diff options
author | Oliver Fromme <oliver@fromme.com> | 2014-07-09 18:43:58 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-07-09 20:11:36 +0200 |
commit | a32dcaaaf809b63d9cffd61fa4a2d2c1976727ce (patch) | |
tree | e77f4493c8561200ccce1ff3ce50de0ec1c3f57a /libavutil/rc4.c | |
parent | e36916a63f6fd0644461ecbd6b08eeb8dfab60ab (diff) | |
download | ffmpeg-a32dcaaaf809b63d9cffd61fa4a2d2c1976727ce.tar.gz |
avcodec/dvdsubenc: Add dvdsub workaround for some players
The issue affects dvdsub subtitles (a.k.a. VOBSUB).
Some players -- in particular hardware players -- cut off
the lowest row of pixels if the number of rows in the subtitle
is odd.
The patch below implements a work-around for that. If the
number of rows is odd, it is simply rounded up to an even
number, adding an invisible (i.e. fully transparent) row.
The work-around can be enabled or disabled with a new
option -even_rows_fix. The default is disabled, so there
is no change of behaviour for users who don't care about it.
The overhead for the fix is low, and in many cases even zero:
For subtitles with an odd number of rows (i.e. in 50% of
cases on average), the size increases by two bytes because
a fully transparent row is encoded as 0x00 0x00. However,
in the VOBSUB standard, all data packets are padded to 2KB
anyway, so in most cases the additional bytes just use some
part of the padding, so there is no overhead. Only in the
rare case that the 2KB boundary is hit (0.1% chance), a full
2KB block is added.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/rc4.c')
0 files changed, 0 insertions, 0 deletions