2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-21 11:44:01 +08:00
linux-next/Documentation/userspace-api/media
Dafna Hirschfeld b38c73ca1c media: v4l2: add support for colorspace conversion API (CSC) for video capture
For video capture it is the driver that reports the colorspace,
transfer function, Y'CbCr/HSV encoding and quantization range
used by the video, and there is no way to request something
different, even though many HDTV receivers have some sort of
colorspace conversion capabilities.

For output video this feature already exists since the application
specifies this information for the video format it will send out, and
the transmitter will enable any available CSC if a format conversion has
to be performed in order to match the capabilities of the sink.

For video capture we propose adding new v4l2_pix_format flag:
V4L2_PIX_FMT_FLAG_SET_CSC. The flag is set by the application,
the driver will interpret the colorspace, xfer_func, ycbcr_enc/hsv_enc
and quantization fields as the requested colorspace information and will
attempt to do the conversion it supports.

Drivers set the flags
V4L2_FMT_FLAG_CSC_COLORSPACE,
V4L2_FMT_FLAG_CSC_XFER_FUNC,
V4L2_FMT_FLAG_CSC_YCBCR_ENC/V4L2_FMT_FLAG_CSC_HSV_ENC,
V4L2_FMT_FLAG_CSC_QUANTIZATION,
in the flags field of the struct v4l2_fmtdesc during enumeration to
indicate that they support colorspace conversion for the respective field.

Drivers do not have to actually look at the flags. If the flags are not
set, then the fields 'colorspace', 'xfer_func', 'ycbcr_enc/hsv_enc',
and 'quantization' are set to the default values by the core, i.e. just
pass on the received format without conversion.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-09-26 10:20:57 +02:00
..
cec media: docs: use the new SPDX header for GFDL-1.1 on *.rst files 2020-09-01 14:13:30 +02:00
drivers media: docs: add an uAPI chapter for driver-specific stuff 2020-04-14 10:36:50 +02:00
dvb media: docs: use SPDX GPL-2.0 OR GFDL-1.1 instead of text on *.svg files 2020-09-01 14:13:30 +02:00
mediactl media: docs: use SPDX GPL-2.0 OR GFDL-1.1 instead of text on *.rst files 2020-09-01 14:13:30 +02:00
rc media: docs: use the new SPDX header for GFDL-1.1 on *.rst files 2020-09-01 14:13:30 +02:00
v4l media: v4l2: add support for colorspace conversion API (CSC) for video capture 2020-09-26 10:20:57 +02:00
audio.h.rst.exceptions
ca.h.rst.exceptions
cec.h.rst.exceptions
conf_nitpick.py Documentation: media: convert to use i2c_new_client_device() 2020-06-19 09:20:25 +02:00
dmx.h.rst.exceptions
fdl-appendix.rst media: docs: use the new SPDX header for GFDL-1.1 on *.rst files 2020-09-01 14:13:30 +02:00
frontend.h.rst.exceptions
gen-errors.rst media: docs: use the new SPDX header for GFDL-1.1 on *.rst files 2020-09-01 14:13:30 +02:00
glossary.rst media: docs: add glossary.rst with common terms used at V4L2 spec 2020-09-01 14:13:30 +02:00
index.rst media: docs: add glossary.rst with common terms used at V4L2 spec 2020-09-01 14:13:30 +02:00
intro.rst
lirc.h.rst.exceptions
Makefile
media.h.rst.exceptions
net.h.rst.exceptions
typical_media_device.svg media: docs: use the new SPDX header for GFDL-1.1 on *.svg files 2020-09-01 14:13:30 +02:00
video.h.rst.exceptions
videodev2.h.rst.exceptions media: v4l2: add support for colorspace conversion API (CSC) for video capture 2020-09-26 10:20:57 +02:00