History

avcodec/mpegvideo_enc: Move vbv_delay warning to mpeg12enc.c

It is MPEG-1/2 only.

Andreas Rheinhardt committed 1 year ago

Commit c3ab7361 parent 137060d2 files · +9 −11Browse files

Unified · Split

2 files
  1. libavcodec/mpeg12enc.c +9 −0
  2. libavcodec/mpegvideo_enc.c +0 −11
libavcodec/mpeg12enc.c+9−0
@@ -255,6 +255,15 @@ static av_cold int encode_init(AVCodecContext *avctx) · 254 unmodified lines
255 }255 }
256 }256 }
257 257
258 if (avctx->rc_max_rate &&
259 avctx->rc_min_rate == avctx->rc_max_rate &&
260 90000LL * (avctx->rc_buffer_size - 1) >
261 avctx->rc_max_rate * 0xFFFFLL) {
262 av_log(avctx, AV_LOG_INFO,
263 "Warning vbv_delay will be set to 0xFFFF (=VBR) as the "
264 "specified vbv buffer is too large for the given bitrate!\n");
265 }
266
258 if (mpeg12->drop_frame_timecode)267 if (mpeg12->drop_frame_timecode)
259 mpeg12->tc.flags |= AV_TIMECODE_FLAG_DROPFRAME;268 mpeg12->tc.flags |= AV_TIMECODE_FLAG_DROPFRAME;
260 if (mpeg12->drop_frame_timecode && mpeg12->frame_rate_index != 4) {269 if (mpeg12->drop_frame_timecode && mpeg12->frame_rate_index != 4) {
libavcodec/mpegvideo_enc.c+0−11
@@ -588,17 +588,6 @@ av_cold int ff_mpv_encode_init(AVCodecContext *avctx) · 587 unmodified lines
588 avctx->bit_rate_tolerance = INT_MAX;588 avctx->bit_rate_tolerance = INT_MAX;
589 }589 }
590 590
591 if (avctx->rc_max_rate &&
592 avctx->rc_min_rate == avctx->rc_max_rate &&
593 (s->codec_id == AV_CODEC_ID_MPEG1VIDEO ||
594 s->codec_id == AV_CODEC_ID_MPEG2VIDEO) &&
595 90000LL * (avctx->rc_buffer_size - 1) >
596 avctx->rc_max_rate * 0xFFFFLL) {
597 av_log(avctx, AV_LOG_INFO,
598 "Warning vbv_delay will be set to 0xFFFF (=VBR) as the "
599 "specified vbv buffer is too large for the given bitrate!\n");
600 }
601
602 if ((avctx->flags & AV_CODEC_FLAG_4MV) && s->codec_id != AV_CODEC_ID_MPEG4 &&591 if ((avctx->flags & AV_CODEC_FLAG_4MV) && s->codec_id != AV_CODEC_ID_MPEG4 &&
603 s->codec_id != AV_CODEC_ID_H263 && s->codec_id != AV_CODEC_ID_H263P &&592 s->codec_id != AV_CODEC_ID_H263 && s->codec_id != AV_CODEC_ID_H263P &&
604 s->codec_id != AV_CODEC_ID_FLV1) {593 s->codec_id != AV_CODEC_ID_FLV1) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t