]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/mpegvideo_enc.c
Merge commit 'ba71c74017c287681153ec8f6f1cba650d797275'
[ffmpeg] / libavcodec / mpegvideo_enc.c
index 09b48ab8a8e04729a10e70e61cf6c7a661a639c8..99ab8856875edbfa10b32615572b92a8184bf405 100644 (file)
@@ -890,6 +890,20 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx)
     FF_ENABLE_DEPRECATION_WARNINGS;
 #endif
 
+#if FF_API_NORMALIZE_AQP
+    FF_DISABLE_DEPRECATION_WARNINGS
+    if (avctx->flags & CODEC_FLAG_NORMALIZE_AQP)
+        s->mpv_flags |= FF_MPV_FLAG_NAQ;
+    FF_ENABLE_DEPRECATION_WARNINGS;
+#endif
+
+#if FF_API_MV0
+    FF_DISABLE_DEPRECATION_WARNINGS
+    if (avctx->flags & CODEC_FLAG_MV0)
+        s->mpv_flags |= FF_MPV_FLAG_MV0;
+    FF_ENABLE_DEPRECATION_WARNINGS
+#endif
+
     if (avctx->b_frame_strategy == 2) {
         for (i = 0; i < s->max_b_frames + 2; i++) {
             s->tmp_frames[i] = av_frame_alloc();
@@ -1045,7 +1059,7 @@ static int load_input_picture(MpegEncContext *s, const AVFrame *pic_arg)
         if (s->linesize & (STRIDE_ALIGN-1))
             direct = 0;
 
-        av_dlog(s->avctx, "%d %d %td %td\n", pic_arg->linesize[0],
+        av_dlog(s->avctx, "%d %d %"PTRDIFF_SPECIFIER" %"PTRDIFF_SPECIFIER"\n", pic_arg->linesize[0],
                 pic_arg->linesize[1], s->linesize, s->uvlinesize);
 
         if (direct) {
@@ -1217,8 +1231,7 @@ static int estimate_best_b_count(MpegEncContext *s)
 
     c->width        = s->width  >> scale;
     c->height       = s->height >> scale;
-    c->flags        = CODEC_FLAG_QSCALE | CODEC_FLAG_PSNR |
-                      CODEC_FLAG_INPUT_PRESERVED;
+    c->flags        = CODEC_FLAG_QSCALE | CODEC_FLAG_PSNR;
     c->flags       |= s->avctx->flags & CODEC_FLAG_QPEL;
     c->mb_decision  = s->avctx->mb_decision;
     c->me_cmp       = s->avctx->me_cmp;