Mercurial > libavcodec.hg
changeset 1711:f2f8eddf1b13 libavcodec
rate limit tips and checks
author | michael |
---|---|
date | Thu, 01 Jan 2004 15:13:44 +0000 |
parents | 4a68b20eeb2c |
children | 5175116a97e8 |
files | mpegvideo.c |
diffstat | 1 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mpegvideo.c Thu Jan 01 02:56:35 2004 +0000 +++ b/mpegvideo.c Thu Jan 01 15:13:44 2004 +0000 @@ -731,12 +731,21 @@ 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;