changeset 34542:814b6fcad4b3

Set memc_only via AVDictionary. Since CODEC_FLAG2_MEMC_ONLY was not used in FFmpeg even before it was removed, this probably also fixes a regression.
author reimar
date Sat, 28 Jan 2012 13:20:20 +0000
parents bdda068ba0a0
children 21caebba991b
files libmpcodecs/vf_mcdeint.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vf_mcdeint.c	Sat Jan 28 13:13:29 2012 +0000
+++ b/libmpcodecs/vf_mcdeint.c	Sat Jan 28 13:20:20 2012 +0000
@@ -186,6 +186,7 @@
 
         for(i=0; i<3; i++){
             AVCodecContext *avctx_enc;
+            AVDictionary *opts;
 #if 0
             int is_chroma= !!i;
             int w= ((width  + 31) & (~31))>>is_chroma;
@@ -206,7 +207,7 @@
             avctx_enc->flags = CODEC_FLAG_QSCALE | CODEC_FLAG_LOW_DELAY;
             avctx_enc->strict_std_compliance = FF_COMPLIANCE_EXPERIMENTAL;
             avctx_enc->global_quality= 1;
-            avctx_enc->flags2= CODEC_FLAG2_MEMC_ONLY;
+            av_dict_set(&opts, "memc_only", "1", 0);
             avctx_enc->me_cmp=
             avctx_enc->me_sub_cmp= FF_CMP_SAD; //SSE;
             avctx_enc->mb_cmp= FF_CMP_SSE;
@@ -224,7 +225,8 @@
                 avctx_enc->flags |= CODEC_FLAG_QPEL;
             }
 
-            avcodec_open(avctx_enc, enc);
+            avcodec_open2(avctx_enc, enc, &opts);
+            av_dict_free(&opts);
 
         }
         vf->priv->frame= avcodec_alloc_frame();