Correct the threshold of get_ur_golomb_jpegls() at which the optimized
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 15 Sep 2008 20:30:22 +0000 (20:30 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 15 Sep 2008 20:30:22 +0000 (20:30 +0000)
case is used.
Fix issue245.

Originally committed as revision 15334 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/golomb.h

index a1d904c..f2fb892 100644 (file)
@@ -255,7 +255,7 @@ static inline int get_ur_golomb_jpegls(GetBitContext *gb, int k, int limit, int
 
     log= av_log2(buf);
 
-    if(log > 31-11){
+    if(log - k >= 32-MIN_CACHE_BITS){
         buf >>= log - k;
         buf += (30-log)<<k;
         LAST_SKIP_BITS(re, gb, 32 + k - log);