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

marco subversion at mplayerhq.hu
Sat Aug 11 19:10:59 CEST 2007


Author: marco
Date: Sat Aug 11 19:10:58 2007
New Revision: 682

Log:
don't use multiplication for checking if the blockcount is one

Modified:
   dirac/libavcodec/dirac.c

Modified: dirac/libavcodec/dirac.c
==============================================================================
--- dirac/libavcodec/dirac.c	(original)
+++ dirac/libavcodec/dirac.c	Sat Aug 11 19:10:58 2007
@@ -954,7 +954,7 @@ static void codeblock(AVCodecContext *av
                       subband_t orientation, int x, int y,
                       int qoffset, int qfactor) {
     DiracContext *s = avctx->priv_data;
-    int blockcnt = s->codeblocksh[level] * s->codeblocksv[level];
+    int blockcnt_one = (s->codeblocksh[level] + s->codeblocksv[level]) == 2;
     int zero = 0;
     int left, right, top, bottom;
     int v, h;
@@ -964,7 +964,7 @@ static void codeblock(AVCodecContext *av
     top    = (subband_height(avctx, level) *  y     ) / s->codeblocksv[level];
     bottom = (subband_height(avctx, level) * (y + 1)) / s->codeblocksv[level];
 
-    if (blockcnt != 1) {
+    if (!blockcnt_one) {
         /* Determine if this codeblock is a zero block.  */
         zero = dirac_arith_get_bit(&s->arith, ARITH_CONTEXT_ZERO_BLOCK);
     }



More information about the FFmpeg-soc mailing list