Home
last modified time | relevance | path

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

123456

/linux/drivers/media/platform/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/staging/media/imx/
A Dimx-media-csi.c726 crop = priv->crop; in csi_setup()
1198 crop->width = min_t(__u32, infmt->width, crop->width); in csi_try_crop()
1199 if (crop->left + crop->width > infmt->width) in csi_try_crop()
1200 crop->left = infmt->width - crop->width; in csi_try_crop()
1224 crop->height = min_t(__u32, in_height, crop->height); in csi_try_crop()
1225 if (crop->top + crop->height > in_height) in csi_try_crop()
1226 crop->top = in_height - crop->height; in csi_try_crop()
1306 crop->width / 2 : crop->width; in csi_enum_frame_size()
1309 crop->height / 2 : crop->height; in csi_enum_frame_size()
1494 crop->top = 0; in csi_try_fmt()
[all …]
/linux/drivers/media/platform/vsp1/
A Dvsp1_rpf.c251 struct v4l2_rect crop; in rpf_configure_partition() local
261 crop = *vsp1_rwpf_get_crop(rpf, rpf->entity.config); in rpf_configure_partition()
274 crop.width = pipe->partition->rpf.width; in rpf_configure_partition()
275 crop.left += pipe->partition->rpf.left; in rpf_configure_partition()
279 crop.height = round_down(crop.height / 2, fmtinfo->vsub); in rpf_configure_partition()
280 crop.top = round_down(crop.top / 2, fmtinfo->vsub); in rpf_configure_partition()
284 (crop.width << VI6_RPF_SRC_BSIZE_BHSIZE_SHIFT) | in rpf_configure_partition()
287 (crop.width << VI6_RPF_SRC_ESIZE_EHSIZE_SHIFT) | in rpf_configure_partition()
291 + crop.left * fmtinfo->bpp[0] / 8; in rpf_configure_partition()
296 offset = crop.top * format->plane_fmt[1].bytesperline in rpf_configure_partition()
[all …]
A Dvsp1_rwpf.c107 struct v4l2_rect *crop; in vsp1_rwpf_set_format() local
110 crop = vsp1_rwpf_get_crop(rwpf, config); in vsp1_rwpf_set_format()
111 crop->left = 0; in vsp1_rwpf_set_format()
112 crop->top = 0; in vsp1_rwpf_set_format()
113 crop->width = fmt->format.width; in vsp1_rwpf_set_format()
114 crop->height = fmt->format.height; in vsp1_rwpf_set_format()
188 struct v4l2_rect *crop; in vsp1_rwpf_set_selection() local
232 crop = vsp1_rwpf_get_crop(rwpf, config); in vsp1_rwpf_set_selection()
233 *crop = sel->r; in vsp1_rwpf_set_selection()
238 format->width = crop->width; in vsp1_rwpf_set_selection()
[all …]
A Dvsp1_hgt.c135 struct v4l2_rect *crop; in hgt_configure_stream() local
142 crop = vsp1_entity_get_pad_selection(entity, entity->config, in hgt_configure_stream()
151 (crop->left << VI6_HGT_OFFSET_HOFFSET_SHIFT) | in hgt_configure_stream()
152 (crop->top << VI6_HGT_OFFSET_VOFFSET_SHIFT)); in hgt_configure_stream()
154 (crop->width << VI6_HGT_SIZE_HSIZE_SHIFT) | in hgt_configure_stream()
155 (crop->height << VI6_HGT_SIZE_VSIZE_SHIFT)); in hgt_configure_stream()
167 hratio = crop->width * 2 / compose->width / 3; in hgt_configure_stream()
168 vratio = crop->height * 2 / compose->height / 3; in hgt_configure_stream()
A Dvsp1_hgo.c139 struct v4l2_rect *crop; in hgo_configure_stream() local
143 crop = vsp1_entity_get_pad_selection(entity, entity->config, in hgo_configure_stream()
152 (crop->left << VI6_HGO_OFFSET_HOFFSET_SHIFT) | in hgo_configure_stream()
153 (crop->top << VI6_HGO_OFFSET_VOFFSET_SHIFT)); in hgo_configure_stream()
155 (crop->width << VI6_HGO_SIZE_HSIZE_SHIFT) | in hgo_configure_stream()
156 (crop->height << VI6_HGO_SIZE_VSIZE_SHIFT)); in hgo_configure_stream()
164 hratio = crop->width * 2 / compose->width / 3; in hgo_configure_stream()
165 vratio = crop->height * 2 / compose->height / 3; in hgo_configure_stream()
A Dvsp1_histo.c208 struct v4l2_rect *crop; in histo_get_selection() local
226 crop = vsp1_entity_get_pad_selection(&histo->entity, config, in histo_get_selection()
231 sel->r.width = crop->width; in histo_get_selection()
232 sel->r.height = crop->height; in histo_get_selection()
298 struct v4l2_rect *crop; in histo_set_compose() local
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()
[all …]
/linux/drivers/media/platform/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/Documentation/userspace-api/media/drivers/
A Dccs.rst20 as analogue crop functionality present in many compliant devices. The analogue
21 crop is configured using the ``V4L2_SEL_TGT_CROP`` on the source pad (0) of the
32 Additionally, if a device has no scaler or digital crop functionality, the
33 source pad (1) expses another digital crop selection rectangle that can only
34 crop at the end of the lines and frames.
39 The scaler sub-device represents the digital crop and scaling functionality of
41 configure the digital crop on the sink pad (0) when digital crop is supported.
46 another digital crop selection rectangle that can only crop at the end of the
49 Digital and analogue crop
53 dropping some data on the floor. Analogue crop, on the other hand, means that
[all …]
/linux/Documentation/driver-api/media/drivers/ccs/
A Dccs.rst20 as analogue crop functionality present in many compliant devices. The analogue
21 crop is configured using the ``V4L2_SEL_TGT_CROP`` on the source pad (0) of the
32 Additionally, if a device has no scaler or digital crop functionality, the
33 source pad (1) expses another digital crop selection rectangle that can only
34 crop at the end of the lines and frames.
39 The scaler sub-device represents the digital crop and scaling functionality of
41 configure the digital crop on the sink pad (0) when digital crop is supported.
46 another digital crop selection rectangle that can only crop at the end of the
49 Digital and analogue crop
53 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 …]
A Dvidioc-subdev-g-crop.rst13 VIDIOC_SUBDEV_G_CROP - VIDIOC_SUBDEV_S_CROP - Get or set the crop rectangle on a subdev pad
44 To retrieve the current crop rectangle applications set the ``pad``
53 To change the current crop rectangle applications set both the ``pad``
56 structure. The driver verifies the requested crop rectangle, adjusts it
63 to ``V4L2_SUBDEV_FORMAT_TRY``. When set, 'try' crop rectangles are not
65 crop rectangles and stored in the sub-device file handle. Two
74 Drivers must not return an error solely because the requested crop
111 The crop rectangle can't be changed because the pad is currently
/linux/drivers/staging/media/atomisp/pci/
A Datomisp_subdev.c266 return &isp_sd->fmt[pad].crop; in atomisp_subdev_get_rect()
404 crop[pad]->width = ffmt[pad]->width; in atomisp_subdev_set_selection()
422 && crop[pad]->width && crop[pad]->height) { in atomisp_subdev_set_selection()
423 crop[pad]->width -= padding_w; in atomisp_subdev_set_selection()
424 crop[pad]->height -= padding_h; in atomisp_subdev_set_selection()
439 crop[pad]->width = roundup(crop[pad]->width * 5 / 6, in atomisp_subdev_set_selection()
441 crop[pad]->height = roundup(crop[pad]->height * 5 / 6, in atomisp_subdev_set_selection()
445 crop[pad]->width = min(crop[pad]->width, r->width); in atomisp_subdev_set_selection()
446 crop[pad]->height = min(crop[pad]->height, r->height); in atomisp_subdev_set_selection()
451 struct v4l2_rect tmp = *crop[pad]; in atomisp_subdev_set_selection()
[all …]
/linux/drivers/media/platform/omap3isp/
A Dispresizer.c1203 crop->width = clamp_t(u32, crop->width, min_width, max_width); in resizer_try_crop()
1204 crop->height = clamp_t(u32, crop->height, min_height, max_height); in resizer_try_crop()
1207 crop->left = clamp_t(u32, crop->left, 0, sink->width - MIN_IN_WIDTH); in resizer_try_crop()
1208 crop->width = clamp_t(u32, crop->width, MIN_IN_WIDTH, in resizer_try_crop()
1210 crop->top = clamp_t(u32, crop->top, 0, sink->height - MIN_IN_HEIGHT); in resizer_try_crop()
1211 crop->height = clamp_t(u32, crop->height, MIN_IN_HEIGHT, in resizer_try_crop()
1385 struct v4l2_rect crop; in resizer_try_format() local
1509 struct v4l2_rect *crop; in resizer_set_format() local
1521 crop->left = 0; in resizer_set_format()
1522 crop->top = 0; in resizer_set_format()
[all …]
/linux/drivers/media/platform/rockchip/rkisp1/
A Drkisp1-common.c19 void rkisp1_sd_adjust_crop_rect(struct v4l2_rect *crop, in rkisp1_sd_adjust_crop_rect() argument
22 v4l2_rect_set_min_size(crop, &rkisp1_sd_min_crop); in rkisp1_sd_adjust_crop_rect()
23 v4l2_rect_map_inside(crop, bounds); in rkisp1_sd_adjust_crop_rect()
26 void rkisp1_sd_adjust_crop(struct v4l2_rect *crop, in rkisp1_sd_adjust_crop() argument
36 rkisp1_sd_adjust_crop_rect(crop, &crop_bounds); in rkisp1_sd_adjust_crop()
/linux/drivers/media/platform/meson/ge2d/
A Dge2d.c64 struct v4l2_rect crop; member
218 FIELD_PREP(GE2D_END, ctx->in.crop.top + ctx->in.crop.height)); in ge2d_hw_start()
221 FIELD_PREP(GE2D_END, ctx->in.crop.left + ctx->in.crop.width)); in ge2d_hw_start()
224 FIELD_PREP(GE2D_END, ctx->out.crop.top + ctx->out.crop.height)); in ge2d_hw_start()
227 FIELD_PREP(GE2D_END, ctx->out.crop.left + ctx->out.crop.width)); in ge2d_hw_start()
230 FIELD_PREP(GE2D_END, ctx->out.crop.top + ctx->out.crop.height)); in ge2d_hw_start()
233 FIELD_PREP(GE2D_END, ctx->out.crop.left + ctx->out.crop.width)); in ge2d_hw_start()
493 s->r = f->crop; in vidioc_g_selection()
555 f->crop = s->r; in vidioc_s_selection()
622 frm->crop.top = 0; in vidioc_s_fmt_cap()
[all …]
/linux/drivers/media/platform/mtk-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/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/i2c/
A Dmt9m032.c150 struct v4l2_rect crop; member
183 struct v4l2_rect *crop = &sensor->crop; in mt9m032_update_timing() local
195 - crop->height; in mt9m032_update_timing()
206 - crop->height; in mt9m032_update_timing()
221 sensor->crop.width - 1); in mt9m032_update_geom_timing()
224 sensor->crop.height - 1); in mt9m032_update_geom_timing()
227 sensor->crop.left); in mt9m032_update_geom_timing()
230 sensor->crop.top); in mt9m032_update_geom_timing()
349 return &sensor->crop; in __mt9m032_get_pad_crop()
753 sensor->crop.top = MT9M032_ROW_START_DEF; in mt9m032_probe()
[all …]
A Dmt9t001.c126 struct v4l2_rect crop; member
280 return &mt9t001->crop; in __mt9t001_get_pad_crop()
293 struct v4l2_rect *crop = &mt9t001->crop; in mt9t001_s_stream() local
807 struct v4l2_rect *crop; in mt9t001_open() local
810 crop->left = MT9T001_COLUMN_START_DEF; in mt9t001_open()
811 crop->top = MT9T001_ROW_START_DEF; in mt9t001_open()
812 crop->width = MT9T001_WINDOW_WIDTH_DEF + 1; in mt9t001_open()
813 crop->height = MT9T001_WINDOW_HEIGHT_DEF + 1; in mt9t001_open()
936 mt9t001->crop.left = MT9T001_COLUMN_START_DEF; in mt9t001_probe()
937 mt9t001->crop.top = MT9T001_ROW_START_DEF; in mt9t001_probe()
[all …]
A Dmt9v032.c189 struct v4l2_rect crop; member
248 struct v4l2_rect *crop = &mt9v032->crop; in mt9v032_update_hblank() local
377 return &mt9v032->crop; in __mt9v032_get_pad_crop()
388 struct v4l2_rect *crop = &mt9v032->crop; in mt9v032_s_stream() local
931 struct v4l2_rect *crop; in mt9v032_open() local
934 crop->left = MT9V032_COLUMN_START_DEF; in mt9v032_open()
935 crop->top = MT9V032_ROW_START_DEF; in mt9v032_open()
936 crop->width = MT9V032_WINDOW_WIDTH_DEF; in mt9v032_open()
937 crop->height = MT9V032_WINDOW_HEIGHT_DEF; in mt9v032_open()
1150 mt9v032->crop.left = MT9V032_COLUMN_START_DEF; in mt9v032_probe()
[all …]
/linux/drivers/media/platform/exynos-gsc/
A Dgsc-core.c234 frame->crop.width = width; in gsc_set_frame_size()
235 frame->crop.height = height; in gsc_set_frame_size()
236 frame->crop.left = 0; in gsc_set_frame_size()
237 frame->crop.top = 0; in gsc_set_frame_size()
297 s_frame->crop.width + remainder, s_frame->crop.width); in gsc_check_src_scale_info()
305 s_frame->crop.height + remainder, s_frame->crop.height); in gsc_check_src_scale_info()
645 s_frame->crop.height, d_frame->crop.width, d_frame->crop.height, in gsc_set_scaler_info()
654 ty = d_frame->crop.width; in gsc_set_scaler_info()
655 tx = d_frame->crop.height; in gsc_set_scaler_info()
657 tx = d_frame->crop.width; in gsc_set_scaler_info()
[all …]
/linux/drivers/media/pci/bt8xx/
A Dbttv-risc.c598 unsigned int crop, vdelay; in bttv_buffer_activate_vbi() local
604 crop = btread(BT848_E_CROP); in bttv_buffer_activate_vbi()
609 crop = (crop & 0x3f) | ((vbi->geo.vdelay >> 2) & 0xc0); in bttv_buffer_activate_vbi()
612 btwrite(crop, BT848_E_CROP); in bttv_buffer_activate_vbi()
614 btwrite(crop, BT848_O_CROP); in bttv_buffer_activate_vbi()
712 tvnorm,&buf->crop); in bttv_buffer_risc()
766 tvnorm,&buf->crop); in bttv_buffer_risc()
775 tvnorm,&buf->crop); in bttv_buffer_risc()
784 tvnorm,&buf->crop); in bttv_buffer_risc()
807 tvnorm,&buf->crop); in bttv_buffer_risc()
[all …]

Completed in 45 milliseconds

123456