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 2129A486A7 for ; Tue, 16 Jan 2024 00:04:44 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 912D568CF92; Tue, 16 Jan 2024 02:04:43 +0200 (EET) Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4426568AC25 for ; Tue, 16 Jan 2024 02:04:37 +0200 (EET) Received: by mail.gandi.net (Postfix) with ESMTPSA id 8522F60004 for ; Tue, 16 Jan 2024 00:04:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1705363476; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=KNde4+ZRVs+8daG2IXmQG6Y1M+0LcjSFoCL5aNVmkmE=; b=dvKx/Pq/N5IyhbZk8EY1Jg1YOTxGNu7/IZOmws5PPa/nRF+NbYKPQk7k8TyBoegK3OdHB6 x9XHEQFb4CLVC4i/bLHlMLvPSrv4vr7j1If0jRwwKuEEuQALOwaBEt1TeATvnn5Hgp+l7V apcFi6zoUF4PmQneWn4cNGhkcSPjGPcwklk2nSJxm8ODduCXkvmln047dt3EnpS6R4ZQQl cB3Of6dVloB79JYyZpiYDZrHICZZdFm5WKkYHg77eRD4yq0/MN4D1Teh9woe1KaihoSeXV bSibmvA2Yu0AQMUZl7HtVj07HtlBac4k2lahvPctQ20+hHasy1h3y0GkAp6Kaw== Date: Tue, 16 Jan 2024 01:04:35 +0100 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20240116000435.GJ6420@pb2> References: <20240108145336.380094-1-jeff@jeffreyknockel.com> <20240114150854.321430-1-jeff@jeffreyknockel.com> MIME-Version: 1.0 In-Reply-To: X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH v2] avutil/pixfmt: fix AV_PIX_FMT_RGB8 description 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: multipart/mixed; boundary="===============7599181979667315392==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============7599181979667315392== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="cwb4f5ZdyUYETXgq" Content-Disposition: inline --cwb4f5ZdyUYETXgq Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jan 14, 2024 at 09:58:52PM +0100, Diederick C. Niehorster wrote: > On Sun, Jan 14, 2024 at 4:15=E2=80=AFPM Jeffrey Knockel wrote: > > > > Previously AV_PIX_FMT_RGB8 was documented as "RGB 3:3:2, > > (msb)2R 3G 3B(lsb)". While the RGB 3:3:2 part is correct, the latter > > part should be: (msb)3R 3G 2B(lsb). This commit also updates the > > format's pixdesc description to be (msb)3R 3G 2B(lsb). > > > > Signed-off-by: Jeffrey Knockel > > --- > > libavutil/pixdesc.c | 6 +++--- > > libavutil/pixfmt.h | 2 +- > > 2 files changed, 4 insertions(+), 4 deletions(-) > > > > diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c > > index 0db4167934..f6d4d01460 100644 > > --- a/libavutil/pixdesc.c > > +++ b/libavutil/pixdesc.c > > @@ -530,9 +530,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descript= ors[AV_PIX_FMT_NB] =3D { > > .log2_chroma_w =3D 0, > > .log2_chroma_h =3D 0, > > .comp =3D { > > - { 0, 1, 0, 6, 2 }, /* R */ > > - { 0, 1, 0, 3, 3 }, /* G */ > > - { 0, 1, 0, 0, 3 }, /* B */ > > + { 0, 1, 0, 5, 3 }, /* R */ > > + { 0, 1, 0, 2, 3 }, /* G */ > > + { 0, 1, 0, 0, 2 }, /* B */ > > }, > > .flags =3D AV_PIX_FMT_FLAG_RGB, > > }, > > diff --git a/libavutil/pixfmt.h b/libavutil/pixfmt.h > > index 58f9ad28bd..9c87571f49 100644 > > --- a/libavutil/pixfmt.h > > +++ b/libavutil/pixfmt.h > > @@ -83,7 +83,7 @@ enum AVPixelFormat { > > AV_PIX_FMT_BGR8, ///< packed RGB 3:3:2, 8bpp, (msb)2B 3G 3R(= lsb) > > AV_PIX_FMT_BGR4, ///< packed RGB 1:2:1 bitstream, 4bpp, (msb= )1B 2G 1R(lsb), a byte contains two pixels, the first pixel in the byte is = the one composed by the 4 msb bits > > AV_PIX_FMT_BGR4_BYTE, ///< packed RGB 1:2:1, 8bpp, (msb)1B 2G 1R(= lsb) > > - AV_PIX_FMT_RGB8, ///< packed RGB 3:3:2, 8bpp, (msb)2R 3G 3B(= lsb) > > + AV_PIX_FMT_RGB8, ///< packed RGB 3:3:2, 8bpp, (msb)3R 3G 2B(= lsb) > > AV_PIX_FMT_RGB4, ///< packed RGB 1:2:1 bitstream, 4bpp, (msb= )1R 2G 1B(lsb), a byte contains two pixels, the first pixel in the byte is = the one composed by the 4 msb bits > > AV_PIX_FMT_RGB4_BYTE, ///< packed RGB 1:2:1, 8bpp, (msb)1R 2G 1B(= lsb) > > AV_PIX_FMT_NV12, ///< planar YUV 4:2:0, 12bpp, 1 plane for Y = and 1 plane for the UV components, which are interleaved (first byte U and = the following byte V) > > -- > > 2.34.1 >=20 > LGTM. > Tested. Without this patch, the output of avutil av_read_image_line2() > is all wrong, with it applied it is correct. will apply thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Opposition brings concord. Out of discord comes the fairest harmony. -- Heraclitus --cwb4f5ZdyUYETXgq Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZaXIEAAKCRBhHseHBAsP q/guAJ9VLVsL2EzKN5kSd8w04lXAuLujAgCeM2B1FxX8ak1wQL7zk27VsTyQU8c= =sPPP -----END PGP SIGNATURE----- --cwb4f5ZdyUYETXgq-- --===============7599181979667315392== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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". --===============7599181979667315392==--