5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8
};
-/**
- *
- * @param buf_size size of buf in bits
- */
-void ff_init_cabac_encoder(CABACContext *c, uint8_t *buf, int buf_size){
- init_put_bits(&c->pb, buf, buf_size);
-
- c->low= 0;
- c->range= 0x1FE;
- c->outstanding_count= 0;
- c->pb.bit_left++; //avoids firstBitFlag
-}
-
/**
*
* @param buf_size size of buf in bits
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;
}