1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +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:
Andreas Rheinhardt
2025-02-28 00:46:23 +01:00
parent 137060d586
commit c3ab7362dd
2 changed files with 9 additions and 11 deletions

View File

@ -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)
mpeg12->tc.flags |= AV_TIMECODE_FLAG_DROPFRAME;
if (mpeg12->drop_frame_timecode && mpeg12->frame_rate_index != 4) {

View File

@ -588,17 +588,6 @@ av_cold int ff_mpv_encode_init(AVCodecContext *avctx)
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 &&
s->codec_id != AV_CODEC_ID_H263 && s->codec_id != AV_CODEC_ID_H263P &&
s->codec_id != AV_CODEC_ID_FLV1) {