Lines Matching full:sel
203 struct v4l2_subdev_selection *sel) in histo_get_selection() argument
211 if (sel->pad != HISTO_PAD_SINK) in histo_get_selection()
217 sel->which); in histo_get_selection()
223 switch (sel->target) { in histo_get_selection()
229 sel->r.left = 0; in histo_get_selection()
230 sel->r.top = 0; in histo_get_selection()
231 sel->r.width = crop->width; in histo_get_selection()
232 sel->r.height = crop->height; in histo_get_selection()
239 sel->r.left = 0; in histo_get_selection()
240 sel->r.top = 0; in histo_get_selection()
241 sel->r.width = format->width; in histo_get_selection()
242 sel->r.height = format->height; in histo_get_selection()
247 sel->r = *vsp1_entity_get_pad_selection(&histo->entity, config, in histo_get_selection()
248 sel->pad, sel->target); in histo_get_selection()
263 struct v4l2_subdev_selection *sel) in histo_set_crop() argument
272 sel->r.left = clamp_t(unsigned int, sel->r.left, 0, format->width - 1); in histo_set_crop()
273 sel->r.top = clamp_t(unsigned int, sel->r.top, 0, format->height - 1); in histo_set_crop()
274 sel->r.width = clamp_t(unsigned int, sel->r.width, HISTO_MIN_SIZE, in histo_set_crop()
275 format->width - sel->r.left); in histo_set_crop()
276 sel->r.height = clamp_t(unsigned int, sel->r.height, HISTO_MIN_SIZE, in histo_set_crop()
277 format->height - sel->r.top); in histo_set_crop()
281 sel->pad, V4L2_SEL_TGT_CROP); in histo_set_crop()
282 *selection = sel->r; in histo_set_crop()
285 sel->pad, in histo_set_crop()
287 *selection = sel->r; in histo_set_crop()
294 struct v4l2_subdev_selection *sel) in histo_set_compose() argument
306 sel->r.left = 0; in histo_set_compose()
307 sel->r.top = 0; in histo_set_compose()
310 sel->pad, in histo_set_compose()
327 sel->r.width = clamp(sel->r.width, crop->width / 4, crop->width); in histo_set_compose()
328 ratio = 1 << (crop->width * 2 / sel->r.width / 3); in histo_set_compose()
329 sel->r.width = crop->width / ratio; in histo_set_compose()
332 sel->r.height = clamp(sel->r.height, crop->height / 4, crop->height); in histo_set_compose()
333 ratio = 1 << (crop->height * 2 / sel->r.height / 3); in histo_set_compose()
334 sel->r.height = crop->height / ratio; in histo_set_compose()
337 sel->pad, in histo_set_compose()
339 *compose = sel->r; in histo_set_compose()
346 struct v4l2_subdev_selection *sel) in histo_set_selection() argument
352 if (sel->pad != HISTO_PAD_SINK) in histo_set_selection()
358 sel->which); in histo_set_selection()
364 if (sel->target == V4L2_SEL_TGT_CROP) in histo_set_selection()
365 ret = histo_set_crop(subdev, config, sel); in histo_set_selection()
366 else if (sel->target == V4L2_SEL_TGT_COMPOSE) in histo_set_selection()
367 ret = histo_set_compose(subdev, config, sel); in histo_set_selection()