[FFmpeg-devel] [PATCH 4/4] lavfi/delogo: band width must be at least 1

Stefano Sabatini stefasab at gmail.com
Fri Jul 5 11:41:35 CEST 2013


On date Friday 2013-07-05 10:35:49 +0200, Jean Delvare encoded:
> We need at least one pixel around the logo to use as known points to
> interpolate from. So properly declare the band/t attribute has having
> a minimum value of 1.
> 
> Signed-off-by: Jean Delvare <khali at linux-fr.org>
> ---
>  libavfilter/vf_delogo.c |    7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> --- ffmpeg.orig/libavfilter/vf_delogo.c	2013-07-03 10:38:38.113816209 +0200
> +++ ffmpeg/libavfilter/vf_delogo.c	2013-07-03 10:49:15.936214770 +0200
> @@ -160,8 +160,8 @@ static const AVOption delogo_options[]=
>      { "y",    "set logo y position",       OFFSET(y),    AV_OPT_TYPE_INT, { .i64 = -1 }, -1, INT_MAX, FLAGS },
>      { "w",    "set logo width",            OFFSET(w),    AV_OPT_TYPE_INT, { .i64 = -1 }, -1, INT_MAX, FLAGS },
>      { "h",    "set logo height",           OFFSET(h),    AV_OPT_TYPE_INT, { .i64 = -1 }, -1, INT_MAX, FLAGS },
> -    { "band", "set delogo area band size", OFFSET(band), AV_OPT_TYPE_INT, { .i64 =  4 }, -1, INT_MAX, FLAGS },
> -    { "t",    "set delogo area band size", OFFSET(band), AV_OPT_TYPE_INT, { .i64 =  4 }, -1, INT_MAX, FLAGS },
> +    { "band", "set delogo area band size", OFFSET(band), AV_OPT_TYPE_INT, { .i64 =  4 },  1, INT_MAX, FLAGS },
> +    { "t",    "set delogo area band size", OFFSET(band), AV_OPT_TYPE_INT, { .i64 =  4 },  1, INT_MAX, FLAGS },
>      { "show", "show delogo area",          OFFSET(show), AV_OPT_TYPE_INT, { .i64 =  0 },  0, 1,       FLAGS },
>      { NULL },
>  };
> @@ -195,9 +195,6 @@ static av_cold int init(AVFilterContext
>      CHECK_UNSET_OPT(w);
>      CHECK_UNSET_OPT(h);
>  
> -    if (s->band < 0)
> -        s->band = 4;

LGTM, thanks. Probably bump micro.
-- 
FFmpeg = Friendly and Formidable Mortal Powered Enigmatic Gymnast


More information about the ffmpeg-devel mailing list