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

Stefano Sabatini stefano.sabatini-lala
Wed Jun 30 01:04:36 CEST 2010

On date Tuesday 2010-06-29 12:56:17 -0700, Baptiste Coudurier encoded:
> On 6/29/10 12:02 PM, Daniel G. Taylor wrote:
> >Hey,
> >
> >Attached is a small patch to make the vf_scale filter always produce
> >multiples of 2 when the -1 option is used for either width or height to
> >keep the aspect ratio. This lets you use it properly with some encoders,
> >like libx264, that would otherwise fail, e.g:
> This depends on the output pixel format. For 420, indeed it would be useful.

Odd-size rescaling was a feature explicitely requested by Michael. I'm
not against adding an option to make it only issues even-sized image though.

A yet better solution would be to make the output size parametric
(IIRC there is already a patch by Baptiste for that in the ML), and
now that the eval API is public there is no excuse for not working on

FFmpeg = Fostering & Fierce Magical Power Extravagant Gorilla

More information about the ffmpeg-devel mailing list