From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 15CFB44794 for ; Tue, 25 Oct 2022 20:58:05 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0127968B86B; Tue, 25 Oct 2022 23:58:02 +0300 (EEST) Received: from mail-yb1-f177.google.com (mail-yb1-f177.google.com [209.85.219.177]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1B7D268B86B for ; Tue, 25 Oct 2022 23:57:57 +0300 (EEST) Received: by mail-yb1-f177.google.com with SMTP id j130so16267519ybj.9 for ; Tue, 25 Oct 2022 13:57:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=KOO9BghZb6j4/L6x6x2JEj5nG4KknKDd+RwWFH/PCGc=; b=r5JTMpeuhRhdV/xsqS5kWS7kNL5YXdWPFRqq9VvZY0duUidivJHSFIOxGBJEMEbhaO dXhk5vBvpVem1ymVcwE+57vFRZ8RcFx9u7kcwux+lpMdOabTenN6VMM/NSooQzodaF+G yDYjsZT85Vk4JJhZMMrw0bttWNa5iqcZpAOpfniXQ+JhSM/s/tP/u6qiqPuNICLfWSqk 72awlmVJsdFH9GPX6IoEmiAb3LA4MVGP2CWzgetxiBdNIvm/AATbfr3yvUTwVGz8HF+G l/cg6840zA/HZrPYuWKCKVdNfC9T9+/xQUGzHaNgdEOarim45Uzcoe7TVLtchv0aLXeD OnCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=KOO9BghZb6j4/L6x6x2JEj5nG4KknKDd+RwWFH/PCGc=; b=4+szp6kYOayozLAmYxScIYVlNqyLWcOJSRAzLW3DRQneKaLbz3tsmVxfEX1JzORGQ8 X2jUGb3PzL9uBc1x+Oqf/uQMKDixOWuDW9npmZWJxtI9ZnGOG3i4ils6lcTit8bz1c2U 5lvRlt1Y6X0XAZe4/+DqxXvyp2rNXmdS7djfh0PaM4pr+hU+BmqbgleGVhixv1QD9T+J 2Ybtdf96AzAO46O1qQgWrGOB2dz79PWdUckhfyDD8DentYLrxiZ8LCkan7xIEGZE6BT+ ge2d85AeOlXHCGJ7GE77PsBR488Iu22++Ka1gPU1Mvc/4J3zG8sQ+bjF4ujOyYm5WVSx xAhg== X-Gm-Message-State: ACrzQf1qsylt7Sc6fVMR3fiCcHUulwr8Izt8swwLl8V4DARcEv8TIc7E jhSfWPl8Q5RiMXcXIwMuEmfqs9WWarNjk038zkDhHsAuZlk= X-Google-Smtp-Source: AMsMyM4TXOYJF1VH18xGkJkcr2UYtp2gaCX9XQwgPfWZxDcf/XABPxMGLBPJ8/ErQI2+MINtLNn86YXwcpiOJVBh9Ig= X-Received: by 2002:a05:6902:72d:b0:6be:ba8a:605d with SMTP id l13-20020a056902072d00b006beba8a605dmr37973088ybt.615.1666731475074; Tue, 25 Oct 2022 13:57:55 -0700 (PDT) MIME-Version: 1.0 References: <20221025182834.3925004-1-jzern@google.com> In-Reply-To: <20221025182834.3925004-1-jzern@google.com> From: Vignesh Venkatasubramanian Date: Tue, 25 Oct 2022 13:57:43 -0700 Message-ID: To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [PATCH] avcodec/libaomdec: fix pix_fmt w/AVCOL_SPC_RGB X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Tue, Oct 25, 2022 at 11:28 AM James Zern wrote: > > Signed-off-by: James Zern > --- > libavcodec/libaomdec.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/libavcodec/libaomdec.c b/libavcodec/libaomdec.c > index 378d638a89..53982559d9 100644 > --- a/libavcodec/libaomdec.c > +++ b/libavcodec/libaomdec.c > @@ -113,15 +113,19 @@ 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; > + avctx->pix_fmt = avctx->colorspace == AVCOL_SPC_RGB ? > + AV_PIX_FMT_GBRP : AV_PIX_FMT_YUV444P; > avctx->profile = FF_PROFILE_AV1_HIGH; > return 0; > } else if (img->bit_depth == 10) { > avctx->pix_fmt = AV_PIX_FMT_YUV444P10; > + avctx->pix_fmt = avctx->colorspace == AVCOL_SPC_RGB ? > + AV_PIX_FMT_GBRP10 : AV_PIX_FMT_YUV444P10; > avctx->profile = FF_PROFILE_AV1_HIGH; > return 0; > } else if (img->bit_depth == 12) { > - avctx->pix_fmt = AV_PIX_FMT_YUV444P12; > + avctx->pix_fmt = avctx->colorspace == AVCOL_SPC_RGB ? > + AV_PIX_FMT_GBRP12 : AV_PIX_FMT_YUV444P12; > avctx->profile = FF_PROFILE_AV1_PROFESSIONAL; > return 0; > } else { > -- > 2.38.0.135.g90850a2211-goog > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". lgtm. I can confirm that AV1 files with gbrp pixel format play back properly with ffplay with this patch (without this patch it does not look right). -- Vignesh _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".