Lines Matching full:format
65 struct v4l2_mbus_framefmt *format; in vsp1_rwpf_set_format() local
76 /* Default to YUV if the requested format is not supported. */ in vsp1_rwpf_set_format()
77 if (fmt->format.code != MEDIA_BUS_FMT_ARGB8888_1X32 && in vsp1_rwpf_set_format()
78 fmt->format.code != MEDIA_BUS_FMT_AHSV8888_1X32 && in vsp1_rwpf_set_format()
79 fmt->format.code != MEDIA_BUS_FMT_AYUV8_1X32) in vsp1_rwpf_set_format()
80 fmt->format.code = MEDIA_BUS_FMT_AYUV8_1X32; in vsp1_rwpf_set_format()
82 format = vsp1_entity_get_pad_format(&rwpf->entity, config, fmt->pad); in vsp1_rwpf_set_format()
86 * The RWPF performs format conversion but can't scale, only the in vsp1_rwpf_set_format()
87 * format code can be changed on the source pad. in vsp1_rwpf_set_format()
89 format->code = fmt->format.code; in vsp1_rwpf_set_format()
90 fmt->format = *format; in vsp1_rwpf_set_format()
94 format->code = fmt->format.code; in vsp1_rwpf_set_format()
95 format->width = clamp_t(unsigned int, fmt->format.width, in vsp1_rwpf_set_format()
97 format->height = clamp_t(unsigned int, fmt->format.height, in vsp1_rwpf_set_format()
99 format->field = V4L2_FIELD_NONE; in vsp1_rwpf_set_format()
100 format->colorspace = V4L2_COLORSPACE_SRGB; in vsp1_rwpf_set_format()
102 fmt->format = *format; in vsp1_rwpf_set_format()
111 crop->width = fmt->format.width; in vsp1_rwpf_set_format()
112 crop->height = fmt->format.height; in vsp1_rwpf_set_format()
115 /* Propagate the format to the source pad. */ in vsp1_rwpf_set_format()
116 format = vsp1_entity_get_pad_format(&rwpf->entity, config, in vsp1_rwpf_set_format()
118 *format = fmt->format; in vsp1_rwpf_set_format()
121 format->width = fmt->format.height; in vsp1_rwpf_set_format()
122 format->height = fmt->format.width; in vsp1_rwpf_set_format()
136 struct v4l2_mbus_framefmt *format; in vsp1_rwpf_get_selection() local
160 format = vsp1_entity_get_pad_format(&rwpf->entity, config, in vsp1_rwpf_get_selection()
164 sel->r.width = format->width; in vsp1_rwpf_get_selection()
165 sel->r.height = format->height; in vsp1_rwpf_get_selection()
184 struct v4l2_mbus_framefmt *format; in vsp1_rwpf_set_selection() local
207 format = vsp1_entity_get_pad_format(&rwpf->entity, config, in vsp1_rwpf_set_selection()
214 if (format->code == MEDIA_BUS_FMT_AYUV8_1X32) { in vsp1_rwpf_set_selection()
221 sel->r.left = min_t(unsigned int, sel->r.left, format->width - 2); in vsp1_rwpf_set_selection()
222 sel->r.top = min_t(unsigned int, sel->r.top, format->height - 2); in vsp1_rwpf_set_selection()
224 format->width - sel->r.left); in vsp1_rwpf_set_selection()
226 format->height - sel->r.top); in vsp1_rwpf_set_selection()
231 /* Propagate the format to the source pad. */ in vsp1_rwpf_set_selection()
232 format = vsp1_entity_get_pad_format(&rwpf->entity, config, in vsp1_rwpf_set_selection()
234 format->width = crop->width; in vsp1_rwpf_set_selection()
235 format->height = crop->height; in vsp1_rwpf_set_selection()