[FFmpeg-devel] [PATCH v3 1/3] avfilter/vf_bwdif: consider chroma subsampling when enforcing minimum dimensions

Thomas Mundt tmundt75 at gmail.com
Sun Dec 3 00:02:36 EET 2023


Cosmin Stejerean via ffmpeg-devel <ffmpeg-devel at ffmpeg.org> schrieb am Sa.,
2. Dez. 2023, 21:17:

> From: Cosmin Stejerean <cosmin at cosmin.at>
>
> Fixes #10688
>
> Signed-off-by: Cosmin Stejerean <cosmin at cosmin.at>
> ---
>  libavfilter/vf_bwdif.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/libavfilter/vf_bwdif.c b/libavfilter/vf_bwdif.c
> index 137cd5ef13..353cd0b61a 100644
> --- a/libavfilter/vf_bwdif.c
> +++ b/libavfilter/vf_bwdif.c
> @@ -191,13 +191,14 @@ static int config_props(AVFilterLink *link)
>          return ret;
>      }
>
> -    if (link->w < 3 || link->h < 4) {
> -        av_log(ctx, AV_LOG_ERROR, "Video of less than 3 columns or 4
> lines is not supported\n");
> +    yadif->csp = av_pix_fmt_desc_get(link->format);
> +    yadif->filter = filter;
> +
> +    if (AV_CEIL_RSHIFT(link->w, yadif->csp->log2_chroma_w) < 3 ||
> AV_CEIL_RSHIFT(link->h, yadif->csp->log2_chroma_h) < 4) {
> +        av_log(ctx, AV_LOG_ERROR, "Video with planes less than 3 columns
> or 4 lines is not supported\n");
>          return AVERROR(EINVAL);
>      }
>
> -    yadif->csp = av_pix_fmt_desc_get(link->format);
> -    yadif->filter = filter;
>      ff_bwdif_init_filter_line(&s->dsp, yadif->csp->comp[0].depth);
>
>      return 0;
> --
> 2.42.1
>

LGTM, thanks.

>


More information about the ffmpeg-devel mailing list