[MPlayer-cvslog] r28837 - trunk/libass/ass_bitmap.c

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sun Mar 8 01:19:26 CET 2009


On Fri, Mar 06, 2009 at 10:20:15AM +0100, greg wrote:
> Author: greg
> Date: Fri Mar  6 10:20:14 2009
> New Revision: 28837
> 
> Log:
> Fix \be blur start position.
> 
> Modified:
>    trunk/libass/ass_bitmap.c
> 
> Modified: trunk/libass/ass_bitmap.c
> ==============================================================================
> --- trunk/libass/ass_bitmap.c	Fri Mar  6 10:20:09 2009	(r28836)
> +++ trunk/libass/ass_bitmap.c	Fri Mar  6 10:20:14 2009	(r28837)
> @@ -264,7 +264,7 @@ static void be_blur(unsigned char *buf, 
>  	unsigned int old_sum, new_sum;
>  
>  	for (y=0; y<h; y++) {
> -		old_sum = 2 * buf[0];
> +		old_sum = 2 * buf[y*w];
>  		for (x=0; x<w-1; x++) {
>  			new_sum = buf[y*w+x] + buf[y*w+x+1];
>  			buf[y*w+x] = (old_sum + new_sum) >> 2;
> @@ -273,7 +273,7 @@ static void be_blur(unsigned char *buf, 
>  	}
>  
>  	for (x=0; x<w; x++) {
> -		old_sum = 2 * buf[0];
> +		old_sum = 2 * buf[x];
>  		for (y=0; y<h-1; y++) {
>  			new_sum = buf[y*w+x] + buf[(y+1)*w+x];
>  			buf[y*w+x] = (old_sum + new_sum) >> 2;

You are still treating left/top border differently from bottom/right
one. I don't really mind how you treat the borders, I think there is no
"correct" way, but they should at least all be treated the same way.



More information about the MPlayer-cvslog mailing list