Commit e2171410 authored by kostya's avatar kostya

Don't do non-uniform quantization on zero coeffs.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@5810 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent ecfb4e70
......@@ -2061,13 +2061,13 @@ not_coded:
if(dc_pred_dir) { //left
for(k = 1; k < 8; k++) {
block[k << 3] = ac_val[k] * scale;
if(!v->pquantizer)
if(!v->pquantizer && block[k << 3])
block[k << 3] += (block[k << 3] < 0) ? -v->pq : v->pq;
}
} else { //top
for(k = 1; k < 8; k++) {
block[k] = ac_val[k + 8] * scale;
if(!v->pquantizer)
if(!v->pquantizer && block[k])
block[k] += (block[k] < 0) ? -v->pq : v->pq;
}
}
......@@ -2260,13 +2260,13 @@ static int vc1_decode_intra_block(VC1Context *v, DCTELEM block[64], int n, int c
if(dc_pred_dir) { //left
for(k = 1; k < 8; k++) {
block[k << 3] = ac_val2[k] * scale;
if(!v->pquantizer)
if(!v->pquantizer && block[k << 3])
block[k << 3] += (block[k << 3] < 0) ? -mquant : mquant;
}
} else { //top
for(k = 1; k < 8; k++) {
block[k] = ac_val2[k + 8] * scale;
if(!v->pquantizer)
if(!v->pquantizer && block[k])
block[k] += (block[k] < 0) ? -mquant : mquant;
}
}
......
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