/drivers/media/platform/omap/ |
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,
|
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) 46 crop->width = (pix->width < fbuf->fmt.width) ? 48 crop->height = (pix->height < fbuf->fmt.height) ? 50 crop->width &= ~1; 51 crop->height &= ~1; 52 crop->left = ((pix->width - crop->width) >> 1) & ~1; 53 crop->top = ((pix->height - crop 43 omap_vout_default_crop(struct v4l2_pix_format *pix, struct v4l2_framebuffer *fbuf, struct v4l2_rect *crop) argument 111 omap_vout_new_window(struct v4l2_rect *crop, struct v4l2_window *win, struct v4l2_framebuffer *fbuf, struct v4l2_window *new_win) argument 165 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) argument 281 omap_vout_new_format(struct v4l2_pix_format *pix, struct v4l2_framebuffer *fbuf, struct v4l2_rect *crop, struct v4l2_window *win) argument [all...] |
H A D | omap_vout_vrfb.c | 296 struct v4l2_rect *crop = &vout->crop; local 328 ctop = (pix->height - crop->height) - crop->top; 329 cleft = (pix->width - crop->width) - crop->left; 341 temp_ps * cleft + crop->top * temp_ps; 344 cleft + crop->top * temp_ps + (line_length * 345 ((crop->width / (vr_ps)) - 1) * ps); 360 (crop [all...] |
/drivers/media/platform/vsp1/ |
H A D | vsp1_rwpf.c | 81 return &rwpf->crop; 103 struct v4l2_rect *crop; local 132 /* Update the sink crop rectangle. */ 133 crop = vsp1_rwpf_get_crop(rwpf, fh, fmt->which); 134 crop->left = 0; 135 crop->top = 0; 136 crop->width = fmt->format.width; 137 crop->height = fmt->format.height; 185 struct v4l2_rect *crop; local 194 /* Make sure the crop rectangl [all...] |
H A D | vsp1_rpf.c | 80 const struct v4l2_rect *crop = &rpf->crop; local 92 /* Source size, stride and crop offsets. 94 * The crop offsets correspond to the location of the crop rectangle top 99 (crop->width << VI6_RPF_SRC_BSIZE_BHSIZE_SHIFT) | 100 (crop->height << VI6_RPF_SRC_BSIZE_BVSIZE_SHIFT)); 102 (crop->width << VI6_RPF_SRC_ESIZE_EHSIZE_SHIFT) | 103 (crop->height << VI6_RPF_SRC_ESIZE_EVSIZE_SHIFT)); 105 rpf->offsets[0] = crop [all...] |
H A D | vsp1_wpf.c | 79 const struct v4l2_rect *crop = &wpf->crop; local 124 (crop->left << VI6_WPF_SZCLIP_OFST_SHIFT) | 125 (crop->width << VI6_WPF_SZCLIP_SIZE_SHIFT)); 127 (crop->top << VI6_WPF_SZCLIP_OFST_SHIFT) | 128 (crop->height << VI6_WPF_SZCLIP_SIZE_SHIFT));
|
H A D | vsp1_rwpf.h | 39 struct v4l2_rect crop; member in struct:vsp1_rwpf
|
/drivers/media/i2c/ |
H A D | mt9v032.c | 236 struct v4l2_rect crop; member in struct:mt9v032 293 struct v4l2_rect *crop = &mt9v032->crop; local 299 min_hblank = max_t(int, mt9v032->model->data->min_row_time - crop->width, 395 return &mt9v032->crop; 407 struct v4l2_rect *crop = &mt9v032->crop; local 426 ret = regmap_write(map, MT9V032_COLUMN_START, crop->left); 430 ret = regmap_write(map, MT9V032_ROW_START, crop->top); 434 ret = regmap_write(map, MT9V032_WINDOW_WIDTH, crop 555 mt9v032_get_crop(struct v4l2_subdev *subdev, struct v4l2_subdev_fh *fh, struct v4l2_subdev_crop *crop) argument 566 mt9v032_set_crop(struct v4l2_subdev *subdev, struct v4l2_subdev_fh *fh, struct v4l2_subdev_crop *crop) argument 806 struct v4l2_rect *crop; local [all...] |
H A D | mt9p031.c | 125 struct v4l2_rect crop; /* Sensor window */ member in struct:mt9p031 387 const struct v4l2_rect *crop = &mt9p031->crop; local 402 ret = mt9p031_write(client, MT9P031_COLUMN_START, crop->left); 405 ret = mt9p031_write(client, MT9P031_ROW_START, crop->top); 408 ret = mt9p031_write(client, MT9P031_WINDOW_WIDTH, crop->width - 1); 411 ret = mt9p031_write(client, MT9P031_WINDOW_HEIGHT, crop->height - 1); 418 xskip = DIV_ROUND_CLOSEST(crop->width, format->width); 419 yskip = DIV_ROUND_CLOSEST(crop->height, format->height); 529 return &mt9p031->crop; 584 mt9p031_get_crop(struct v4l2_subdev *subdev, struct v4l2_subdev_fh *fh, struct v4l2_subdev_crop *crop) argument 595 mt9p031_set_crop(struct v4l2_subdev *subdev, struct v4l2_subdev_fh *fh, struct v4l2_subdev_crop *crop) argument 942 struct v4l2_rect *crop; local [all...] |
H A D | mt9t001.c | 129 struct v4l2_rect crop; member in struct:mt9t001 268 return &mt9t001->crop; 281 struct v4l2_rect *crop = &mt9t001->crop; local 298 hratio = DIV_ROUND_CLOSEST(crop->width, format->width); 299 vratio = DIV_ROUND_CLOSEST(crop->height, format->height); 309 ret = mt9t001_write(client, MT9T001_COLUMN_START, crop->left); 313 ret = mt9t001_write(client, MT9T001_ROW_START, crop->top); 317 ret = mt9t001_write(client, MT9T001_WINDOW_WIDTH, crop->width - 1); 321 ret = mt9t001_write(client, MT9T001_WINDOW_HEIGHT, crop 404 mt9t001_get_crop(struct v4l2_subdev *subdev, struct v4l2_subdev_fh *fh, struct v4l2_subdev_crop *crop) argument 415 mt9t001_set_crop(struct v4l2_subdev *subdev, struct v4l2_subdev_fh *fh, struct v4l2_subdev_crop *crop) argument 786 struct v4l2_rect *crop; local [all...] |
H A D | mt9m032.c | 158 struct mutex lock; /* Protects streaming, format, interval and crop */ 163 struct v4l2_rect crop; member in struct:mt9m032 196 struct v4l2_rect *crop = &sensor->crop; local 204 row_time = mt9m032_row_time(sensor, crop->width); 208 - crop->height; 214 div_u64((crop->height + MT9M032_VBLANK_MAX) * 219 - crop->height; 234 sensor->crop.width - 1); 237 sensor->crop 425 mt9m032_get_pad_crop(struct v4l2_subdev *subdev, struct v4l2_subdev_fh *fh, struct v4l2_subdev_crop *crop) argument 438 mt9m032_set_pad_crop(struct v4l2_subdev *subdev, struct v4l2_subdev_fh *fh, struct v4l2_subdev_crop *crop) argument [all...] |
H A D | s5k6aa.c | 1117 struct v4l2_rect *crop; local 1125 crop = v4l2_subdev_get_try_crop(fh, 0); 1131 crop = &s5k6aa->ccd_rect; 1143 * Make sure the crop window is valid, i.e. its size is 1147 crop->width = clamp_t(unsigned int, crop->width, mf->width, 1149 crop->height = clamp_t(unsigned int, crop->height, mf->height, 1151 crop->left = clamp_t(unsigned int, crop 1164 s5k6aa_get_crop(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh, struct v4l2_subdev_crop *crop) argument 1183 s5k6aa_set_crop(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh, struct v4l2_subdev_crop *crop) argument 1420 struct v4l2_rect *crop = v4l2_subdev_get_try_crop(fh, 0); local [all...] |
/drivers/media/platform/omap3isp/ |
H A D | ispresizer.c | 130 * __resizer_get_crop - helper function for getting resizer crop rectangle 133 * @which : wanted subdev crop rectangle 142 return &res->crop.request; 497 * where the input width and height are the resizer input crop rectangle size. 509 clock = div_u64((u64)limit * res->crop.active.height, ofmt->height); 511 *max_rate = div_u64((u64)clock * res->crop.active.width, ofmt->width); 590 requests_per_frame = DIV_ROUND_UP(res->crop.active.width * 2, 256) 591 * res->crop.active.height; 627 /* This will handle crop settings in stream off state */ 773 * compute the input crop rectangl 1185 resizer_try_crop(const struct v4l2_mbus_framefmt *sink, const struct v4l2_mbus_framefmt *source, struct v4l2_rect *crop) argument 1384 struct v4l2_rect crop; local 1505 struct v4l2_rect *crop; local [all...] |
H A D | isppreview.c | 76 * during streaming are enabled when computing sink crop and source format 92 * YUV conversion. They thus can crop one pixel on the left and one pixel on the 94 * filters are disabled, the driver must crop the two pixels on the same side of 1075 unsigned int sph = prev->crop.left; 1076 unsigned int eph = prev->crop.left + prev->crop.width - 1; 1077 unsigned int slv = prev->crop.top; 1078 unsigned int elv = prev->crop.top + prev->crop.height - 1; 1707 return &prev->crop; 1746 struct v4l2_rect *crop; local 1823 preview_try_crop(struct isp_prev_device *prev, const struct v4l2_mbus_framefmt *sink, struct v4l2_rect *crop) argument 2048 struct v4l2_rect *crop; local [all...] |
H A D | ispresizer.h | 90 * @lock: Protects formats and crop rectangles between set_selection and IRQ 91 * @crop.request: Crop rectangle requested by the user 92 * @crop.active: Active crop rectangle (based on hardware requirements) 104 u32 crop_offset; /* additional offset for crop in memory mode */ 116 } crop; member in struct:isp_res_device
|
/drivers/media/v4l2-core/ |
H A D | v4l2-subdev.c | 143 static int check_crop(struct v4l2_subdev *sd, struct v4l2_subdev_crop *crop) argument 145 if (crop->which != V4L2_SUBDEV_FORMAT_TRY && 146 crop->which != V4L2_SUBDEV_FORMAT_ACTIVE) 149 if (crop->pad >= sd->entity.num_pads) 279 struct v4l2_subdev_crop *crop = arg; local 282 rval = check_crop(sd, crop); 286 rval = v4l2_subdev_call(sd, pad, get_crop, subdev_fh, crop); 291 sel.which = crop->which; 292 sel.pad = crop->pad; 298 crop 304 struct v4l2_subdev_crop *crop = arg; local [all...] |
/drivers/media/platform/exynos-gsc/ |
H A D | gsc-core.c | 233 frame->crop.width = width; 234 frame->crop.height = height; 235 frame->crop.left = 0; 236 frame->crop.top = 0; 291 remainder = s_frame->crop.width % (*wratio * walign); 293 s_frame->crop.width -= remainder; 294 gsc_cal_prescaler_ratio(var, s_frame->crop.width, tx, wratio); 296 s_frame->crop.width + remainder, s_frame->crop.width); 299 remainder = s_frame->crop [all...] |
H A D | gsc-regs.c | 131 cfg = GSC_SRCIMG_OFFSET_X(frame->crop.left); 132 cfg |= GSC_SRCIMG_OFFSET_Y(frame->crop.top); 141 cfg = GSC_CROPPED_WIDTH(frame->crop.width); 142 cfg |= GSC_CROPPED_HEIGHT(frame->crop.height); 245 cfg = GSC_DSTIMG_OFFSET_X(frame->crop.left); 246 cfg |= GSC_DSTIMG_OFFSET_Y(frame->crop.top); 257 cfg = GSC_SCALED_WIDTH(frame->crop.height); 258 cfg |= GSC_SCALED_HEIGHT(frame->crop.width); 260 cfg = GSC_SCALED_WIDTH(frame->crop.width); 261 cfg |= GSC_SCALED_HEIGHT(frame->crop [all...] |
/drivers/media/platform/soc_camera/ |
H A D | soc_scale_crop.h | 35 struct v4l2_crop *crop, struct v4l2_crop *cam_crop,
|
H A D | soc_scale_crop.c | 40 /* Get and store current client crop */ 43 struct v4l2_crop crop; local 47 crop.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; 49 ret = v4l2_subdev_call(sd, video, g_crop, &crop); 51 *rect = crop.c; 66 /* Client crop has changed, update our sub-rectangle to remain within the area */ 97 struct v4l2_crop *crop, struct v4l2_crop *cam_crop, 100 struct v4l2_rect *rect = &crop->c, *cam_rect = &cam_crop->c; 106 v4l2_subdev_call(sd, video, s_crop, crop); 214 /* Iterative s_mbus_fmt, also updates cached client crop o 96 soc_camera_client_s_crop(struct v4l2_subdev *sd, struct v4l2_crop *crop, struct v4l2_crop *cam_crop, struct v4l2_rect *target_rect, struct v4l2_rect *subrect) argument [all...] |
/drivers/staging/media/davinci_vpfe/ |
H A D | dm365_isif.c | 197 struct v4l2_rect *win = &isif->crop; 244 vpfe_isif->crop.left = 0; 245 vpfe_isif->crop.top = 0; 246 vpfe_isif->crop.width = format.width; 247 vpfe_isif->crop.height = format.height; 1538 * isif_pad_set_crop() - set crop rectangle on pad 1547 struct v4l2_subdev_crop *crop) 1553 if (crop->pad != ISIF_PAD_SINK) 1556 format = __isif_get_format(vpfe_isif, fh, crop->pad, crop 1546 isif_pad_set_crop(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh, struct v4l2_subdev_crop *crop) argument 1594 isif_pad_get_crop(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh, struct v4l2_subdev_crop *crop) argument 1628 struct v4l2_subdev_crop crop; local [all...] |
/drivers/media/pci/bt8xx/ |
H A D | bttv-risc.c | 362 geo->crop = ((width>>8)&0x03) | ((geo->hdelay>>6)&0x0c) | 386 const struct v4l2_rect * crop) 392 if ((crop->left == tvnorm->cropcap.defrect.left 393 && crop->top == tvnorm->cropcap.defrect.top 394 && crop->width == tvnorm->cropcap.defrect.width 395 && crop->height == tvnorm->cropcap.defrect.height 405 c_width = min((unsigned int) crop->width, width * 16); 406 c_height = min((unsigned int) crop->height, height * 16); 411 geo->hdelay = ((crop->left * width + c_width) / c_width) & ~1; 414 geo->vdelay = crop 380 bttv_calc_geo(struct bttv * btv, struct bttv_geometry * geo, unsigned int width, unsigned int height, int both_fields, const struct bttv_tvnorm * tvnorm, const struct v4l2_rect * crop) argument 609 unsigned int crop, vdelay; local [all...] |
/drivers/media/platform/vivid/ |
H A D | vivid-vid-out.c | 416 struct v4l2_rect *crop = &dev->crop_out; local 452 rect_map_inside(crop, &r); 454 *crop = r; 473 crop->width / MAX_ZOOM, 474 factor * crop->height / MAX_ZOOM 478 crop->width * MAX_ZOOM, 479 factor * crop->height * MAX_ZOOM 487 rect_set_size_to(crop, &r); 492 rect_map_inside(crop, &r); 499 crop 639 struct v4l2_rect *crop = &dev->crop_out; local [all...] |
H A D | vivid-tpg.c | 99 tpg->crop.width = tpg->compose.width = w; 100 tpg->crop.height = tpg->compose.height = h; 236 void tpg_s_crop_compose(struct tpg_data *tpg, const struct v4l2_rect *crop, argument 239 tpg->crop = *crop; 242 tpg->crop.width - 1) / tpg->crop.width; 263 tpg->crop.top = tpg->crop.left = 0; 264 tpg->crop [all...] |
/drivers/media/platform/s3c-camif/ |
H A D | camif-capture.c | 747 struct v4l2_rect *crop = &camif->camif_crop; local 762 pr_debug("fmt: %ux%u, crop: %ux%u, bytesperline: %u\n", 763 pix->width, pix->height, crop->width, crop->height, 767 * camera input interface crop rectangle and the resizer's capabilities. 769 sc_hrmax = min(SCALER_MAX_RATIO, 1 << (ffs(crop->width) - 3)); 770 sc_vrmax = min(SCALER_MAX_RATIO, 1 << (ffs(crop->height) - 1)); 772 wmin = max_t(u32, pix_lim->min_out_width, crop->width / sc_hrmax); 774 hmin = max_t(u32, 8, crop->height / sc_vrmax); 1265 /* crop rectangl 1300 struct v4l2_rect *crop = &camif->camif_crop; local 1316 struct v4l2_rect *crop = &camif->camif_crop; local 1382 struct v4l2_rect *crop = &camif->camif_crop; local 1469 struct v4l2_rect *crop = &camif->camif_crop; local [all...] |