Lines Matching refs:format

59 	struct v4l2_mbus_framefmt *format;  in vsp1_rwpf_set_format()  local
71 if (fmt->format.code != MEDIA_BUS_FMT_ARGB8888_1X32 && in vsp1_rwpf_set_format()
72 fmt->format.code != MEDIA_BUS_FMT_AHSV8888_1X32 && in vsp1_rwpf_set_format()
73 fmt->format.code != MEDIA_BUS_FMT_AYUV8_1X32) in vsp1_rwpf_set_format()
74 fmt->format.code = MEDIA_BUS_FMT_AYUV8_1X32; in vsp1_rwpf_set_format()
76 format = v4l2_subdev_state_get_format(state, fmt->pad); in vsp1_rwpf_set_format()
83 format->code = fmt->format.code; in vsp1_rwpf_set_format()
84 fmt->format = *format; in vsp1_rwpf_set_format()
88 format->code = fmt->format.code; in vsp1_rwpf_set_format()
89 format->width = clamp_t(unsigned int, fmt->format.width, in vsp1_rwpf_set_format()
91 format->height = clamp_t(unsigned int, fmt->format.height, in vsp1_rwpf_set_format()
93 format->field = V4L2_FIELD_NONE; in vsp1_rwpf_set_format()
94 format->colorspace = V4L2_COLORSPACE_SRGB; in vsp1_rwpf_set_format()
96 fmt->format = *format; in vsp1_rwpf_set_format()
105 crop->width = fmt->format.width; in vsp1_rwpf_set_format()
106 crop->height = fmt->format.height; in vsp1_rwpf_set_format()
110 format = v4l2_subdev_state_get_format(state, RWPF_PAD_SOURCE); in vsp1_rwpf_set_format()
111 *format = fmt->format; in vsp1_rwpf_set_format()
114 format->width = fmt->format.height; in vsp1_rwpf_set_format()
115 format->height = fmt->format.width; in vsp1_rwpf_set_format()
129 struct v4l2_mbus_framefmt *format; in vsp1_rwpf_get_selection() local
153 format = v4l2_subdev_state_get_format(state, RWPF_PAD_SINK); in vsp1_rwpf_get_selection()
156 sel->r.width = format->width; in vsp1_rwpf_get_selection()
157 sel->r.height = format->height; in vsp1_rwpf_get_selection()
176 struct v4l2_mbus_framefmt *format; in vsp1_rwpf_set_selection() local
199 format = v4l2_subdev_state_get_format(state, RWPF_PAD_SINK); in vsp1_rwpf_set_selection()
205 if (format->code == MEDIA_BUS_FMT_AYUV8_1X32) { in vsp1_rwpf_set_selection()
212 sel->r.left = min_t(unsigned int, sel->r.left, format->width - 2); in vsp1_rwpf_set_selection()
213 sel->r.top = min_t(unsigned int, sel->r.top, format->height - 2); in vsp1_rwpf_set_selection()
215 format->width - sel->r.left); in vsp1_rwpf_set_selection()
217 format->height - sel->r.top); in vsp1_rwpf_set_selection()
223 format = v4l2_subdev_state_get_format(state, RWPF_PAD_SOURCE); in vsp1_rwpf_set_selection()
224 format->width = crop->width; in vsp1_rwpf_set_selection()
225 format->height = crop->height; in vsp1_rwpf_set_selection()