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0,0,0,0,0,0,0,0,0,0,0,0,0, |
|
|
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, |
|
|
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, |
|
|
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, |
|
|
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, |
|
|
|
|
}; |
|
|
|
|
uint8_t ff_h264_cabac_tables[512 + 4*2*64 + 4*64 + 63]; |
|
|
|
|
|
|
|
|
|
static const uint8_t lps_range[64][4]= { |
|
|
|
|
{128,176,208,240}, {128,167,197,227}, {128,158,187,216}, {123,150,178,205}, |
|
|
|
@ -143,6 +122,9 @@ void ff_init_cabac_states(void) |
|
|
|
|
if (initialized) |
|
|
|
|
return; |
|
|
|
|
|
|
|
|
|
for (i = 0; i < 512; i++) |
|
|
|
|
ff_h264_norm_shift[i] = i ? 8 - av_log2(i) : 9; |
|
|
|
|
|
|
|
|
|
for(i=0; i<64; i++){ |
|
|
|
|
for(j=0; j<4; j++){ //FIXME check if this is worth the 1 shift we save
|
|
|
|
|
ff_h264_lps_range[j*2*64+2*i+0]= |
|
|
|
|