[FFmpeg-devel] [PATCH] avfilter: add panorama filter

Ganesh Ajjanagadde gajjanag at mit.edu
Sat Dec 5 19:20:40 CET 2015


> On Sat, Dec 05, 2015 at 06:38:47PM +0100, Paul B Mahol wrote:
[...]
>> +AVFILTER_DEFINE_CLASS(panorama);
>> +
>> +static int query_formats(AVFilterContext *ctx)
>> +{
>> +    static const enum AVPixelFormat pix_fmts[] = {
>> +        AV_PIX_FMT_YUVA444P, AV_PIX_FMT_YUVA422P, AV_PIX_FMT_YUVA420P,
>> +        AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_YUVJ440P, AV_PIX_FMT_YUVJ422P,AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ411P,
>> +        AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV440P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV411P, AV_PIX_FMT_YUV410P,
>> +        AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRAP, AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE
>> +    };

Seems a rather long list that is quite arbitrary. Any reason not to
use some "all" API provided in formats.h?

>> +
>> +    AVFilterFormats *fmts_list = ff_make_format_list(pix_fmts);
>> +    if (!fmts_list)
>> +        return AVERROR(ENOMEM);
>> +    return ff_set_common_formats(ctx, fmts_list);

still leaky - when fmts_list is allocated correctly, and
ff_set_common_formats fails. Proof: use the patch used for the proof
regarding af_agate.

@Clement: found this while examining avfilter/vf_curves. Can you
please do the needful there?

[...]


More information about the ffmpeg-devel mailing list