You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avcodec/mpegvideo_enc: Move vbv_delay warning to mpeg12enc.c
It is MPEG-1/2 only. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@@ -255,6 +255,15 @@ static av_cold int encode_init(AVCodecContext *avctx)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (avctx->rc_max_rate &&
|
||||||
|
avctx->rc_min_rate == avctx->rc_max_rate &&
|
||||||
|
90000LL * (avctx->rc_buffer_size - 1) >
|
||||||
|
avctx->rc_max_rate * 0xFFFFLL) {
|
||||||
|
av_log(avctx, AV_LOG_INFO,
|
||||||
|
"Warning vbv_delay will be set to 0xFFFF (=VBR) as the "
|
||||||
|
"specified vbv buffer is too large for the given bitrate!\n");
|
||||||
|
}
|
||||||
|
|
||||||
if (mpeg12->drop_frame_timecode)
|
if (mpeg12->drop_frame_timecode)
|
||||||
mpeg12->tc.flags |= AV_TIMECODE_FLAG_DROPFRAME;
|
mpeg12->tc.flags |= AV_TIMECODE_FLAG_DROPFRAME;
|
||||||
if (mpeg12->drop_frame_timecode && mpeg12->frame_rate_index != 4) {
|
if (mpeg12->drop_frame_timecode && mpeg12->frame_rate_index != 4) {
|
||||||
|
@@ -588,17 +588,6 @@ av_cold int ff_mpv_encode_init(AVCodecContext *avctx)
|
|||||||
avctx->bit_rate_tolerance = INT_MAX;
|
avctx->bit_rate_tolerance = INT_MAX;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (avctx->rc_max_rate &&
|
|
||||||
avctx->rc_min_rate == avctx->rc_max_rate &&
|
|
||||||
(s->codec_id == AV_CODEC_ID_MPEG1VIDEO ||
|
|
||||||
s->codec_id == AV_CODEC_ID_MPEG2VIDEO) &&
|
|
||||||
90000LL * (avctx->rc_buffer_size - 1) >
|
|
||||||
avctx->rc_max_rate * 0xFFFFLL) {
|
|
||||||
av_log(avctx, AV_LOG_INFO,
|
|
||||||
"Warning vbv_delay will be set to 0xFFFF (=VBR) as the "
|
|
||||||
"specified vbv buffer is too large for the given bitrate!\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((avctx->flags & AV_CODEC_FLAG_4MV) && s->codec_id != AV_CODEC_ID_MPEG4 &&
|
if ((avctx->flags & AV_CODEC_FLAG_4MV) && s->codec_id != AV_CODEC_ID_MPEG4 &&
|
||||||
s->codec_id != AV_CODEC_ID_H263 && s->codec_id != AV_CODEC_ID_H263P &&
|
s->codec_id != AV_CODEC_ID_H263 && s->codec_id != AV_CODEC_ID_H263P &&
|
||||||
s->codec_id != AV_CODEC_ID_FLV1) {
|
s->codec_id != AV_CODEC_ID_FLV1) {
|
||||||
|
Reference in New Issue
Block a user