summaryrefslogtreecommitdiff
path: root/Documentation/userspace-api/media
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-03-06 08:34:41 +0100
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-04-14 10:32:45 +0200
commit2e9a7e0bc191c6dc97a0b3cb994b83834179a42b (patch)
tree82cf26174d0e40a7863ff99cd326d709d334dbce /Documentation/userspace-api/media
parentff768f596fa19e719c88fbc9bd65e13145d944e7 (diff)
media: docs: move fourcc file to the uAPI document
This file gives a hint about how fourcc should be named. It is on a very weird place, as such kind of thing belongs to the uAPI guide. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'Documentation/userspace-api/media')
-rw-r--r--Documentation/userspace-api/media/v4l/common.rst1
-rw-r--r--Documentation/userspace-api/media/v4l/fourcc.rst32
2 files changed, 33 insertions, 0 deletions
diff --git a/Documentation/userspace-api/media/v4l/common.rst b/Documentation/userspace-api/media/v4l/common.rst
index af28ac1bcf88..7d81c58a13cd 100644
--- a/Documentation/userspace-api/media/v4l/common.rst
+++ b/Documentation/userspace-api/media/v4l/common.rst
@@ -57,6 +57,7 @@ applicable to all devices.
ext-ctrls-fm-tx
ext-ctrls-fm-rx
ext-ctrls-detect
+ fourcc
format
planar-apis
selection-api
diff --git a/Documentation/userspace-api/media/v4l/fourcc.rst b/Documentation/userspace-api/media/v4l/fourcc.rst
new file mode 100644
index 000000000000..d3482c40da62
--- /dev/null
+++ b/Documentation/userspace-api/media/v4l/fourcc.rst
@@ -0,0 +1,32 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+Guidelines for Video4Linux pixel format 4CCs
+============================================
+
+Guidelines for Video4Linux 4CC codes defined using v4l2_fourcc() are
+specified in this document. First of the characters defines the nature of
+the pixel format, compression and colour space. The interpretation of the
+other three characters depends on the first one.
+
+Existing 4CCs may not obey these guidelines.
+
+Raw bayer
+---------
+
+The following first characters are used by raw bayer formats:
+
+- B: raw bayer, uncompressed
+- b: raw bayer, DPCM compressed
+- a: A-law compressed
+- u: u-law compressed
+
+2nd character: pixel order
+
+- B: BGGR
+- G: GBRG
+- g: GRBG
+- R: RGGB
+
+3rd character: uncompressed bits-per-pixel 0--9, A--
+
+4th character: compressed bits-per-pixel 0--9, A--