[FFmpeg-devel] [PATCH]ffplay 2/2: Fix subtitle rendering for special cases

Michael Niedermayer michaelni
Mon Feb 2 21:18:04 CET 2009

On Sun, Feb 01, 2009 at 11:19:37PM +0100, Bj?rn Axelsson wrote:
> Second subtitle-related patch.
> The ffplay.c subtitle renderer (blend_subrect) fails to handle some of the
> special cases with odd widths, odd heights and/or odd positions. For
> example it could insert an empty line, wraparound the subrect one pixel
> vertically, misalign the UV components and generally make a mess of things.
> This fix could have been smaller, since I didn't care to track down the
> original error in the offset calculations. Instead I replaced the
> calculations with an arguably simpler and seemingly more correct
> implementation.

great, iam in favor of someone rewriting blend_subrect()
first see "C?dric Schieli [FFmpeg-devel] [RFC] Alpha support" there is some
alpha blend code in there, with which the subtitle case should be merged

second the code should be < 1/2 as big as now

your choice is between either
A. writing a clean and minimal patch to fix the bug (and supply a clear
   description of the bug
B. provide a new (not diffed) implementation that is smaller, cleaner and
   better (1/2 size and attached benchmarks are required)

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In a rich man's house there is no place to spit but his face.
-- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090202/004be0b1/attachment.pgp>

More information about the ffmpeg-devel mailing list