| /OK3568_Linux_fs/yocto/poky/meta/recipes-multimedia/libtiff/tiff/ |
| H A D | 0001-fix-the-FPE-in-tiffcrop-415-427-and-428.patch | 53 @@ -5182,17 +5182,17 @@ computeInputPixelOffsets(struct crop_mask *crop, struct image_data *image, 55 if ((crop->res_unit == RESUNIT_INCH) || (crop->res_unit == RESUNIT_CENTIMETER)) 57 - x1 = (uint32_t) (crop->corners[i].X1 * scale * xres); 58 - x2 = (uint32_t) (crop->corners[i].X2 * scale * xres); 59 - y1 = (uint32_t) (crop->corners[i].Y1 * scale * yres); 60 - y2 = (uint32_t) (crop->corners[i].Y2 * scale * yres); 61 + x1 = _TIFFClampDoubleToUInt32(crop->corners[i].X1 * scale * xres); 62 + x2 = _TIFFClampDoubleToUInt32(crop->corners[i].X2 * scale * xres); 63 + y1 = _TIFFClampDoubleToUInt32(crop->corners[i].Y1 * scale * yres); 64 + y2 = _TIFFClampDoubleToUInt32(crop->corners[i].Y2 * scale * yres); [all …]
|
| H A D | CVE-2022-2867.patch | 24 @@ -5194,20 +5194,33 @@ computeInputPixelOffsets(struct crop_mask *crop, struct image_data *image, 25 y1 = _TIFFClampDoubleToUInt32(crop->corners[i].Y1); 26 y2 = _TIFFClampDoubleToUInt32(crop->corners[i].Y2); 48 crop->regionlist[i].x1 = image->width - 1; 50 - crop->regionlist[i].x1 = (uint32_t) (x1 - 1); 52 + crop->regionlist[i].x1 = (uint32_t)(x1 - 1); 55 - crop->regionlist[i].x2 = image->width - 1; 57 - crop->regionlist[i].x2 = (uint32_t)(x2 - 1); 59 + crop->regionlist[i].x2 = image->width - 1; 61 + crop->regionlist[i].x2 = (uint32_t)(x2 - 1); [all …]
|
| H A D | CVE-2022-2869.patch | 23 @@ -5194,26 +5194,30 @@ computeInputPixelOffsets(struct crop_mask *crop, struct image_data *image, 24 y1 = _TIFFClampDoubleToUInt32(crop->corners[i].Y1); 25 y2 = _TIFFClampDoubleToUInt32(crop->corners[i].Y2); 28 - crop->regionlist[i].x1 = 0; 34 + crop->regionlist[i].x1 = image->width - 1; 36 crop->regionlist[i].x1 = (uint32_t) (x1 - 1); 39 - crop->regionlist[i].x2 = image->width - 1; 41 - crop->regionlist[i].x2 = (uint32_t) (x2 - 1); 43 + crop->regionlist[i].x2 = image->width - 1; 45 + crop->regionlist[i].x2 = (uint32_t)(x2 - 1); [all …]
|
| H A D | CVE-2023-0800_0801_0802_0803_0804.patch | 24 crop->regionlist[i].buffsize = buffsize; 25 crop->bufftotal += buffsize; 31 if (crop->img_mode == COMPOSITE_IMAGES) 33 switch (crop->edge_ref) 37 + if (i > 0 && zlength != crop->combined_length) 45 crop->combined_length = zlength; 46 crop->combined_width += zwidth; 51 + if (i > 0 && zwidth != crop->combined_width) 59 crop->combined_width = zwidth; 60 crop->combined_length += zlength; [all …]
|
| H A D | 0001-tiffcrop-Fix-issue-330-and-some-more-from-320-to-349.patch | 81 + TIFFError("tiffcrop input error", "The crop options(-X|-Y), -Z and -z are mutually exclusi… 374 @@ -5431,7 +5519,7 @@ getCropOffsets(struct image_data *image, struct crop_mask *crop, struct dump_… 383 @@ -5512,8 +5600,13 @@ getCropOffsets(struct image_data *image, struct crop_mask *crop, struct dump… 384 seg = crop->zonelist[j].position; 385 total = crop->zonelist[j].total; 389 + if (crop->zonelist[j].position < 0 || crop->zonelist[j].total < 0) { 390 …ror("getCropOffsets", "Negative crop zone values %d:%d are not allowed, thus skipped.", crop->zone… 398 @@ -5526,17 +5619,23 @@ getCropOffsets(struct image_data *image, struct crop_mask *crop, struct dum… 400 crop->regionlist[i].x1 = offsets.startx + 405 - crop->regionlist[i].x2 = 0; [all …]
|
| H A D | 0003-add-checks-for-return-value-of-limitMalloc-392.patch | 52 @@ -7648,7 +7652,11 @@ createCroppedImage(struct image_data *image, struct crop_mask *crop, 59 + TIFFError("createCroppedImage", "Unable to allocate/reallocate crop buffer"); 65 @@ -7664,15 +7672,15 @@ createCroppedImage(struct image_data *image, struct crop_mask *crop, 71 + TIFFError("createCroppedImage", "Unable to allocate/reallocate crop buffer"); 80 - TIFFError("createCroppedImage", "Unable to allocate/reallocate crop buffer"); 85 if (crop->crop_mode & CROP_INVERT)
|
| /OK3568_Linux_fs/kernel/drivers/media/platform/omap/ |
| H A D | omap_voutlib.c | 44 struct v4l2_framebuffer *fbuf, struct v4l2_rect *crop) in omap_vout_default_crop() argument 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->height) >> 1) & ~1; in omap_vout_default_crop() 115 int omap_vout_new_window(struct v4l2_rect *crop, in omap_vout_new_window() argument 133 if ((crop->height/win->w.height) >= 2) in omap_vout_new_window() 134 crop->height = win->w.height * 2; in omap_vout_new_window() [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->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() 399 (line_length * ((crop->width / vr_ps) - 1) * in omap_vout_calculate_vrfb_offset() [all …]
|
| /OK3568_Linux_fs/kernel/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() argument 1203 crop->width = min_t(__u32, infmt->width, crop->width); in csi_try_crop() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/media/platform/vsp1/ |
| H A D | vsp1_rpf.c | 251 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() 285 (crop.height << VI6_RPF_SRC_BSIZE_BVSIZE_SHIFT)); in rpf_configure_partition() 287 (crop.width << VI6_RPF_SRC_ESIZE_EHSIZE_SHIFT) | in rpf_configure_partition() 288 (crop.height << VI6_RPF_SRC_ESIZE_EVSIZE_SHIFT)); in rpf_configure_partition() [all …]
|
| H A D | vsp1_rwpf.c | 105 struct v4l2_rect *crop; in vsp1_rwpf_set_format() local 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 228 crop = vsp1_rwpf_get_crop(rwpf, config); in vsp1_rwpf_set_selection() 229 *crop = sel->r; in vsp1_rwpf_set_selection() 234 format->width = crop->width; in vsp1_rwpf_set_selection() [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_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()
|
| /OK3568_Linux_fs/kernel/drivers/media/platform/sti/delta/ |
| H A D | delta-debug.c | 25 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()
|
| /OK3568_Linux_fs/kernel/Documentation/userspace-api/media/v4l/ |
| H A D | crop.rst | 15 equivalent in the SELECTION API. See :ref:`selection-vs-crop` for a 64 .. kernel-figure:: crop.svg 65 :alt: crop.svg 170 struct v4l2_crop crop; 180 memset (&crop, 0, sizeof (crop)); 181 crop.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; 182 crop.c = cropcap.defrect; 186 if (-1 == ioctl (fd, VIDIOC_S_CROP, &crop) 229 struct v4l2_crop crop; 239 memset (&crop, 0, sizeof (crop)); [all …]
|
| /OK3568_Linux_fs/kernel/drivers/media/platform/omap3isp/ |
| H A D | ispresizer.c | 139 return &res->crop.request; in __resizer_get_crop() 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() 924 res->crop_offset = (res->crop.active.top * input->width + in resizer_set_crop_params() 925 res->crop.active.left) * 2; in resizer_set_crop_params() 944 resizer_set_start(res, res->crop.active.left * 2, in resizer_set_crop_params() 945 res->crop.active.top); in resizer_set_crop_params() 952 resizer_set_input_size(res, res->crop.active.width, in resizer_set_crop_params() [all …]
|
| /OK3568_Linux_fs/kernel/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() 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() 403 crop[pad]->width = ffmt[pad]->width; in atomisp_subdev_set_selection() 404 crop[pad]->height = ffmt[pad]->height; in atomisp_subdev_set_selection() 409 "ov2722", 6) && crop[pad]->height == 1092) { in atomisp_subdev_set_selection() [all …]
|
| /OK3568_Linux_fs/external/camera_engine_rkaiq/media_enquiry/media_enquiry/mediactl/ |
| H A D | v4l2subdev.c | 118 struct v4l2_subdev_crop crop; in v4l2_subdev_get_selection() member 139 memset(&u.crop, 0, sizeof(u.crop)); in v4l2_subdev_get_selection() 140 u.crop.pad = pad; in v4l2_subdev_get_selection() 141 u.crop.which = which; in v4l2_subdev_get_selection() 143 ret = ioctl(entity->fd, VIDIOC_SUBDEV_G_CROP, &u.crop); in v4l2_subdev_get_selection() 147 *rect = u.crop.rect; in v4l2_subdev_get_selection() 157 struct v4l2_subdev_crop crop; in v4l2_subdev_set_selection() member 179 memset(&u.crop, 0, sizeof(u.crop)); in v4l2_subdev_set_selection() 180 u.crop.pad = pad; in v4l2_subdev_set_selection() 181 u.crop.which = which; in v4l2_subdev_set_selection() [all …]
|
| /OK3568_Linux_fs/kernel/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()
|
| /OK3568_Linux_fs/kernel/drivers/media/platform/rockchip/isp/ |
| H A D | bridge.c | 194 u32 w = hw->max_in.w ? hw->max_in.w : dev->crop.width; in config_mode() 195 u32 h = hw->max_in.h ? hw->max_in.h : dev->crop.height; in config_mode() 342 struct v4l2_rect *crop; in bridge_set_selection() local 349 crop = &sel->r; in bridge_set_selection() 350 crop->left = clamp_t(u32, crop->left, 0, src_w); in bridge_set_selection() 351 crop->top = clamp_t(u32, crop->top, 0, src_h); in bridge_set_selection() 352 crop->width = clamp_t(u32, crop->width, in bridge_set_selection() 353 CIF_ISP_OUTPUT_W_MIN, src_w - crop->left); in bridge_set_selection() 354 crop->height = clamp_t(u32, crop->height, in bridge_set_selection() 355 CIF_ISP_OUTPUT_H_MIN, src_h - crop->top); in bridge_set_selection() [all …]
|
| /OK3568_Linux_fs/kernel/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()
|
| /OK3568_Linux_fs/kernel/Documentation/driver-api/media/drivers/ |
| H A D | sh_mobile_ceu_camera.rst | 76 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)
|
| /OK3568_Linux_fs/kernel/drivers/media/i2c/ |
| H A D | mt9m032.c | 150 struct v4l2_rect crop; member 183 struct v4l2_rect *crop = &sensor->crop; in mt9m032_update_timing() local 191 row_time = mt9m032_row_time(sensor, crop->width); in mt9m032_update_timing() 195 - crop->height; in mt9m032_update_timing() 201 div_u64((crop->height + MT9M032_VBLANK_MAX) * 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() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/media/platform/exynos-gsc/ |
| H A D | gsc-core.c | 234 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() 292 remainder = s_frame->crop.width % (*wratio * walign); in gsc_check_src_scale_info() 294 s_frame->crop.width -= remainder; in gsc_check_src_scale_info() 295 gsc_cal_prescaler_ratio(var, s_frame->crop.width, tx, wratio); in gsc_check_src_scale_info() 297 s_frame->crop.width + remainder, s_frame->crop.width); in gsc_check_src_scale_info() 300 remainder = s_frame->crop.height % (*hratio * halign); in gsc_check_src_scale_info() 302 s_frame->crop.height -= remainder; in gsc_check_src_scale_info() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/media/pci/bt8xx/ |
| H A D | bttv-risc.c | 352 geo->crop = ((width>>8)&0x03) | ((geo->hdelay>>6)&0x0c) | in bttv_calc_geo_old() 376 const struct v4l2_rect * crop) in bttv_calc_geo() argument 382 if ((crop->left == tvnorm->cropcap.defrect.left in bttv_calc_geo() 383 && crop->top == tvnorm->cropcap.defrect.top in bttv_calc_geo() 384 && crop->width == tvnorm->cropcap.defrect.width in bttv_calc_geo() 385 && crop->height == tvnorm->cropcap.defrect.height in bttv_calc_geo() 395 c_width = min((unsigned int) crop->width, width * 16); in bttv_calc_geo() 396 c_height = min((unsigned int) crop->height, height * 16); in bttv_calc_geo() 401 geo->hdelay = ((crop->left * width + c_width) / c_width) & ~1; in bttv_calc_geo() 404 geo->vdelay = crop->top - tvnorm->cropcap.bounds.top + MIN_VDELAY; in bttv_calc_geo() [all …]
|