[FFmpeg-cvslog] r17550 - trunk/libavcodec/golomb.h

mru subversion
Tue Feb 24 02:41:45 CET 2009


Author: mru
Date: Tue Feb 24 02:41:44 2009
New Revision: 17550

Log:
Fix get_ur_golomb_jpegls() with A32_BITSTREAM_READER

If k==0, log==0 can indicate that the coded value uses more than
MIN_CACHE_BITS bits.  With MIN_CACHE_BITS==32, the fast branch is
incorrectly taken in this case unless explicitly forbidden.

Modified:
   trunk/libavcodec/golomb.h

Modified: trunk/libavcodec/golomb.h
==============================================================================
--- trunk/libavcodec/golomb.h	Tue Feb 24 02:12:25 2009	(r17549)
+++ trunk/libavcodec/golomb.h	Tue Feb 24 02:41:44 2009	(r17550)
@@ -273,7 +273,7 @@ static inline int get_ur_golomb_jpegls(G
 
     log= av_log2(buf);
 
-    if(log - k >= 32-MIN_CACHE_BITS && 32-log < limit){
+    if(log - k >= 32-MIN_CACHE_BITS+(MIN_CACHE_BITS==32) && 32-log < limit){
         buf >>= log - k;
         buf += (30-log)<<k;
         LAST_SKIP_BITS(re, gb, 32 + k - log);




More information about the ffmpeg-cvslog mailing list