[FFmpeg-devel] [PATCH]ffplay 1/2: fix subtitles vertical resolution

Björn Axelsson gecko
Sun Feb 1 23:19:28 CET 2009


First patch from some recent subtitle work.

This trivial patch fixes a bug in the ffplay.c subtitle renderer
(blend_subrect) which basically halves the vertical resolution of
subtitles as each same source pixel is used twice.

The effect of this patch can be easily seen in this sample:
http://samples.mplayerhq.hu/sub/small.divx

-- 
Bj?rn Axelsson
-------------- next part --------------
Index: ffplay.c
===================================================================
--- ffplay.c.orig	2009-02-01 21:14:48.000000000 +0100
+++ ffplay.c	2009-02-01 21:43:33.000000000 +0100
@@ -533,7 +533,7 @@
             a1 = a;
             lum[0] = ALPHA_BLEND(a, lum[0], y, 0);
 
-            YUVA_IN(y, u, v, a, p, pal);
+            YUVA_IN(y, u, v, a, p + BPP, pal);
             u1 += u;
             v1 += v;
             a1 += a;
@@ -547,7 +547,7 @@
             a1 += a;
             lum[0] = ALPHA_BLEND(a, lum[0], y, 0);
 
-            YUVA_IN(y, u, v, a, p, pal);
+            YUVA_IN(y, u, v, a, p + BPP, pal);
             u1 += u;
             v1 += v;
             a1 += a;



More information about the ffmpeg-devel mailing list