Home
last modified time | relevance | path

Searched refs:crop (Results 1 – 25 of 34) sorted by relevance

12

/linux-2.6.39/drivers/media/video/omap/
Domap_voutlib.c40 struct v4l2_framebuffer *fbuf, struct v4l2_rect *crop) in omap_vout_default_crop() argument
42 crop->width = (pix->width < fbuf->fmt.width) ? in omap_vout_default_crop()
44 crop->height = (pix->height < fbuf->fmt.height) ? in omap_vout_default_crop()
46 crop->width &= ~1; in omap_vout_default_crop()
47 crop->height &= ~1; in omap_vout_default_crop()
48 crop->left = ((pix->width - crop->width) >> 1) & ~1; in omap_vout_default_crop()
49 crop->top = ((pix->height - crop->height) >> 1) & ~1; in omap_vout_default_crop()
107 int omap_vout_new_window(struct v4l2_rect *crop, in omap_vout_new_window() argument
125 if ((crop->height/win->w.height) >= 2) in omap_vout_new_window()
126 crop->height = win->w.height * 2; in omap_vout_new_window()
[all …]
Domap_voutlib.h16 struct v4l2_framebuffer *fbuf, struct v4l2_rect *crop);
19 struct v4l2_rect *crop, struct v4l2_window *win,
26 extern int omap_vout_new_window(struct v4l2_rect *crop,
31 struct v4l2_framebuffer *fbuf, struct v4l2_rect *crop,
Domap_vout.c514 struct v4l2_rect *crop = &vout->crop; in omap_vout_calculate_offset() local
553 ctop = (pix->height - crop->height) - crop->top; in omap_vout_calculate_offset()
554 cleft = (pix->width - crop->width) - crop->left; in omap_vout_calculate_offset()
566 temp_ps * cleft + crop->top * temp_ps; in omap_vout_calculate_offset()
569 cleft + crop->top * temp_ps + (line_length * in omap_vout_calculate_offset()
570 ((crop->width / (vr_ps)) - 1) * ps); in omap_vout_calculate_offset()
585 (crop->height - 1) * ps); in omap_vout_calculate_offset()
594 temp_ps * crop->left + ctop * ps; in omap_vout_calculate_offset()
597 temp_ps * crop->left + ctop * ps + in omap_vout_calculate_offset()
598 (line_length * ((crop->width / vr_ps) - 1) * in omap_vout_calculate_offset()
[all …]
Domap_voutdef.h106 struct v4l2_rect crop; member
/linux-2.6.39/drivers/media/video/omap3isp/
Dispresizer.c152 return &res->crop.request; in __resizer_get_crop()
522 clock = div_u64((u64)limit * res->crop.active.height, ofmt->height); in omap3isp_resizer_max_rate()
524 *max_rate = div_u64((u64)clock * res->crop.active.width, ofmt->width); in omap3isp_resizer_max_rate()
603 requests_per_frame = DIV_ROUND_UP(res->crop.active.width * 2, 256) in resizer_adjust_bandwidth()
604 * res->crop.active.height; in resizer_adjust_bandwidth()
941 res->crop_offset = (res->crop.active.top * input->width + in resizer_set_crop_params()
942 res->crop.active.left) * 2; in resizer_set_crop_params()
961 resizer_set_start(res, res->crop.active.left * 2, in resizer_set_crop_params()
962 res->crop.active.top); in resizer_set_crop_params()
969 resizer_set_input_size(res, res->crop.active.width, in resizer_set_crop_params()
[all …]
Dispvideo.c795 isp_video_get_crop(struct file *file, void *fh, struct v4l2_crop *crop) in isp_video_get_crop() argument
810 ret = v4l2_subdev_call(subdev, video, g_crop, crop); in isp_video_get_crop()
820 crop->c.left = 0; in isp_video_get_crop()
821 crop->c.top = 0; in isp_video_get_crop()
822 crop->c.width = format.format.width; in isp_video_get_crop()
823 crop->c.height = format.format.height; in isp_video_get_crop()
829 isp_video_set_crop(struct file *file, void *fh, struct v4l2_crop *crop) in isp_video_set_crop() argument
840 ret = v4l2_subdev_call(subdev, video, s_crop, crop); in isp_video_set_crop()
Dispresizer.h124 } crop; member
/linux-2.6.39/drivers/media/video/
Dv4l2-subdev.c217 struct v4l2_subdev_crop *crop = arg; in subdev_do_ioctl() local
219 if (crop->which != V4L2_SUBDEV_FORMAT_TRY && in subdev_do_ioctl()
220 crop->which != V4L2_SUBDEV_FORMAT_ACTIVE) in subdev_do_ioctl()
223 if (crop->pad >= sd->entity.num_pads) in subdev_do_ioctl()
226 return v4l2_subdev_call(sd, pad, get_crop, subdev_fh, crop); in subdev_do_ioctl()
230 struct v4l2_subdev_crop *crop = arg; in subdev_do_ioctl() local
232 if (crop->which != V4L2_SUBDEV_FORMAT_TRY && in subdev_do_ioctl()
233 crop->which != V4L2_SUBDEV_FORMAT_ACTIVE) in subdev_do_ioctl()
236 if (crop->pad >= sd->entity.num_pads) in subdev_do_ioctl()
239 return v4l2_subdev_call(sd, pad, set_crop, subdev_fh, crop); in subdev_do_ioctl()
Dtw9910.c709 struct v4l2_crop crop = { in tw9910_g_crop() local
717 ret = tw9910_s_crop(sd, &crop); in tw9910_g_crop()
756 struct v4l2_crop crop = { in tw9910_g_fmt() local
764 ret = tw9910_s_crop(sd, &crop); in tw9910_g_fmt()
/linux-2.6.39/drivers/media/video/bt8xx/
Dbttv-risc.c360 geo->crop = ((width>>8)&0x03) | ((geo->hdelay>>6)&0x0c) | in bttv_calc_geo_old()
384 const struct v4l2_rect * crop) in bttv_calc_geo() argument
390 if ((crop->left == tvnorm->cropcap.defrect.left in bttv_calc_geo()
391 && crop->top == tvnorm->cropcap.defrect.top in bttv_calc_geo()
392 && crop->width == tvnorm->cropcap.defrect.width in bttv_calc_geo()
393 && crop->height == tvnorm->cropcap.defrect.height in bttv_calc_geo()
403 c_width = min((unsigned int) crop->width, width * 16); in bttv_calc_geo()
404 c_height = min((unsigned int) crop->height, height * 16); in bttv_calc_geo()
409 geo->hdelay = ((crop->left * width + c_width) / c_width) & ~1; in bttv_calc_geo()
412 geo->vdelay = crop->top - tvnorm->cropcap.bounds.top + MIN_VDELAY; in bttv_calc_geo()
[all …]
Dbttv-driver.c871 __s32 top = btv->crop[!!fh->do_crop].rect.top; in check_alloc_btres_lock()
922 u8 crop; in disclaim_video_lines() local
932 crop = btread(BT848_E_CROP) | 0xc0; in disclaim_video_lines()
933 btwrite(crop, BT848_E_CROP); in disclaim_video_lines()
935 btwrite(crop, BT848_O_CROP); in disclaim_video_lines()
1307 bttv_crop_reset(&btv->crop[0], norm); in set_tvnorm()
1308 btv->crop[1] = btv->crop[0]; /* current = default */ in set_tvnorm()
1728 c = btv->crop[!!fh->do_crop]; in bttv_prepare_buffer()
1760 buf->crop.top != c.rect.top || in bttv_prepare_buffer()
1761 buf->crop.left != c.rect.left || in bttv_prepare_buffer()
[all …]
Dbttvp.h153 u8 vtc,crop,comb; member
170 struct v4l2_rect crop; member
481 struct bttv_crop crop[2]; member
/linux-2.6.39/Documentation/video4linux/
Dsh_mobile_ceu_camera.txt70 2. Calculate "effective" input crop (sensor subwindow) - CEU crop scaled back at
95 8. Calculate new CEU crop - apply sensor scales to previously calculated
96 "effective" crop:
101 9. Use CEU cropping to crop to the new window:
126 to 2 : 2', target crop 5 : 5', current output format 6' - 6.
136 6. Calculate and apply host crop: 6 - 7 = (5 - 2) * (6' - 6) / (5' - 5)
/linux-2.6.39/drivers/media/video/davinci/
Dvpfe_capture.c343 ccdc_dev->hw_ops.set_image_window(&vpfe_dev->crop); in vpfe_config_ccdc_image_format()
404 vpfe_dev->crop.top = 0; in vpfe_config_image_format()
405 vpfe_dev->crop.left = 0; in vpfe_config_image_format()
406 vpfe_dev->crop.width = vpfe_dev->std_info.active_pixels; in vpfe_config_image_format()
407 vpfe_dev->crop.height = vpfe_dev->std_info.active_lines; in vpfe_config_image_format()
408 pix->width = vpfe_dev->crop.width; in vpfe_config_image_format()
409 pix->height = vpfe_dev->crop.height; in vpfe_config_image_format()
1638 struct v4l2_cropcap *crop) in vpfe_cropcap() argument
1647 memset(crop, 0, sizeof(struct v4l2_cropcap)); in vpfe_cropcap()
1648 crop->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; in vpfe_cropcap()
[all …]
Dvpif_display.c1197 struct v4l2_cropcap *crop) in vpif_cropcap() argument
1202 if (V4L2_BUF_TYPE_VIDEO_OUTPUT != crop->type) in vpif_cropcap()
1205 crop->bounds.left = crop->bounds.top = 0; in vpif_cropcap()
1206 crop->defrect.left = crop->defrect.top = 0; in vpif_cropcap()
1207 crop->defrect.height = crop->bounds.height = common->height; in vpif_cropcap()
1208 crop->defrect.width = crop->bounds.width = common->width; in vpif_cropcap()
Dvpif_capture.c1727 struct v4l2_cropcap *crop) in vpif_cropcap() argument
1733 if (V4L2_BUF_TYPE_VIDEO_CAPTURE != crop->type) in vpif_cropcap()
1736 crop->bounds.left = 0; in vpif_cropcap()
1737 crop->bounds.top = 0; in vpif_cropcap()
1738 crop->bounds.height = common->height; in vpif_cropcap()
1739 crop->bounds.width = common->width; in vpif_cropcap()
1740 crop->defrect = crop->bounds; in vpif_cropcap()
/linux-2.6.39/drivers/media/video/pvrusb2/
Dpvrusb2-v4l2.c760 struct v4l2_crop *crop = (struct v4l2_crop *)arg; in pvr2_v4l2_do_ioctl() local
762 if (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) { in pvr2_v4l2_do_ioctl()
772 crop->c.left = val; in pvr2_v4l2_do_ioctl()
779 crop->c.top = val; in pvr2_v4l2_do_ioctl()
786 crop->c.width = val; in pvr2_v4l2_do_ioctl()
793 crop->c.height = val; in pvr2_v4l2_do_ioctl()
797 struct v4l2_crop *crop = (struct v4l2_crop *)arg; in pvr2_v4l2_do_ioctl() local
798 if (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) { in pvr2_v4l2_do_ioctl()
804 crop->c.left); in pvr2_v4l2_do_ioctl()
811 crop->c.top); in pvr2_v4l2_do_ioctl()
[all …]
/linux-2.6.39/drivers/media/video/saa7134/
Dsaa7134-video.c1943 static int saa7134_g_crop(struct file *file, void *f, struct v4l2_crop *crop) in saa7134_g_crop() argument
1948 if (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE && in saa7134_g_crop()
1949 crop->type != V4L2_BUF_TYPE_VIDEO_OVERLAY) in saa7134_g_crop()
1951 crop->c = dev->crop_current; in saa7134_g_crop()
1955 static int saa7134_s_crop(struct file *file, void *f, struct v4l2_crop *crop) in saa7134_s_crop() argument
1961 if (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE && in saa7134_s_crop()
1962 crop->type != V4L2_BUF_TYPE_VIDEO_OVERLAY) in saa7134_s_crop()
1964 if (crop->c.height < 0) in saa7134_s_crop()
1966 if (crop->c.width < 0) in saa7134_s_crop()
1974 if (crop->c.top < b->top) in saa7134_s_crop()
[all …]
/linux-2.6.39/drivers/staging/go7007/
Dgo7007-v4l2.c1342 static int vidioc_g_crop(struct file *file, void *priv, struct v4l2_crop *crop) in vidioc_g_crop() argument
1346 if (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) in vidioc_g_crop()
1349 crop->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; in vidioc_g_crop()
1354 crop->c.top = 0; in vidioc_g_crop()
1355 crop->c.left = 0; in vidioc_g_crop()
1356 crop->c.width = 720; in vidioc_g_crop()
1357 crop->c.height = 480; in vidioc_g_crop()
1360 crop->c.top = 0; in vidioc_g_crop()
1361 crop->c.left = 0; in vidioc_g_crop()
1362 crop->c.width = 720; in vidioc_g_crop()
[all …]
/linux-2.6.39/include/media/
Dv4l2-subdev.h267 int (*g_crop)(struct v4l2_subdev *sd, struct v4l2_crop *crop);
268 int (*s_crop)(struct v4l2_subdev *sd, struct v4l2_crop *crop);
439 struct v4l2_subdev_crop *crop);
441 struct v4l2_subdev_crop *crop);
/linux-2.6.39/drivers/staging/cx25821/
Dcx25821-video.h173 extern int cx25821_vidioc_s_crop(struct file *file, void *priv, struct v4l2_crop *crop);
174 extern int cx25821_vidioc_g_crop(struct file *file, void *priv, struct v4l2_crop *crop);
/linux-2.6.39/drivers/media/video/ivtv/
Divtv-ioctl.c868 static int ivtv_s_crop(struct file *file, void *fh, struct v4l2_crop *crop) in ivtv_s_crop() argument
877 if (crop->type == V4L2_BUF_TYPE_VIDEO_OUTPUT && in ivtv_s_crop()
880 yi->main_rect = crop->c; in ivtv_s_crop()
884 crop->c.width, crop->c.height, crop->c.left, crop->c.top)) { in ivtv_s_crop()
885 itv->main_rect = crop->c; in ivtv_s_crop()
894 static int ivtv_g_crop(struct file *file, void *fh, struct v4l2_crop *crop) in ivtv_g_crop() argument
903 if (crop->type == V4L2_BUF_TYPE_VIDEO_OUTPUT && in ivtv_g_crop()
906 crop->c = yi->main_rect; in ivtv_g_crop()
908 crop->c = itv->main_rect; in ivtv_g_crop()
/linux-2.6.39/drivers/media/video/zoran/
Dzoran_driver.c2558 static int zoran_g_crop(struct file *file, void *__fh, struct v4l2_crop *crop) in zoran_g_crop() argument
2562 int type = crop->type, res = 0; in zoran_g_crop()
2564 memset(crop, 0, sizeof(*crop)); in zoran_g_crop()
2565 crop->type = type; in zoran_g_crop()
2569 if (crop->type != V4L2_BUF_TYPE_VIDEO_OUTPUT && in zoran_g_crop()
2570 (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE || in zoran_g_crop()
2580 crop->c.top = fh->jpg_settings.img_y; in zoran_g_crop()
2581 crop->c.left = fh->jpg_settings.img_x; in zoran_g_crop()
2582 crop->c.width = fh->jpg_settings.img_width; in zoran_g_crop()
2583 crop->c.height = fh->jpg_settings.img_height; in zoran_g_crop()
[all …]
/linux-2.6.39/include/media/davinci/
Dvpfe_capture.h153 struct v4l2_rect crop; member
/linux-2.6.39/drivers/media/video/et61x251/
Det61x251_core.c1759 struct v4l2_crop crop = { in et61x251_vidioc_g_crop() local
1763 memcpy(&(crop.c), &(s->_rect), sizeof(struct v4l2_rect)); in et61x251_vidioc_g_crop()
1765 if (copy_to_user(arg, &crop, sizeof(crop))) in et61x251_vidioc_g_crop()
1776 struct v4l2_crop crop; in et61x251_vidioc_s_crop() local
1786 if (copy_from_user(&crop, arg, sizeof(crop))) in et61x251_vidioc_s_crop()
1789 rect = &(crop.c); in et61x251_vidioc_s_crop()
1791 if (crop.type != V4L2_BUF_TYPE_VIDEO_CAPTURE) in et61x251_vidioc_s_crop()
1839 if (copy_to_user(arg, &crop, sizeof(crop))) { in et61x251_vidioc_s_crop()

12