You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-04 22:03:09 +02:00
avcodec/mpegvideo_enc: Move q_scale_type check to mpeg12enc.c
The MPEG-2 encoder is the only encoder supporting q_scale_type. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@ -201,6 +201,14 @@ static av_cold int encode_init(AVCodecContext *avctx)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mpeg12->mpeg.q_scale_type == 1) {
|
||||||
|
if (avctx->qmax > 28) {
|
||||||
|
av_log(avctx, AV_LOG_ERROR,
|
||||||
|
"non linear quant only supports qmax <= 28 currently\n");
|
||||||
|
return AVERROR_PATCHWELCOME;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (avctx->profile == AV_PROFILE_UNKNOWN) {
|
if (avctx->profile == AV_PROFILE_UNKNOWN) {
|
||||||
if (avctx->level != AV_LEVEL_UNKNOWN) {
|
if (avctx->level != AV_LEVEL_UNKNOWN) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "Set profile and level\n");
|
av_log(avctx, AV_LOG_ERROR, "Set profile and level\n");
|
||||||
|
@ -705,14 +705,6 @@ av_cold int ff_mpv_encode_init(AVCodecContext *avctx)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (s->q_scale_type == 1) {
|
|
||||||
if (avctx->qmax > 28) {
|
|
||||||
av_log(avctx, AV_LOG_ERROR,
|
|
||||||
"non linear quant only supports qmax <= 28 currently\n");
|
|
||||||
return AVERROR_PATCHWELCOME;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (avctx->slices > 1 &&
|
if (avctx->slices > 1 &&
|
||||||
!(avctx->codec->capabilities & AV_CODEC_CAP_SLICE_THREADS)) {
|
!(avctx->codec->capabilities & AV_CODEC_CAP_SLICE_THREADS)) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "Multiple slices are not supported by this codec\n");
|
av_log(avctx, AV_LOG_ERROR, "Multiple slices are not supported by this codec\n");
|
||||||
|
Reference in New Issue
Block a user