changeset 2087:a4d3699c6636 libavcodec

1000l to the ffsvq3 author, our default bitstream reader is only guranteed to be able to read 25bit at a time
author michael
date Sat, 19 Jun 2004 01:14:13 +0000
parents 13811ac6ddc7
children 19d4d5c6a8f4
files golomb.h
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/golomb.h	Sat Jun 19 00:10:21 2004 +0000
+++ b/golomb.h	Sat Jun 19 01:14:13 2004 +0000
@@ -80,7 +80,10 @@
         
         return ff_interleaved_ue_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;
 
@@ -88,7 +91,7 @@
             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 ((buf << log) >> log) - 1;