Files
external_libcamera/src/libcamera/formats.yaml
Laurent Pinchart 73570c0637 libcamera: Switch internal YAML files to YAML 1.1
The python3-yaml package (containing the PyYAML Python package) shipped
by Debian stable is documented as a YAML 1.1 parser:

    Python3-yaml is a complete YAML 1.1 parser and emitter for Python3.

PyYAML doesn't implement YAML 1.2 support, but ignores the minor number
of the YAML directive, and thus doesn't choke on the libcamera internal
files used to generate format- and control-related source code that
explicitly state conformance with YAML 1.2. Still, given that we don't
use any feature of YAML 1.2, and that the tuning data files now use YAML
1.1, switch the internal YAML files to version 1.1 as well for
consistency.

The main drawback of YAML 1.1 is that the unquoted literal strings Yes,
No, On and Off will be parsed as booleans. We need to be careful to
avoid those values in YAML files, until libcamera can switch to YAML 1.2
once more recent versions of libyaml get shipped by the distributions we
want to support. This is however not an issue introduced by this change,
as the existing YAML 1.2 files were parsed with the YAML 1.1 string
literal parsing rules anyway.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Florian Sylvestre <fsylvestre@baylibre.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2022-08-04 18:48:27 +03:00

165 lines
3.4 KiB
YAML

# SPDX-License-Identifier: LGPL-2.1-or-later
#
# Copyright (C) 2020, Google Inc.
#
%YAML 1.1
---
formats:
- R8:
fourcc: DRM_FORMAT_R8
- R10:
fourcc: DRM_FORMAT_R10
- R12:
fourcc: DRM_FORMAT_R12
- RGB565:
fourcc: DRM_FORMAT_RGB565
- RGB565_BE:
fourcc: DRM_FORMAT_RGB565
big_endian: true
- RGB888:
fourcc: DRM_FORMAT_RGB888
- BGR888:
fourcc: DRM_FORMAT_BGR888
- XRGB8888:
fourcc: DRM_FORMAT_XRGB8888
- XBGR8888:
fourcc: DRM_FORMAT_XBGR8888
- RGBX8888:
fourcc: DRM_FORMAT_RGBX8888
- BGRX8888:
fourcc: DRM_FORMAT_BGRX8888
- ARGB8888:
fourcc: DRM_FORMAT_ARGB8888
- ABGR8888:
fourcc: DRM_FORMAT_ABGR8888
- RGBA8888:
fourcc: DRM_FORMAT_RGBA8888
- BGRA8888:
fourcc: DRM_FORMAT_BGRA8888
- YUYV:
fourcc: DRM_FORMAT_YUYV
- YVYU:
fourcc: DRM_FORMAT_YVYU
- UYVY:
fourcc: DRM_FORMAT_UYVY
- VYUY:
fourcc: DRM_FORMAT_VYUY
- AVUY8888:
fourcc: DRM_FORMAT_AVUY8888
- XVUY8888:
fourcc: DRM_FORMAT_XVUY8888
- NV12:
fourcc: DRM_FORMAT_NV12
- NV21:
fourcc: DRM_FORMAT_NV21
- NV16:
fourcc: DRM_FORMAT_NV16
- NV61:
fourcc: DRM_FORMAT_NV61
- NV24:
fourcc: DRM_FORMAT_NV24
- NV42:
fourcc: DRM_FORMAT_NV42
- YUV420:
fourcc: DRM_FORMAT_YUV420
- YVU420:
fourcc: DRM_FORMAT_YVU420
- YUV422:
fourcc: DRM_FORMAT_YUV422
- YVU422:
fourcc: DRM_FORMAT_YVU422
- YUV444:
fourcc: DRM_FORMAT_YUV444
- YVU444:
fourcc: DRM_FORMAT_YVU444
- MJPEG:
fourcc: DRM_FORMAT_MJPEG
- SRGGB8:
fourcc: DRM_FORMAT_SRGGB8
- SGRBG8:
fourcc: DRM_FORMAT_SGRBG8
- SGBRG8:
fourcc: DRM_FORMAT_SGBRG8
- SBGGR8:
fourcc: DRM_FORMAT_SBGGR8
- SRGGB10:
fourcc: DRM_FORMAT_SRGGB10
- SGRBG10:
fourcc: DRM_FORMAT_SGRBG10
- SGBRG10:
fourcc: DRM_FORMAT_SGBRG10
- SBGGR10:
fourcc: DRM_FORMAT_SBGGR10
- SRGGB12:
fourcc: DRM_FORMAT_SRGGB12
- SGRBG12:
fourcc: DRM_FORMAT_SGRBG12
- SGBRG12:
fourcc: DRM_FORMAT_SGBRG12
- SBGGR12:
fourcc: DRM_FORMAT_SBGGR12
- SRGGB16:
fourcc: DRM_FORMAT_SRGGB16
- SGRBG16:
fourcc: DRM_FORMAT_SGRBG16
- SGBRG16:
fourcc: DRM_FORMAT_SGBRG16
- SBGGR16:
fourcc: DRM_FORMAT_SBGGR16
- R10_CSI2P:
fourcc: DRM_FORMAT_R10
mod: MIPI_FORMAT_MOD_CSI2_PACKED
- SRGGB10_CSI2P:
fourcc: DRM_FORMAT_SRGGB10
mod: MIPI_FORMAT_MOD_CSI2_PACKED
- SGRBG10_CSI2P:
fourcc: DRM_FORMAT_SGRBG10
mod: MIPI_FORMAT_MOD_CSI2_PACKED
- SGBRG10_CSI2P:
fourcc: DRM_FORMAT_SGBRG10
mod: MIPI_FORMAT_MOD_CSI2_PACKED
- SBGGR10_CSI2P:
fourcc: DRM_FORMAT_SBGGR10
mod: MIPI_FORMAT_MOD_CSI2_PACKED
- SRGGB12_CSI2P:
fourcc: DRM_FORMAT_SRGGB12
mod: MIPI_FORMAT_MOD_CSI2_PACKED
- SGRBG12_CSI2P:
fourcc: DRM_FORMAT_SGRBG12
mod: MIPI_FORMAT_MOD_CSI2_PACKED
- SGBRG12_CSI2P:
fourcc: DRM_FORMAT_SGBRG12
mod: MIPI_FORMAT_MOD_CSI2_PACKED
- SBGGR12_CSI2P:
fourcc: DRM_FORMAT_SBGGR12
mod: MIPI_FORMAT_MOD_CSI2_PACKED
- SRGGB10_IPU3:
fourcc: DRM_FORMAT_SRGGB10
mod: IPU3_FORMAT_MOD_PACKED
- SGRBG10_IPU3:
fourcc: DRM_FORMAT_SGRBG10
mod: IPU3_FORMAT_MOD_PACKED
- SGBRG10_IPU3:
fourcc: DRM_FORMAT_SGBRG10
mod: IPU3_FORMAT_MOD_PACKED
- SBGGR10_IPU3:
fourcc: DRM_FORMAT_SBGGR10
mod: IPU3_FORMAT_MOD_PACKED
...