[FFmpeg-devel] [PATCH]Add more 32bit RGB colourspaces to kerndeint

Stefano Sabatini stefasab at gmail.com
Sat Jan 5 12:17:22 CET 2013


On date Saturday 2013-01-05 11:58:35 +0100, Carl Eugen Hoyos encoded:
> Hi!
> 
> I did not test with input that contains transparency.
> 
> Please review, Carl Eugen

> diff --git a/libavfilter/vf_kerndeint.c b/libavfilter/vf_kerndeint.c
> index 3569bfa..337f9ee 100644
> --- a/libavfilter/vf_kerndeint.c
> +++ b/libavfilter/vf_kerndeint.c
> @@ -83,6 +83,13 @@ static int query_formats(AVFilterContext *ctx)
>          AV_PIX_FMT_YUV420P,
>          AV_PIX_FMT_YUYV422,
>          AV_PIX_FMT_ARGB,
> +        AV_PIX_FMT_0RGB,
> +        AV_PIX_FMT_ABGR,
> +        AV_PIX_FMT_0BGR,
> +        AV_PIX_FMT_RGBA,
> +        AV_PIX_FMT_RGB0,
> +        AV_PIX_FMT_BGRA,
> +        AV_PIX_FMT_BGR0,
>          AV_PIX_FMT_NONE
>      };
>  
> @@ -103,6 +110,17 @@ static int config_props(AVFilterLink *inlink)
>                            inlink->w, inlink->h, inlink->format, 1);
>  }
>  

> +#define isRGB(x) \
> +    (  x == PIX_FMT_ARGB \
> +    || x == PIX_FMT_0RGB \
> +    || x == PIX_FMT_ABGR \
> +    || x == PIX_FMT_0BGR \
> +    || x == PIX_FMT_RGBA \
> +    || x == PIX_FMT_RGB0 \
> +    || x == PIX_FMT_BGRA \
> +    || x == PIX_FMT_BGR0 \
> +    )

The check could be done in config once and for all (checking
desc->flags & RGB).
-- 
FFmpeg = Fast and Furious Mean Pure Erroneous Guru


More information about the ffmpeg-devel mailing list