[vlc-devel] commit: (zvbi) forward port telx transparency from 1.0.0-git ( Jean-Paul Saman )

git version control git at videolan.org
Sat Oct 4 14:39:42 CEST 2008


vlc | branch: 0.9-bugfix | Jean-Paul Saman <jpsaman at videolan.org> | Fri Oct  3 15:40:24 2008 +0200| [b72db57c628c3de02c2ef3876f07f929ee81abfe] | committer: Jean-Paul Saman 

(zvbi) forward port telx transparency from 1.0.0-git

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

 modules/codec/zvbi.c |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/modules/codec/zvbi.c b/modules/codec/zvbi.c
index 468072c..3025d20 100644
--- a/modules/codec/zvbi.c
+++ b/modules/codec/zvbi.c
@@ -535,26 +535,27 @@ static int OpaquePage( picture_t *p_src, const vbi_page p_page,
         for( x = 0; x < fmt.i_width; x++ )
         {
             const vbi_opacity opacity = p_page.text[ y/10 * p_page.columns + x/12 ].opacity;
+            const int background = p_page.text[ y/10 * p_page.columns + x/12 ].background;
             uint32_t *p_pixel = (uint32_t*)&p_src->p->p_pixels[y * p_src->p->i_pitch + 4*x];
+
             switch( opacity )
             {
             /* Show video instead of this character */
             case VBI_TRANSPARENT_SPACE:
                 *p_pixel = 0;
                 break;
+            /* Display foreground and background color */
             /* To make the boxed text "closed captioning" transparent
              * change true to false.
              */
             case VBI_OPAQUE:
+            /* alpha blend video into background color */
+            case VBI_SEMI_TRANSPARENT:
                 if( b_opaque )
                     break;
-            /* Full text transparency. only foreground color is show */
-            case VBI_TRANSPARENT_FULL:
-                *p_pixel = 0;
-                break;
             /* Transparency for boxed text */
-            case VBI_SEMI_TRANSPARENT:
-                if( (*p_pixel) == 0xff000000 && 0 ) /* Disabled until someone implement borders */
+            case VBI_TRANSPARENT_FULL:
+                if( (*p_pixel) == (0xff000000 | p_page.color_map[background] ) )
                     *p_pixel = 0;
                 break;
             }




More information about the vlc-devel mailing list