1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

golomb: Add a get_se_golomb_long

Useful in libavformat mostly.
This commit is contained in:
Luca Barbato 2014-03-10 10:57:51 +01:00
parent e854b8f9f4
commit 5eacbb5328

View File

@ -206,6 +206,18 @@ static inline int get_se_golomb(GetBitContext *gb)
}
}
static inline int get_se_golomb_long(GetBitContext *gb)
{
unsigned int buf = get_ue_golomb_long(gb);
if (buf & 1)
buf = -(buf >> 1);
else
buf = (buf >> 1);
return buf;
}
static inline int svq3_get_se_golomb(GetBitContext *gb)
{
unsigned int buf;