Lines Matching refs:format

46  * xvip_get_format_by_code - Retrieve format information for a media bus code
47 * @code: the format media bus code
49 * Return: a pointer to the format information structure corresponding to the
50 * given V4L2 media bus format @code, or ERR_PTR if no corresponding format can
58 const struct xvip_video_format *format = &xvip_video_formats[i];
60 if (format->code == code)
61 return format;
69 * xvip_get_format_by_fourcc - Retrieve format information for a 4CC
70 * @fourcc: the format 4CC
72 * Return: a pointer to the format information structure corresponding to the
73 * given V4L2 format @fourcc, or ERR_PTR if no corresponding format can be
81 const struct xvip_video_format *format = &xvip_video_formats[i];
83 if (format->fourcc == fourcc)
84 return format;
92 * xvip_of_get_format - Parse a device tree node and return format information
95 * Read the xlnx,video-format, xlnx,video-width and xlnx,cfa-pattern properties
97 * format information.
99 * Return: a pointer to the format information structure corresponding to the
100 * format name and width, or ERR_PTR if no corresponding format can be found.
110 ret = of_property_read_u32(node, "xlnx,video-format", &vf_code);
122 const struct xvip_video_format *format = &xvip_video_formats[i];
124 if (format->vf_code != vf_code || format->width != width)
128 strcmp(pattern, format->pattern))
131 return format;
139 * xvip_set_format_size - Set the media bus frame format size
140 * @format: V4L2 frame format on media bus
141 * @fmt: media bus format
143 * Set the media bus frame format size. The width / height from the subdevice
144 * format are set to the given media bus format. The new format size is stored
145 * in @format. The width and height are clamped using default min / max values.
147 void xvip_set_format_size(struct v4l2_mbus_framefmt *format,
150 format->width = clamp_t(unsigned int, fmt->format.width,
152 format->height = clamp_t(unsigned int, fmt->format.height,
235 * xvip_enum_mbus_code - Enumerate the media format code
241 * pad format code. This function only works for subdevices with fixed format
242 * on all pads. Subdevices with multiple format should have their own
245 * Return: 0 if the media bus code is found, or -EINVAL if the format index
252 struct v4l2_mbus_framefmt *format;
263 format = v4l2_subdev_get_try_format(subdev, cfg, code->pad);
265 code->code = format->code;
279 * pad, and that the format on the source pad is always identical to the
280 * format on the sink pad. Entities with different requirements need to
290 struct v4l2_mbus_framefmt *format;
298 format = v4l2_subdev_get_try_format(subdev, cfg, fse->pad);
300 if (fse->index || fse->code != format->code)
312 fse->min_width = format->width;
313 fse->max_width = format->width;
314 fse->min_height = format->height;
315 fse->max_height = format->height;