]> git.sesse.net Git - vlc/blobdiff - modules/video_filter/blend.c
Fix compilation. We can't use config_* in mozilla so use the -DDATAPATH
[vlc] / modules / video_filter / blend.c
index cf36ef3037ae2fdb523a128a6d1d964cc501db50..5316fc795eb2142901d781fdf9ae3b581ac329e2 100644 (file)
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
 #include <vlc/vlc.h>
 #include <vlc_vout.h>
 #include "vlc_filter.h"
@@ -141,7 +145,6 @@ static int OpenFilter( vlc_object_t *p_this )
              (char *)&p_filter->fmt_in.video.i_chroma,
              (char *)&p_filter->fmt_out.video.i_chroma );
 
-
     return VLC_SUCCESS;
 }
 
@@ -178,7 +181,7 @@ static void Blend( filter_t *p_filter, picture_t *p_dst,
     if( i_width <= 0 || i_height <= 0 ) return;
 
 #if 0
-    printf( "chroma: %4.4s -> %4.4s\n",
+    msg_Dbg( p_filter, "chroma: %4.4s -> %4.4s\n",
              (char *)&p_filter->fmt_in.video.i_chroma,
              (char *)&p_filter->fmt_out.video.i_chroma );
 #endif
@@ -591,11 +594,12 @@ static void BlendR24( filter_t *p_filter, picture_t *p_dst_pic,
 #define TRANS_BITS  8
 
     if( (i_pix_pitch == 4)
-     && (((((int)p_dst)|((int)p_src1)|i_dst_pitch|i_src1_pitch) & 3) == 0) )
+     && (((((intptr_t)p_dst)|((intptr_t)p_src1)|i_dst_pitch|i_src1_pitch)
+          & 3) == 0) )
     {
         /*
-        ** if picture pixels are 32 bits long and lines addresses are 32 bit aligned,
-        ** optimize rendering
+        ** if picture pixels are 32 bits long and lines addresses are 32 bit
+        ** aligned, optimize rendering
         */
         uint32_t *p32_dst = (uint32_t *)p_dst;
         uint32_t i32_dst_pitch = (uint32_t)(i_dst_pitch>>2);
@@ -743,7 +747,7 @@ static void BlendR24( filter_t *p_filter, picture_t *p_dst_pic,
                     /* Completely transparent. Don't change pixel */
                     continue;
                 }
-                else 
+                else
                 {
                     int i_pos = i_x * i_pix_pitch;
                     if( i_trans == MAX_TRANS )
@@ -1472,7 +1476,7 @@ static void BlendPalI420( filter_t *p_filter, picture_t *p_dst,
                 /* Completely opaque. Completely overwrite underlying pixel */
                 p_dst_y[i_x] = p_pal[p_src2[i_x]][0];
 
-                if( b_even_scanline && i_x % 2 == 0 )
+                if( b_even_scanline && ((i_x % 2) == 0) )
                 {
                     p_dst_u[i_x/2] = p_pal[p_src2[i_x]][1];
                     p_dst_v[i_x/2] = p_pal[p_src2[i_x]][2];
@@ -1485,7 +1489,7 @@ static void BlendPalI420( filter_t *p_filter, picture_t *p_dst,
                 (uint16_t)p_src1_y[i_x] * (MAX_TRANS - i_trans) )
                 >> TRANS_BITS;
 
-            if( b_even_scanline && i_x % 2 == 0 )
+            if( b_even_scanline && ((i_x % 2) == 0) )
             {
                 p_dst_u[i_x/2] = ( (uint16_t)p_pal[p_src2[i_x]][1] * i_trans +
                     (uint16_t)p_src1_u[i_x/2] * (MAX_TRANS - i_trans) )