aboutsummaryrefslogtreecommitdiff
path: root/include/uapi/linux/videodev2.h
AgeCommit message (Collapse)AuthorFilesLines
2024-09-05media: videodev2.h: add V4L2_CAP_EDIDErling Ljunggren1-0/+1
Add capability flag to indicate that the device is an EDID-only device. Signed-off-by: Erling Ljunggren <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Reviewed-by: Sebastian Fricke <[email protected]> Reviewed-by: Ricardo Ribalda <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2024-08-12media: uapi: videodev2: Add V4L2_META_FMT_RK_ISP1_EXT_PARAMSJacopo Mondi1-0/+1
The rkisp1 driver stores ISP configuration parameters in the fixed rkisp1_params_cfg structure. As the members of the structure are part of the userspace API, the structure layout is immutable and cannot be extended further. Introducing new parameters or modifying the existing ones would change the buffer layout and cause breakages in existing applications. The allow for future extensions to the ISP parameters, introduce a new extensible parameters format, with a new format 4CC. Document usage of the new format in the rkisp1 admin guide. Signed-off-by: Jacopo Mondi <[email protected]> Reviewed-by: Daniel Scally <[email protected]> Reviewed-by: Paul Elder <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Tested-by: Kieran Bingham <[email protected]> Acked-by: Sakari Ailus <[email protected]> Signed-off-by: Laurent Pinchart <[email protected]>
2024-06-27media: uapi: Add PiSP Compressed RAW Bayer formatsJacopo Mondi1-0/+12
Add Raspberry Pi compressed RAW Bayer formats. The compression algorithm description is provided by Nick Hollinghurst <[email protected]> from Raspberry Pi. Signed-off-by: Jacopo Mondi <[email protected]> Reviewed-by: Naushir Patuck <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-06-27media: uapi: Add meta pixel format for PiSP BE configJacopo Mondi1-0/+3
Add format description for the PiSP Back End configuration parameter buffer. Signed-off-by: Jacopo Mondi <[email protected]> Reviewed-by: Naushir Patuck <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-06-27media: uapi: Add a pixel format for BGR48 and RGB48Jacopo Mondi1-0/+2
Add BGR48 and RGB48 16-bit per component image formats. Signed-off-by: Jacopo Mondi <[email protected]> Reviewed-by: Kieran Bingham <[email protected]> Reviewed-by: Naushir Patuck <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-04-29media: uapi: v4l: Don't expose generic metadata formats to userspaceLaurent Pinchart1-0/+2
The generic metadata pixel formats (V4L2_META_FMT_GENERIC_*) are meant to be used in conjunction with device-specific media bus codes. Those codes are work in progress and not available in the upstream kernel yet. To make sure the generic metadata pixel formats won't be used by userspace until we have the full infrastructure in place, keep their definition private to the kernel for now. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-04-29media: v4l: Add V4L2-PIX-FMT-Y14P formatJean-Michel Hautbois1-0/+1
This is a packed grey-scale image format with a depth of 14 bits per pixel. Every four consecutive samples are packed into seven bytes. Each of the first four bytes contain the eight high order bits of the pixels, and the three following bytes contains the six least significants bits of each pixel, in the same order. As the other formats only needed 5 bytes before, append two bytes in the documentation array. Signed-off-by: Jean-Michel Hautbois <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-04-29media: v4l: Add V4L2-PIX-FMT-Y12P formatJean-Michel Hautbois1-0/+1
This is a packed grey-scale image format with a depth of 12 bits per pixel. Two consecutive pixels are packed into 3 bytes. The first 2 bytes contain the 8 high order bits of the pixels, and the 3rd byte contains the 4 least significants bits of each pixel, in the same order. Add the entry in userspace API, and document it. Signed-off-by: Jean-Michel Hautbois <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-04-29media: v4l: Set line based metadata flag in V4L2 coreSakari Ailus1-0/+4
Set (and unset) the V4L2_FMT_FLAG_META_LINE_BASED flag in struct v4l2_fmtdesc based on the format after returning the driver callback for enumerating formats. This way the drivers don't need to care about the flag. Signed-off-by: Sakari Ailus <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-04-29media: v4l: Support line-based metadata captureSakari Ailus1-0/+10
Many camera sensors, among other devices, transmit embedded data and image data for each CSI-2 frame. This embedded data typically contains register configuration of the sensor that has been used to capture the image data of the same frame. The embedded data is received by the CSI-2 receiver and has the same properties as the image data, including that it is line based: it has width, height and bytesperline (stride). Add these fields to struct v4l2_meta_format and document them. Also add V4L2_FMT_FLAG_META_LINE_BASED to tell a given format is line-based i.e. these fields of struct v4l2_meta_format are valid for it. Signed-off-by: Sakari Ailus <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-04-29media: uapi: v4l: Add generic 8-bit metadata format definitionsSakari Ailus1-0/+8
Generic 8-bit metadata formats define the in-memory data layout but not the format of the data itself. The reasoning for having such formats is to allow CSI-2 receiver drivers to receive and DMA drivers to write the data to memory without knowing a large number of device-specific formats. These formats may be used only in conjunction with a Media Controller pipeline where the internal pad of the source sub-device defines the specific format of the data (using an mbus code). Signed-off-by: Sakari Ailus <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-04-15media: videodev2: Fix v4l2_ext_control packing.Ricardo Ribalda1-1/+1
The structure is packed, which requires that all its fields need to be also packed. ./include/uapi/linux/videodev2.h:1810:2: warning: field within 'struct v4l2_ext_control' is less aligned than 'union v4l2_ext_control::(anonymous at ./include/uapi/linux/videodev2.h:1810:2)' and is usually due to 'struct v4l2_ext_control' being packed, which can lead to unaligned accesses [-Wunaligned-access] Explicitly set the inner union as packed. Marking the inner union as 'packed' does not change the layout, since the whole struct is already packed, it just silences the clang warning. See also this llvm discussion: https://github.com/llvm/llvm-project/issues/55520 Signed-off-by: Ricardo Ribalda <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-03-25media: v4l2: Add REMOVE_BUFS ioctlBenjamin Gaignard1-0/+17
VIDIOC_REMOVE_BUFS ioctl allows to remove buffers from a queue. The number of buffers to remove in given by count field of struct v4l2_remove_buffers and the range start at the index specified in the same structure. Signed-off-by: Benjamin Gaignard <[email protected]> Reviewed-by: Mauro Carvalho Chehab <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> [hverkuil: vidioc-remove-bufs.rst: mention no bufs are freed on error]
2024-02-05media: videodev2.h: Fix kerneldocRicardo Ribalda1-16/+16
Named nested unions need their prefix: https://www.kernel.org/doc/html/latest/doc-guide/kernel-doc.html#nested-structs-unions Signed-off-by: Ricardo Ribalda <[email protected]> Reviewed-by: Randy Dunlap <[email protected]> Tested-by: Randy Dunlap <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2023-11-23media: videodev.h: add missing p_hdr10_* pointersHans Verkuil1-0/+2
The HDR10 standard compound controls were missing the corresponding pointers in videodev2.h. Add these and document them. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2023-11-23media: videodev2.h: add missing __user to p_h264_ppsHans Verkuil1-1/+1
The p_h264_pps pointer in struct v4l2_ext_control was missing the __user annotation. Add this. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2023-11-23media: core: Report the maximum possible number of buffers for the queueBenjamin Gaignard1-1/+6
Use one of the struct v4l2_create_buffers reserved bytes to report the maximum possible number of buffers for the queue. V4l2 framework set V4L2_BUF_CAP_SUPPORTS_MAX_NUM_BUFFERS flags in queue capabilities so userland can know when the field is valid. Does the same change in v4l2_create_buffers32 structure. Signed-off-by: Benjamin Gaignard <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2023-09-27media: v4l: Add HEXTILE compressed formatMarvin Lin1-0/+1
Add HEXTILE compressed format which is defined in Remote Framebuffer Protocol (RFC 6143, chapter 7.7.4 Hextile Encoding) and is used by Encoding Compression Engine (ECE) present on Nuvoton NPCM SoCs. Signed-off-by: Marvin Lin <[email protected]> Reviewed-by: Nicolas Dufresne <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2023-08-10media: mediatek: vcodec: Add capture format to support 10bit raster modeMingjia Zhang1-0/+1
Define one uncompressed capture format V4L2_PIX_FMT_MT2110R in order to support 10bit for H264 in mt8195. Signed-off-by: Mingjia Zhang <[email protected]> Co-developed-by: Yunfei Dong <[email protected]> Signed-off-by: Yunfei Dong <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2023-08-10media: mediatek: vcodec: Add capture format to support 10bit tile modeMingjia Zhang1-0/+1
Define one uncompressed capture format V4L2_PIX_FMT_MT2110T in order to support 10bit for AV1/VP9/HEVC in mt8195. Signed-off-by: Mingjia Zhang <[email protected]> Co-developed-by: Yunfei Dong <[email protected]> Signed-off-by: Yunfei Dong <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2023-06-09media: Add NV15_4L4 pixel formatBenjamin Gaignard1-0/+1
NV15_4L4 is the 10-bits per component 4x4 tiled format. Signed-off-by: Benjamin Gaignard <[email protected]> Signed-off-by: Nicolas Dufresne <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2023-06-09media: Add AV1 uAPIDaniel Almeida1-0/+10
This patch adds the AOMedia Video 1 (AV1) kernel uAPI. This design is based on currently available AV1 API implementations and aims to support the development of AV1 stateless video codecs on Linux. Signed-off-by: Daniel Almeida <[email protected]> Co-developed-by: Nicolas Dufresne <[email protected]> Signed-off-by: Nicolas Dufresne <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2023-05-25media: videodev2.h: Fix struct v4l2_input tuner index commentMarek Vasut1-1/+1
VIDIOC_ENUMINPUT documentation describes the tuner field of struct v4l2_input as index: Documentation/userspace-api/media/v4l/vidioc-enuminput.rst " * - __u32 - ``tuner`` - Capture devices can have zero or more tuners (RF demodulators). When the ``type`` is set to ``V4L2_INPUT_TYPE_TUNER`` this is an RF connector and this field identifies the tuner. It corresponds to struct :c:type:`v4l2_tuner` field ``index``. For details on tuners see :ref:`tuner`. " Drivers I could find also use the 'tuner' field as an index, e.g.: drivers/media/pci/bt8xx/bttv-driver.c bttv_enum_input() drivers/media/usb/go7007/go7007-v4l2.c vidioc_enum_input() However, the UAPI comment claims this field is 'enum v4l2_tuner_type': include/uapi/linux/videodev2.h This field being 'enum v4l2_tuner_type' is unlikely as it seems to be never used that way in drivers, and documentation confirms it. It seem this comment got in accidentally in the commit which this patch fixes. Fix the UAPI comment to stop confusion. This was pointed out by Dmitry while reviewing VIDIOC_ENUMINPUT support for strace. Fixes: 6016af82eafc ("[media] v4l2: use __u32 rather than enums in ioctl() structs") Signed-off-by: Marek Vasut <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2023-05-25media: videodev2.h: Fix p_s32 and p_s64 pointer typesDaniel Lundberg Pedersen1-2/+2
Use the intended pointer types for p_s32 and p_64 in the union of the struct v4l2_ext_control. Fixes: e77eb66342c7 ("videodev2.h: add p_s32 and p_s64 pointers") Signed-off-by: Daniel Lundberg Pedersen <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2023-04-15media: Add ABGR64_12 video formatMing Qian1-0/+1
ABGR64_12 is a reversed RGB format with alpha channel last, 12 bits per component like ABGR32, expanded to 16bits. Data in the 12 high bits, zeros in the 4 low bits, arranged in little endian order. Signed-off-by: Ming Qian <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2023-04-15media: Add BGR48_12 video formatMing Qian1-0/+3
BGR48_12 is a reversed RGB format with 12 bits per component like BGR24, expanded to 16bits. Data in the 12 high bits, zeros in the 4 low bits, arranged in little endian order. Signed-off-by: Ming Qian <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2023-04-15media: Add YUV48_12 video formatMing Qian1-0/+1
YUV48_12 is a YUV format with 12-bits per component like YUV24, expanded to 16bits. Data in the 12 high bits, zeros in the 4 low bits, arranged in little endian order. [hverkuil: replaced a . by ,] Signed-off-by: Ming Qian <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2023-04-15media: Add Y012 video formatMing Qian1-0/+1
Y012 is a luma-only formats with 12-bits per pixel, expanded to 16bits. Data in the 12 high bits, zeros in the 4 low bits, arranged in little endian order. Signed-off-by: Ming Qian <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2023-04-15media: Add P012 and P012M video formatMing Qian1-0/+2
P012 is a YUV format with 12-bits per component with interleaved UV, like NV12, expanded to 16 bits. Data in the 12 high bits, zeros in the 4 low bits, arranged in little endian order. And P012M has two non contiguous planes. Signed-off-by: Ming Qian <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2023-04-10media: add RealVideo format RV30 and RV40Ming Qian1-0/+2
RealVideo, or also spelled as Real Video, is a suite of proprietary video compression formats developed by RealNetworks - the specific format changes with the version. RealVideo codecs are identified by four-character codes. RV30 and RV40 are RealNetworks' proprietary H.264-based codecs. Reviewed-by: Nicolas Dufresne <[email protected]> Signed-off-by: Ming Qian <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2023-04-10media: add Sorenson Spark video formatMing Qian1-0/+1
Sorenson Spark is an implementation of H.263 for use in Flash Video and Adobe Flash files. Sorenson Spark is an incomplete implementation of H.263. It differs mostly in header structure and ranges of the coefficients. Signed-off-by: Ming Qian <[email protected]> Reviewed-by: Nicolas Dufresne <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2023-03-20media: videodev.h: drop V4L2_FBUF_CAP_LIST/BITMAP_CLIPPINGHans Verkuil1-0/+2
These two capabilities are no longer supported, so no longer define them when compiling the kernel. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2023-01-20media: Add Y210, Y212 and Y216 formatsTomi Valkeinen1-0/+8
Add Y210, Y212 and Y216 formats. Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Acked-by: Mauro Carvalho Chehab <[email protected]> Acked-by: Hans Verkuil <[email protected]> Signed-off-by: Laurent Pinchart <[email protected]>
2023-01-20media: Add 2-10-10-10 RGB formatsTomi Valkeinen1-0/+3
Add RGBX1010102, RGBA1010102 and ARGB2101010 formats. Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Acked-by: Mauro Carvalho Chehab <[email protected]> Acked-by: Hans Verkuil <[email protected]> Signed-off-by: Laurent Pinchart <[email protected]>
2022-11-25media: add nv12_8l128 and nv12_10be_8l128 video format.Ming Qian1-0/+2
add contiguous nv12 tiled format nv12_8l128 and nv12_10be_8l128 Signed-off-by: Ming Qian <[email protected]> Reviewed-by: Nicolas Dufresne <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2022-11-15Merge tag 'br-v6.2d' of git://linuxtv.org/hverkuil/media_tree into media_stageMauro Carvalho Chehab1-0/+2
Tag branch * tag 'br-v6.2d' of git://linuxtv.org/hverkuil/media_tree: (35 commits) media: saa7164: remove variable cnt atomisp: fix potential NULL pointer dereferences radio-terratec: Remove variable p media: platform: s5p-mfc: Fix spelling mistake "mmaping" -> "mmapping" media: platform: mtk-mdp3: remove unused VIDEO_MEDIATEK_VPU config media: vivid: remove redundant assignment to variable checksum media: cedrus: h264: Optimize mv col buffer allocation media: cedrus: h265: Associate mv col buffers with buffer media: mediatek: vcodec: fix h264 cavlc bitstream fail media: cedrus: hevc: Fix offset adjustments media: imx-jpeg: Fix Coverity issue in probe media: v4l2-ioctl.c: Unify YCbCr/YUV terms in format descriptions media: atomisp: Fix spelling mistake "mis-match" -> "mismatch" media: c8sectpfe: Add missed header(s) media: adv748x: afe: Select input port when initializing AFE media: vimc: Update device configuration in the documentation media: adv748x: Remove dead function declaration media: mxl5005s: Make array RegAddr static const media: atomisp: Fix spelling mistake "modee" -> "mode" media: meson/vdec: always init coef_node_start ...
2022-11-04media: v4l: Add definition for the Aspeed JPEG formatJammy Huang1-0/+1
This introduces support for the Aspeed JPEG format, where the new frame can refer to previous frame to reduce the amount of compressed data. The concept is similar to I/P frame of video compression. It will compare the new frame with previous one to decide which macroblock's data is changed, and only the changed macroblocks will be compressed. This Aspeed JPEG format is used by the video engine on Aspeed platforms, which is generally adapted for remote KVM. Signed-off-by: Jammy Huang <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2022-10-25media: videodev2.h: V4L2_DV_BT_BLANKING_HEIGHT should check 'interlaced'Hans Verkuil1-1/+2
If it is a progressive (non-interlaced) format, then ignore the interlaced timing values. Signed-off-by: Hans Verkuil <[email protected]> Fixes: 7f68127fa11f ([media] videodev2.h: defines to calculate blanking and frame sizes) Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2022-10-24videodev2.h: add p_s32 and p_s64 pointersHans Verkuil1-0/+2
Added p_s32 and p_s64 pointers to the union in struct v4l2_ext_control to simplify INTEGER and INTEGER64 control array support. Internally the control framework handles such arrays just fine, but userspace is missing corresponding pointers to access array elements of these types. The internal union v4l2_ctrl_ptr which the control framework uses already has these types, they just were never added to the public API. Signed-off-by: Hans Verkuil <[email protected]>
2022-08-30media: videodev2.h: drop V4L2_CAP_ASYNCIOHans Verkuil1-1/+5
The V4L2_CAP_ASYNCIO capability was never implemented (and in fact it isn't clear what it was supposed to do in the first place). Drop it from the capabilities list. Keep it in videodev2.h with the other defines under ifndef __KERNEL__ for backwards compatibility. This will free up a capability bit for other future uses. And having an unused and undefined I/O method is just plain confusing. Signed-off-by: Hans Verkuil <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2022-08-19media: v4l2-ctrls: add change flag for when dimensions changeHans Verkuil1-0/+1
Add a new V4L2_EVENT_CTRL_CH_DIMENSIONS change flag that is issued when the dimensions of an array change as a result of a __v4l2_ctrl_modify_dimensions() call. This will inform userspace that there are new dimensions. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2022-07-17media: Add P010 tiled formatEzequiel Garcia1-0/+1
Add P010 tiled format [rebased, updated pixel format name and added description] Tested-by: Benjamin Gaignard <[email protected]> Signed-off-by: Ezequiel Garcia <[email protected]> Signed-off-by: Jernej Skrabec <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2022-07-15media: uapi: move HEVC stateless controls out of stagingBenjamin Gaignard1-0/+5
HEVC uAPI is used by 2 mainline drivers (Hantro, Cedrus) and at least 2 out-of-tree drivers (rkvdec, RPi). The uAPI has been reviewed so it is time to make it 'public' by un-staging it. Signed-off-by: Benjamin Gaignard <[email protected]> Reviewed-by: Ezequiel Garcia <[email protected]> Acked-by: Nicolas Dufresne <[email protected]> Tested-by: Jernej Skrabec <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2022-07-15media: uapi: Move the HEVC stateless control type out of stagingBenjamin Gaignard1-0/+6
Move the HEVC stateless controls types out of staging, and re-number them. Signed-off-by: Benjamin Gaignard <[email protected]> Reviewed-by: Ezequiel Garcia <[email protected]> Acked-by: Nicolas Dufresne <[email protected]> Tested-by: Jernej Skrabec <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2022-07-15media: uapi: Move parsed HEVC pixel format out of stagingBenjamin Gaignard1-0/+1
Move HEVC pixel format since we are ready to stabilize the uAPI Signed-off-by: Benjamin Gaignard <[email protected]> Reviewed-by: Ezequiel Garcia <[email protected]> Acked-by: Nicolas Dufresne <[email protected]> Tested-by: Jernej Skrabec <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2022-07-15media: videodev2.h: add V4L2_CTRL_FLAG_DYNAMIC_ARRAYHans Verkuil1-0/+1
Add a new flag that indicates that this control is a dynamically sized array. Also document this flag. Currently dynamically sized arrays are limited to one dimensional arrays, but that might change in the future if there is a need for it. The initial use-case of dynamic arrays are stateless codecs. A frame can be divided in many slices, so you want to provide an array containing slice information for each slice. Typically the number of slices is small, but the standard allow for hundreds or thousands of slices. Dynamic arrays are a good solution since sizing the array for the worst case would waste substantial amounts of memory. Acked-by: Nicolas Dufresne <[email protected]> Tested-by: Benjamin Gaignard <[email protected]> Tested-by: Jernej Skrabec <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2022-07-15media: v4l2: Make colorspace validity checks more future-proofLaurent Pinchart1-0/+22
The helper functions that test validity of colorspace-related fields use the last value of the corresponding enums. This isn't very future-proof, as there's a high chance someone adding a new value may forget to update the helpers. Add new "LAST" entries to the enumerations to improve this, and keep them private to the kernel. Signed-off-by: Laurent Pinchart <[email protected]> Acked-by: Sakari Ailus <[email protected]> Reviewed-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2022-07-15media: v4l: Add packed YUV 4:4:4 YUVA and YUVX pixel formatsLaurent Pinchart1-0/+2
The new YUVA and YUVX are permutations of the existing AYUV and XYUV formats. They are use by the NXP i.MX8 ISI hardware. Signed-off-by: Laurent Pinchart <[email protected]> Reviewed-by: Nicolas Dufresne <[email protected]> Reviewed-by: Jacopo Mondi <[email protected]> Reviewed-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2022-06-20media: Add P010 video formatBenjamin Gaignard1-0/+1
P010 is a YUV format with 10-bits per component with interleaved UV. Signed-off-by: Benjamin Gaignard <[email protected]> Acked-by: Nicolas Dufresne <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2022-05-17media: uapi: Add IPU3 packed Y10 formatDaniel Scally1-1/+2
Some platforms with an Intel IPU3 have an IR sensor producing 10 bit greyscale format data that is transmitted over a CSI-2 bus to a CIO2 device - this packs the data into 32 bytes per 25 pixels. Add an entry to the uAPI header defining that format. Signed-off-by: Daniel Scally <[email protected]> Acked-by: Andy Shevchenko <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>