Commit 797c1536 authored by Jerome Borsboom's avatar Jerome Borsboom Committed by Paul B Mahol

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: 's avatarJerome Borsboom <jerome.borsboom@carpalis.nl>
parent a1dc0bda
...@@ -944,7 +944,7 @@ static int vc1_decode_intra_block(VC1Context *v, int16_t block[64], int n, ...@@ -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_val = s->ac_val[0][s->block_index[n]];
ac_val2 = ac_val; ac_val2 = ac_val;
scale = mquant * 2 + v->halfpq; scale = mquant * 2 + ((mquant == v->pq) ? v->halfpq : 0);
if (dc_pred_dir) //left if (dc_pred_dir) //left
ac_val -= 16; ac_val -= 16;
......
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