diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2004-01-01 15:13:44 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2004-01-01 15:13:44 +0000 |
commit | 273977d8148016e3a2ab7372ec1515ea1f10f1e4 (patch) | |
tree | b9ad73c64d4152932a8b62a272be63f07133e85b /libavcodec/mpegvideo.c | |
parent | 55bbad6f1456b781afe47c7db7bf885fed9afa32 (diff) | |
download | ffmpeg-273977d8148016e3a2ab7372ec1515ea1f10f1e4.tar.gz |
rate limit tips and checks
Originally committed as revision 2643 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r-- | libavcodec/mpegvideo.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index bbb427b558..d60ebd7e1f 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -731,12 +731,21 @@ int MPV_encode_init(AVCodecContext *avctx) s->loop_filter= !!(s->flags & CODEC_FLAG_LOOP_FILTER); s->alternate_scan= !!(s->flags & CODEC_FLAG_ALT_SCAN); + if(avctx->rc_max_rate && !avctx->rc_buffer_size){ + av_log(avctx, AV_LOG_ERROR, "a vbv buffer size is needed, for encoding with a maximum bitrate\n"); + return -1; + } + + if(avctx->rc_min_rate && avctx->rc_max_rate != avctx->rc_min_rate){ + av_log(avctx, AV_LOG_INFO, "Warning min_rate > 0 but min_rate != max_rate isnt recommanded!\n"); + } + if((s->flags & CODEC_FLAG_4MV) && s->codec_id != CODEC_ID_MPEG4 && s->codec_id != CODEC_ID_H263 && s->codec_id != CODEC_ID_H263P){ av_log(avctx, AV_LOG_ERROR, "4MV not supported by codec\n"); return -1; } - + if(s->obmc && s->avctx->mb_decision != FF_MB_DECISION_SIMPLE){ av_log(avctx, AV_LOG_ERROR, "OBMC is only supported with simple mb decission\n"); return -1; |