|
|
@ -731,6 +731,15 @@ int MPV_encode_init(AVCodecContext *avctx) |
|
|
|
s->loop_filter= !!(s->flags & CODEC_FLAG_LOOP_FILTER); |
|
|
|
s->loop_filter= !!(s->flags & CODEC_FLAG_LOOP_FILTER); |
|
|
|
s->alternate_scan= !!(s->flags & CODEC_FLAG_ALT_SCAN); |
|
|
|
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
|
|
|
|
if((s->flags & CODEC_FLAG_4MV) && s->codec_id != CODEC_ID_MPEG4
|
|
|
|
&& s->codec_id != CODEC_ID_H263 && s->codec_id != CODEC_ID_H263P){ |
|
|
|
&& s->codec_id != CODEC_ID_H263 && s->codec_id != CODEC_ID_H263P){ |
|
|
|
av_log(avctx, AV_LOG_ERROR, "4MV not supported by codec\n"); |
|
|
|
av_log(avctx, AV_LOG_ERROR, "4MV not supported by codec\n"); |
|
|
|