void ff_init_cabac_states(void)
{
int i, j;
+ static int initialized = 0;
+
+ if (initialized)
+ return;
for(i=0; i<64; i++){
for(j=0; j<4; j++){ //FIXME check if this is worth the 1 shift we save
for(i=0; i< 63; i++){
ff_h264_last_coeff_flag_offset_8x8[i] = last_coeff_flag_offset_8x8[i];
}
+
+ initialized = 1;
}
ff_h264_decode_init_vlc();
+ ff_init_cabac_states();
+
h->pixel_shift = 0;
h->sps.bit_depth_luma = avctx->bits_per_raw_sample = 8;
align_get_bits(&h->gb);
/* init cabac */
- ff_init_cabac_states();
ff_init_cabac_decoder(&h->cabac,
h->gb.buffer + get_bits_count(&h->gb) / 8,
(get_bits_left(&h->gb) + 7) / 8);