diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-03-10 22:32:35 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-03-10 22:33:32 +0100 |
commit | d79d5aed6d43893ae5d7c088c3ce3aea6e7c4079 (patch) | |
tree | add36dc0754753388e1c0fb90dc9126cc2214182 /libavcodec/golomb.h | |
parent | 27b4d154cad0387277d8640ba804a4ac1c83cf14 (diff) | |
parent | 5eacbb53289570834f9a1acb15fd406ea224eef6 (diff) | |
download | ffmpeg-d79d5aed6d43893ae5d7c088c3ce3aea6e7c4079.tar.gz |
Merge commit '5eacbb53289570834f9a1acb15fd406ea224eef6'
* commit '5eacbb53289570834f9a1acb15fd406ea224eef6':
golomb: Add a get_se_golomb_long
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/golomb.h')
-rw-r--r-- | libavcodec/golomb.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libavcodec/golomb.h b/libavcodec/golomb.h index 43875dc85c..22c2d64030 100644 --- a/libavcodec/golomb.h +++ b/libavcodec/golomb.h @@ -214,6 +214,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; |