Mercurial > libavcodec.hg
changeset 3509:da6095607f26 libavcodec
Don't do non-uniform quantization on zero coeffs.
author | kostya |
---|---|
date | Sat, 22 Jul 2006 03:54:00 +0000 |
parents | 3d6e4ef3170d |
children | f8d3be212bce |
files | vc1.c |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/vc1.c Fri Jul 21 04:06:06 2006 +0000 +++ b/vc1.c Sat Jul 22 03:54:00 2006 +0000 @@ -2061,13 +2061,13 @@ 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 @@ 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; } }