[FFmpeg-soc] [soc]: r597 - in rv40: rv40.c rv40vlc2.h
kostya
subversion at mplayerhq.hu
Fri Aug 3 18:11:27 CEST 2007
Author: kostya
Date: Fri Aug 3 18:11:27 2007
New Revision: 597
Log:
Fix reading of variable-length variable-length code
Modified:
rv40/rv40.c
rv40/rv40vlc2.h
Modified: rv40/rv40.c
==============================================================================
--- rv40/rv40.c (original)
+++ rv40/rv40.c Fri Aug 3 18:11:27 2007
@@ -623,16 +623,16 @@ static inline int rv40_decode_dquant(Get
*/
static inline int get_omega(GetBitContext *gb)
{
- int bits = 0, code = 0, t, tb;
+ int bits = 0, code = 1, t, tb;
for(;;){
t = get_vlc2(gb, mbinfo_vlc.table, MBINFO_BITS, 1);
- tb = t >> 4;
+ tb = t >> 5;
code = (code << tb) | (t & 0xF);
bits += tb;
- if(bits & 1) break;
+ if(t & 0x10) break;
}
- return (code >> 1) | (1 << (bits - 1));
+ return code;
}
/**
Modified: rv40/rv40vlc2.h
==============================================================================
--- rv40/rv40vlc2.h (original)
+++ rv40/rv40vlc2.h Fri Aug 3 18:11:27 2007
@@ -652,10 +652,10 @@ static const uint8_t mbinfo_vlc_bits[NUM
};
static const uint8_t mbinfo_vlc_syms[NUM_MBINFO] = {
- 0x40, 0x41, 0x30, 0x42, 0x43, 0x31, 0x20,
- 0x44, 0x45, 0x32, 0x46, 0x47, 0x33, 0x21, 0x10,
- 0x48, 0x49, 0x34, 0x4A, 0x4B, 0x35, 0x22,
- 0x4C, 0x4D, 0x36, 0x4E, 0x4F, 0x37, 0x23, 0x11, 0x00
+ 0x80, 0x81, 0x70, 0x82, 0x83, 0x71, 0x50,
+ 0x84, 0x85, 0x72, 0x86, 0x87, 0x73, 0x51, 0x30,
+ 0x88, 0x89, 0x74, 0x8A, 0x8B, 0x75, 0x52,
+ 0x8C, 0x8D, 0x76, 0x8E, 0x8F, 0x77, 0x53, 0x31, 0x10
};
//@}
More information about the FFmpeg-soc
mailing list