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 6E4C047618 for ; Sun, 14 Jan 2024 15:15:29 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id DE45968CE0D; Sun, 14 Jan 2024 17:15:27 +0200 (EET) Received: from smtp2.us.opalstack.com (smtp2.us.opalstack.com [23.106.47.103]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 773B468CBCA for ; Sun, 14 Jan 2024 17:15:20 +0200 (EET) Received: from localhost.localdomain (unknown [64.137.151.198]) by smtp2.us.opalstack.com (Postfix) with ESMTPSA id 938C31D01BF; Sun, 14 Jan 2024 15:15:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jeffreyknockel.com; s=dkim; t=1705245319; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3g+l+5abdHYRVwEnZPZP8X3PgzOXNDemgV5VuYdIU90=; b=hbFyJy7UmJv8pisCDsfJ21ysV0FcBGUCop9wiyJPGFcVLapU+ArrDIzZSGbyDD98tjzTBD L1cXIImDRidXxh7fPe9yvFhGZQgjL8amXjuGNy4Pqo6sVZjwTroORru7NdpLwksIXwdwQe sSWPm0cF4jq3eXIINXtg3kLwJO96e1M= From: Jeffrey Knockel To: ffmpeg-devel@ffmpeg.org Date: Sun, 14 Jan 2024 10:08:55 -0500 Message-Id: <20240114150854.321430-1-jeff@jeffreyknockel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240108145336.380094-1-jeff@jeffreyknockel.com> References: <20240108145336.380094-1-jeff@jeffreyknockel.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.74 Subject: [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 Cc: Jeffrey Knockel 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: 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_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 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 = 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 _______________________________________________ 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".