[FFmpeg-devel] [PATCH] lavfi/crop: support more pixel formats
Paul B Mahol
onemda at gmail.com
Thu Jul 4 16:19:42 CEST 2013
On 7/4/13, Stefano Sabatini <stefasab at gmail.com> wrote:
> On date Wednesday 2013-07-03 21:38:19 +0000, Paul B Mahol encoded:
>> Signed-off-by: Paul B Mahol <onemda at gmail.com>
>> ---
>> libavfilter/vf_crop.c | 37 ++++++--------------
>> tests/ref/fate/filter-pixfmts-crop | 69
>> ++++++++++++++++++++++++++++++++++++++
>> 2 files changed, 79 insertions(+), 27 deletions(-)
>>
>> diff --git a/libavfilter/vf_crop.c b/libavfilter/vf_crop.c
> [...]
>> - ff_set_common_formats(ctx, ff_make_format_list(pix_fmts));
>> + AVFilterFormats *formats = NULL;
>> + int fmt;
>> +
>> + for (fmt = 0; fmt < AV_PIX_FMT_NB; fmt++) {
>> + const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(fmt);
>> + if (!(desc->flags & (AV_PIX_FMT_FLAG_HWACCEL |
>> AV_PIX_FMT_FLAG_BITSTREAM)) &&
>
>> + !((desc->log2_chroma_w || desc->log2_chroma_h) &&
>> !(desc->flags & AV_PIX_FMT_FLAG_PLANAR)))
>
> Please don't use the BRAINDEAD_PLANAR flag.
Its not brain dead.
More information about the ffmpeg-devel
mailing list