[FFmpeg-devel] [PATCH] lavfi/hflip: support more formats
Michael Niedermayer
michaelni at gmx.at
Mon Feb 25 12:58:43 CET 2013
On Mon, Feb 25, 2013 at 10:33:58AM +0000, Paul B Mahol wrote:
> Signed-off-by: Paul B Mahol <onemda at gmail.com>
> ---
> libavfilter/vf_hflip.c | 40 +++++++++++-----------------------------
> 1 file changed, 11 insertions(+), 29 deletions(-)
>
> diff --git a/libavfilter/vf_hflip.c b/libavfilter/vf_hflip.c
> index c583ffd..969e950 100644
> --- a/libavfilter/vf_hflip.c
> +++ b/libavfilter/vf_hflip.c
> @@ -42,35 +42,17 @@ typedef struct {
>
> static int query_formats(AVFilterContext *ctx)
> {
> - static const enum AVPixelFormat pix_fmts[] = {
> - AV_PIX_FMT_RGB48BE, AV_PIX_FMT_RGB48LE,
> - AV_PIX_FMT_BGR48BE, AV_PIX_FMT_BGR48LE,
> - AV_PIX_FMT_ARGB, AV_PIX_FMT_RGBA,
> - AV_PIX_FMT_ABGR, AV_PIX_FMT_BGRA,
> - AV_PIX_FMT_RGB24, AV_PIX_FMT_BGR24,
> - AV_PIX_FMT_RGB565BE, AV_PIX_FMT_RGB565LE,
> - AV_PIX_FMT_RGB555BE, AV_PIX_FMT_RGB555LE,
> - AV_PIX_FMT_RGB444BE, AV_PIX_FMT_RGB444LE,
> - AV_PIX_FMT_BGR565BE, AV_PIX_FMT_BGR565LE,
> - AV_PIX_FMT_BGR555BE, AV_PIX_FMT_BGR555LE,
> - AV_PIX_FMT_BGR444BE, AV_PIX_FMT_BGR444LE,
> - AV_PIX_FMT_GRAY16BE, AV_PIX_FMT_GRAY16LE,
> - AV_PIX_FMT_YUV420P16LE, AV_PIX_FMT_YUV420P16BE,
> - AV_PIX_FMT_YUV422P16LE, AV_PIX_FMT_YUV422P16BE,
> - AV_PIX_FMT_YUV444P16LE, AV_PIX_FMT_YUV444P16BE,
> - AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV422P,
> - AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV411P,
> - AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV440P,
> - AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_YUVJ422P,
> - AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ440P,
> - AV_PIX_FMT_YUVA420P,
> - AV_PIX_FMT_RGB8, AV_PIX_FMT_BGR8,
> - AV_PIX_FMT_RGB4_BYTE, AV_PIX_FMT_BGR4_BYTE,
> - AV_PIX_FMT_PAL8, AV_PIX_FMT_GRAY8,
> - AV_PIX_FMT_NONE
> - };
> -
> - ff_set_common_formats(ctx, ff_make_format_list(pix_fmts));
> + AVFilterFormats *pix_fmts = NULL;
> + int fmt;
> +
> + for (fmt = 0; fmt < AV_PIX_FMT_NB; fmt++) {
> + const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(fmt);
> + if (!(desc->flags & PIX_FMT_HWACCEL ||
> + desc->flags & PIX_FMT_BITSTREAM))
> + ff_add_format(&pix_fmts, fmt);
> + }
can hflip handle, yuyv and similar subsampled packed formats ?
or NV12 ?
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
While the State exists there can be no freedom; when there is freedom there
will be no State. -- Vladimir Lenin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130225/932a072e/attachment.asc>
More information about the ffmpeg-devel
mailing list