[MPlayer-dev-eng] [PATCH] bugfix for black bar besides gaussed vobsubs

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Sat Jan 8 11:35:31 CET 2005


Hi,
On Sat, Jan 08, 2005 at 06:40:29AM +0100, Csillag Kristof wrote:
> 2005-01-08, szo keltezéssel 06.26-kor Csillag Kristof ezt írta:
> 
> > This two-line patch fixes the mess, and removes the black bar.
> Unfortunately, it does not. Sorry, I broke it just before submitting.
> 
>   * * *
> 
> Drop the patch in my previous mail, try this one instead!
> 
> 
> -- 
> Csillag Kristof <fenwick at freemail.hu>

> --- MPlayer-20050107-csk-1/spudec.c	2005-01-08 05:32:45.000000000 +0100
> +++ MPlayer-20050107-csk/spudec.c	2005-01-08 06:34:48.000000000 +0100
> @@ -742,6 +742,7 @@
>  	static SwsFilter filter;
>  	static int firsttime = 1;
>  	static float oldvar;
> +	int x, y;
>  	int i;
>  
>  	if (!firsttime && oldvar != spu_gaussvar) sws_freeVec(filter.lumH);
> @@ -758,6 +759,7 @@
>  	for (i=ss*sh-1; i>=0; i--) if (!s2[i]) s2[i] = 255; //else s2[i] = 1;
>  	sws_scale(ctx,&s2,&ss,0,sh,&d2,&ds);
>  	for (i=ds*dh-1; i>=0; i--) if (d2[i]==0) d2[i] = 1; else if (d2[i]==255) d2[i] = 0;
> +	for (y = 0; y < sh; ++y) { int i = ds * y;  for (x = dw; x < ds; ++x) d2[i + x] = 0; }
>  	sws_freeContext(ctx);
>  }

How about memset(d2, 255, ds*dh); before scaling? Probably not much
slower (well, when I look at that code I think speed wasn't really much
considered anyway) and easier to understand.
Think that should work, too...

Greetings,
Reimar Döffinger




More information about the MPlayer-dev-eng mailing list