On 01/08/2020 12:22, [email protected] wrote:
From: Limin Wang <[email protected]>

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.

... not that you can even get to that message at the moment, because the 
encoder wrapper only accepts YUV420P and YUV420P10 anyway.


Signed-off-by: Limin Wang <[email protected]>
---
  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;


Sure, LGTM.

Thanks,

- Mark
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".

Reply via email to