[FFmpeg-devel] [PATCH] libavfilter-soc: add query_formats callback to vf_hflip

Vitor Sessak vitor1001
Sun Feb 15 20:58:35 CET 2009

Stefano Sabatini wrote:
> Hi,
> the algorithm implemented in draw_slice() only works with planar
> formats, it may be extended and it will but for the moment this patch
> fixes filtering for filter chains of the kind:
> "format=rgb32, hflip"

I think it shouldn't be too hard to extend it, but I'm fine with the patch.

> Also what about a function like avfilter_all_planar_colorspaces()?

Maybe something like

avfilter_colorspaces(int flags);

enum flags = {
     FMT_IS_PLANAR = 1;
     FMT_IS_YUV = 2;
     FMT_IS_RGB = 4;
     FMT_IS_REAL_PIXELS = 8; ///< Not a HW format
     FMT_IS_BW = 16; ///< Is it useful?

would be more useful? Also, maybe defining a PIX_FMT_PLANAR_RGB32 would 
avoid converting to YUV and back for such filters (but this would only 
be useful if the colorspace negotiation is smarter then is ATM and avoid 
lossy conversions when possible).


More information about the ffmpeg-devel mailing list