[SCM] libav/experimental: svq3_get_se_golomb() fix
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 15:42:45 UTC 2013
The following commit has been merged in the experimental branch:
commit 895345da9a45175c4cd6a72d6137218074423df8
Author: Michael Niedermayer <michaelni at gmx.at>
Date: Wed Jan 19 13:03:38 2005 +0000
svq3_get_se_golomb() fix
Originally committed as revision 3849 to svn://svn.ffmpeg.org/ffmpeg/trunk
diff --git a/libavcodec/golomb.h b/libavcodec/golomb.h
index fdf97bc..9f89502 100644
--- a/libavcodec/golomb.h
+++ b/libavcodec/golomb.h
@@ -167,7 +167,10 @@ static inline int svq3_get_se_golomb(GetBitContext *gb){
return ff_interleaved_se_golomb_vlc_code[buf];
}else{
- buf |=1;
+ LAST_SKIP_BITS(re, gb, 8);
+ UPDATE_CACHE(re, gb);
+ buf |= 1 | (GET_CACHE(re, gb) >> 8);
+
if((buf & 0xAAAAAAAA) == 0)
return INVALID_VLC;
@@ -175,7 +178,7 @@ static inline int svq3_get_se_golomb(GetBitContext *gb){
buf = (buf << 2) - ((buf << log) >> (log - 1)) + (buf >> 30);
}
- LAST_SKIP_BITS(re, gb, 63 - 2*log);
+ LAST_SKIP_BITS(re, gb, 63 - 2*log - 8);
CLOSE_READER(re, gb);
return (signed) (((((buf << log) >> log) - 1) ^ -(buf & 0x1)) + 1) >> 1;
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list