Lines Matching refs:crop

128  * __resizer_get_crop - helper function for getting resizer crop rectangle
131 * @which : wanted subdev crop rectangle
141 return &res->crop.request;
495 * where the input width and height are the resizer input crop rectangle size.
507 clock = div_u64((u64)limit * res->crop.active.height, ofmt->height);
509 *max_rate = div_u64((u64)clock * res->crop.active.width, ofmt->width);
588 requests_per_frame = DIV_ROUND_UP(res->crop.active.width * 2, 256)
589 * res->crop.active.height;
625 /* This will handle crop settings in stream off state */
771 * compute the input crop rectangle as the last step.
896 /* Center the new crop rectangle. */
925 /* Calculate additional offset for crop */
926 res->crop_offset = (res->crop.active.top * input->width +
927 res->crop.active.left) * 2;
946 resizer_set_start(res, res->crop.active.left * 2,
947 res->crop.active.top);
954 resizer_set_input_size(res, res->crop.active.width,
955 res->crop.active.height);
1181 * resizer_try_crop - mangles crop parameters.
1185 struct v4l2_rect *crop)
1202 crop->width = clamp_t(u32, crop->width, min_width, max_width);
1203 crop->height = clamp_t(u32, crop->height, min_height, max_height);
1206 crop->left = clamp_t(u32, crop->left, 0, sink->width - MIN_IN_WIDTH);
1207 crop->width = clamp_t(u32, crop->width, MIN_IN_WIDTH,
1208 sink->width - crop->left);
1209 crop->top = clamp_t(u32, crop->top, 0, sink->height - MIN_IN_HEIGHT);
1210 crop->height = clamp_t(u32, crop->height, MIN_IN_HEIGHT,
1211 sink->height - crop->top);
1220 * The only supported rectangles are the crop rectangles on the sink pad.
1270 * The only supported rectangle is the actual crop rectangle on the sink pad.
1303 /* Clamp the crop rectangle to the bounds, and then mangle it further to
1306 * application sets the output format, the current crop rectangle is
1307 * mangled during crop rectangle computation, which would lead to a new,
1308 * smaller input crop rectangle every time the output size is set if we
1328 /* Update the source format, resizing ratios and crop rectangle. If
1338 res->crop.active = sel->r;
1384 struct v4l2_rect crop;
1403 crop = *__resizer_get_crop(res, sd_state, which);
1404 resizer_calc_ratios(res, &crop, fmt, &ratio);
1508 struct v4l2_rect *crop;
1518 /* reset crop rectangle */
1519 crop = __resizer_get_crop(res, sd_state, fmt->which);
1520 crop->left = 0;
1521 crop->top = 0;
1522 crop->width = fmt->format.width;
1523 crop->height = fmt->format.height;
1534 /* Compute and store the active crop rectangle and resizer
1538 res->crop.active = res->crop.request;
1539 resizer_calc_ratios(res, &res->crop.active, format,