[FFmpeg-soc] [soc]: r1335 - dirac/libavcodec/dirac.c

marco subversion at mplayerhq.hu
Mon Sep 10 18:14:17 CEST 2007


Author: marco
Date: Mon Sep 10 18:14:17 2007
New Revision: 1335

Log:
fix the code to check for a zero codeblock

Modified:
   dirac/libavcodec/dirac.c

Modified: dirac/libavcodec/dirac.c
==============================================================================
--- dirac/libavcodec/dirac.c	(original)
+++ dirac/libavcodec/dirac.c	Mon Sep 10 18:14:17 2007
@@ -3155,7 +3155,11 @@ static void encode_codeblock(DiracContex
         int zero = 0;
         for (y = top; y < bottom; y++) {
             for (x = left; x < right; x++) {
-                if (coeffs[x + y * s->padded_width] != 0) {
+                int xpos, ypos;
+                xpos   = coeff_posx(s, level, orientation, x);
+                ypos   = coeff_posy(s, level, orientation, y);
+
+                if (coeffs[xpos + ypos * s->padded_width] != 0) {
                     zero = 0;
                     break;
                 }



More information about the FFmpeg-soc mailing list