[vlc-devel] commit: Use gray for the place holder color on packed formats (else you' d end up (Antoine Cellerier )

git version control git at videolan.org
Wed Jun 4 16:49:36 CEST 2008


vlc | branch: master | Antoine Cellerier <dionoea at videolan.org> | Wed Jun  4 16:51:20 2008 +0200| [497087466251d63b5245082c5200f5df21a5af4f]

Use gray for the place holder color on packed formats (else you'd end up
with an ugly green in packed YUV).

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=497087466251d63b5245082c5200f5df21a5af4f
---

 modules/video_filter/ripple.c |    3 ++-
 modules/video_filter/wall.c   |    8 ++++----
 modules/video_filter/wave.c   |    5 +++--
 3 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/modules/video_filter/ripple.c b/modules/video_filter/ripple.c
index e388056..6963ba3 100644
--- a/modules/video_filter/ripple.c
+++ b/modules/video_filter/ripple.c
@@ -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;
diff --git a/modules/video_filter/wall.c b/modules/video_filter/wall.c
index 96c82f4..2a2b53d 100644
--- a/modules/video_filter/wall.c
+++ b/modules/video_filter/wall.c
@@ -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 )
             {
diff --git a/modules/video_filter/wave.c b/modules/video_filter/wave.c
index 64f3b15..5abf08d 100644
--- a/modules/video_filter/wave.c
+++ b/modules/video_filter/wave.c
@@ -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 at 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++ )




More information about the vlc-devel mailing list