[FFmpeg-devel] [PATCH 3/5] avcodec/libsvtav1: remove the unsupported color format and profile
lance.lmwang at gmail.com
lance.lmwang at gmail.com
Sat Aug 1 14:22:41 EEST 2020
From: Limin Wang <lance.lmwang at gmail.com>
If you enable YUV422 or YUV444, SVT-AV1 library will report "only support 420 now" error,
so it's better to remove the unsupported code.
Signed-off-by: Limin Wang <lance.lmwang at gmail.com>
---
libavcodec/libsvtav1.c | 13 -------------
1 file changed, 13 deletions(-)
diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c
index eb6043b..3e3b907 100644
--- a/libavcodec/libsvtav1.c
+++ b/libavcodec/libsvtav1.c
@@ -160,10 +160,6 @@ static int config_enc_params(EbSvtAv1EncConfiguration *param,
if (desc->log2_chroma_w == 1 && desc->log2_chroma_h == 1)
param->encoder_color_format = EB_YUV420;
- else if (desc->log2_chroma_w == 1 && desc->log2_chroma_h == 0)
- param->encoder_color_format = EB_YUV422;
- else if (!desc->log2_chroma_w && !desc->log2_chroma_h)
- param->encoder_color_format = EB_YUV444;
else {
av_log(avctx, AV_LOG_ERROR , "Unsupported pixel format\n");
return AVERROR(EINVAL);
@@ -175,15 +171,6 @@ static int config_enc_params(EbSvtAv1EncConfiguration *param,
if (avctx->level != FF_LEVEL_UNKNOWN)
param->level = avctx->level;
- if ((param->encoder_color_format == EB_YUV422 || param->encoder_bit_depth > 10)
- && param->profile != FF_PROFILE_AV1_PROFESSIONAL ) {
- av_log(avctx, AV_LOG_WARNING, "Forcing Professional profile\n");
- param->profile = FF_PROFILE_AV1_PROFESSIONAL;
- } else if (param->encoder_color_format == EB_YUV444 && param->profile != FF_PROFILE_AV1_HIGH) {
- av_log(avctx, AV_LOG_WARNING, "Forcing High profile\n");
- param->profile = FF_PROFILE_AV1_HIGH;
- }
-
// Update param from options
param->hierarchical_levels = svt_enc->hierarchical_level;
param->enc_mode = svt_enc->enc_mode;
--
1.8.3.1
More information about the ffmpeg-devel
mailing list