Lines Matching +full:clip +full:- +full:x +full:- +full:high

1 /* SPDX-License-Identifier: GPL-2.0-or-later */
6 internal low-level v4l2 drivers.
18 #include <media/v4l2-dev.h>
20 /* Common printk constructs for v4l-i2c drivers. These macros create a unique
24 printk(level "%s %d-%04x: " fmt, name, i2c_adapter_id(adapter), addr , ## arg)
27 v4l_printk(level, (client)->dev.driver->name, (client)->adapter, \
28 (client)->addr, fmt , ## arg)
54 /* ------------------------------------------------------------------------- */
58 printk(level "%s: " fmt, (dev)->name , ## arg)
78 * v4l2_ctrl_query_fill- Fill in a struct v4l2_queryctrl
90 * This function assumes that the @qctrl->id field is filled.
92 * Returns -EINVAL if the control is not known by the V4L2 core, 0 on success.
98 /* ------------------------------------------------------------------------- */
108 * enum v4l2_i2c_tuner_type - specifies the range of tuner address that
128 * NOTE: All I2C addresses above use the 7-bit notation.
140 * v4l2_i2c_new_subdev - Load an i2c module and return an initialized
157 * v4l2_i2c_new_subdev_board - Load an i2c module and return an initialized
174 * v4l2_i2c_subdev_set_name - Set name for an I²C sub-device
180 * @postfix: sub-device specific string to put right after the I²C device name;
187 * v4l2_i2c_subdev_init - Initializes a &struct v4l2_subdev with data from
198 * v4l2_i2c_subdev_addr - returns i2c client address of &struct v4l2_subdev.
202 * Returns the address of an I2C sub-device
207 * v4l2_i2c_tuner_addrs - Return a list of I2C tuner addresses to probe.
217 * v4l2_i2c_subdev_unregister - Unregister a v4l2_subdev
267 /* ------------------------------------------------------------------------- */
276 * v4l2_spi_new_subdev - Load an spi module and return an initialized
290 * v4l2_spi_subdev_init - Initialize a v4l2_subdev with data from an
301 * v4l2_spi_subdev_unregister - Unregister a v4l2_subdev
325 /* ------------------------------------------------------------------------- */
329 * are still used in tuner-simple.c (TUNER_SET_CONFIG) and cx18/ivtv (RESET).
345 /* ------------------------------------------------------------------------- */
350 * v4l_bound_align_image - adjust video dimensions according to
364 * Clip an image to have @width between @wmin and @wmax, and @height between
377 * #. The alignments must not be so high there are no possible image
393 * v4l2_find_nearest_size - Find the nearest size among a discrete
413 BUILD_BUG_ON(sizeof((array)->width_field) != sizeof(u32) || \
414 sizeof((array)->height_field) != sizeof(u32)); \
427 * v4l2_g_parm_cap - helper routine for vidioc_g_parm to fill this in by
433 * @sd: the sub-device pointer.
440 * v4l2_s_parm_cap - helper routine for vidioc_s_parm to fill this in by
446 * @sd: the sub-device pointer.
457 /* ------------------------------------------------------------------------- */
462 * enum v4l2_pixel_encoding - specifies the pixel encoding value
464 * @V4L2_PIXEL_ENC_UNKNOWN: Pixel encoding is unknown/un-initialized
477 * struct v4l2_format_info - information about a V4L2 format
482 * @bpp: Array of per-plane bytes per pixel
483 * @bpp_div: Array of per-plane bytes per pixel divisors to support fractional pixel sizes.
486 * @block_w: Per-plane macroblock pixel width (optional)
487 * @block_h: Per-plane macroblock pixel height (optional)
504 return f && f->pixel_enc == V4L2_PIXEL_ENC_RGB; in v4l2_is_format_rgb()
509 return f && f->pixel_enc == V4L2_PIXEL_ENC_YUV; in v4l2_is_format_yuv()
514 return f && f->pixel_enc == V4L2_PIXEL_ENC_BAYER; in v4l2_is_format_bayer()
526 * v4l2_get_link_freq - Get link rate from transmitter
530 * D-PHY, samples per clock on parallel. 0 otherwise.
532 * times two on D-PHY, 1 on parallel. 0 otherwise.
535 * transmitter sub-devices. It returns the link rate, either from the
541 * * %-ENOENT: Link frequency or pixel rate control not found
542 * * %-EINVAL: Invalid link frequency value
552 * v4l2_link_freq_to_bitmap - Figure out platform-supported link frequencies
558 * @bitmap: Bitmap of driver-supported link frequencies found in @fw_link_freqs
560 * This function checks which driver-supported link frequencies are enabled in
566 * * %-ENOENT: No match found between driver-supported link frequencies and
568 * * %-ENODATA: No link frequencies were specified in firmware.
579 * When the timestamp comes from 32-bit user space, there may be in v4l2_buffer_get_timestamp()
583 return buf->timestamp.tv_sec * NSEC_PER_SEC + in v4l2_buffer_get_timestamp()
584 (u32)buf->timestamp.tv_usec * NSEC_PER_USEC; in v4l2_buffer_get_timestamp()
592 buf->timestamp.tv_sec = ts.tv_sec; in v4l2_buffer_set_timestamp()
593 buf->timestamp.tv_usec = ts.tv_nsec / NSEC_PER_USEC; in v4l2_buffer_set_timestamp()