vlc | branch: master | Devin Heitmueller <[email protected]> | Mon Sep 21 10:37:44 2015 -0400| [d759a18e56adf3cf8a4a3dba1cb61593ddfdc7e1] | committer: Jean-Baptiste Kempf
Fix CC rendering area to be 80% of the window height, per FCC regulations The FCC defines a "safe area" for caption rendering to be 80% of the window height. This patch changes it from 75% to 80%, and fixes a bug in the original math due to integer arithmetic (the result of (100/16 got truncated): Original math: 100 / 16 * 8 / 10 = 4.8 Fixed math: 100 * 8 / 10 / 16 = 5 Signed-off-by: Jean-Baptiste Kempf <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d759a18e56adf3cf8a4a3dba1cb61593ddfdc7e1 --- modules/codec/cc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/codec/cc.c b/modules/codec/cc.c index 9e75688..e3cb87b 100644 --- a/modules/codec/cc.c +++ b/modules/codec/cc.c @@ -431,7 +431,8 @@ static subpicture_t *Subtitle( decoder_t *p_dec, text_segment_t *p_segments, mti if( p_dec->p_sys->b_opaque ) p_spu_sys->p_default_style->i_style_flags |= STYLE_BACKGROUND; p_spu_sys->p_default_style->i_font_color = rgi_eia608_colors[EIA608_COLOR_DEFAULT]; - p_spu_sys->p_default_style->f_font_relsize = 100 / EIA608_SCREEN_ROWS * 3/4; + /* FCC defined "safe area" for EIA-608 captions is 80% of the height of the display */ + p_spu_sys->p_default_style->f_font_relsize = 100 * 8 / 10 / EIA608_SCREEN_ROWS; p_spu_sys->p_default_style->i_features |= (STYLE_HAS_FONT_COLOR | STYLE_HAS_FLAGS); return p_spu; _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
