/drivers/media/video/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) 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 | 293 struct v4l2_rect *crop = &vout->crop; local 325 ctop = (pix->height - crop->height) - crop->top; 326 cleft = (pix->width - crop->width) - crop->left; 338 temp_ps * cleft + crop->top * temp_ps; 341 cleft + crop->top * temp_ps + (line_length * 342 ((crop->width / (vr_ps)) - 1) * ps); 357 (crop [all...] |
H A D | omap_voutdef.h | 145 struct v4l2_rect crop; member in struct:omap_vout_device
|
H A D | omap_vout.c | 291 struct v4l2_rect *crop = &vout->crop; local 314 crop->top + crop->left * ps; 391 cropheight = vout->crop.width; 392 cropwidth = vout->crop.height; 396 cropheight = vout->crop.height; 397 cropwidth = vout->crop.width; 1157 /* set default crop and win */ 1158 omap_vout_new_format(&vout->pix, &vout->fbuf, &vout->crop, 1284 vidioc_g_crop(struct file *file, void *fh, struct v4l2_crop *crop) argument 1294 vidioc_s_crop(struct file *file, void *fh, struct v4l2_crop *crop) argument [all...] |
/drivers/media/video/ |
H A D | v4l2-subdev.c | 38 /* Allocate try format and crop in the same memory block */ 236 struct v4l2_subdev_crop *crop = arg; local 238 if (crop->which != V4L2_SUBDEV_FORMAT_TRY && 239 crop->which != V4L2_SUBDEV_FORMAT_ACTIVE) 242 if (crop->pad >= sd->entity.num_pads) 245 return v4l2_subdev_call(sd, pad, get_crop, subdev_fh, crop); 249 struct v4l2_subdev_crop *crop = arg; local 251 if (crop->which != V4L2_SUBDEV_FORMAT_TRY && 252 crop->which != V4L2_SUBDEV_FORMAT_ACTIVE) 255 if (crop [all...] |
H A D | mt9m032.c | 140 struct mutex lock; /* Protects streaming, format, interval and crop */ 145 struct v4l2_rect crop; member in struct:mt9m032 178 struct v4l2_rect *crop = &sensor->crop; local 186 row_time = mt9m032_row_time(sensor, crop->width); 190 - crop->height; 196 div_u64((crop->height + MT9M032_VBLANK_MAX) * 201 - crop->height; 216 sensor->crop.width - 1); 219 sensor->crop 403 mt9m032_get_pad_crop(struct v4l2_subdev *subdev, struct v4l2_subdev_fh *fh, struct v4l2_subdev_crop *crop) argument 416 mt9m032_set_pad_crop(struct v4l2_subdev *subdev, struct v4l2_subdev_fh *fh, struct v4l2_subdev_crop *crop) argument [all...] |
H A D | mt9p031.c | 105 struct v4l2_rect crop; /* Sensor window */ member in struct:mt9p031 305 const struct v4l2_rect *crop = &mt9p031->crop; local 320 ret = mt9p031_write(client, MT9P031_COLUMN_START, crop->left); 323 ret = mt9p031_write(client, MT9P031_ROW_START, crop->top); 326 ret = mt9p031_write(client, MT9P031_WINDOW_WIDTH, crop->width - 1); 329 ret = mt9p031_write(client, MT9P031_WINDOW_HEIGHT, crop->height - 1); 336 xskip = DIV_ROUND_CLOSEST(crop->width, format->width); 337 yskip = DIV_ROUND_CLOSEST(crop->height, format->height); 447 return &mt9p031->crop; 500 mt9p031_get_crop(struct v4l2_subdev *subdev, struct v4l2_subdev_fh *fh, struct v4l2_subdev_crop *crop) argument 511 mt9p031_set_crop(struct v4l2_subdev *subdev, struct v4l2_subdev_fh *fh, struct v4l2_subdev_crop *crop) argument 757 struct v4l2_rect *crop; local [all...] |
H A D | mt9t001.c | 120 struct v4l2_rect crop; member in struct:mt9t001 188 return &mt9t001->crop; 200 struct v4l2_rect *crop = &mt9t001->crop; local 209 hratio = DIV_ROUND_CLOSEST(crop->width, format->width); 210 vratio = DIV_ROUND_CLOSEST(crop->height, format->height); 220 ret = mt9t001_write(client, MT9T001_COLUMN_START, crop->left); 224 ret = mt9t001_write(client, MT9T001_ROW_START, crop->top); 228 ret = mt9t001_write(client, MT9T001_WINDOW_WIDTH, crop->width - 1); 232 ret = mt9t001_write(client, MT9T001_WINDOW_HEIGHT, crop 313 mt9t001_get_crop(struct v4l2_subdev *subdev, struct v4l2_subdev_fh *fh, struct v4l2_subdev_crop *crop) argument 324 mt9t001_set_crop(struct v4l2_subdev *subdev, struct v4l2_subdev_fh *fh, struct v4l2_subdev_crop *crop) argument 631 struct v4l2_rect *crop; local [all...] |
H A D | mt9v032.c | 123 struct v4l2_rect crop; member in struct:mt9v032 274 return &mt9v032->crop; 288 struct v4l2_rect *crop = &mt9v032->crop; local 297 hratio = DIV_ROUND_CLOSEST(crop->width, format->width); 298 vratio = DIV_ROUND_CLOSEST(crop->height, format->height); 306 ret = mt9v032_write(client, MT9V032_COLUMN_START, crop->left); 310 ret = mt9v032_write(client, MT9V032_ROW_START, crop->top); 314 ret = mt9v032_write(client, MT9V032_WINDOW_WIDTH, crop->width); 318 ret = mt9v032_write(client, MT9V032_WINDOW_HEIGHT, crop 404 mt9v032_get_crop(struct v4l2_subdev *subdev, struct v4l2_subdev_fh *fh, struct v4l2_subdev_crop *crop) argument 415 mt9v032_set_crop(struct v4l2_subdev *subdev, struct v4l2_subdev_fh *fh, struct v4l2_subdev_crop *crop) argument 607 struct v4l2_rect *crop; local [all...] |
/drivers/media/video/omap3isp/ |
H A D | ispresizer.h | 99 * @crop.request: Crop rectangle requested by the user 100 * @crop.active: Active crop rectangle (based on hardware requirements) 112 u32 crop_offset; /* additional offset for crop in memory mode */ 123 } crop; member in struct:isp_res_device
|
H A D | isppreview.h | 155 * @crop: Active crop rectangle 173 struct v4l2_rect crop; member in struct:isp_prev_device
|
H A D | ispvideo.c | 806 isp_video_get_crop(struct file *file, void *fh, struct v4l2_crop *crop) argument 818 /* Try the get crop operation first and fallback to get format if not 821 ret = v4l2_subdev_call(subdev, video, g_crop, crop); 831 crop->c.left = 0; 832 crop->c.top = 0; 833 crop->c.width = format.format.width; 834 crop->c.height = format.format.height; 840 isp_video_set_crop(struct file *file, void *fh, struct v4l2_crop *crop) argument 851 ret = v4l2_subdev_call(subdev, video, s_crop, crop);
|
H A D | ispresizer.c | 140 * __resizer_get_crop - helper function for getting resizer crop rectangle 143 * @which : wanted subdev crop rectangle 152 return &res->crop.request; 510 * where the input width and height are the resizer input crop rectangle size. 522 clock = div_u64((u64)limit * res->crop.active.height, ofmt->height); 524 *max_rate = div_u64((u64)clock * res->crop.active.width, ofmt->width); 603 requests_per_frame = DIV_ROUND_UP(res->crop.active.width * 2, 256) 604 * res->crop.active.height; 640 /* This will handle crop settings in stream off state */ 786 * compute the input crop rectangl 1198 resizer_g_crop(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh, struct v4l2_subdev_crop *crop) argument 1219 resizer_try_crop(const struct v4l2_mbus_framefmt *sink, const struct v4l2_mbus_framefmt *source, struct v4l2_rect *crop) argument 1258 resizer_s_crop(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh, struct v4l2_subdev_crop *crop) argument 1338 struct v4l2_rect crop; local 1459 struct v4l2_rect *crop; local [all...] |
/drivers/media/video/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...] |
H A D | bttvp.h | 150 u8 vtc,crop,comb; member in struct:bttv_geometry 167 struct v4l2_rect crop; member in struct:bttv_buffer 206 /* Scaled image size limits with this crop rect. Divide 490 struct bttv_crop crop[2]; member in struct:bttv 497 /* Latest possible end of VBI capturing (= crop[x].rect.top when
|
/drivers/media/video/pvrusb2/ |
H A D | pvrusb2-v4l2.c | 763 struct v4l2_crop *crop = (struct v4l2_crop *)arg; local 765 if (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) { 775 crop->c.left = val; 782 crop->c.top = val; 789 crop->c.width = val; 796 crop->c.height = val; 800 struct v4l2_crop *crop = (struct v4l2_crop *)arg; local 801 if (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) { 807 crop->c.left); 814 crop [all...] |
/drivers/media/video/cx18/ |
H A D | cx18-ioctl.c | 530 static int cx18_s_crop(struct file *file, void *fh, struct v4l2_crop *crop) argument 535 if (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) 541 static int cx18_g_crop(struct file *file, void *fh, struct v4l2_crop *crop) argument 545 if (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
|
/drivers/media/video/davinci/ |
H A D | vpbe_display.c | 407 * the crop coordinates for cropped or scaled display. if crop 411 * to begin with, set the crop window same as expected. Later we 450 /* no scaling, only cropping. Set display area to crop area */ 481 /* no scaling, only cropping. Set display area to crop area */ 485 "crop display xsize = %d, ysize = %d\n", 632 struct v4l2_crop *crop) 640 struct v4l2_rect *rect = &crop->c; 646 if (crop->type != V4L2_BUF_TYPE_VIDEO_OUTPUT) { 701 struct v4l2_crop *crop) 631 vpbe_display_s_crop(struct file *file, void *priv, struct v4l2_crop *crop) argument 700 vpbe_display_g_crop(struct file *file, void *priv, struct v4l2_crop *crop) argument [all...] |
H A D | vpfe_capture.c | 343 ccdc_dev->hw_ops.set_image_window(&vpfe_dev->crop); 371 * pix format & crop values in the vpfe device and ccdc. It first 374 * values based on that.Sets crop values to match with scan resolution 404 vpfe_dev->crop.top = 0; 405 vpfe_dev->crop.left = 0; 406 vpfe_dev->crop.width = vpfe_dev->std_info.active_pixels; 407 vpfe_dev->crop.height = vpfe_dev->std_info.active_lines; 408 pix->width = vpfe_dev->crop.width; 409 pix->height = vpfe_dev->crop.height; 1638 struct v4l2_cropcap *crop) 1637 vpfe_cropcap(struct file *file, void *priv, struct v4l2_cropcap *crop) argument 1657 vpfe_g_crop(struct file *file, void *priv, struct v4l2_crop *crop) argument 1668 vpfe_s_crop(struct file *file, void *priv, struct v4l2_crop *crop) argument [all...] |
H A D | vpif_capture.c | 1723 * @crop: ptr to v4l2_cropcap structure 1726 struct v4l2_cropcap *crop) 1732 if (V4L2_BUF_TYPE_VIDEO_CAPTURE != crop->type) 1735 crop->bounds.left = 0; 1736 crop->bounds.top = 0; 1737 crop->bounds.height = common->height; 1738 crop->bounds.width = common->width; 1739 crop->defrect = crop->bounds; 1725 vpif_cropcap(struct file *file, void *priv, struct v4l2_cropcap *crop) argument
|
H A D | vpif_display.c | 1194 struct v4l2_cropcap *crop) 1199 if (V4L2_BUF_TYPE_VIDEO_OUTPUT != crop->type) 1202 crop->bounds.left = crop->bounds.top = 0; 1203 crop->defrect.left = crop->defrect.top = 0; 1204 crop->defrect.height = crop->bounds.height = common->height; 1205 crop->defrect.width = crop 1193 vpif_cropcap(struct file *file, void *priv, struct v4l2_cropcap *crop) argument [all...] |
/drivers/media/video/ivtv/ |
H A D | ivtv-ioctl.c | 878 static int ivtv_s_crop(struct file *file, void *fh, struct v4l2_crop *crop) argument 887 if (crop->type == V4L2_BUF_TYPE_VIDEO_OUTPUT && 890 yi->main_rect = crop->c; 894 crop->c.width, crop->c.height, crop->c.left, crop->c.top)) { 895 itv->main_rect = crop->c; 904 static int ivtv_g_crop(struct file *file, void *fh, struct v4l2_crop *crop) argument 913 if (crop [all...] |
/drivers/media/video/s5p-fimc/ |
H A D | fimc-capture.c | 138 * spinlock held. It updates the camera pixel crop, rotation and 489 * Format and crop negotiation helpers 532 /* Can't scale or crop in transparent (JPEG) transfer mode */ 592 * For the crop rectangle at source pad the following constraints 596 * - maximum crop size depends if the rotator is used or not; 598 * prescaler ratios determined by sink pad size and source pad crop, 1336 /* Reset the crop rectangle if required. */ 1348 struct v4l2_subdev_crop *crop) 1352 struct v4l2_rect *r = &crop->rect; 1355 if (crop 1346 fimc_subdev_get_crop(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh, struct v4l2_subdev_crop *crop) argument 1376 fimc_subdev_set_crop(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh, struct v4l2_subdev_crop *crop) argument [all...] |
/drivers/media/video/zoran/ |
H A D | zoran_driver.c | 2554 static int zoran_g_crop(struct file *file, void *__fh, struct v4l2_crop *crop) argument 2558 int type = crop->type, res = 0; 2560 memset(crop, 0, sizeof(*crop)); 2561 crop->type = type; 2565 if (crop->type != V4L2_BUF_TYPE_VIDEO_OUTPUT && 2566 (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE || 2576 crop->c.top = fh->jpg_settings.img_y; 2577 crop->c.left = fh->jpg_settings.img_x; 2578 crop 2587 zoran_s_crop(struct file *file, void *__fh, struct v4l2_crop *crop) argument [all...] |
/drivers/staging/media/go7007/ |
H A D | go7007-v4l2.c | 1341 static int vidioc_g_crop(struct file *file, void *priv, struct v4l2_crop *crop) argument 1345 if (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) 1348 crop->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; 1353 crop->c.top = 0; 1354 crop->c.left = 0; 1355 crop->c.width = 720; 1356 crop->c.height = 480; 1359 crop->c.top = 0; 1360 crop->c.left = 0; 1361 crop 1377 vidioc_s_crop(struct file *file, void *priv, struct v4l2_crop *crop) argument [all...] |