Lines Matching +full:pixel +full:- +full:format
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * vimc-common.h Virtual Media Controller Driver
5 * Copyright (C) 2015-2017 Helen Koike <helen.fornazier@gmail.com>
13 #include <media/media-device.h>
14 #include <media/v4l2-device.h>
18 /* VIMC-specific controls */
46 * vimc_colorimetry_clamp - Adjust colorimetry parameters
56 if ((fmt)->colorspace == V4L2_COLORSPACE_DEFAULT \
57 || (fmt)->colorspace > V4L2_COLORSPACE_DCI_P3) { \
58 (fmt)->colorspace = V4L2_COLORSPACE_DEFAULT; \
59 (fmt)->ycbcr_enc = V4L2_YCBCR_ENC_DEFAULT; \
60 (fmt)->quantization = V4L2_QUANTIZATION_DEFAULT; \
61 (fmt)->xfer_func = V4L2_XFER_FUNC_DEFAULT; \
63 if ((fmt)->ycbcr_enc > V4L2_YCBCR_ENC_SMPTE240M) \
64 (fmt)->ycbcr_enc = V4L2_YCBCR_ENC_DEFAULT; \
65 if ((fmt)->quantization > V4L2_QUANTIZATION_LIM_RANGE) \
66 (fmt)->quantization = V4L2_QUANTIZATION_DEFAULT; \
67 if ((fmt)->xfer_func > V4L2_XFER_FUNC_SMPTE2084) \
68 (fmt)->xfer_func = V4L2_XFER_FUNC_DEFAULT; \
72 * struct vimc_pix_map - maps media bus code with v4l2 pixel format
74 * @code: media bus format code defined by MEDIA_BUS_FMT_* macros
75 * @bpp: number of bytes each pixel occupies
76 * @pixelformat: pixel format defined by V4L2_PIX_FMT_* macros
77 * @bayer: true if this is a bayer format
80 * V4L2_PIX_FMT_* fourcc pixelformat and its bytes per pixel (bpp)
90 * struct vimc_ent_device - core struct that represents an entity in the
96 * @vdev_get_format: callback that returns the current format a pad, used
118 * struct vimc_device - main device for vimc driver
137 * vimc entity - called from vimc-core
138 * @unregister: unregisters vimc entity - called from vimc-core
139 * @release: releases vimc entity - called from the v4l2_dev
163 * vimc_is_source - returns true if the entity has only source pads
177 * vimc_pix_map_by_index - get vimc_pix_map struct by its index
184 * vimc_mbus_code_by_index - get mbus code by its index
193 * vimc_pix_map_by_code - get vimc_pix_map struct by media bus code
195 * @code: media bus format code defined by MEDIA_BUS_FMT_* macros
200 * vimc_pix_map_by_pixelformat - get vimc_pix_map struct by v4l2 pixel format
202 * @pixelformat: pixel format defined by V4L2_PIX_FMT_* macros
207 * vimc_ent_sd_register - initialize and register a subdev node
212 * @name: name of the sub-device. Please notice that the name must be
235 * vimc_vdev_link_validate - validates a media link