[FFmpeg-devel] [PATCH] Add dvdsub workaround for some players
michaelni at gmx.at
Wed Jul 9 20:19:32 CEST 2014
On Wed, Jul 09, 2014 at 06:43:58PM +0200, Oliver Fromme wrote:
> I mentioned this issue before, now here is a small patch for it.
> 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.
> Suggested commit message (if you think this is too concise,
> you can also use what I've written above):
> Implement work-around for some players having problems with
> odd-sized dvdsub subtitles. If enabled with -even_rows_fix 1,
> the number of rows is rounded up to an even number.
can you also post one that adds "even_rows_fix" to the docs ?
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Those who are best at talking, realize last or never when they are wrong.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 181 bytes
Desc: Digital signature
More information about the ffmpeg-devel