Home
last modified time | relevance | path

Searched refs:crop (Results 1 – 25 of 184) sorted by relevance

12345678

/linux/drivers/media/platform/ti/omap/
A Domap_voutlib.c50 crop->width &= ~1; in omap_vout_default_crop()
51 crop->height &= ~1; in omap_vout_default_crop()
52 crop->left = ((pix->width - crop->width) >> 1) & ~1; in omap_vout_default_crop()
53 crop->top = ((pix->height - crop->height) >> 1) & ~1; in omap_vout_default_crop()
137 crop->width = win->w.width * 2; in omap_vout_new_window()
139 if (crop->width > 768) { in omap_vout_new_window()
145 crop->width = 768; in omap_vout_new_window()
153 crop->width = win->w.width * 4; in omap_vout_new_window()
273 *crop = try_crop; in omap_vout_new_crop()
295 win->w.width = crop->width; in omap_vout_new_format()
[all …]
A Domap_vout_vrfb.c322 struct v4l2_rect *crop = &vout->crop; in omap_vout_calculate_vrfb_offset() local
354 ctop = (pix->height - crop->height) - crop->top; in omap_vout_calculate_vrfb_offset()
355 cleft = (pix->width - crop->width) - crop->left; in omap_vout_calculate_vrfb_offset()
371 ((crop->width / (vr_ps)) - 1) * ps); in omap_vout_calculate_vrfb_offset()
386 (crop->height - 1) * ps); in omap_vout_calculate_vrfb_offset()
395 temp_ps * crop->left + ctop * ps; in omap_vout_calculate_vrfb_offset()
398 temp_ps * crop->left + ctop * ps + in omap_vout_calculate_vrfb_offset()
406 crop->top + (crop->left / vr_ps) * ps; in omap_vout_calculate_vrfb_offset()
409 crop->top + (crop->left / vr_ps) * ps + in omap_vout_calculate_vrfb_offset()
415 vr_ps + (crop->left * ps) / vr_ps + in omap_vout_calculate_vrfb_offset()
[all …]
A Domap_voutlib.h16 struct v4l2_framebuffer *fbuf, struct v4l2_rect *crop);
19 struct v4l2_rect *crop, struct v4l2_window *win,
26 int omap_vout_new_window(struct v4l2_rect *crop,
31 struct v4l2_framebuffer *fbuf, struct v4l2_rect *crop,
/linux/drivers/media/platform/st/stm32/stm32-dcmipp/
A Ddcmipp-byteproc.c244 struct v4l2_rect *crop, *compose; in dcmipp_byteproc_set_fmt() local
256 fmt->format.width = crop->width; in dcmipp_byteproc_set_fmt()
260 crop->top = 0; in dcmipp_byteproc_set_fmt()
261 crop->left = 0; in dcmipp_byteproc_set_fmt()
262 crop->width = fmt->format.width; in dcmipp_byteproc_set_fmt()
264 *compose = *crop; in dcmipp_byteproc_set_fmt()
303 s->r = *crop; in dcmipp_byteproc_get_selection()
356 *crop = s->r; in dcmipp_byteproc_set_selection()
362 crop->width, crop->height, crop->left, crop->top); in dcmipp_byteproc_set_selection()
368 *crop = s->r; in dcmipp_byteproc_set_selection()
[all …]
/linux/drivers/staging/media/atomisp/pci/
A Datomisp_subdev.c240 return &isp_sd->fmt[pad].crop; in atomisp_subdev_get_rect()
342 crop[pad]->width = ffmt[pad]->width; in atomisp_subdev_set_selection()
343 crop[pad]->height = ffmt[pad]->height; in atomisp_subdev_set_selection()
346 && crop[pad]->width && crop[pad]->height) { in atomisp_subdev_set_selection()
359 crop[pad]->width = roundup(crop[pad]->width * 5 / 6, in atomisp_subdev_set_selection()
361 crop[pad]->height = roundup(crop[pad]->height * 5 / 6, in atomisp_subdev_set_selection()
365 crop[pad]->width = min(crop[pad]->width, r->width); in atomisp_subdev_set_selection()
366 crop[pad]->height = min(crop[pad]->height, r->height); in atomisp_subdev_set_selection()
369 struct v4l2_rect tmp = *crop[pad]; in atomisp_subdev_set_selection()
398 crop[pad]->width, in atomisp_subdev_set_selection()
[all …]
/linux/drivers/media/platform/st/sti/delta/
A Ddelta-debug.c25 s->crop.width, s->crop.height, in delta_streaminfo_str()
26 s->crop.left, s->crop.top, in delta_streaminfo_str()
46 f->crop.width, f->crop.height, in delta_frameinfo_str()
47 f->crop.left, f->crop.top, in delta_frameinfo_str()
/linux/drivers/staging/media/imx/
A Dimx-media-csi.c716 crop = priv->crop; in csi_setup()
1200 crop->width = min_t(__u32, infmt->width, crop->width); in csi_try_crop()
1201 if (crop->left + crop->width > infmt->width) in csi_try_crop()
1202 crop->left = infmt->width - crop->width; in csi_try_crop()
1226 crop->height = min_t(__u32, in_height, crop->height); in csi_try_crop()
1227 if (crop->top + crop->height > in_height) in csi_try_crop()
1228 crop->top = in_height - crop->height; in csi_try_crop()
1309 crop->width / 2 : crop->width; in csi_enum_frame_size()
1312 crop->height / 2 : crop->height; in csi_enum_frame_size()
1497 crop->top = 0; in csi_try_fmt()
[all …]
/linux/Documentation/userspace-api/media/drivers/
A Dccs.rst24 as analogue crop functionality present in many compliant devices. The analogue
25 crop is configured using the ``V4L2_SEL_TGT_CROP`` on the source pad (0) of the
36 Additionally, if a device has no scaler or digital crop functionality, the
37 source pad (1) exposes another digital crop selection rectangle that can only
38 crop at the end of the lines and frames.
43 The scaler sub-device represents the digital crop and scaling functionality of
45 configure the digital crop on the sink pad (0) when digital crop is supported.
50 another digital crop selection rectangle that can only crop at the end of the
53 Digital and analogue crop
57 dropping some data on the floor. Analogue crop, on the other hand, means that
[all …]
/linux/Documentation/userspace-api/media/v4l/
A Dcrop.rst64 .. kernel-figure:: crop.svg
65 :alt: crop.svg
170 struct v4l2_crop crop;
180 memset (&crop, 0, sizeof (crop));
229 struct v4l2_crop crop;
239 memset (&crop, 0, sizeof (crop));
247 crop.c.width /= 2;
248 crop.c.height /= 2;
249 crop.c.left += crop.c.width / 2;
250 crop.c.top += crop.c.height / 2;
[all …]
/linux/drivers/media/platform/ti/omap3isp/
A Dispresizer.c1202 crop->width = clamp_t(u32, crop->width, min_width, max_width); in resizer_try_crop()
1203 crop->height = clamp_t(u32, crop->height, min_height, max_height); in resizer_try_crop()
1206 crop->left = clamp_t(u32, crop->left, 0, sink->width - MIN_IN_WIDTH); in resizer_try_crop()
1207 crop->width = clamp_t(u32, crop->width, MIN_IN_WIDTH, in resizer_try_crop()
1209 crop->top = clamp_t(u32, crop->top, 0, sink->height - MIN_IN_HEIGHT); in resizer_try_crop()
1210 crop->height = clamp_t(u32, crop->height, MIN_IN_HEIGHT, in resizer_try_crop()
1384 struct v4l2_rect crop; in resizer_try_format() local
1508 struct v4l2_rect *crop; in resizer_set_format() local
1520 crop->left = 0; in resizer_set_format()
1521 crop->top = 0; in resizer_set_format()
[all …]
/linux/drivers/media/platform/renesas/vsp1/
A Dvsp1_hgt.c136 struct v4l2_rect *crop; in hgt_configure_stream() local
143 crop = v4l2_subdev_state_get_crop(state, HISTO_PAD_SINK); in hgt_configure_stream()
149 (crop->left << VI6_HGT_OFFSET_HOFFSET_SHIFT) | in hgt_configure_stream()
150 (crop->top << VI6_HGT_OFFSET_VOFFSET_SHIFT)); in hgt_configure_stream()
152 (crop->width << VI6_HGT_SIZE_HSIZE_SHIFT) | in hgt_configure_stream()
153 (crop->height << VI6_HGT_SIZE_VSIZE_SHIFT)); in hgt_configure_stream()
165 hratio = crop->width * 2 / compose->width / 3; in hgt_configure_stream()
166 vratio = crop->height * 2 / compose->height / 3; in hgt_configure_stream()
A Dvsp1_rwpf.c99 struct v4l2_rect *crop; in vsp1_rwpf_set_format() local
102 crop = v4l2_subdev_state_get_crop(state, RWPF_PAD_SINK); in vsp1_rwpf_set_format()
103 crop->left = 0; in vsp1_rwpf_set_format()
104 crop->top = 0; 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()
177 struct v4l2_rect *crop; in vsp1_rwpf_set_selection() local
219 crop = v4l2_subdev_state_get_crop(state, RWPF_PAD_SINK); in vsp1_rwpf_set_selection()
220 *crop = sel->r; in vsp1_rwpf_set_selection()
224 format->width = crop->width; in vsp1_rwpf_set_selection()
[all …]
A Dvsp1_rpf.c291 struct v4l2_rect crop = partition->rpf[rpf->entity.index]; in rpf_configure_partition() local
303 crop.height = round_down(crop.height / 2, fmtinfo->vsub); in rpf_configure_partition()
304 crop.top = round_down(crop.top / 2, fmtinfo->vsub); in rpf_configure_partition()
308 (crop.width << VI6_RPF_SRC_BSIZE_BHSIZE_SHIFT) | in rpf_configure_partition()
309 (crop.height << VI6_RPF_SRC_BSIZE_BVSIZE_SHIFT)); in rpf_configure_partition()
311 (crop.width << VI6_RPF_SRC_ESIZE_EHSIZE_SHIFT) | in rpf_configure_partition()
312 (crop.height << VI6_RPF_SRC_ESIZE_EVSIZE_SHIFT)); in rpf_configure_partition()
314 mem.addr[0] += crop.top * format->plane_fmt[0].bytesperline in rpf_configure_partition()
315 + crop.left * fmtinfo->bpp[0] / 8; in rpf_configure_partition()
321 offset = crop.top / fmtinfo->vsub * bpl in rpf_configure_partition()
[all …]
A Dvsp1_hgo.c140 struct v4l2_rect *crop; in hgo_configure_stream() local
144 crop = v4l2_subdev_state_get_crop(state, HISTO_PAD_SINK); in hgo_configure_stream()
150 (crop->left << VI6_HGO_OFFSET_HOFFSET_SHIFT) | in hgo_configure_stream()
151 (crop->top << VI6_HGO_OFFSET_VOFFSET_SHIFT)); in hgo_configure_stream()
153 (crop->width << VI6_HGO_SIZE_HSIZE_SHIFT) | in hgo_configure_stream()
154 (crop->height << VI6_HGO_SIZE_VSIZE_SHIFT)); in hgo_configure_stream()
162 hratio = crop->width * 2 / compose->width / 3; in hgo_configure_stream()
163 vratio = crop->height * 2 / compose->height / 3; in hgo_configure_stream()
A Dvsp1_histo.c204 struct v4l2_rect *crop; in histo_get_selection() local
224 sel->r.width = crop->width; in histo_get_selection()
225 sel->r.height = crop->height; in histo_get_selection()
282 struct v4l2_rect *crop; in histo_set_compose() local
293 crop = v4l2_subdev_state_get_crop(sd_state, sel->pad); in histo_set_compose()
309 sel->r.width = clamp(sel->r.width, crop->width / 4, crop->width); in histo_set_compose()
310 ratio = 1 << (crop->width * 2 / sel->r.width / 3); in histo_set_compose()
311 sel->r.width = crop->width / ratio; in histo_set_compose()
314 sel->r.height = clamp(sel->r.height, crop->height / 4, crop->height); in histo_set_compose()
315 ratio = 1 << (crop->height * 2 / sel->r.height / 3); in histo_set_compose()
[all …]
/linux/drivers/media/i2c/
A Dimx296.c510 const struct v4l2_rect *crop; in imx296_setup() local
534 (crop->width != format->width ? in imx296_setup()
684 struct v4l2_rect *crop; in imx296_set_format() local
702 crop->width / 2, crop->width); in imx296_set_format()
704 crop->height / 2, crop->height); in imx296_set_format()
709 format->width = crop->width / hratio; in imx296_set_format()
712 format->width = crop->width; in imx296_set_format()
713 format->height = crop->height; in imx296_set_format()
759 struct v4l2_rect *crop; in imx296_set_selection() local
785 if (rect.width != crop->width || rect.height != crop->height) { in imx296_set_selection()
[all …]
A Dmt9m114.c1159 struct v4l2_rect *crop; in mt9m114_pa_init_state() local
1163 crop->left = 0; in mt9m114_pa_init_state()
1164 crop->top = 0; in mt9m114_pa_init_state()
1219 struct v4l2_rect *crop; in mt9m114_pa_set_fmt() local
1269 struct v4l2_rect *crop; in mt9m114_pa_set_selection() local
1294 sel->r = *crop; in mt9m114_pa_set_selection()
1668 crop->left = 4; in mt9m114_ifp_init_state()
1669 crop->top = 4; in mt9m114_ifp_init_state()
1922 sel->r = *crop; in mt9m114_ifp_set_selection()
1935 crop->width); in mt9m114_ifp_set_selection()
[all …]
/linux/drivers/media/platform/mediatek/mdp/
A Dmtk_mdp_regs.c74 config->crop_x = frame->crop.left; in mtk_mdp_hw_set_in_size()
75 config->crop_y = frame->crop.top; in mtk_mdp_hw_set_in_size()
78 config->crop_w = frame->crop.width; in mtk_mdp_hw_set_in_size()
79 config->crop_h = frame->crop.height; in mtk_mdp_hw_set_in_size()
109 config->crop_x = frame->crop.left; in mtk_mdp_hw_set_out_size()
110 config->crop_y = frame->crop.top; in mtk_mdp_hw_set_out_size()
111 config->crop_w = frame->crop.width; in mtk_mdp_hw_set_out_size()
112 config->crop_h = frame->crop.height; in mtk_mdp_hw_set_out_size()
/linux/drivers/staging/media/starfive/camss/
A Dstf-isp.c63 struct v4l2_rect *crop; in isp_set_stream() local
72 stf_isp_settings(isp_dev, crop, fmt->code); in isp_set_stream()
182 struct v4l2_rect *crop) in isp_try_crop() argument
194 v4l2_rect_set_min_size(crop, &stf_frame_min_crop); in isp_try_crop()
195 v4l2_rect_map_inside(crop, &bounds); in isp_try_crop()
247 struct v4l2_subdev_selection crop = { 0 }; in isp_set_selection() local
257 crop.which = sel->which; in isp_set_selection()
258 crop.pad = STF_ISP_PAD_SRC; in isp_set_selection()
259 crop.target = V4L2_SEL_TGT_CROP; in isp_set_selection()
260 crop.r = *rect; in isp_set_selection()
[all …]
/linux/drivers/media/platform/amlogic/meson-ge2d/
A Dge2d.c64 struct v4l2_rect crop; member
218 FIELD_PREP(GE2D_END, ctx->in.crop.top + ctx->in.crop.height - 1)); in ge2d_hw_start()
221 FIELD_PREP(GE2D_END, ctx->in.crop.left + ctx->in.crop.width - 1)); in ge2d_hw_start()
224 FIELD_PREP(GE2D_END, ctx->out.crop.top + ctx->out.crop.height - 1)); in ge2d_hw_start()
227 FIELD_PREP(GE2D_END, ctx->out.crop.left + ctx->out.crop.width - 1)); in ge2d_hw_start()
493 s->r = f->crop; in vidioc_g_selection()
555 f->crop = s->r; in vidioc_s_selection()
621 frm->crop.left = 0; in vidioc_s_fmt_cap()
622 frm->crop.top = 0; in vidioc_s_fmt_cap()
697 frm->crop.left = 0; in vidioc_s_fmt_out()
[all …]
/linux/Documentation/driver-api/media/drivers/
A Dsh_mobile_ceu_camera.rst76 2. Calculate "effective" input crop (sensor subwindow) - CEU crop scaled back at
101 8. Calculate new CEU crop - apply sensor scales to previously calculated
102 "effective" crop:
107 9. Use CEU cropping to crop to the new window:
119 The :ref:`V4L2 crop API <crop-scale>` says:
132 to 2 : 2', target crop 5 : 5', current output format 6' - 6.
142 6. Calculate and apply host crop: 6 - 7 = (5 - 2) * (6' - 6) / (5' - 5)
/linux/drivers/media/pci/bt8xx/
A Dbttv-risc.c287 const struct v4l2_rect * crop) in bttv_calc_geo() argument
322 geo->crop = (((geo->width >> 8) & 0x03) | in bttv_calc_geo()
568 unsigned int crop, vdelay; in bttv_buffer_activate_vbi() local
573 crop = btread(BT848_E_CROP); in bttv_buffer_activate_vbi()
578 crop = (crop & 0x3f) | ((vbi->geo.vdelay >> 2) & 0xc0); in bttv_buffer_activate_vbi()
581 btwrite(crop, BT848_E_CROP); in bttv_buffer_activate_vbi()
583 btwrite(crop, BT848_O_CROP); in bttv_buffer_activate_vbi()
675 &btv->crop[!!btv->do_crop].rect); in bttv_buffer_risc()
725 &btv->crop[!!btv->do_crop].rect); in bttv_buffer_risc()
735 &btv->crop[!!btv->do_crop].rect); in bttv_buffer_risc()
[all …]
/linux/drivers/media/platform/mediatek/mdp3/
A Dmtk-mdp3-regs.c289 crop_w = crop->width; in mdp_check_scaling_ratio()
290 crop_h = crop->height; in mdp_check_scaling_ratio()
319 r1 = frame->crop.c.width * frame->crop.c.height; in mdp_check_pp_enable()
438 c->left = crop->c.left in mdp_set_src_crop()
439 + mdp_to_fixed(&c->left_subpix, &crop->left_subpix); in mdp_set_src_crop()
440 c->top = crop->c.top in mdp_set_src_crop()
441 + mdp_to_fixed(&c->top_subpix, &crop->top_subpix); in mdp_set_src_crop()
442 c->width = crop->c.width in mdp_set_src_crop()
443 + mdp_to_fixed(&c->width_subpix, &crop->width_subpix); in mdp_set_src_crop()
444 c->height = crop->c.height in mdp_set_src_crop()
[all …]
/linux/drivers/media/platform/samsung/exynos-gsc/
A Dgsc-core.c233 frame->crop.width = width; in gsc_set_frame_size()
234 frame->crop.height = height; in gsc_set_frame_size()
235 frame->crop.left = 0; in gsc_set_frame_size()
236 frame->crop.top = 0; in gsc_set_frame_size()
296 s_frame->crop.width + remainder, s_frame->crop.width); in gsc_check_src_scale_info()
304 s_frame->crop.height + remainder, s_frame->crop.height); in gsc_check_src_scale_info()
643 s_frame->crop.height, d_frame->crop.width, d_frame->crop.height, in gsc_set_scaler_info()
652 ty = d_frame->crop.width; in gsc_set_scaler_info()
653 tx = d_frame->crop.height; in gsc_set_scaler_info()
655 tx = d_frame->crop.width; in gsc_set_scaler_info()
[all …]
/linux/drivers/media/pci/intel/ipu6/
A Dipu6-isys-subdev.c146 struct v4l2_rect *crop; in ipu6_isys_subdev_set_fmt() local
198 crop = v4l2_subdev_state_get_crop(state, other_pad, other_stream); in ipu6_isys_subdev_set_fmt()
200 crop->left = 0; in ipu6_isys_subdev_set_fmt()
201 crop->top = 0; in ipu6_isys_subdev_set_fmt()
202 crop->width = fmt->width; in ipu6_isys_subdev_set_fmt()
203 crop->height = fmt->height; in ipu6_isys_subdev_set_fmt()
265 struct v4l2_rect *crop) in ipu6_isys_get_stream_pad_crop() argument
270 if (!sd || !crop) in ipu6_isys_get_stream_pad_crop()
276 *crop = *rect; in ipu6_isys_get_stream_pad_crop()

Completed in 68 milliseconds

12345678