[MPlayer-dev-eng] [PATCH] vf_scale to x16 values

Nico Sabbi nsabbi at tiscali.it
Sun Mar 6 20:16:21 CET 2005


Reimar Döffinger wrote:

>Hi,
>On Sun, Mar 06, 2005 at 10:19:26AM +0100, Nico Sabbi wrote:
>  
>
>>This patch extends -vf scale so that if w or h is -4
>>the resulting scaled value is rounded to closest multiple of 16
>>(optimal for encoding).
>>    
>>
>
>I would prefer it if you would do it like a flag, e.g. with -10 you get
>the result as with -2, just rounded etc. I'm also not sure if "normal" rounding,
>rounding up or rounding down is best...
>I attached my suggestion, I don't find it perfect, but at least a bit better.
>If you think it's okay just apply it, I don't know if I will get around
>to it.
>
>Greetings,
>Reimar Döffinger
>  
>
>  
>
ok, your patch is better,  but doesn't apply (3/3 hunks failed), didn't 
include the
necessary mods to the conf_parameters and is obfuscated:

>------------------------------------------------------------------------
>
>+    if (vf->priv->w < 0 && (-vf->priv->w & 8)) {
>+      vf->priv->w = -(-vf->priv->w & ~8);
>+      round_w = 1;
>  
>

why not vf->priv->w += 8 ? :)

I'll commit later the attached patch.

Thanks,
       Nico
-------------- next part --------------
A non-text attachment was scrubbed...
Name: scale2.diff
Type: text/x-patch
Size: 1894 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20050306/3c423700/attachment.bin>


More information about the MPlayer-dev-eng mailing list