[vlc-devel] commit: Keep a good rendering quality when rendering zvbi subs as text. ( Antoine Cellerier )

git version control git at videolan.org
Fri May 23 14:12:29 CEST 2008


vlc | branch: master | Antoine Cellerier <dionoea at videolan.org> | Fri May 23 14:12:26 2008 +0200| [45a444a2b4660bccfba8478b9691ddb170666092]

Keep a good rendering quality when rendering zvbi subs as text.

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

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

diff --git a/modules/codec/zvbi.c b/modules/codec/zvbi.c
index ea2d596..05b9c65 100644
--- a/modules/codec/zvbi.c
+++ b/modules/codec/zvbi.c
@@ -326,9 +326,12 @@ static subpicture_t *Decode( decoder_t *p_dec, block_t **pp_block )
                                    VLC_FOURCC('R','G','B','A');
 #endif
     fmt.i_aspect = p_sys->b_text ? 0 : VOUT_ASPECT_FACTOR;
-    fmt.i_sar_num = fmt.i_sar_den = 1;
-    fmt.i_width = fmt.i_visible_width = p_page.columns * 12;
-    fmt.i_height = fmt.i_visible_height = p_page.rows * 10;
+    if( !p_sys->b_text )
+    {
+        fmt.i_sar_num = fmt.i_sar_den = 1;
+        fmt.i_width = fmt.i_visible_width = p_page.columns * 12;
+        fmt.i_height = fmt.i_visible_height = p_page.rows * 10;
+    }
     fmt.i_bits_per_pixel = p_sys->b_text ? 0 : 32;
     fmt.i_x_offset = fmt.i_y_offset = 0;
 
@@ -351,10 +354,13 @@ static subpicture_t *Decode( decoder_t *p_dec, block_t **pp_block )
     p_spu->b_ephemer = true;
     p_spu->b_absolute = false;
     p_spu->b_pausable = true;
-    p_spu->i_width = fmt.i_width;
-    p_spu->i_height = fmt.i_height;
-    p_spu->i_original_picture_width = p_page.columns * 12;
-    p_spu->i_original_picture_height = p_page.rows * 10;
+    if( !p_sys->b_text )
+    {
+        p_spu->i_width = fmt.i_width;
+        p_spu->i_height = fmt.i_height;
+        p_spu->i_original_picture_width = p_page.columns * 12;
+        p_spu->i_original_picture_height = p_page.rows * 10;
+    }
 
 #ifdef WORDS_BIGENDIAN
 # define ZVBI_PIXFMT_RGBA32 VBI_PIXFMT_RGBA32_BE




More information about the vlc-devel mailing list