Ticket #113: ffmpeg-cabacres-types.diff
| File ffmpeg-cabacres-types.diff, 1.4 kB (added by astrange, 2 years ago) |
|---|
-
h264.c
old new 6040 6040 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8 6041 6041 }; 6042 6042 6043 static int decode_cabac_residual( H264Context *h, DCTELEM *block, int cat, int n, const uint8_t *scantable, const uint32_t *qmul, intmax_coeff) {6043 static int decode_cabac_residual( H264Context *h, DCTELEM *block, unsigned char cat, int n, const uint8_t *scantable, const uint32_t *qmul, unsigned char max_coeff) { 6044 6044 const int mb_xy = h->s.mb_x + h->s.mb_y*h->s.mb_stride; 6045 6045 static const uint16_t significant_coeff_flag_offset[2][6] = { 6046 6046 { 105+0, 105+15, 105+29, 105+44, 105+47, 402 }, … … 6064 6064 9,10,10, 8,13,13, 9, 9,10,10,14,14,14,14,14 } 6065 6065 }; 6066 6066 6067 int index[64];6067 uint8_t index[64]; 6068 6068 6069 int last;6069 uint8_t last; 6070 6070 int coeff_count = 0; 6071 6071 6072 intabslevel1 = 1;6073 intabslevelgt1 = 0;6072 unsigned abslevel1 = 1; 6073 unsigned abslevelgt1 = 0; 6074 6074 6075 6075 uint8_t *significant_coeff_ctx_base; 6076 6076 uint8_t *last_coeff_ctx_base; … … 6169 6169 } 6170 6170 6171 6171 while ( coeff_count-- ) { 6172 uint8_t j= scantable[index[coeff_count]]; 6172 6173 uint8_t *ctx = (abslevelgt1 != 0 ? 0 : FFMIN( 4, abslevel1 )) + abs_level_m1_ctx_base; 6173 int j= scantable[index[coeff_count]];6174 6174 6175 6175 if( get_cabac( CC, ctx ) == 0 ) { 6176 6176 int sign = get_cabac_bypass_sign( CC, qmul ? -qmul[j] : -1 );
