[FFmpeg-devel] [PATCH] extractplanes filter

Paul B Mahol onemda at gmail.com
Fri May 3 12:38:37 CEST 2013

On 5/3/13, Nicolas George <nicolas.george at normalesup.org> wrote:
> Le tridi 13 floreal, an CCXXI, Paul B Mahol a ecrit :
>> I wonder how format renegotiation works. I would like to pick 16bit gray
>> with right endianess depending on input format - if its 16 bit at all
>> otherwise just pick 8bit one.
> That would be useful in this situation indeed.
> The basic principle is this: query_formats() sets the formats it can, and
> if
> it could not set everything it returns EAGAIN, and will be called again
> later, hopefully when more information is available.
> In this situation, I believe the correct flow is this:
>     if input formats are not set
>         set input formats to all 8 and 16 bits formats
>     if input formats still contains several bit depths
>         return AVERROR(EAGAIN)
>     else
>         set output formats to the corresponding gray format

Thanks, I think that makes sense.

>> I can't find where its explained how to do that.
> There is a small paragraph in doc/filter_design.txt, it could be expanded,
> possibly with an example.

Ugh, that file contains obsolete information too.

> Regards,
> --
>   Nicolas George

More information about the ffmpeg-devel mailing list