[FFmpeg-devel] [Patch] Scale filter should use multiples of 2

Daniel G. Taylor dan
Thu Jul 22 17:33:10 CEST 2010


On 07/21/2010 08:04 PM, Stefano Sabatini wrote:
> Ehm, after further inspection of the code I discovered that the graph
> parser *already* supports escaping (through the av_get_token()
> function).
>
> So for the particular case above:
> "scale=W:round(H\, 16)"
>
> or even:
> 'scale=W:round(H, 16)'

Okay, awesome. I've confirmed that works, along with stuff like:

ffmpeg -i in.mp4 -vf "scale=PI*100:round(PI*100/A\, 16)" out.mp4

I've also fixed all the comments from the other mail, and as you can see 
above added PI and E. Updated patch is attached. There are now two 
issues I'm a little stuck with and would like your thoughts on:

   * With zero arguments it crashes. It appears 'flags=0x...' is
     magically appended to args and I have no idea where and what
     is going on. Can one of you C string parsing gurus take a look
     at the best way to parse the args here?

   * The special case of -1 can't work within the expression parser, so
     if you want to round e.g. scale=320:-1 you now would have to
     do "scale=320:round(320/H\, 16)". Any way to fix this or is
     it okay this way?

Take care,
-- 
Daniel G. Taylor
http://programmer-art.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: scale_eval.diff
Type: text/x-diff
Size: 3934 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100722/d7e021b7/attachment.diff>



More information about the ffmpeg-devel mailing list