• Home
  • Raw
  • Download

Lines Matching full:format

49  * xvip_get_format_by_code - Retrieve format information for a media bus code
50 * @code: the format media bus code
52 * Return: a pointer to the format information structure corresponding to the
53 * given V4L2 media bus format @code, or ERR_PTR if no corresponding format can
61 const struct xvip_video_format *format = &xvip_video_formats[i]; in xvip_get_format_by_code() local
63 if (format->code == code) in xvip_get_format_by_code()
64 return format; in xvip_get_format_by_code()
72 * xvip_get_format_by_fourcc - Retrieve format information for a 4CC
73 * @fourcc: the format 4CC
75 * Return: a pointer to the format information structure corresponding to the
76 * given V4L2 format @fourcc, or ERR_PTR if no corresponding format can be
84 const struct xvip_video_format *format = &xvip_video_formats[i]; in xvip_get_format_by_fourcc() local
86 if (format->fourcc == fourcc) in xvip_get_format_by_fourcc()
87 return format; in xvip_get_format_by_fourcc()
95 * xvip_of_get_format - Parse a device tree node and return format information
98 * Read the xlnx,video-format, xlnx,video-width and xlnx,cfa-pattern properties
100 * format information.
102 * Return: a pointer to the format information structure corresponding to the
103 * format name and width, or ERR_PTR if no corresponding format can be found.
113 ret = of_property_read_u32(node, "xlnx,video-format", &vf_code); in xvip_of_get_format()
125 const struct xvip_video_format *format = &xvip_video_formats[i]; in xvip_of_get_format() local
127 if (format->vf_code != vf_code || format->width != width) in xvip_of_get_format()
131 strcmp(pattern, format->pattern)) in xvip_of_get_format()
134 return format; in xvip_of_get_format()
142 * xvip_set_format_size - Set the media bus frame format size
143 * @format: V4L2 frame format on media bus
144 * @fmt: media bus format
146 * Set the media bus frame format size. The width / height from the subdevice
147 * format are set to the given media bus format. The new format size is stored
148 * in @format. The width and height are clamped using default min / max values.
150 void xvip_set_format_size(struct v4l2_mbus_framefmt *format, in xvip_set_format_size() argument
153 format->width = clamp_t(unsigned int, fmt->format.width, in xvip_set_format_size()
155 format->height = clamp_t(unsigned int, fmt->format.height, in xvip_set_format_size()
238 * xvip_enum_mbus_code - Enumerate the media format code
244 * pad format code. This function only works for subdevices with fixed format
245 * on all pads. Subdevices with multiple format should have their own
248 * Return: 0 if the media bus code is found, or -EINVAL if the format index
255 struct v4l2_mbus_framefmt *format; in xvip_enum_mbus_code() local
266 format = v4l2_subdev_get_try_format(subdev, cfg, code->pad); in xvip_enum_mbus_code()
268 code->code = format->code; in xvip_enum_mbus_code()
282 * pad, and that the format on the source pad is always identical to the
283 * format on the sink pad. Entities with different requirements need to
293 struct v4l2_mbus_framefmt *format; in xvip_enum_frame_size() local
301 format = v4l2_subdev_get_try_format(subdev, cfg, fse->pad); in xvip_enum_frame_size()
303 if (fse->index || fse->code != format->code) in xvip_enum_frame_size()
315 fse->min_width = format->width; in xvip_enum_frame_size()
316 fse->max_width = format->width; in xvip_enum_frame_size()
317 fse->min_height = format->height; in xvip_enum_frame_size()
318 fse->max_height = format->height; in xvip_enum_frame_size()