From nobody Sun Apr 12 10:34:06 2026 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 07AEF3BE160 for ; Wed, 4 Mar 2026 14:05:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772633125; cv=none; b=JJHw/LOfIZ+EWwlvktxYm2gS42/zyfKU4ASgSOrRup7rV+0+oxsVefr11zhgTVfDIoj8eNLDEQqjXPR15vVpwPXIGcb8kftXaKClZNwtKD17maB2ygbXckW3vqf2dWPyxa+RLd2uPG3wuoPUSZmQQUYgudRv6BEWIEbBHcggNoQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772633125; c=relaxed/simple; bh=fCZ7l1zWLuOmc9ZecF6FygLedL5iYBbceOgpkaXdciU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=KCsoURjJ8n5tgmfz2paqgPybQp6145qyFbIfO0PM4Dg/hZmOFfRORNece8kzyGOiwyyikytYdAiJa2bLZYJP34LQFiofEmLnhxRxeJVMOM2Lt6OOu1k+3PyLEZu9X1EWhpfLj6jqMwkDvoeKRC3YLDqixVeGkE44xffZfXVsptM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=raspberrypi.com; spf=pass smtp.mailfrom=raspberrypi.com; dkim=pass (2048-bit key) header.d=raspberrypi.com header.i=@raspberrypi.com header.b=qnwmS+Vk; arc=none smtp.client-ip=209.85.128.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=raspberrypi.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=raspberrypi.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="qnwmS+Vk" Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-483a2338616so43245405e9.0 for ; Wed, 04 Mar 2026 06:05:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1772633121; x=1773237921; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=K5QNeVnlLBH3/bXg5RBtmhfoseGDTb1QFshJs8flMKI=; b=qnwmS+Vkv9ylFabcq8b/wfb+jSGGTPnRmC/pcr/w6nK/TbIwFRNVlIOtRRBq4meViV kJlILGZ1fmW52RO91Qz9GKCUixrdDeSgajfXsKH8Qe5DDMpJm3jymoDsYIDkZkzf0AMG FPOBYtFLtOBABhTSap9KkJQBuOLfDP6nplpbjV3VxQuSd82K/ZfNYwMtB5VdALqGX0Zw vsO0mo5n5OecvGnyVHzdNOFREsClyAUAaZ1w0tDxMvPWILAsjcFHH8wSsBg6b6SRy9rT szWh9XznCuTUJ2LlmWIGBtiNSY4CwKu55RdDBDSL75s057Q2qsMog2N0snAeKTaW2xjh lcsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772633121; x=1773237921; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=K5QNeVnlLBH3/bXg5RBtmhfoseGDTb1QFshJs8flMKI=; b=qE/FNHUPCWicAT2xHw+9RnyQRs5Tam0JZ/s3kBBNdSr6alK6sI/H5s43Iqq69ul5QO ShzI2+tFy7CQahH1a8crqAaKPalH4Q0dsyrEQD7E5Zl+aDj70ljs20M+1ejL0njVdgJu w0B7NKhBcVXNsQW6dT7Nd4QVAKe6A6N0rt/YRfzGZueiHKcynRBu8M7+ZVohWhv/m5Gx hl8kE7BCtCrewYep+JyQ2ukNoHxHdGGn9eUgm6Q3NiPdvkdlRzGmh4og0SQhN9x4tZbP UVgOPxk3rPw356fYocndA5O7kp+iUuPXAUy1CnIRVJ8x5CRf8BlBLhEt26gGK1zZyDDK MEEw== X-Forwarded-Encrypted: i=1; AJvYcCVLkBU+T8aB29zOkpnHIrOVcU5UNJuyvcPvoNzd3Llx+Wj2kLCWKtpl59c1gpMe3Dy8LTmc6/b5AiorYKQ=@vger.kernel.org X-Gm-Message-State: AOJu0YydHYmsxqgrlbt/1a4MXcrLlCW+JgeFqSvibP56tljK/ZDbfUs+ SilsUsSxPS/i+/ItYagenNv6a4pOZ7a7UA226DU16ctR7jqNAEzvEl01ElBM04/TAT4= X-Gm-Gg: ATEYQzwpYLOBAYhWyukxlkVonSdyMjkrNf0JYFkuUT29rE1Ps6nfa1taTB7xBluqbA+ 32Rl/c/OxzY4/P8SD9EqwWeVQXILQu8Iog/KxHj6WBFMXlQQH1O2D9OrkILmWN+r499GqObsuoM QwCP2dVvsHb9n7OEyepBVydMiz3h4erKEDmnriKZbE2TRfwJ9+Kk7oGA5Aq+uB901IVIdkjHoLT TI/gVM6M2GGnPzLdQ8yfXDoxWFX+bsnnPXdlvFNVlMhcKTVpAc5N7u4I4Jw7E6j0D+ef85Awi5V /WO+g1ExqWDrkMig7SbFHcBA8Ql07jt29p4ZAaE2do0hqx2kqYal+UeOGBRDL8WpKj2DNrj5Owv F2+NPj9gxtnEUe5tNuf8FTsPeKc8TNARxq9wAzKRXu6Odw+lJ6Mh42a24pEPVBmfQKJAQ0/NFRH pK2dsmSPRBSHJmJpGaDV0qrui3 X-Received: by 2002:a05:600c:37ce:b0:480:4a90:1b06 with SMTP id 5b1f17b1804b1-485198be6d5mr37123935e9.34.1772633121379; Wed, 04 Mar 2026 06:05:21 -0800 (PST) Received: from [127.0.1.1] ([2a00:1098:3142:e::8]) by smtp.googlemail.com with ESMTPSA id 5b1f17b1804b1-485187b6ffbsm59296165e9.2.2026.03.04.06.05.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Mar 2026 06:05:20 -0800 (PST) From: Dave Stevenson Date: Wed, 04 Mar 2026 14:05:15 +0000 Subject: [PATCH v6 2/6] docs: uapi: media: Document Raspberry Pi NV12 column format Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260304-media-rpi-hevc-dec-v6-2-93868ae6dff8@raspberrypi.com> References: <20260304-media-rpi-hevc-dec-v6-0-93868ae6dff8@raspberrypi.com> In-Reply-To: <20260304-media-rpi-hevc-dec-v6-0-93868ae6dff8@raspberrypi.com> To: Sakari Ailus , Laurent Pinchart , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Florian Fainelli , Broadcom internal kernel review list , John Cox , Dom Cobley , review list , Ezequiel Garcia Cc: Nicolas Dufresne , John Cox , Stefan Wahren , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Dave Stevenson X-Mailer: b4 0.14.1 The Raspberry Pi HEVC decoder uses a tiled format based on columns for 8 and 10 bit YUV images, so document them as NV12MT_COL128 and NV12MT_10_COL128. Signed-off-by: Dave Stevenson --- .../userspace-api/media/v4l/pixfmt-yuv-planar.rst | 46 ++++++++++++++++++= ++++ 1 file changed, 46 insertions(+) diff --git a/Documentation/userspace-api/media/v4l/pixfmt-yuv-planar.rst b/= Documentation/userspace-api/media/v4l/pixfmt-yuv-planar.rst index 0631919bd667..1aa4182b8adc 100644 --- a/Documentation/userspace-api/media/v4l/pixfmt-yuv-planar.rst +++ b/Documentation/userspace-api/media/v4l/pixfmt-yuv-planar.rst @@ -957,6 +957,52 @@ Data in the 12 high bits, zeros in the 4 low bits, arr= anged in little endian ord - Cr\ :sub:`11` =20 =20 +.. _V4L2-PIX-FMT-NV12MT-COL128: +.. _V4L2-PIX-FMT-NV12MT-10-COL128: + +NV12MT_COL128 and NV12MT_10_COL128 +---------------------------------- + +``V4L2_PIX_FMT_NV12MT_COL128`` is a tiled version of +``V4L2_PIX_FMT_NV12M`` where the two planes are split into 128 byte wide c= olumns +of Y or interleaved CbCr. The height is always aligned to a multiple of 8 = lines. + +V4L2_PIX_FMT_NV12MT_10_COL128 expands that as a 10 bit format where 3 10 b= it +values are packed into a 32bit word. A 128 byte wide column therefore hold= s 96 +samples (either Y or interleaved CrCb). That effectively makes it 6 values= in a +64 bit word for the CbCr plane, as the values always go in pairs. + +Bit-packed representation. + +.. tabularcolumns:: |p{1.2cm}||p{1.2cm}||p{1.2cm}||p{1.2cm}|p{3.2cm}|p{3.2= cm}| + +.. flat-table:: + :header-rows: 0 + :stub-columns: 0 + :widths: 8 8 8 8 + + * - Y'\ :sub:`00[7:0]` + - Y'\ :sub:`01[5:0] (bits 7--2)` Y'\ :sub:`00[9:8]`\ (bits 1--0) + - Y'\ :sub:`02[3:0] (bits 7--4)` Y'\ :sub:`01[9:6]`\ (bits 3--0) + - unused (bits 7--6)` Y'\ :sub:`02[9:4]`\ (bits 5--0) + +.. tabularcolumns:: |p{1.2cm}||p{1.2cm}||p{1.2cm}||p{1.2cm}|p{3.2cm}|p{3.2= cm}| + +.. flat-table:: + :header-rows: 0 + :stub-columns: 0 + :widths: 12 12 12 12 12 12 12 12 + + * - Cb\ :sub:`00[7:0]` + - Cr\ :sub:`00[5:0]`\ (bits 7--2) Cb\ :sub:`00[9:8]`\ (bits 1--0) + - Cb\ :sub:`01[3:0]`\ (bits 7--4) Cr\ :sub:`00[9:6]`\ (bits 3--0) + - unused (bits 7--6) Cb\ :sub:`02[9:4]`\ (bits 5--0) + - Cr\ :sub:`01[7:0]` + - Cb\ :sub:`02[5:0]`\ (bits 7--2) Cr\ :sub:`01[9:8]`\ (bits 1--0) + - Cr\ :sub:`02[3:0]`\ (bits 7--4) Cb\ :sub:`02[9:6]`\ (bits 3--0) + - unused (bits 7--6) Cr\ :sub:`02[9:4]`\ (bits 5--0) + + Fully Planar YUV Formats =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 --=20 2.34.1