Mercurial > mplayer.hg
changeset 14432:275b2ce30af7
Fix black line on right of subtitle with -spuaa 4 by setting alpha of
border pixels to 0 after scaling, not before.
author | reimar |
---|---|
date | Sat, 08 Jan 2005 21:06:04 +0000 |
parents | 0c10f923746e |
children | 95bb94a930a3 |
files | spudec.c |
diffstat | 1 files changed, 6 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/spudec.c Sat Jan 08 19:16:21 2005 +0000 +++ b/spudec.c Sat Jan 08 21:06:04 2005 +0000 @@ -808,15 +808,6 @@ } if (spu->scaled_image) { unsigned int x, y; - /* Kludge: draw_alpha needs width multiple of 8. */ - if (spu->scaled_width < spu->scaled_stride) - for (y = 0; y < spu->scaled_height; ++y) { - memset(spu->scaled_aimage + y * spu->scaled_stride + spu->scaled_width, 0, - spu->scaled_stride - spu->scaled_width); - /* FIXME: Why is this one needed? */ - memset(spu->scaled_image + y * spu->scaled_stride + spu->scaled_width, 0, - spu->scaled_stride - spu->scaled_width); - } if (spu->scaled_width <= 1 || spu->scaled_height <= 1) { goto nothing_to_do; } @@ -1061,6 +1052,12 @@ } } nothing_to_do: + /* Kludge: draw_alpha needs width multiple of 8. */ + if (spu->scaled_width < spu->scaled_stride) + for (y = 0; y < spu->scaled_height; ++y) { + memset(spu->scaled_aimage + y * spu->scaled_stride + spu->scaled_width, 0, + spu->scaled_stride - spu->scaled_width); + } spu->scaled_frame_width = dxs; spu->scaled_frame_height = dys; }