[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 18:15:29 EEST 2020
On Sat, Aug 01, 2020 at 02:02:33PM +0100, Mark Thompson wrote:
> On 01/08/2020 12:22, lance.lmwang at gmail.com wrote:
> > 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.
>
> ... not that you can even get to that message at the moment, because the encoder wrapper only accepts YUV420P and YUV420P10 anyway.
Sorry, my commit message isn't clear, in fact, I add the code to enable YUV422
and YUV444, but by the testing result, it'll failed, so I 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;
> >
>
> Sure, LGTM.
>
> Thanks,
>
> - Mark
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
--
Thanks,
Limin Wang
More information about the ffmpeg-devel
mailing list