From patchwork Mon Jan 8 14:53:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeffrey Knockel X-Patchwork-Id: 45530 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:6a93:b0:199:de12:6fa6 with SMTP id bi19csp114492pzb; Mon, 8 Jan 2024 06:57:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IHKdd7IQgUSazkFM1d5YlZKfSvVf2kDks53PrOpuDI876euvbk7Qytya8/pAUhM6TcAExBP X-Received: by 2002:a17:906:8455:b0:a2b:1df5:47c3 with SMTP id e21-20020a170906845500b00a2b1df547c3mr75645ejy.87.1704725840297; Mon, 08 Jan 2024 06:57:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704725840; cv=none; d=google.com; s=arc-20160816; b=xwnxaA5CJSORyOObssTeptlH8f/D2KnrJe7ChNxTHMYraGNdOCDGfW8d+pnC2qSumR 5xSc0tDAcyv03X/tqNXFDnBL50IfRA/7yW5UCZ58wVwcASd9qSR5joftLnzOGNyF6yye 5CRhvllhmcFeFJ06Wlra5VgVbWbzX1nx9ZyINuVH22p7QxZlsuVqjuQMdtUD44mOn+T8 u3JOuueddvnyT1aEUkBnERizeSMRqpTv+cUChF9zyTOOKwGJ3HqGS0b1PHx4fsKf8owi /JejDsK9QLs4Z25LHLLBQa+BMKXXye/BV2PVT0eQpnaSAc/1b7YMhDl9IrC7DoL51u19 jo1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:message-id:date:to:from :dkim-signature:delivered-to; bh=vTSm09TpaYfLv8XhqB6TpvOZzfgvJex6xH/WKSFLGys=; fh=xGtG+lnMhutSIzbZasuiUMEmYI5HMPGJtmaTRKB8a6U=; b=LuSv1d1ohZsm+nclb7RyIdDXp8xFSU+hVbCydkU2EduRO0GYSdgeekKfyyNQIPYUPK Vy1jIuNENJovCyr3ThstLYGzMDNjNLpPtIspXXjJFvaJf0dA+1XnkKdfYoEIcBYuKrHb RiwHiV+lc4ABR61frO2xnlYkSBsJA2mgvQ5o3M8/BmbjXlCOn3LvOeDRwH/otoFSkh21 5edjsOSPFdkmlmdVNOydjlKmHimYEmZguMfIztZZfjIni+uJ2hxJnOf7BYWEj8GTSuw+ yyUFohRtH9HtshB3jRoxDLXDCNi7kDrY2R6qtNJ7Dn2zJOCF3W5fZw07PqSSi0jIw5yZ PPgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@jeffreyknockel.com header.s=dkim header.b=MXTpyniC; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=jeffreyknockel.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id k25-20020a170906681900b00a2791b24dd1si3175419ejr.967.2024.01.08.06.57.19; Mon, 08 Jan 2024 06:57:20 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@jeffreyknockel.com header.s=dkim header.b=MXTpyniC; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=jeffreyknockel.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 96F9868CC4A; Mon, 8 Jan 2024 16:57:15 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from smtp2.us.opalstack.com (smtp2.us.opalstack.com [23.106.47.103]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2064068CA09 for ; Mon, 8 Jan 2024 16:57:08 +0200 (EET) Received: from polaris.citlab.utoronto.ca (unknown [128.100.127.106]) by smtp2.us.opalstack.com (Postfix) with ESMTPSA id B22E71CFF58; Mon, 8 Jan 2024 14:57:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jeffreyknockel.com; s=dkim; t=1704725826; 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; bh=Fn9rXGxuCjLM0inoHmcQ+dtkRsWaycBoUWYOt9VMqu0=; b=MXTpyniCYWXkIk6D1QXpaaIXGQqRyOVlpsdVOs8vZ96odKMqinUQ0dCIY9QZwYLuefR6ZD yQtQfwzkakXJEm6SdS7w6D8US9g+KlqQp7BfTmQhJlAPZJMXC20rrUaageY4KAPE2oF9yc B9KuAugv2aYEYf13LSMBzcu2A3Y1byE= From: Jeffrey Knockel To: ffmpeg-devel@ffmpeg.org Date: Mon, 8 Jan 2024 09:53:37 -0500 Message-Id: <20240108145336.380094-1-jeff@jeffreyknockel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-1.42 Subject: [FFmpeg-devel] [PATCH] 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: FXEOyRO0Gd/t Previously the description was partially mistaken, explaining the format 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). The corresponding bit masks are red: 0xE0, green: 0x1C, blue: 0x03. Signed-off-by: Jeffrey Knockel --- libavutil/pixfmt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)