[Ffmpeg-cvslog] r5810 - trunk/libavcodec/vc1.c

kostya subversion
Sat Jul 22 05:54:00 CEST 2006


Author: kostya
Date: Sat Jul 22 05:54:00 2006
New Revision: 5810

Modified:
   trunk/libavcodec/vc1.c

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


Modified: trunk/libavcodec/vc1.c
==============================================================================
--- trunk/libavcodec/vc1.c	(original)
+++ trunk/libavcodec/vc1.c	Sat Jul 22 05:54:00 2006
@@ -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;
                 }
             }




More information about the ffmpeg-cvslog mailing list