[FFmpeg-devel] [PATCH]lavc/aomdec: Allow RGB decoding

Carl Eugen Hoyos ceffmpeg at gmail.com
Sun Oct 11 21:07:22 EEST 2020


Am So., 11. Okt. 2020 um 19:51 Uhr schrieb James Almer <jamrial at gmail.com>:
>
> On 10/11/2020 2:27 PM, Carl Eugen Hoyos wrote:
> > Hi!
> >
> > Attached patch fixes ticket #8929 for me.
> >
> > Please comment, Carl Eugen
>
> > From 580477c4b0e07fa5436474ae732596bed5faf2d4 Mon Sep 17 00:00:00 2001
> > From: Carl Eugen Hoyos <ceffmpeg at gmail.com>
> > Date: Sun, 11 Oct 2020 19:25:10 +0200
> > Subject: [PATCH] lavc/aomdec: Allow RGB decoding.
> >
> > Fixes ticket #8929.
> > ---
> >  libavcodec/libaomdec.c | 18 +++++++++++++++---
> >  1 file changed, 15 insertions(+), 3 deletions(-)
> >
> > diff --git a/libavcodec/libaomdec.c b/libavcodec/libaomdec.c
> > index 1430a651fe..f83c11ddf8 100644
> > --- a/libavcodec/libaomdec.c
> > +++ b/libavcodec/libaomdec.c
> > @@ -134,15 +134,27 @@ static int set_pix_fmt(AVCodecContext *avctx, struct aom_image *img)
> >      case AOM_IMG_FMT_I444:
> >      case AOM_IMG_FMT_I44416:
> >          if (img->bit_depth == 8) {
> > -            avctx->pix_fmt = AV_PIX_FMT_YUV444P;
> > +            if (avctx->color_trc == AVCOL_TRC_IEC61966_2_1) {
>
> AV1 signals RGB with the combination of AVCOL_SPC_RGB, AVCOL_PRI_BT709
> and AVCOL_TRC_IEC61966_2_1, not just the latter alone.

Testing for bt709 seems simply wrong to me.

Concerning the "colorspace":
Is it possible that this is badly specified?
Since we don't do this so far, it should not be part of this patch imo.

Carl Eugen


More information about the ffmpeg-devel mailing list