]> git.sesse.net Git - vlc/commitdiff
Use gray for the place holder color on packed formats (else you'd end up
authorAntoine Cellerier <dionoea@videolan.org>
Wed, 4 Jun 2008 14:51:20 +0000 (16:51 +0200)
committerAntoine Cellerier <dionoea@videolan.org>
Wed, 4 Jun 2008 14:51:20 +0000 (16:51 +0200)
with an ugly green in packed YUV).

modules/video_filter/ripple.c
modules/video_filter/wall.c
modules/video_filter/wave.c

index e3880561d88ccb5a17043d96ff065162c9ab3955..6963ba3da9faceb3d332107837f1da6a4a26ac5a 100644 (file)
@@ -143,7 +143,8 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
         uint8_t black_pixel;
         uint8_t *p_in, *p_out;
 
-        black_pixel = ( i_index == Y_PLANE ) ? 0x00 : 0x80;
+        black_pixel = ( p_pic->i_planes > 1 && i_index == Y_PLANE ) ? 0x00
+                                                                    : 0x80;
 
         i_num_lines = p_pic->p[i_index].i_visible_lines;
         i_pixel_pitch = p_pic->p[i_index].i_pixel_pitch;
index 96c82f40bb76faa140dc90c12de70eb7ff42025b..2a2b53d2035858be5a9a5ffdcad88c5854ff0c3d 100644 (file)
@@ -299,12 +299,12 @@ static int Init( vout_thread_t *p_vout )
     w1 &= ~1;
     h1 = w1 * VOUT_ASPECT_FACTOR / i_aspect&~1;
     h1 &= ~1;
+
     h2 = p_vout->output.i_height / p_vout->p_sys->i_row&~1;
     h2 &= ~1;
     w2 = h2 * i_aspect / VOUT_ASPECT_FACTOR&~1;
     w2 &= ~1;
+
     if ( h1 * p_vout->p_sys->i_row < p_vout->output.i_height )
     {
         unsigned int i_tmp;
@@ -340,7 +340,7 @@ static int Init( vout_thread_t *p_vout )
 
     p_vout->p_sys->i_vout = 0;
     msg_Dbg( p_vout, "target window (%d,%d)-(%d,%d)", i_hstart,i_vstart,i_hend,i_vend );
+
 
     i_top = 0;
     i_height = 0;
@@ -375,7 +375,7 @@ static int Init( vout_thread_t *p_vout )
                     i_align |= VOUT_ALIGN_RIGHT;
                 }
             }
+
             if( i_row * i_target_height >= i_vstart &&
                 ( i_row + 1 ) * i_target_height <= i_vend )
             {
index 64f3b1581181582a55c0b5fee8731a9447ad4be7..5abf08d2f8cb3588fb95d7ce51f53f9696789573 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * wave.c : Wave video effect plugin for vlc
  *****************************************************************************
- * Copyright (C) 2000-2006 the VideoLAN team
+ * Copyright (C) 2000-2008 the VideoLAN team
  * $Id$
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
@@ -152,7 +152,8 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
         i_pixel_pitch = p_pic->p[i_index].i_pixel_pitch;
         i_visible_pixels = i_visible_pitch/i_pixel_pitch;
 
-        black_pixel = ( i_index == Y_PLANE ) ? 0x00 : 0x80;
+        black_pixel = ( p_pic->i_planes > 1 && i_index == Y_PLANE ) ? 0x00
+                                                                    : 0x80;
 
         /* Ok, we do 3 times the sin() calculation for each line. So what ? */
         for( i_line = 0 ; i_line < i_num_lines ; i_line++ )