[MPlayer-cvslog] r33206 - trunk/gui/util/bitmap.c

ib subversion at mplayerhq.hu
Mon Apr 4 16:06:09 CEST 2011


Author: ib
Date: Mon Apr  4 16:06:08 2011
New Revision: 33206

Log:
Move common pixel shifting statement

Since both branches of the condition perform it, do it right before.
Besides, use more compact notation.

Modified:
   trunk/gui/util/bitmap.c

Modified: trunk/gui/util/bitmap.c
==============================================================================
--- trunk/gui/util/bitmap.c	Mon Apr  4 15:49:57 2011	(r33205)
+++ trunk/gui/util/bitmap.c	Mon Apr  4 16:06:08 2011	(r33206)
@@ -237,10 +237,11 @@ int Convert32to1(txSample *in, txSample 
         buf = (uint32_t *)in->Image;
 
         for (i = 0; i < out->Width * out->Height; i++) {
+            tmp >>= 1;
+
             if (buf[i] != transparent)
-                tmp = (tmp >> 1) | 0x80;
+                tmp |= 0x80;
             else {
-                tmp    = tmp >> 1;
                 buf[i] = 0;
                 shaped = 1;
             }


More information about the MPlayer-cvslog mailing list