[Mplayer-cvslog] CVS: main/libmpcodecs vf_scale.c,1.18,1.19

Kim Minh Kaplan kmkaplan at selfoffice.com
Thu Jul 18 17:34:11 CEST 2002


Arpi writes:

>> +    if(vf->priv->h==-3) vf->priv->h=vf->priv->w*height/width; else
>> +    if(vf->priv->h==-2) vf->priv->h=vf->priv->w*d_height/d_width;
>> +    break;
>> +    }
>>      if(vf->priv->w<0) vf->priv->w=width; else
>>      if(vf->priv->w==0) vf->priv->w=d_width;
>>      
>> -    if(vf->priv->h==-3) vf->priv->h=vf->priv->w*height/width; else
>> -    if(vf->priv->h==-2) vf->priv->h=vf->priv->w*d_height/d_width;
>
> you shouldn't chaneg the order of those if()'s !

OK, I see your point.  Correction on its way.

> and, why didn't you put just the rounding into the switc(){ .. } and left
> the others before it?

If I leave the default before the switch then vf->priv->w
and vf->priv->h will have already been set so it is not possible to
know that we need to do some rounding (or should we do the rounding
even if the user specificaly asks for even values?)

Kim Minh.



More information about the MPlayer-cvslog mailing list