/kernel/linux/linux-5.10/drivers/media/platform/omap/ |
H A D | omap_voutlib.c | 37 /* Return the default overlay cropping rectangle in crop given the image 44 struct v4l2_framebuffer *fbuf, struct v4l2_rect *crop) in omap_vout_default_crop() 46 crop->width = (pix->width < fbuf->fmt.width) ? in omap_vout_default_crop() 48 crop->height = (pix->height < fbuf->fmt.height) ? in omap_vout_default_crop() 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 in omap_vout_default_crop() 43 omap_vout_default_crop(struct v4l2_pix_format *pix, struct v4l2_framebuffer *fbuf, struct v4l2_rect *crop) omap_vout_default_crop() argument 115 omap_vout_new_window(struct v4l2_rect *crop, struct v4l2_window *win, struct v4l2_framebuffer *fbuf, struct v4l2_window *new_win) omap_vout_new_window() argument 169 omap_vout_new_crop(struct v4l2_pix_format *pix, struct v4l2_rect *crop, struct v4l2_window *win, struct v4l2_framebuffer *fbuf, const struct v4l2_rect *new_crop) omap_vout_new_crop() argument 285 omap_vout_new_format(struct v4l2_pix_format *pix, struct v4l2_framebuffer *fbuf, struct v4l2_rect *crop, struct v4l2_window *win) omap_vout_new_format() argument [all...] |
H 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() 367 temp_ps * cleft + crop->top * temp_ps; in omap_vout_calculate_vrfb_offset() 370 cleft + crop->top * temp_ps + (line_length * in omap_vout_calculate_vrfb_offset() 371 ((crop->width / (vr_ps)) - 1) * ps); in omap_vout_calculate_vrfb_offset() 386 (crop in omap_vout_calculate_vrfb_offset() [all...] |
H 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,
|
/kernel/linux/linux-6.6/drivers/media/platform/ti/omap/ |
H A D | omap_voutlib.c | 37 /* Return the default overlay cropping rectangle in crop given the image 44 struct v4l2_framebuffer *fbuf, struct v4l2_rect *crop) in omap_vout_default_crop() 46 crop->width = (pix->width < fbuf->fmt.width) ? in omap_vout_default_crop() 48 crop->height = (pix->height < fbuf->fmt.height) ? in omap_vout_default_crop() 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 in omap_vout_default_crop() 43 omap_vout_default_crop(struct v4l2_pix_format *pix, struct v4l2_framebuffer *fbuf, struct v4l2_rect *crop) omap_vout_default_crop() argument 115 omap_vout_new_window(struct v4l2_rect *crop, struct v4l2_window *win, struct v4l2_framebuffer *fbuf, struct v4l2_window *new_win) omap_vout_new_window() argument 169 omap_vout_new_crop(struct v4l2_pix_format *pix, struct v4l2_rect *crop, struct v4l2_window *win, struct v4l2_framebuffer *fbuf, const struct v4l2_rect *new_crop) omap_vout_new_crop() argument 285 omap_vout_new_format(struct v4l2_pix_format *pix, struct v4l2_framebuffer *fbuf, struct v4l2_rect *crop, struct v4l2_window *win) omap_vout_new_format() argument [all...] |
H 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() 367 temp_ps * cleft + crop->top * temp_ps; in omap_vout_calculate_vrfb_offset() 370 cleft + crop->top * temp_ps + (line_length * in omap_vout_calculate_vrfb_offset() 371 ((crop->width / (vr_ps)) - 1) * ps); in omap_vout_calculate_vrfb_offset() 386 (crop in omap_vout_calculate_vrfb_offset() [all...] |
H 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,
|
/kernel/linux/linux-5.10/drivers/media/platform/sti/delta/ |
H A D | delta-debug.c | 24 s->flags & DELTA_STREAMINFO_FLAG_CROP ? "crop=" : "", in delta_streaminfo_str() 25 s->crop.width, s->crop.height, in delta_streaminfo_str() 26 s->crop.left, s->crop.top, in delta_streaminfo_str() 45 f->flags & DELTA_STREAMINFO_FLAG_CROP ? "crop=" : "", in delta_frameinfo_str() 46 f->crop.width, f->crop.height, in delta_frameinfo_str() 47 f->crop.left, f->crop in delta_frameinfo_str() [all...] |
/kernel/linux/linux-6.6/drivers/media/platform/st/sti/delta/ |
H A D | delta-debug.c | 24 s->flags & DELTA_STREAMINFO_FLAG_CROP ? "crop=" : "", in delta_streaminfo_str() 25 s->crop.width, s->crop.height, in delta_streaminfo_str() 26 s->crop.left, s->crop.top, in delta_streaminfo_str() 45 f->flags & DELTA_STREAMINFO_FLAG_CROP ? "crop=" : "", in delta_frameinfo_str() 46 f->crop.width, f->crop.height, in delta_frameinfo_str() 47 f->crop.left, f->crop in delta_frameinfo_str() [all...] |
/kernel/linux/linux-6.6/drivers/staging/media/atomisp/pci/ |
H A D | atomisp_subdev.c | 251 return &isp_sd->fmt[pad].crop; in atomisp_subdev_get_rect() 276 struct v4l2_rect *crop[ATOMISP_SUBDEV_PADS_NUM], in isp_get_fmt_rect() 283 crop[i] = atomisp_subdev_get_rect(sd, sd_state, which, i, in isp_get_fmt_rect() 296 struct v4l2_rect *crop[ATOMISP_SUBDEV_PADS_NUM], in isp_subdev_propagate() local 302 isp_get_fmt_rect(sd, sd_state, which, ffmt, crop, comp); in isp_subdev_propagate() 308 /* Only crop target supported on sink pad. */ in isp_subdev_propagate() 358 struct v4l2_rect *crop[ATOMISP_SUBDEV_PADS_NUM], in atomisp_subdev_set_selection() local 365 isp_get_fmt_rect(sd, sd_state, which, ffmt, crop, comp); in atomisp_subdev_set_selection() 379 /* Only crop target supported on sink pad. */ in atomisp_subdev_set_selection() 382 crop[pa in atomisp_subdev_set_selection() 272 isp_get_fmt_rect(struct v4l2_subdev *sd, struct v4l2_subdev_state *sd_state, uint32_t which, struct v4l2_mbus_framefmt **ffmt, struct v4l2_rect *crop[ATOMISP_SUBDEV_PADS_NUM], struct v4l2_rect *comp[ATOMISP_SUBDEV_PADS_NUM]) isp_get_fmt_rect() argument [all...] |
/kernel/linux/linux-5.10/drivers/media/platform/vsp1/ |
H A D | vsp1_rpf.c | 251 struct v4l2_rect crop; in rpf_configure_partition() local 254 * Source size and crop offsets. in rpf_configure_partition() 256 * The crop offsets correspond to the location of the crop in rpf_configure_partition() 261 crop = *vsp1_rwpf_get_crop(rpf, rpf->entity.config); in rpf_configure_partition() 269 * To achieve this, we adjust our crop to provide a 'sub-crop' 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 in rpf_configure_partition() [all...] |
H A D | vsp1_hgt.c | 135 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()
|
H A D | vsp1_rwpf.c | 105 struct v4l2_rect *crop; in vsp1_rwpf_set_format() local 107 /* Update the sink crop rectangle. */ in vsp1_rwpf_set_format() 108 crop = vsp1_rwpf_get_crop(rwpf, config); in vsp1_rwpf_set_format() 109 crop->left = 0; in vsp1_rwpf_set_format() 110 crop->top = 0; in vsp1_rwpf_set_format() 111 crop->width = fmt->format.width; in vsp1_rwpf_set_format() 112 crop->height = fmt->format.height; in vsp1_rwpf_set_format() 185 struct v4l2_rect *crop; in vsp1_rwpf_set_selection() local 206 /* Make sure the crop rectangle is entirely contained in the image. */ in vsp1_rwpf_set_selection() 211 * Restrict the crop rectangl in vsp1_rwpf_set_selection() [all...] |
H A D | vsp1_hgo.c | 139 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()
|
/kernel/linux/linux-6.6/drivers/media/platform/renesas/vsp1/ |
H A D | vsp1_rpf.c | 303 struct v4l2_rect crop; in rpf_configure_partition() local 306 * Source size and crop offsets. in rpf_configure_partition() 308 * The crop offsets correspond to the location of the crop in rpf_configure_partition() 313 crop = *vsp1_rwpf_get_crop(rpf, rpf->entity.config); in rpf_configure_partition() 321 * To achieve this, we adjust our crop to provide a 'sub-crop' in rpf_configure_partition() 326 crop.width = pipe->partition->rpf.width; in rpf_configure_partition() 327 crop.left += pipe->partition->rpf.left; in rpf_configure_partition() 331 crop in rpf_configure_partition() [all...] |
H A D | vsp1_hgt.c | 135 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()
|
H A D | vsp1_rwpf.c | 107 struct v4l2_rect *crop; in vsp1_rwpf_set_format() local 109 /* Update the sink crop rectangle. */ in vsp1_rwpf_set_format() 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 210 /* Make sure the crop rectangle is entirely contained in the image. */ in vsp1_rwpf_set_selection() 215 * Restrict the crop rectangl in vsp1_rwpf_set_selection() [all...] |
H A D | vsp1_hgo.c | 139 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()
|
/kernel/linux/linux-5.10/drivers/staging/media/imx/ |
H A D | imx-media-csi.c | 81 struct v4l2_rect crop; member 711 struct v4l2_rect crop; in csi_setup() local 724 crop = priv->crop; in csi_setup() 732 crop.width *= incc->cycles; in csi_setup() 735 ipu_csi_set_window(priv->csi, &crop); in csi_setup() 738 priv->crop.width == 2 * priv->compose.width, in csi_setup() 739 priv->crop.height == 2 * priv->compose.height); in csi_setup() 1181 return &priv->crop; in __csi_get_crop() 1196 struct v4l2_rect *crop, in csi_try_crop() 1195 csi_try_crop(struct csi_priv *priv, struct v4l2_rect *crop, struct v4l2_subdev_pad_config *cfg, struct v4l2_mbus_framefmt *infmt, struct v4l2_fwnode_endpoint *upstream_ep) csi_try_crop() argument 1293 struct v4l2_rect *crop; csi_enum_frame_size() local 1328 struct v4l2_rect *crop; csi_enum_frame_interval() local 1432 csi_try_fmt(struct csi_priv *priv, struct v4l2_fwnode_endpoint *upstream_ep, struct v4l2_subdev_pad_config *cfg, struct v4l2_subdev_format *sdformat, struct v4l2_rect *crop, struct v4l2_rect *compose, const struct imx_media_pixfmt **cc) csi_try_fmt() argument 1525 struct v4l2_rect *crop, *compose; csi_set_fmt() local 1589 struct v4l2_rect *crop, *compose; csi_get_selection() local 1630 csi_set_scale(u32 *compose, u32 crop, u32 flags) csi_set_scale() argument 1654 struct v4l2_rect *crop, *compose; csi_set_selection() local [all...] |
/kernel/linux/linux-6.6/drivers/staging/media/imx/ |
H A D | imx-media-csi.c | 81 struct v4l2_rect crop; member 709 struct v4l2_rect crop; in csi_setup() local 716 crop = priv->crop; in csi_setup() 724 crop.width *= incc->cycles; in csi_setup() 727 ipu_csi_set_window(priv->csi, &crop); in csi_setup() 730 priv->crop.width == 2 * priv->compose.width, in csi_setup() 731 priv->crop.height == 2 * priv->compose.height); in csi_setup() 1164 return &priv->crop; in __csi_get_crop() 1179 struct v4l2_rect *crop, in csi_try_crop() 1178 csi_try_crop(struct csi_priv *priv, struct v4l2_rect *crop, struct v4l2_subdev_state *sd_state, struct v4l2_mbus_framefmt *infmt, struct v4l2_mbus_config *mbus_cfg) csi_try_crop() argument 1277 struct v4l2_rect *crop; csi_enum_frame_size() local 1312 struct v4l2_rect *crop; csi_enum_frame_interval() local 1416 csi_try_fmt(struct csi_priv *priv, struct v4l2_mbus_config *mbus_cfg, struct v4l2_subdev_state *sd_state, struct v4l2_subdev_format *sdformat, struct v4l2_rect *crop, struct v4l2_rect *compose, const struct imx_media_pixfmt **cc) csi_try_fmt() argument 1509 struct v4l2_rect *crop, *compose; csi_set_fmt() local 1575 struct v4l2_rect *crop, *compose; csi_get_selection() local 1616 csi_set_scale(u32 *compose, u32 crop, u32 flags) csi_set_scale() argument 1640 struct v4l2_rect *crop, *compose; csi_set_selection() local [all...] |
/kernel/linux/linux-5.10/drivers/staging/media/rkisp1/ |
H A D | rkisp1-common.c | 19 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()
|
/kernel/linux/linux-5.10/drivers/media/platform/omap3isp/ |
H A D | ispresizer.c | 127 * __resizer_get_crop - helper function for getting resizer crop rectangle 130 * @which : wanted subdev crop rectangle 139 return &res->crop.request; in __resizer_get_crop() 493 * where the input width and height are the resizer input crop rectangle size. 505 clock = div_u64((u64)limit * res->crop.active.height, ofmt->height); in omap3isp_resizer_max_rate() 507 *max_rate = div_u64((u64)clock * res->crop.active.width, ofmt->width); in omap3isp_resizer_max_rate() 586 requests_per_frame = DIV_ROUND_UP(res->crop.active.width * 2, 256) in resizer_adjust_bandwidth() 587 * res->crop.active.height; in resizer_adjust_bandwidth() 623 /* This will handle crop settings in stream off state */ in resizer_set_inaddr() 769 * compute the input crop rectangl 1181 resizer_try_crop(const struct v4l2_mbus_framefmt *sink, const struct v4l2_mbus_framefmt *source, struct v4l2_rect *crop) resizer_try_crop() argument 1380 struct v4l2_rect crop; resizer_try_format() local 1501 struct v4l2_rect *crop; resizer_set_format() local [all...] |
/kernel/linux/linux-5.10/drivers/staging/media/atomisp/pci/ |
H A D | atomisp_subdev.c | 266 return &isp_sd->fmt[pad].crop; in atomisp_subdev_get_rect() 290 struct v4l2_rect *crop[ATOMISP_SUBDEV_PADS_NUM], in isp_get_fmt_rect() 297 crop[i] = atomisp_subdev_get_rect(sd, cfg, which, i, in isp_get_fmt_rect() 310 struct v4l2_rect *crop[ATOMISP_SUBDEV_PADS_NUM], in isp_subdev_propagate() local 316 isp_get_fmt_rect(sd, cfg, which, ffmt, crop, comp); in isp_subdev_propagate() 322 /* Only crop target supported on sink pad. */ in isp_subdev_propagate() 376 struct v4l2_rect *crop[ATOMISP_SUBDEV_PADS_NUM], in atomisp_subdev_set_selection() local 385 isp_get_fmt_rect(sd, cfg, which, ffmt, crop, comp); in atomisp_subdev_set_selection() 400 /* Only crop target supported on sink pad. */ in atomisp_subdev_set_selection() 403 crop[pa in atomisp_subdev_set_selection() 287 isp_get_fmt_rect(struct v4l2_subdev *sd, struct v4l2_subdev_pad_config *cfg, uint32_t which, struct v4l2_mbus_framefmt **ffmt, struct v4l2_rect *crop[ATOMISP_SUBDEV_PADS_NUM], struct v4l2_rect *comp[ATOMISP_SUBDEV_PADS_NUM]) isp_get_fmt_rect() argument [all...] |
/kernel/linux/linux-6.6/drivers/media/platform/ti/omap3isp/ |
H A D | ispresizer.c | 128 * __resizer_get_crop - helper function for getting resizer crop rectangle 131 * @which : wanted subdev crop rectangle 142 return &res->crop.request; in __resizer_get_crop() 496 * where the input width and height are the resizer input crop rectangle size. 508 clock = div_u64((u64)limit * res->crop.active.height, ofmt->height); in omap3isp_resizer_max_rate() 510 *max_rate = div_u64((u64)clock * res->crop.active.width, ofmt->width); in omap3isp_resizer_max_rate() 589 requests_per_frame = DIV_ROUND_UP(res->crop.active.width * 2, 256) in resizer_adjust_bandwidth() 590 * res->crop.active.height; in resizer_adjust_bandwidth() 626 /* This will handle crop settings in stream off state */ in resizer_set_inaddr() 772 * compute the input crop rectangl 1184 resizer_try_crop(const struct v4l2_mbus_framefmt *sink, const struct v4l2_mbus_framefmt *source, struct v4l2_rect *crop) resizer_try_crop() argument 1385 struct v4l2_rect crop; resizer_try_format() local 1509 struct v4l2_rect *crop; resizer_set_format() local [all...] |
/kernel/linux/linux-5.10/drivers/media/platform/mtk-mdp/ |
H 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()
|
/kernel/linux/linux-6.6/drivers/media/platform/mediatek/mdp/ |
H 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()
|