diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-03-11 12:16:27 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-03-11 12:16:27 +0100 |
commit | 7f8804296da9f0511873c3c75a86ddf195cb0214 (patch) | |
tree | 30ec808c75063db1e8254ca9665aba58a53b9f8b | |
parent | f67e75b5dc048adcde38567f4b6cfeaaf0676bbd (diff) | |
parent | 6d7ab09788bdafffb3f3fc4f7feb262eb8cdf0b1 (diff) | |
download | ffmpeg-7f8804296da9f0511873c3c75a86ddf195cb0214.tar.gz |
Merge commit '6d7ab09788bdafffb3f3fc4f7feb262eb8cdf0b1' into release/2.2
* commit '6d7ab09788bdafffb3f3fc4f7feb262eb8cdf0b1':
golomb: Add a get_se_golomb_long
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-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; |