]> git.sesse.net Git - vlc/commitdiff
* src/video_output/video_output.c: 4th (and good) attempt at fixing mask
authorSam Hocevar <sam@videolan.org>
Sun, 23 Apr 2006 13:41:42 +0000 (13:41 +0000)
committerSam Hocevar <sam@videolan.org>
Sun, 23 Apr 2006 13:41:42 +0000 (13:41 +0000)
    shifts.  Thanks to bigben for testing.

src/video_output/video_output.c

index 336b2ec91b16f6192663b4347b8517cd521a6ca2..bfbc67d00366ab5f52f136fc0d6da385eef118f0 100644 (file)
@@ -1207,7 +1207,7 @@ static int BinaryLog( uint32_t i )
  *****************************************************************************/
 static void MaskToShift( int *pi_left, int *pi_right, uint32_t i_mask )
 {
-    uint64_t i_low, i_high;            /* lower hand higher bits of the mask */
+    uint32_t i_low, i_high;            /* lower hand higher bits of the mask */
 
     if( !i_mask )
     {
@@ -1218,7 +1218,7 @@ static void MaskToShift( int *pi_left, int *pi_right, uint32_t i_mask )
     /* Get bits */
     i_low = i_high = i_mask;
 
-    i_low &= - (int64_t)i_low;          /* lower bit of the mask */
+    i_low &= - (int32_t)i_low;          /* lower bit of the mask */
     i_high += i_low;                    /* higher bit of the mask */
 
     /* Transform bits into an index. Also deal with i_high overflow, which