Commit d759a18e authored by Devin Heitmueller's avatar Devin Heitmueller Committed by 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: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent eacbb34f
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment