Commit ff7639b0 authored by Fiona Glaser's avatar Fiona Glaser

Fix regression in r922

set the chroma DC coefficients to zero for residual coding in qpel-rd
fix C99ism
parent 543601b8
......@@ -730,10 +730,12 @@ static void block_residual_write_cabac( x264_t *h, x264_cabac_t *cb, int i_ctxBl
do
{
int i_prefix, ctx;
i_coeff--;
/* write coeff_abs - 1 */
int i_prefix = X264_MIN( i_coeff_abs_m1[i_coeff], 14 );
int ctx = coeff_abs_level1_ctx[node_ctx] + i_ctx_level;
i_prefix = X264_MIN( i_coeff_abs_m1[i_coeff], 14 );
ctx = coeff_abs_level1_ctx[node_ctx] + i_ctx_level;
if( i_prefix )
{
......
......@@ -809,6 +809,7 @@ void x264_macroblock_encode_p8x8( x264_t *h, int i8 )
h->dctf.sub4x4_dct( dct4x4, p_fenc, p_fdec );
h->quantf.quant_4x4( dct4x4, h->quant4_mf[CQM_4PC][i_qp], h->quant4_bias[CQM_4PC][i_qp] );
h->zigzagf.scan_4x4( h->dct.luma4x4[16+i8+ch*4], dct4x4 );
h->dct.luma4x4[16+i8+ch*4][0] = 0;
if( array_non_zero( dct4x4 ) )
{
h->quantf.dequant_4x4( dct4x4, h->dequant4_mf[CQM_4PC], i_qp );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment