[libav-api] No pix_fmt auto conversion in avfilter?

Ronald S. Bultje rsbultje at gmail.com
Thu Feb 16 17:45:52 CET 2012


Hi,

On Wed, Feb 15, 2012 at 3:11 AM, Andrey Utkin
<andrey.krieger.utkin at gmail.com> wrote:
> Could somebody explain why this code fails when FILTER_STRING is not
> "scale", but just "fifo" or "copy"?
> https://gist.github.com/1834778
> The reason is that AVFrame out from filtergraph has 0x0 dimensions.
> The point is that pixel format conversion must take place, but i don't
> understand why avfilter doesn't sort it out automatically.
> It is surprising because when i open "buffer" video source for
> avfilter, i point in its params that input is in PIX_FMT_RGBA.
> Could / should this be "fixed", so auto-coversion took place in such cases?
> If so, i'd appreciate advices how to patch the libavfilter.

It could be fixed, but the problem is that it's not an easy fix,
format conversion is rather expensive and can cause loss of precision,
chroma information, and introduce rounding error. Maybe make it
settable (auto-introduce-scale-filter)?

Ronald


More information about the libav-api mailing list