[FFmpeg-soc] [soc]: r1373 - in rv40: rv40.c rv40vlc.h rv40vlc2.h
kostya
subversion at mplayerhq.hu
Wed Sep 19 07:24:27 CEST 2007
Author: kostya
Date: Wed Sep 19 07:24:26 2007
New Revision: 1373
Log:
Move omega part code to rv40vlc.h and rename it in process
Modified:
rv40/rv40.c
rv40/rv40vlc.h
rv40/rv40vlc2.h
Modified: rv40/rv40.c
==============================================================================
--- rv40/rv40.c (original)
+++ rv40/rv40.c Wed Sep 19 07:24:26 2007
@@ -136,9 +136,10 @@ typedef struct RV34DecContext{
}RV34DecContext;
static RV34VLC intra_vlcs[NUM_INTRA_TABLES], inter_vlcs[NUM_INTER_TABLES];
+static VLC omega_part_vlc;
static VLC aic_top_vlc;
static VLC aic_mode1_vlc[AIC_MODE1_NUM], aic_mode2_vlc[AIC_MODE2_NUM];
-static VLC mbinfo_vlc, ptype_vlc[NUM_PTYPE_VLCS], btype_vlc[NUM_BTYPE_VLCS];
+static VLC ptype_vlc[NUM_PTYPE_VLCS], btype_vlc[NUM_BTYPE_VLCS];
/**
* @defgroup vlc RV40 VLC generating functions
@@ -234,10 +235,10 @@ static void rv34_init_tables()
aic_mode2_vlc_bits[i], 1, 1,
aic_mode2_vlc_codes[i], 2, 2, INIT_VLC_USE_STATIC);
}
- init_vlc_sparse(&mbinfo_vlc, MBINFO_BITS, NUM_MBINFO,
- mbinfo_vlc_bits, 1, 1,
- mbinfo_vlc_codes, 1, 1,
- mbinfo_vlc_syms, 1, 1, INIT_VLC_USE_STATIC);
+ init_vlc_sparse(&omega_part_vlc, OMEGA_BITS, NUM_OMEGA,
+ omega_part_vlc_bits, 1, 1,
+ omega_part_vlc_codes, 1, 1,
+ omega_part_vlc_syms, 1, 1, INIT_VLC_USE_STATIC);
for(i = 0; i < NUM_PTYPE_VLCS; i++)
init_vlc_sparse(&ptype_vlc[i], PTYPE_VLC_BITS, PTYPE_VLC_SIZE,
ptype_vlc_bits[i], 1, 1,
@@ -614,7 +615,7 @@ static inline int get_omega(GetBitContex
int code = 1, t, tb;
for(;;){
- t = get_vlc2(gb, mbinfo_vlc.table, MBINFO_BITS, 1);
+ t = get_vlc2(gb, omega_part_vlc.table, OMEGA_BITS, 1);
tb = t >> 5;
code = (code << tb) | (t & 0xF);
if(t & 0x10) break;
Modified: rv40/rv40vlc.h
==============================================================================
--- rv40/rv40vlc.h (original)
+++ rv40/rv40vlc.h Wed Sep 19 07:24:26 2007
@@ -4119,4 +4119,31 @@ static const uint8_t* rv34_inter_coeffvl
rv34_table_1_4_6, rv34_table_1_5_6, rv34_table_1_6_6,
};
+/** Tables used in variable code parts decoding */
+//@{
+#define NUM_OMEGA 31
+#define OMEGA_BITS 8
+
+static const uint8_t omega_part_vlc_codes[NUM_OMEGA] = {
+ 0x00, 0x01, 0x01, 0x04, 0x05, 0x03, 0x01,
+ 0x10, 0x11, 0x09, 0x14, 0x15, 0x0B, 0x03, 0x01,
+ 0x40, 0x41, 0x21, 0x44, 0x45, 0x23, 0x09,
+ 0x50, 0x51, 0x29, 0x54, 0x55, 0x2B, 0x0B, 0x03, 0x01
+};
+
+static const uint8_t omega_part_vlc_bits[NUM_OMEGA] = {
+ 8, 8, 7, 8, 8, 7, 5,
+ 8, 8, 7, 8, 8, 7, 5, 3,
+ 8, 8, 7, 8, 8, 7, 5,
+ 8, 8, 7, 8, 8, 7, 5, 3, 1
+};
+
+static const uint8_t omega_part_vlc_syms[NUM_OMEGA] = {
+ 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
+};
+//@}
+
#endif /* RV40VLC_H */
Modified: rv40/rv40vlc2.h
==============================================================================
--- rv40/rv40vlc2.h (original)
+++ rv40/rv40vlc2.h Wed Sep 19 07:24:26 2007
@@ -632,33 +632,6 @@ static const uint8_t aic_mode1_vlc_bits[
//@}
-/** Tables used in macroblock information decoding */
-//@{
-#define NUM_MBINFO 31
-#define MBINFO_BITS 8
-
-static const uint8_t mbinfo_vlc_codes[NUM_MBINFO] = {
- 0x00, 0x01, 0x01, 0x04, 0x05, 0x03, 0x01,
- 0x10, 0x11, 0x09, 0x14, 0x15, 0x0B, 0x03, 0x01,
- 0x40, 0x41, 0x21, 0x44, 0x45, 0x23, 0x09,
- 0x50, 0x51, 0x29, 0x54, 0x55, 0x2B, 0x0B, 0x03, 0x01
-};
-
-static const uint8_t mbinfo_vlc_bits[NUM_MBINFO] = {
- 8, 8, 7, 8, 8, 7, 5,
- 8, 8, 7, 8, 8, 7, 5, 3,
- 8, 8, 7, 8, 8, 7, 5,
- 8, 8, 7, 8, 8, 7, 5, 3, 1
-};
-
-static const uint8_t mbinfo_vlc_syms[NUM_MBINFO] = {
- 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
-};
-//@}
-
#define PBTYPE_ESCAPE 0xFF
/** Tables used for P-frame macroblock type decoding */
More information about the FFmpeg-soc
mailing list