[MPlayer-dev-eng] [PATCH] cropdetect

Attila Kinali attila at kinali.ch
Sat Aug 7 14:37:07 CEST 2004


On Thu, Jul 29, 2004 at 12:22:45PM +0200, Diego Biurrun wrote:
Content-Description: message body text
 

> diff -ur /tmp/MPlayer-1.0pre5/libmpcodecs/vf_cropdetect.c ./libmpcodecs/vf_cropdetect.c
> --- /tmp/MPlayer-1.0pre5/libmpcodecs/vf_cropdetect.c	2003-10-25 11:37:34.000000000 -0700
> +++ ./libmpcodecs/vf_cropdetect.c	2004-07-28 15:13:56.000000000 -0700
> @@ -105,12 +106,27 @@
>  
>      x=(vf->priv->x1+1)&(~1);
>      y=(vf->priv->y1+1)&(~1);
> -    
> +    w=(vf->priv->x2+1-x)&(~1);
> +    h=(vf->priv->y2+1-y)&(~1);
> +
> +    if ( vf->priv->round > 1 ){
> +      while ( w % vf->priv->round != 0 ) {
> +        --w;
> +        if( w % 2 == 0 )
> +          ++x;
> +      }
> +
> +      while ( h % vf->priv->round != 0 ) {
> +        --h; 
> +        if( h % 2 == 0 ) 
> +          ++y;
> +      }
> +    }

What is the reason to increas x resp y if w resp h is a multple of 2 ?


			Attila Kinali




More information about the MPlayer-dev-eng mailing list