PIX_FMT_XVMC_MPEG2_MC,
-1};
#ifdef CONFIG_ENCODERS
-static uint8_t (*mv_penalty)[MAX_MV*2+1]= NULL;
+static uint8_t mv_penalty[MAX_FCODE+1][MAX_MV*2+1];
static uint8_t fcode_tab[MAX_MV*2+1];
static uint8_t uni_mpeg1_ac_vlc_len [64*64*2];
static int8_t mpeg1_max_level[2][64];
#endif //CONFIG_ENCODERS
+static uint8_t static_rl_table_store[2][2][2*MAX_RUN + MAX_LEVEL + 3];
+
static void init_2d_vlc_rl(RLTable *rl, int use_static)
{
int i;
int i;
done=1;
- init_rl(&rl_mpeg1, 1);
- if(s->intra_vlc_format)
- init_rl(&rl_mpeg2, 1);
+ init_rl(&rl_mpeg1, static_rl_table_store[0]);
+ init_rl(&rl_mpeg2, static_rl_table_store[1]);
for(i=0; i<64; i++)
{
mpeg1_chr_dc_uni[i+255]= bits + (code<<8);
}
- mv_penalty= av_mallocz( sizeof(uint8_t)*(MAX_FCODE+1)*(2*MAX_MV+1) );
-
for(f_code=1; f_code<=MAX_FCODE; f_code++){
for(mv=-MAX_MV; mv<=MAX_MV; mv++){
int len;
init_vlc(&mb_btype_vlc, MB_BTYPE_VLC_BITS, 11,
&table_mb_btype[0][1], 2, 1,
&table_mb_btype[0][0], 2, 1, 1);
- init_rl(&rl_mpeg1, 1);
- init_rl(&rl_mpeg2, 1);
+ init_rl(&rl_mpeg1, static_rl_table_store[0]);
+ init_rl(&rl_mpeg2, static_rl_table_store[1]);
init_2d_vlc_rl(&rl_mpeg1, 1);
init_2d_vlc_rl(&rl_mpeg2, 1);
}else{
assert(mb_type & MB_TYPE_L0L1);
//FIXME decide if MBs in field pictures are MB_TYPE_INTERLACED
- /* get additionnal motion vector type */
+ /* get additional motion vector type */
if (s->frame_pred_frame_dct)
motion_type = MT_FRAME;
else{