| /drivers/media/platform/ti/omap/ |
| A D | omap_voutlib.c | 50 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 D | omap_vout_vrfb.c | 322 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 D | omap_voutlib.h | 16 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,
|
| /drivers/media/platform/st/stm32/stm32-dcmipp/ |
| A D | dcmipp-byteproc.c | 259 struct v4l2_rect *crop, *compose; in dcmipp_byteproc_set_fmt() local 271 fmt->format.width = crop->width; in dcmipp_byteproc_set_fmt() 275 crop->top = 0; in dcmipp_byteproc_set_fmt() 276 crop->left = 0; in dcmipp_byteproc_set_fmt() 277 crop->width = fmt->format.width; in dcmipp_byteproc_set_fmt() 279 *compose = *crop; in dcmipp_byteproc_set_fmt() 318 s->r = *crop; in dcmipp_byteproc_get_selection() 371 *crop = s->r; in dcmipp_byteproc_set_selection() 377 crop->left, crop->top, crop->width, crop->height); in dcmipp_byteproc_set_selection() 383 *crop = s->r; in dcmipp_byteproc_set_selection() [all …]
|
| /drivers/staging/media/atomisp/pci/ |
| A D | atomisp_subdev.c | 229 return &isp_sd->fmt[pad].crop; in atomisp_subdev_get_rect() 331 crop[pad]->width = ffmt[pad]->width; in atomisp_subdev_set_selection() 332 crop[pad]->height = ffmt[pad]->height; in atomisp_subdev_set_selection() 335 && crop[pad]->width && crop[pad]->height) { in atomisp_subdev_set_selection() 348 crop[pad]->width = roundup(crop[pad]->width * 5 / 6, in atomisp_subdev_set_selection() 350 crop[pad]->height = roundup(crop[pad]->height * 5 / 6, in atomisp_subdev_set_selection() 354 crop[pad]->width = min(crop[pad]->width, r->width); in atomisp_subdev_set_selection() 355 crop[pad]->height = min(crop[pad]->height, r->height); in atomisp_subdev_set_selection() 358 struct v4l2_rect tmp = *crop[pad]; in atomisp_subdev_set_selection() 387 crop[pad]->width, in atomisp_subdev_set_selection() [all …]
|
| /drivers/staging/media/imx/ |
| A D | imx-media-csi.c | 716 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 …]
|
| /drivers/media/platform/st/sti/delta/ |
| A D | delta-debug.c | 25 s->crop.left, s->crop.top, in delta_streaminfo_str() 26 s->crop.width, s->crop.height, in delta_streaminfo_str() 46 f->crop.left, f->crop.top, in delta_frameinfo_str() 47 f->crop.width, f->crop.height, in delta_frameinfo_str()
|
| /drivers/media/i2c/ |
| A D | mt9m114.c | 822 crop->top, &ret); in mt9m114_configure_pa() 824 crop->width + crop->left - 1, &ret); in mt9m114_configure_pa() 826 crop->height + crop->top - 1, &ret); in mt9m114_configure_pa() 1183 crop->left = 0; in mt9m114_pa_init_state() 1184 crop->top = 0; in mt9m114_pa_init_state() 1314 sel->r = *crop; in mt9m114_pa_set_selection() 1680 crop->left = 4; in mt9m114_ifp_init_state() 1681 crop->top = 4; in mt9m114_ifp_init_state() 1934 sel->r = *crop; in mt9m114_ifp_set_selection() 1947 crop->width); in mt9m114_ifp_set_selection() [all …]
|
| A D | imx296.c | 510 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 D | vd55g1.c | 600 struct v4l2_rect *crop) in vd55g1_get_hblank_min() argument 607 mipi_req_line_time = (crop->width * in vd55g1_get_hblank_min() 622 return min_line_length - crop->width; in vd55g1_get_hblank_min() 626 struct v4l2_rect *crop, in vd55g1_get_vblank_limits() argument 863 struct v4l2_rect *crop) in vd55g1_apply_cold_start() argument 948 struct v4l2_rect *crop) in vd55g1_set_framefmt() argument 1030 struct v4l2_rect *crop = in vd55g1_enable_streams() local 1150 sel->r = *crop; in vd55g1_get_selection() 1179 struct v4l2_rect *crop) in vd55g1_new_format_change_controls() argument 1354 struct v4l2_rect *crop = in vd55g1_s_ctrl() local [all …]
|
| /drivers/media/platform/ti/omap3isp/ |
| A D | ispresizer.c | 1202 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 …]
|
| /drivers/media/platform/amlogic/c3/isp/ |
| A D | c3-isp-resizer.c | 252 struct v4l2_rect *crop; in c3_isp_rsz_pps_enable() local 270 ihsize = crop->width; in c3_isp_rsz_pps_enable() 271 ivsize = crop->height; in c3_isp_rsz_pps_enable() 640 struct v4l2_rect *crop; in c3_isp_rsz_get_selection() local 663 sel->r = *crop; in c3_isp_rsz_get_selection() 682 struct v4l2_rect *crop; in c3_isp_rsz_set_selection() local 708 *cmps = *crop; in c3_isp_rsz_set_selection() 714 sel->r = *crop; in c3_isp_rsz_set_selection() 723 crop->width); in c3_isp_rsz_set_selection() 766 crop->left = 0; in c3_isp_rsz_init_state() [all …]
|
| /drivers/media/platform/amlogic/meson-ge2d/ |
| A D | ge2d.c | 64 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() 491 s->r = f->crop; in vidioc_g_selection() 553 f->crop = s->r; in vidioc_s_selection() 619 frm->crop.left = 0; in vidioc_s_fmt_cap() 620 frm->crop.top = 0; in vidioc_s_fmt_cap() 695 frm->crop.left = 0; in vidioc_s_fmt_out() [all …]
|
| /drivers/media/platform/renesas/vsp1/ |
| A D | vsp1_hgt.c | 136 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 D | vsp1_rpf.c | 323 struct v4l2_rect crop = partition->rpf[rpf->entity.index]; in rpf_configure_partition() local 335 crop.height = round_down(crop.height / 2, fmtinfo->vsub); in rpf_configure_partition() 336 crop.top = round_down(crop.top / 2, fmtinfo->vsub); in rpf_configure_partition() 340 (crop.width << VI6_RPF_SRC_BSIZE_BHSIZE_SHIFT) | in rpf_configure_partition() 341 (crop.height << VI6_RPF_SRC_BSIZE_BVSIZE_SHIFT)); in rpf_configure_partition() 343 (crop.width << VI6_RPF_SRC_ESIZE_EHSIZE_SHIFT) | in rpf_configure_partition() 344 (crop.height << VI6_RPF_SRC_ESIZE_EVSIZE_SHIFT)); in rpf_configure_partition() 346 mem.addr[0] += crop.top * format->plane_fmt[0].bytesperline in rpf_configure_partition() 347 + crop.left * fmtinfo->bpp[0] / 8; in rpf_configure_partition() 353 offset = crop.top / fmtinfo->vsub * bpl in rpf_configure_partition() [all …]
|
| A D | vsp1_rwpf.c | 144 struct v4l2_rect *crop; in vsp1_rwpf_set_format() local 147 crop = v4l2_subdev_state_get_crop(state, RWPF_PAD_SINK); in vsp1_rwpf_set_format() 148 crop->left = 0; in vsp1_rwpf_set_format() 149 crop->top = 0; in vsp1_rwpf_set_format() 150 crop->width = fmt->format.width; in vsp1_rwpf_set_format() 151 crop->height = fmt->format.height; in vsp1_rwpf_set_format() 222 struct v4l2_rect *crop; in vsp1_rwpf_set_selection() local 264 crop = v4l2_subdev_state_get_crop(state, RWPF_PAD_SINK); in vsp1_rwpf_set_selection() 265 *crop = sel->r; in vsp1_rwpf_set_selection() 269 format->width = crop->width; in vsp1_rwpf_set_selection() [all …]
|
| A D | vsp1_hgo.c | 140 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 D | vsp1_histo.c | 202 struct v4l2_rect *crop; in histo_get_selection() local 222 sel->r.width = crop->width; in histo_get_selection() 223 sel->r.height = crop->height; in histo_get_selection() 280 struct v4l2_rect *crop; in histo_set_compose() local 291 crop = v4l2_subdev_state_get_crop(sd_state, sel->pad); in histo_set_compose() 307 sel->r.width = clamp(sel->r.width, crop->width / 4, crop->width); in histo_set_compose() 308 ratio = 1 << (crop->width * 2 / sel->r.width / 3); in histo_set_compose() 309 sel->r.width = crop->width / ratio; in histo_set_compose() 312 sel->r.height = clamp(sel->r.height, crop->height / 4, crop->height); in histo_set_compose() 313 ratio = 1 << (crop->height * 2 / sel->r.height / 3); in histo_set_compose() [all …]
|
| /drivers/staging/media/starfive/camss/ |
| A D | stf-isp.c | 63 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 …]
|
| /drivers/media/platform/mediatek/mdp/ |
| A D | mtk_mdp_regs.c | 74 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()
|
| /drivers/media/pci/bt8xx/ |
| A D | bttv-risc.c | 287 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 …]
|
| /drivers/media/platform/samsung/exynos-gsc/ |
| A D | gsc-core.c | 233 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 …]
|
| /drivers/media/platform/mediatek/mdp3/ |
| A D | mtk-mdp3-regs.c | 289 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 …]
|
| /drivers/media/pci/intel/ipu6/ |
| A D | ipu6-isys-subdev.c | 146 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()
|
| /drivers/media/platform/renesas/rcar-vin/ |
| A D | rcar-dma.c | 183 return !(vin->crop.width == vin->format.width && in rvin_scaler_needed() 185 vin->crop.height == vin->format.height && in rvin_scaler_needed() 567 if (vin->crop.height != vin->compose.height) in rvin_scaler_gen2() 572 if (vin->crop.width != vin->compose.width) in rvin_scaler_gen2() 573 xs = (4096 * vin->crop.width) / vin->compose.width; in rvin_scaler_gen2() 599 vin->crop.width, vin->crop.height, vin->crop.left, in rvin_scaler_gen2() 660 vin->crop.width, vin->crop.height, vin->crop.left, in rvin_scaler_gen3() 671 rvin_write(vin, vin->crop.left, VNSPPRC_REG); in rvin_crop_scale_comp() 672 rvin_write(vin, vin->crop.left + vin->crop.width - 1, VNEPPRC_REG); in rvin_crop_scale_comp() 673 rvin_write(vin, vin->crop.top, VNSLPRC_REG); in rvin_crop_scale_comp() [all …]
|