diff mbox

[FFmpeg-devel] avfilter/mcdeint: remove usage of deprecated AVCodecContext.me_method

Message ID 20170828171853.9312-1-jamrial@gmail.com
State New
Headers show

Commit Message

James Almer Aug. 28, 2017, 5:18 p.m. UTC
Signed-off-by: James Almer <jamrial@gmail.com>
---
Depends on patch "avcodec/snowenc: fix setting motion_est option"

 libavfilter/vf_mcdeint.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Michael Niedermayer Aug. 31, 2017, 12:39 a.m. UTC | #1
On Mon, Aug 28, 2017 at 02:18:53PM -0300, James Almer wrote:
> Signed-off-by: James Almer <jamrial@gmail.com>
> ---
> Depends on patch "avcodec/snowenc: fix setting motion_est option"
> 
>  libavfilter/vf_mcdeint.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/libavfilter/vf_mcdeint.c b/libavfilter/vf_mcdeint.c
> index 26387b84e7..f07e1a0d60 100644
> --- a/libavfilter/vf_mcdeint.c
> +++ b/libavfilter/vf_mcdeint.c
> @@ -52,6 +52,7 @@
>  #include "libavutil/opt.h"
>  #include "libavutil/pixdesc.h"
>  #include "libavcodec/avcodec.h"
> +#include "libavcodec/snow.h"
>  #include "avfilter.h"
>  #include "formats.h"
>  #include "internal.h"
> @@ -134,7 +135,7 @@ static int config_props(AVFilterLink *inlink)
>      case MODE_EXTRA_SLOW:
>          enc_ctx->refs = 3;
>      case MODE_SLOW:
> -        enc_ctx->me_method = ME_ITER;
> +        av_dict_set(&opts, "motion_est", AV_STRINGIFY(FF_ME_ITER), 0);

"iter" doesnt work instead of AV_STRINGIFY(FF_ME_ITER) ?

either way LGTM if tested

thx

[...]
James Almer Aug. 31, 2017, 12:50 a.m. UTC | #2
On 8/30/2017 9:39 PM, Michael Niedermayer wrote:
> On Mon, Aug 28, 2017 at 02:18:53PM -0300, James Almer wrote:
>> Signed-off-by: James Almer <jamrial@gmail.com>
>> ---
>> Depends on patch "avcodec/snowenc: fix setting motion_est option"
>>
>>  libavfilter/vf_mcdeint.c | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/libavfilter/vf_mcdeint.c b/libavfilter/vf_mcdeint.c
>> index 26387b84e7..f07e1a0d60 100644
>> --- a/libavfilter/vf_mcdeint.c
>> +++ b/libavfilter/vf_mcdeint.c
>> @@ -52,6 +52,7 @@
>>  #include "libavutil/opt.h"
>>  #include "libavutil/pixdesc.h"
>>  #include "libavcodec/avcodec.h"
>> +#include "libavcodec/snow.h"
>>  #include "avfilter.h"
>>  #include "formats.h"
>>  #include "internal.h"
>> @@ -134,7 +135,7 @@ static int config_props(AVFilterLink *inlink)
>>      case MODE_EXTRA_SLOW:
>>          enc_ctx->refs = 3;
>>      case MODE_SLOW:
>> -        enc_ctx->me_method = ME_ITER;
>> +        av_dict_set(&opts, "motion_est", AV_STRINGIFY(FF_ME_ITER), 0);
> 
> "iter" doesnt work instead of AV_STRINGIFY(FF_ME_ITER) ?

You're right, thanks for the suggestion.

> 
> either way LGTM if tested

Tested and pushed, thanks.

> 
> thx
> 
> [...]
> 
> 
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
diff mbox

Patch

diff --git a/libavfilter/vf_mcdeint.c b/libavfilter/vf_mcdeint.c
index 26387b84e7..f07e1a0d60 100644
--- a/libavfilter/vf_mcdeint.c
+++ b/libavfilter/vf_mcdeint.c
@@ -52,6 +52,7 @@ 
 #include "libavutil/opt.h"
 #include "libavutil/pixdesc.h"
 #include "libavcodec/avcodec.h"
+#include "libavcodec/snow.h"
 #include "avfilter.h"
 #include "formats.h"
 #include "internal.h"
@@ -134,7 +135,7 @@  static int config_props(AVFilterLink *inlink)
     case MODE_EXTRA_SLOW:
         enc_ctx->refs = 3;
     case MODE_SLOW:
-        enc_ctx->me_method = ME_ITER;
+        av_dict_set(&opts, "motion_est", AV_STRINGIFY(FF_ME_ITER), 0);
     case MODE_MEDIUM:
         enc_ctx->flags |= AV_CODEC_FLAG_4MV;
         enc_ctx->dia_size = 2;