diff mbox series

[FFmpeg-devel,1/2] avfilter/delogo: remove deprecated options

Message ID 20200410193053.5437-1-ffmpeg@gyani.pro
State Accepted
Commit 74fe697f965017f76203e659db08a7c2eda09b18
Headers show
Series [FFmpeg-devel,1/2] avfilter/delogo: remove deprecated options | expand

Checks

Context Check Description
andriy/ffmpeg-patchwork success Make fate finished

Commit Message

Gyan Doshi April 10, 2020, 7:30 p.m. UTC
Deprecated in 2015 in 8bc708fcee1
---
 libavfilter/vf_delogo.c | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

Comments

James Almer April 10, 2020, 8:47 p.m. UTC | #1
On 4/10/2020 4:30 PM, Gyan Doshi wrote:
> Deprecated in 2015 in 8bc708fcee1
> ---
>  libavfilter/vf_delogo.c | 15 +--------------
>  1 file changed, 1 insertion(+), 14 deletions(-)
> 
> diff --git a/libavfilter/vf_delogo.c b/libavfilter/vf_delogo.c
> index 5a2c5e7feb..8edbe03cdc 100644
> --- a/libavfilter/vf_delogo.c
> +++ b/libavfilter/vf_delogo.c
> @@ -211,11 +211,6 @@ static const AVOption delogo_options[]= {
>      { "y",    "set logo y position",       OFFSET(y_expr),    AV_OPT_TYPE_STRING, { .str = "-1" }, 0, 0, FLAGS },
>      { "w",    "set logo width",            OFFSET(w_expr),    AV_OPT_TYPE_STRING, { .str = "-1" }, 0, 0, FLAGS },
>      { "h",    "set logo height",           OFFSET(h_expr),    AV_OPT_TYPE_STRING, { .str = "-1" }, 0, 0, FLAGS },
> -#if LIBAVFILTER_VERSION_MAJOR < 7
> -    /* Actual default value for band/t is 1, set in init */
> -    { "band", "set delogo area band size", OFFSET(band), AV_OPT_TYPE_INT, { .i64 =  0 },  0, INT_MAX, FLAGS },
> -    { "t",    "set delogo area band size", OFFSET(band), AV_OPT_TYPE_INT, { .i64 =  0 },  0, INT_MAX, FLAGS },
> -#endif
>      { "show", "show delogo area",          OFFSET(show), AV_OPT_TYPE_BOOL,{ .i64 =  0 },  0, 1,       FLAGS },
>      { NULL }
>  };
> @@ -272,16 +267,8 @@ static av_cold int init(AVFilterContext *ctx)
>      CHECK_UNSET_OPT(w);
>      CHECK_UNSET_OPT(h);
>  
> -#if LIBAVFILTER_VERSION_MAJOR < 7
> -    if (s->band == 0) { /* Unset, use default */
> -        av_log(ctx, AV_LOG_WARNING, "Note: default band value was changed from 4 to 1.\n");
> -        s->band = 1;
> -    } else if (s->band != 1) {
> -        av_log(ctx, AV_LOG_WARNING, "Option band is deprecated.\n");
> -    }
> -#else
>      s->band = 1;
> -#endif
> +
>      av_log(ctx, AV_LOG_VERBOSE, "x:%d y:%d, w:%d h:%d band:%d show:%d\n",
>             s->x, s->y, s->w, s->h, s->band, s->show);
>  
> 

LGTM.
Gyan Doshi April 11, 2020, 6:40 a.m. UTC | #2
On 11-04-2020 02:17 am, James Almer wrote:
> On 4/10/2020 4:30 PM, Gyan Doshi wrote:
>> Deprecated in 2015 in 8bc708fcee1
>> ---
>>   libavfilter/vf_delogo.c | 15 +--------------
>>   1 file changed, 1 insertion(+), 14 deletions(-)
>>
>> diff --git a/libavfilter/vf_delogo.c b/libavfilter/vf_delogo.c
>> index 5a2c5e7feb..8edbe03cdc 100644
>> --- a/libavfilter/vf_delogo.c
>> +++ b/libavfilter/vf_delogo.c
>> @@ -211,11 +211,6 @@ static const AVOption delogo_options[]= {
>>       { "y",    "set logo y position",       OFFSET(y_expr),    AV_OPT_TYPE_STRING, { .str = "-1" }, 0, 0, FLAGS },
>>       { "w",    "set logo width",            OFFSET(w_expr),    AV_OPT_TYPE_STRING, { .str = "-1" }, 0, 0, FLAGS },
>>       { "h",    "set logo height",           OFFSET(h_expr),    AV_OPT_TYPE_STRING, { .str = "-1" }, 0, 0, FLAGS },
>> -#if LIBAVFILTER_VERSION_MAJOR < 7
>> -    /* Actual default value for band/t is 1, set in init */
>> -    { "band", "set delogo area band size", OFFSET(band), AV_OPT_TYPE_INT, { .i64 =  0 },  0, INT_MAX, FLAGS },
>> -    { "t",    "set delogo area band size", OFFSET(band), AV_OPT_TYPE_INT, { .i64 =  0 },  0, INT_MAX, FLAGS },
>> -#endif
>>       { "show", "show delogo area",          OFFSET(show), AV_OPT_TYPE_BOOL,{ .i64 =  0 },  0, 1,       FLAGS },
>>       { NULL }
>>   };
>> @@ -272,16 +267,8 @@ static av_cold int init(AVFilterContext *ctx)
>>       CHECK_UNSET_OPT(w);
>>       CHECK_UNSET_OPT(h);
>>   
>> -#if LIBAVFILTER_VERSION_MAJOR < 7
>> -    if (s->band == 0) { /* Unset, use default */
>> -        av_log(ctx, AV_LOG_WARNING, "Note: default band value was changed from 4 to 1.\n");
>> -        s->band = 1;
>> -    } else if (s->band != 1) {
>> -        av_log(ctx, AV_LOG_WARNING, "Option band is deprecated.\n");
>> -    }
>> -#else
>>       s->band = 1;
>> -#endif
>> +
>>       av_log(ctx, AV_LOG_VERBOSE, "x:%d y:%d, w:%d h:%d band:%d show:%d\n",
>>              s->x, s->y, s->w, s->h, s->band, s->show);
>>   
>>
> LGTM.

Thanks. Pushed as 74fe697f965017f76203e659db08a7c2eda09b18

Gyan
diff mbox series

Patch

diff --git a/libavfilter/vf_delogo.c b/libavfilter/vf_delogo.c
index 5a2c5e7feb..8edbe03cdc 100644
--- a/libavfilter/vf_delogo.c
+++ b/libavfilter/vf_delogo.c
@@ -211,11 +211,6 @@  static const AVOption delogo_options[]= {
     { "y",    "set logo y position",       OFFSET(y_expr),    AV_OPT_TYPE_STRING, { .str = "-1" }, 0, 0, FLAGS },
     { "w",    "set logo width",            OFFSET(w_expr),    AV_OPT_TYPE_STRING, { .str = "-1" }, 0, 0, FLAGS },
     { "h",    "set logo height",           OFFSET(h_expr),    AV_OPT_TYPE_STRING, { .str = "-1" }, 0, 0, FLAGS },
-#if LIBAVFILTER_VERSION_MAJOR < 7
-    /* Actual default value for band/t is 1, set in init */
-    { "band", "set delogo area band size", OFFSET(band), AV_OPT_TYPE_INT, { .i64 =  0 },  0, INT_MAX, FLAGS },
-    { "t",    "set delogo area band size", OFFSET(band), AV_OPT_TYPE_INT, { .i64 =  0 },  0, INT_MAX, FLAGS },
-#endif
     { "show", "show delogo area",          OFFSET(show), AV_OPT_TYPE_BOOL,{ .i64 =  0 },  0, 1,       FLAGS },
     { NULL }
 };
@@ -272,16 +267,8 @@  static av_cold int init(AVFilterContext *ctx)
     CHECK_UNSET_OPT(w);
     CHECK_UNSET_OPT(h);
 
-#if LIBAVFILTER_VERSION_MAJOR < 7
-    if (s->band == 0) { /* Unset, use default */
-        av_log(ctx, AV_LOG_WARNING, "Note: default band value was changed from 4 to 1.\n");
-        s->band = 1;
-    } else if (s->band != 1) {
-        av_log(ctx, AV_LOG_WARNING, "Option band is deprecated.\n");
-    }
-#else
     s->band = 1;
-#endif
+
     av_log(ctx, AV_LOG_VERBOSE, "x:%d y:%d, w:%d h:%d band:%d show:%d\n",
            s->x, s->y, s->w, s->h, s->band, s->show);