avcodec/vc1: correct AC inverse quantization scaling

HALFQP should only be added to the inverse quantizer when the block is
coded with PQUANT. See 8.1.3.8 in VC-1 spec.

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
This commit is contained in:
Jerome Borsboom 2018-04-23 21:00:15 +02:00 committed by Paul B Mahol
parent a1dc0bdaf4
commit 797c1536a4

View File

@ -944,7 +944,7 @@ static int vc1_decode_intra_block(VC1Context *v, int16_t block[64], int n,
ac_val = s->ac_val[0][s->block_index[n]];
ac_val2 = ac_val;
scale = mquant * 2 + v->halfpq;
scale = mquant * 2 + ((mquant == v->pq) ? v->halfpq : 0);
if (dc_pred_dir) //left
ac_val -= 16;