[vlc-devel] commit: Fixed rgb masks when blending SPU. (Laurent Aimar )

git version control git at videolan.org
Wed Jul 29 22:48:01 CEST 2009


vlc | branch: 1.0-bugfix | Laurent Aimar <fenrir at videolan.org> | Wed Jul 29 22:45:08 2009 +0200| [fc50e065cd5658322a457f277f06b838a53ed1a2] | committer: Laurent Aimar 

Fixed rgb masks when blending SPU.

It is a partial backport of [30086cdcb5559b0d2520dfece8fe7879995af4b4]

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

 src/video_output/vout_subpictures.c |   21 ++++++++++++++++-----
 1 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/src/video_output/vout_subpictures.c b/src/video_output/vout_subpictures.c
index a4fd7a9..df28ad7 100644
--- a/src/video_output/vout_subpictures.c
+++ b/src/video_output/vout_subpictures.c
@@ -180,7 +180,7 @@ static void SubFilterAllocationClean( filter_t * );
 /* */
 static void SpuRenderCreateAndLoadText( spu_t * );
 static void SpuRenderCreateAndLoadScale( spu_t * );
-static void SpuRenderCreateBlend( spu_t *, vlc_fourcc_t i_chroma, int i_aspect );
+static void SpuRenderCreateBlend( spu_t *, const video_format_t * );
 static void FilterRelease( filter_t *p_filter );
 
 /*****************************************************************************
@@ -426,7 +426,7 @@ void spu_RenderSubpictures( spu_t *p_spu,
 
     /* Create the blending module */
     if( !p_sys->p_blend )
-        SpuRenderCreateBlend( p_spu, p_fmt_dst->i_chroma, p_fmt_dst->i_aspect );
+        SpuRenderCreateBlend( p_spu, p_fmt_dst );
 
     /* Process all subpictures and regions (in the right order) */
     for( unsigned int i_index = 0; i_index < i_subpicture; i_index++ )
@@ -899,7 +899,7 @@ static void FilterRelease( filter_t *p_filter )
     vlc_object_release( p_filter );
 }
 
-static void SpuRenderCreateBlend( spu_t *p_spu, vlc_fourcc_t i_chroma, int i_aspect )
+static void SpuRenderCreateBlend( spu_t *p_spu, const video_format_t *p_fmt )
 {
     filter_t *p_blend;
 
@@ -916,8 +916,19 @@ static void SpuRenderCreateBlend( spu_t *p_spu, vlc_fourcc_t i_chroma, int i_asp
     es_format_Init( &p_blend->fmt_out, VIDEO_ES, 0 );
     p_blend->fmt_out.video.i_x_offset = 0;
     p_blend->fmt_out.video.i_y_offset = 0;
-    p_blend->fmt_out.video.i_chroma = i_chroma;
-    p_blend->fmt_out.video.i_aspect = i_aspect;
+    p_blend->fmt_out.video.i_chroma = p_fmt->i_chroma;
+    p_blend->fmt_out.video.i_aspect = p_fmt->i_aspect;
+    p_blend->fmt_out.video.i_chroma = p_fmt->i_chroma;
+    p_blend->fmt_out.video.i_rmask  = p_fmt->i_rmask;
+    p_blend->fmt_out.video.i_gmask  = p_fmt->i_gmask;
+    p_blend->fmt_out.video.i_bmask  = p_fmt->i_bmask;
+    p_blend->fmt_out.video.i_rrshift= p_fmt->i_rrshift;
+    p_blend->fmt_out.video.i_rgshift= p_fmt->i_rgshift;
+    p_blend->fmt_out.video.i_rbshift= p_fmt->i_rbshift;
+    p_blend->fmt_out.video.i_lrshift= p_fmt->i_lrshift;
+    p_blend->fmt_out.video.i_lgshift= p_fmt->i_lgshift;
+    p_blend->fmt_out.video.i_lbshift= p_fmt->i_lbshift;
+
 
     /* The blend module will be loaded when needed with the real
     * input format */




More information about the vlc-devel mailing list