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 MPEG-4 specific check to mpeg4videoenc.c
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@@ -1305,6 +1305,15 @@ static av_cold int encode_init(AVCodecContext *avctx)
|
|||||||
|
|
||||||
ff_thread_once(&init_static_once, mpeg4_encode_init_static);
|
ff_thread_once(&init_static_once, mpeg4_encode_init_static);
|
||||||
|
|
||||||
|
if (avctx->time_base.den > (1 << 16) - 1) {
|
||||||
|
av_log(avctx, AV_LOG_ERROR,
|
||||||
|
"timebase %d/%d not supported by MPEG 4 standard, "
|
||||||
|
"the maximum admitted value for the timebase denominator "
|
||||||
|
"is %d\n", avctx->time_base.num, avctx->time_base.den,
|
||||||
|
(1 << 16) - 1);
|
||||||
|
return AVERROR(EINVAL);
|
||||||
|
}
|
||||||
|
|
||||||
m4->time_increment_bits = av_log2(avctx->time_base.den - 1) + 1;
|
m4->time_increment_bits = av_log2(avctx->time_base.den - 1) + 1;
|
||||||
|
|
||||||
s->fcode_tab = fcode_tab + MAX_MV;
|
s->fcode_tab = fcode_tab + MAX_MV;
|
||||||
|
@@ -737,16 +737,6 @@ av_cold int ff_mpv_encode_init(AVCodecContext *avctx)
|
|||||||
|
|
||||||
av_log(avctx, AV_LOG_DEBUG, "intra_quant_bias = %d inter_quant_bias = %d\n",s->intra_quant_bias,s->inter_quant_bias);
|
av_log(avctx, AV_LOG_DEBUG, "intra_quant_bias = %d inter_quant_bias = %d\n",s->intra_quant_bias,s->inter_quant_bias);
|
||||||
|
|
||||||
if (avctx->codec_id == AV_CODEC_ID_MPEG4 &&
|
|
||||||
avctx->time_base.den > (1 << 16) - 1) {
|
|
||||||
av_log(avctx, AV_LOG_ERROR,
|
|
||||||
"timebase %d/%d not supported by MPEG 4 standard, "
|
|
||||||
"the maximum admitted value for the timebase denominator "
|
|
||||||
"is %d\n", avctx->time_base.num, avctx->time_base.den,
|
|
||||||
(1 << 16) - 1);
|
|
||||||
return AVERROR(EINVAL);
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (avctx->codec->id) {
|
switch (avctx->codec->id) {
|
||||||
#if CONFIG_MPEG1VIDEO_ENCODER || CONFIG_MPEG2VIDEO_ENCODER
|
#if CONFIG_MPEG1VIDEO_ENCODER || CONFIG_MPEG2VIDEO_ENCODER
|
||||||
case AV_CODEC_ID_MPEG2VIDEO:
|
case AV_CODEC_ID_MPEG2VIDEO:
|
||||||
|
Reference in New Issue
Block a user