It is MPEG-1/2 only.
Unified · Split
| @@ -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 | 267 | if (mpeg12->drop_frame_timecode) |
| 259 | 268 | mpeg12->tc.flags |= AV_TIMECODE_FLAG_DROPFRAME; |
| 260 | 269 | if (mpeg12->drop_frame_timecode && mpeg12->frame_rate_index != 4) { |
| @@ -588,17 +588,6 @@ av_cold int ff_mpv_encode_init(AVCodecContext *avctx) · 587 unmodified lines | ||
| 588 | 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 | 591 | if ((avctx->flags & AV_CODEC_FLAG_4MV) && s->codec_id != AV_CODEC_ID_MPEG4 && |
| 603 | 592 | s->codec_id != AV_CODEC_ID_H263 && s->codec_id != AV_CODEC_ID_H263P && |
| 604 | 593 | s->codec_id != AV_CODEC_ID_FLV1) { |