From dd3e415e06cbd5b6c9e816708f067ede1cfbf943 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 13 Nov 2003 23:22:06 +0000 Subject: [PATCH] qprd needs mbd=2 Originally committed as revision 2517 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/mpegvideo.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 87dd5fb984..e11b411876 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -700,6 +700,11 @@ int MPV_encode_init(AVCodecContext *avctx) return -1; } + if((s->flags & CODEC_FLAG_QP_RD) && s->avctx->mb_decision != FF_MB_DECISION_RD){ + av_log(avctx, AV_LOG_ERROR, "QP RD needs mbd=2\n"); + return -1; + } + if(s->codec_id==CODEC_ID_MJPEG){ s->intra_quant_bias= 1<<(QUANT_BIAS_SHIFT-1); //(a + x/2)/x s->inter_quant_bias= 0;