golomb: Add a get_se_golomb_long
Useful in libavformat mostly. (cherry picked from commit 5eacbb53289570834f9a1acb15fd406ea224eef6)
This commit is contained in:
parent
227cfc1f10
commit
6d7ab09788
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user