changeset 9020:97b991a32b85 libavcodec

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.
author mru
date Tue, 24 Feb 2009 01:41:44 +0000
parents 895f99d00718
children ccde7fbba09e
files golomb.h
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/golomb.h	Tue Feb 24 01:12:25 2009 +0000
+++ b/golomb.h	Tue Feb 24 01:41:44 2009 +0000
@@ -273,7 +273,7 @@
 
     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);