Home
last modified time | relevance | path

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

/linux-4.4.14/drivers/media/platform/omap/
Domap_voutlib.c44 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()
111 int omap_vout_new_window(struct v4l2_rect *crop, in omap_vout_new_window() argument
129 if ((crop->height/win->w.height) >= 2) in omap_vout_new_window()
130 crop->height = win->w.height * 2; in omap_vout_new_window()
[all …]
Domap_vout_vrfb.c297 struct v4l2_rect *crop = &vout->crop; in omap_vout_calculate_vrfb_offset() local
329 ctop = (pix->height - crop->height) - crop->top; in omap_vout_calculate_vrfb_offset()
330 cleft = (pix->width - crop->width) - crop->left; in omap_vout_calculate_vrfb_offset()
342 temp_ps * cleft + crop->top * temp_ps; in omap_vout_calculate_vrfb_offset()
345 cleft + crop->top * temp_ps + (line_length * in omap_vout_calculate_vrfb_offset()
346 ((crop->width / (vr_ps)) - 1) * ps); in omap_vout_calculate_vrfb_offset()
361 (crop->height - 1) * ps); in omap_vout_calculate_vrfb_offset()
370 temp_ps * crop->left + ctop * ps; in omap_vout_calculate_vrfb_offset()
373 temp_ps * crop->left + ctop * ps + in omap_vout_calculate_vrfb_offset()
374 (line_length * ((crop->width / vr_ps) - 1) * in omap_vout_calculate_vrfb_offset()
[all …]
Domap_voutlib.h16 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,
Domap_vout.c279 struct v4l2_rect *crop = &vout->crop; in omap_vout_calculate_offset() local
302 crop->top + crop->left * ps; in omap_vout_calculate_offset()
378 cropheight = vout->crop.width; in omapvid_setup_overlay()
379 cropwidth = vout->crop.height; in omapvid_setup_overlay()
382 cropheight = vout->crop.height; in omapvid_setup_overlay()
383 cropwidth = vout->crop.width; in omapvid_setup_overlay()
1165 omap_vout_new_format(&vout->pix, &vout->fbuf, &vout->crop, &vout->win); in vidioc_s_fmt_vid_out()
1211 ret = omap_vout_new_window(&vout->crop, &vout->win, &vout->fbuf, win); in vidioc_s_fmt_vid_overlay()
1269 static int vidioc_g_crop(struct file *file, void *fh, struct v4l2_crop *crop) in vidioc_g_crop() argument
1273 if (crop->type != V4L2_BUF_TYPE_VIDEO_OUTPUT) in vidioc_g_crop()
[all …]
Domap_voutdef.h145 struct v4l2_rect crop; member
/linux-4.4.14/drivers/media/platform/vsp1/
Dvsp1_rwpf.c82 return &rwpf->crop; in vsp1_rwpf_get_crop()
104 struct v4l2_rect *crop; in vsp1_rwpf_set_format() local
134 crop = vsp1_rwpf_get_crop(rwpf, cfg, fmt->which); in vsp1_rwpf_set_format()
135 crop->left = 0; in vsp1_rwpf_set_format()
136 crop->top = 0; in vsp1_rwpf_set_format()
137 crop->width = fmt->format.width; in vsp1_rwpf_set_format()
138 crop->height = fmt->format.height; in vsp1_rwpf_set_format()
186 struct v4l2_rect *crop; in vsp1_rwpf_set_selection() local
222 crop = vsp1_rwpf_get_crop(rwpf, cfg, sel->which); in vsp1_rwpf_set_selection()
223 *crop = sel->r; in vsp1_rwpf_set_selection()
[all …]
Dvsp1_rpf.c80 const struct v4l2_rect *crop = &rpf->crop; in rpf_s_stream() local
99 (crop->width << VI6_RPF_SRC_BSIZE_BHSIZE_SHIFT) | in rpf_s_stream()
100 (crop->height << VI6_RPF_SRC_BSIZE_BVSIZE_SHIFT)); in rpf_s_stream()
102 (crop->width << VI6_RPF_SRC_ESIZE_EHSIZE_SHIFT) | in rpf_s_stream()
103 (crop->height << VI6_RPF_SRC_ESIZE_EVSIZE_SHIFT)); in rpf_s_stream()
105 rpf->offsets[0] = crop->top * format->plane_fmt[0].bytesperline in rpf_s_stream()
106 + crop->left * fmtinfo->bpp[0] / 8; in rpf_s_stream()
114 rpf->offsets[1] = crop->top * format->plane_fmt[1].bytesperline in rpf_s_stream()
115 + crop->left * fmtinfo->bpp[1] / 8; in rpf_s_stream()
Dvsp1_wpf.c79 const struct v4l2_rect *crop = &wpf->crop; in wpf_s_stream() local
125 (crop->left << VI6_WPF_SZCLIP_OFST_SHIFT) | in wpf_s_stream()
126 (crop->width << VI6_WPF_SZCLIP_SIZE_SHIFT)); in wpf_s_stream()
128 (crop->top << VI6_WPF_SZCLIP_OFST_SHIFT) | in wpf_s_stream()
129 (crop->height << VI6_WPF_SZCLIP_SIZE_SHIFT)); in wpf_s_stream()
Dvsp1_rwpf.h39 struct v4l2_rect crop; member
/linux-4.4.14/drivers/media/platform/omap3isp/
Dispresizer.c142 return &res->crop.request; in __resizer_get_crop()
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()
927 res->crop_offset = (res->crop.active.top * input->width + in resizer_set_crop_params()
928 res->crop.active.left) * 2; in resizer_set_crop_params()
947 resizer_set_start(res, res->crop.active.left * 2, in resizer_set_crop_params()
948 res->crop.active.top); in resizer_set_crop_params()
955 resizer_set_input_size(res, res->crop.active.width, in resizer_set_crop_params()
[all …]
Dispccdc.c1121 const struct v4l2_rect *crop; in ccdc_configure() local
1230 crop = &ccdc->crop; in ccdc_configure()
1238 sph = crop->left * 2; in ccdc_configure()
1239 nph = crop->width * 2 - 1; in ccdc_configure()
1241 sph = crop->left; in ccdc_configure()
1242 nph = crop->width - 1; in ccdc_configure()
1248 isp_reg_writel(isp, (crop->top << ISPCCDC_VERT_START_SLV0_SHIFT) | in ccdc_configure()
1249 (crop->top << ISPCCDC_VERT_START_SLV1_SHIFT), in ccdc_configure()
1251 isp_reg_writel(isp, (crop->height - 1) in ccdc_configure()
1954 return &ccdc->crop; in __ccdc_get_crop()
[all …]
Disppreview.c1069 unsigned int sph = prev->crop.left; in preview_config_input_size()
1070 unsigned int eph = prev->crop.left + prev->crop.width - 1; in preview_config_input_size()
1071 unsigned int slv = prev->crop.top; in preview_config_input_size()
1072 unsigned int elv = prev->crop.top + prev->crop.height - 1; in preview_config_input_size()
1701 return &prev->crop; in __preview_get_crop()
1740 struct v4l2_rect *crop; in preview_try_format() local
1794 crop = __preview_get_crop(prev, cfg, which); in preview_try_format()
1795 fmt->width = crop->width; in preview_try_format()
1796 fmt->height = crop->height; in preview_try_format()
1819 struct v4l2_rect *crop) in preview_try_crop() argument
[all …]
Dispresizer.h116 } crop; member
Dispvideo.c736 isp_video_get_crop(struct file *file, void *fh, struct v4l2_crop *crop) in isp_video_get_crop() argument
751 ret = v4l2_subdev_call(subdev, video, g_crop, crop); in isp_video_get_crop()
761 crop->c.left = 0; in isp_video_get_crop()
762 crop->c.top = 0; in isp_video_get_crop()
763 crop->c.width = format.format.width; in isp_video_get_crop()
764 crop->c.height = format.format.height; in isp_video_get_crop()
770 isp_video_set_crop(struct file *file, void *fh, const struct v4l2_crop *crop) in isp_video_set_crop() argument
781 ret = v4l2_subdev_call(subdev, video, s_crop, crop); in isp_video_set_crop()
Disppreview.h127 struct v4l2_rect crop; member
Dispccdc.h134 struct v4l2_rect crop; member
/linux-4.4.14/drivers/media/platform/exynos-gsc/
Dgsc-core.c233 frame->crop.width = width; in gsc_set_frame_size()
234 frame->crop.height = height; in gsc_set_frame_size()
235 frame->crop.left = 0; in gsc_set_frame_size()
236 frame->crop.top = 0; in gsc_set_frame_size()
291 remainder = s_frame->crop.width % (*wratio * walign); in gsc_check_src_scale_info()
293 s_frame->crop.width -= remainder; in gsc_check_src_scale_info()
294 gsc_cal_prescaler_ratio(var, s_frame->crop.width, tx, wratio); in gsc_check_src_scale_info()
296 s_frame->crop.width + remainder, s_frame->crop.width); in gsc_check_src_scale_info()
299 remainder = s_frame->crop.height % (*hratio * halign); in gsc_check_src_scale_info()
301 s_frame->crop.height -= remainder; in gsc_check_src_scale_info()
[all …]
Dgsc-regs.c131 cfg = GSC_SRCIMG_OFFSET_X(frame->crop.left); in gsc_hw_set_in_size()
132 cfg |= GSC_SRCIMG_OFFSET_Y(frame->crop.top); in gsc_hw_set_in_size()
141 cfg = GSC_CROPPED_WIDTH(frame->crop.width); in gsc_hw_set_in_size()
142 cfg |= GSC_CROPPED_HEIGHT(frame->crop.height); in gsc_hw_set_in_size()
245 cfg = GSC_DSTIMG_OFFSET_X(frame->crop.left); in gsc_hw_set_out_size()
246 cfg |= GSC_DSTIMG_OFFSET_Y(frame->crop.top); in gsc_hw_set_out_size()
257 cfg = GSC_SCALED_WIDTH(frame->crop.height); in gsc_hw_set_out_size()
258 cfg |= GSC_SCALED_HEIGHT(frame->crop.width); in gsc_hw_set_out_size()
260 cfg = GSC_SCALED_WIDTH(frame->crop.width); in gsc_hw_set_out_size()
261 cfg |= GSC_SCALED_HEIGHT(frame->crop.height); in gsc_hw_set_out_size()
Dgsc-m2m.c475 s->r.left = frame->crop.left; in gsc_m2m_g_selection()
476 s->r.top = frame->crop.top; in gsc_m2m_g_selection()
477 s->r.width = frame->crop.width; in gsc_m2m_g_selection()
478 s->r.height = frame->crop.height; in gsc_m2m_g_selection()
536 cr.c.height, ctx->d_frame.crop.width, in gsc_m2m_s_selection()
537 ctx->d_frame.crop.height, in gsc_m2m_s_selection()
541 ctx->s_frame.crop.width, in gsc_m2m_s_selection()
542 ctx->s_frame.crop.height, cr.c.width, in gsc_m2m_s_selection()
553 frame->crop = cr.c; in gsc_m2m_s_selection()
Dgsc-core.h203 struct v4l2_rect crop; member
/linux-4.4.14/drivers/media/v4l2-core/
Dv4l2-subdev.c142 static int check_crop(struct v4l2_subdev *sd, struct v4l2_subdev_crop *crop) in check_crop() argument
144 if (crop->which != V4L2_SUBDEV_FORMAT_TRY && in check_crop()
145 crop->which != V4L2_SUBDEV_FORMAT_ACTIVE) in check_crop()
148 if (crop->pad >= sd->entity.num_pads) in check_crop()
278 struct v4l2_subdev_crop *crop = arg; in subdev_do_ioctl() local
281 rval = check_crop(sd, crop); in subdev_do_ioctl()
286 sel.which = crop->which; in subdev_do_ioctl()
287 sel.pad = crop->pad; in subdev_do_ioctl()
293 crop->rect = sel.r; in subdev_do_ioctl()
299 struct v4l2_subdev_crop *crop = arg; in subdev_do_ioctl() local
[all …]
/linux-4.4.14/drivers/media/i2c/
Dmt9m032.c163 struct v4l2_rect crop; member
196 struct v4l2_rect *crop = &sensor->crop; in mt9m032_update_timing() local
204 row_time = mt9m032_row_time(sensor, crop->width); in mt9m032_update_timing()
208 - crop->height; in mt9m032_update_timing()
214 div_u64((crop->height + MT9M032_VBLANK_MAX) * in mt9m032_update_timing()
219 - crop->height; in mt9m032_update_timing()
234 sensor->crop.width - 1); in mt9m032_update_geom_timing()
237 sensor->crop.height - 1); in mt9m032_update_geom_timing()
240 sensor->crop.left); in mt9m032_update_geom_timing()
243 sensor->crop.top); in mt9m032_update_geom_timing()
[all …]
Dmt9t001.c129 struct v4l2_rect crop; member
268 return &mt9t001->crop; in __mt9t001_get_pad_crop()
281 struct v4l2_rect *crop = &mt9t001->crop; in mt9t001_s_stream() local
298 hratio = DIV_ROUND_CLOSEST(crop->width, format->width); in mt9t001_s_stream()
299 vratio = DIV_ROUND_CLOSEST(crop->height, format->height); in mt9t001_s_stream()
309 ret = mt9t001_write(client, MT9T001_COLUMN_START, crop->left); in mt9t001_s_stream()
313 ret = mt9t001_write(client, MT9T001_ROW_START, crop->top); in mt9t001_s_stream()
317 ret = mt9t001_write(client, MT9T001_WINDOW_WIDTH, crop->width - 1); in mt9t001_s_stream()
321 ret = mt9t001_write(client, MT9T001_WINDOW_HEIGHT, crop->height - 1); in mt9t001_s_stream()
791 struct v4l2_rect *crop; in mt9t001_open() local
[all …]
Dmt9v032.c239 struct v4l2_rect crop; member
296 struct v4l2_rect *crop = &mt9v032->crop; in mt9v032_update_hblank() local
302 min_hblank = max_t(int, mt9v032->model->data->min_row_time - crop->width, in mt9v032_update_hblank()
398 return &mt9v032->crop; in __mt9v032_get_pad_crop()
410 struct v4l2_rect *crop = &mt9v032->crop; in mt9v032_s_stream() local
429 ret = regmap_write(map, MT9V032_COLUMN_START, crop->left); in mt9v032_s_stream()
433 ret = regmap_write(map, MT9V032_ROW_START, crop->top); in mt9v032_s_stream()
437 ret = regmap_write(map, MT9V032_WINDOW_WIDTH, crop->width); in mt9v032_s_stream()
441 ret = regmap_write(map, MT9V032_WINDOW_HEIGHT, crop->height); in mt9v032_s_stream()
814 struct v4l2_rect *crop; in mt9v032_open() local
[all …]
Dmt9p031.c125 struct v4l2_rect crop; /* Sensor window */ member
387 const struct v4l2_rect *crop = &mt9p031->crop; in mt9p031_set_params() local
402 ret = mt9p031_write(client, MT9P031_COLUMN_START, crop->left); in mt9p031_set_params()
405 ret = mt9p031_write(client, MT9P031_ROW_START, crop->top); in mt9p031_set_params()
408 ret = mt9p031_write(client, MT9P031_WINDOW_WIDTH, crop->width - 1); in mt9p031_set_params()
411 ret = mt9p031_write(client, MT9P031_WINDOW_HEIGHT, crop->height - 1); in mt9p031_set_params()
418 xskip = DIV_ROUND_CLOSEST(crop->width, format->width); in mt9p031_set_params()
419 yskip = DIV_ROUND_CLOSEST(crop->height, format->height); in mt9p031_set_params()
529 return &mt9p031->crop; in __mt9p031_get_pad_crop()
947 struct v4l2_rect *crop; in mt9p031_open() local
[all …]
Ds5k6aa.c1117 struct v4l2_rect *crop; in s5k6aa_set_fmt() local
1125 crop = v4l2_subdev_get_try_crop(sd, cfg, 0); in s5k6aa_set_fmt()
1131 crop = &s5k6aa->ccd_rect; in s5k6aa_set_fmt()
1147 crop->width = clamp_t(unsigned int, crop->width, mf->width, in s5k6aa_set_fmt()
1149 crop->height = clamp_t(unsigned int, crop->height, mf->height, in s5k6aa_set_fmt()
1151 crop->left = clamp_t(unsigned int, crop->left, 0, in s5k6aa_set_fmt()
1152 S5K6AA_WIN_WIDTH_MAX - crop->width); in s5k6aa_set_fmt()
1153 crop->top = clamp_t(unsigned int, crop->top, 0, in s5k6aa_set_fmt()
1154 S5K6AA_WIN_HEIGHT_MAX - crop->height); in s5k6aa_set_fmt()
1428 struct v4l2_rect *crop = v4l2_subdev_get_try_crop(sd, fh->pad, 0); in s5k6aa_open() local
[all …]
/linux-4.4.14/drivers/media/pci/bt8xx/
Dbttv-risc.c362 geo->crop = ((width>>8)&0x03) | ((geo->hdelay>>6)&0x0c) | in bttv_calc_geo_old()
386 const struct v4l2_rect * crop) in bttv_calc_geo() argument
392 if ((crop->left == tvnorm->cropcap.defrect.left in bttv_calc_geo()
393 && crop->top == tvnorm->cropcap.defrect.top in bttv_calc_geo()
394 && crop->width == tvnorm->cropcap.defrect.width in bttv_calc_geo()
395 && crop->height == tvnorm->cropcap.defrect.height in bttv_calc_geo()
405 c_width = min((unsigned int) crop->width, width * 16); in bttv_calc_geo()
406 c_height = min((unsigned int) crop->height, height * 16); in bttv_calc_geo()
411 geo->hdelay = ((crop->left * width + c_width) / c_width) & ~1; in bttv_calc_geo()
414 geo->vdelay = crop->top - tvnorm->cropcap.bounds.top + MIN_VDELAY; in bttv_calc_geo()
[all …]
Dbttv-driver.c704 __s32 top = btv->crop[!!fh->do_crop].rect.top; in check_alloc_btres_lock()
755 u8 crop; in disclaim_video_lines() local
765 crop = btread(BT848_E_CROP) | 0xc0; in disclaim_video_lines()
766 btwrite(crop, BT848_E_CROP); in disclaim_video_lines()
768 btwrite(crop, BT848_O_CROP); in disclaim_video_lines()
1159 bttv_crop_reset(&btv->crop[0], norm); in set_tvnorm()
1160 btv->crop[1] = btv->crop[0]; /* current = default */ in set_tvnorm()
1595 c = btv->crop[!!fh->do_crop]; in bttv_prepare_buffer()
1627 buf->crop.top != c.rect.top || in bttv_prepare_buffer()
1628 buf->crop.left != c.rect.left || in bttv_prepare_buffer()
[all …]
Dbttvp.h151 u8 vtc,crop,comb; member
168 struct v4l2_rect crop; member
497 struct bttv_crop crop[2]; member
/linux-4.4.14/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)
Dvivid.txt29 - Supports crop/compose/scale in any combination for both input and output
181 ccs_cap_mode: specify the allowed video capture crop/compose/scaling combination
190 bit 0: Enable crop support. Cropping will take only part of the
204 ccs_out_mode: specify the allowed video output crop/compose/scaling combination
213 bit 0: Enable crop support. Cropping will take only part of the
242 controls that select crop, compose and scale behavior are also
244 will default to enabling crop, compose and scaling.
674 Enable Capture Cropping: enables crop support. This control is only present if
704 Enable Output Cropping: enables crop support. This control is only present if
988 If the combination of crop, compose and scaling allows it, then it is possible
[all …]
Dfimc.txt113 the sub-devices (format, crop), to avoid resetting the subdevs' configuration
/linux-4.4.14/drivers/media/platform/vivid/
Dvivid-vid-out.c443 struct v4l2_rect *crop = &dev->crop_out; in vivid_s_fmt_vid_out() local
480 rect_map_inside(crop, &r); in vivid_s_fmt_vid_out()
482 *crop = r; in vivid_s_fmt_vid_out()
501 crop->width / MAX_ZOOM, in vivid_s_fmt_vid_out()
502 factor * crop->height / MAX_ZOOM in vivid_s_fmt_vid_out()
506 crop->width * MAX_ZOOM, in vivid_s_fmt_vid_out()
507 factor * crop->height * MAX_ZOOM in vivid_s_fmt_vid_out()
515 rect_set_size_to(crop, &r); in vivid_s_fmt_vid_out()
520 rect_map_inside(crop, &r); in vivid_s_fmt_vid_out()
527 crop->top *= factor; in vivid_s_fmt_vid_out()
[all …]
Dvivid-tpg.c102 tpg->crop.width = tpg->compose.width = w; in tpg_init()
103 tpg->crop.height = tpg->compose.height = h; in tpg_init()
389 void tpg_s_crop_compose(struct tpg_data *tpg, const struct v4l2_rect *crop, in tpg_s_crop_compose() argument
392 tpg->crop = *crop; in tpg_s_crop_compose()
395 tpg->crop.width - 1) / tpg->crop.width; in tpg_s_crop_compose()
416 tpg->crop.top = tpg->crop.left = 0; in tpg_reset_source()
417 tpg->crop.width = width; in tpg_reset_source()
418 tpg->crop.height = height; in tpg_reset_source()
1751 return tpg->crop.top + src_y * 2; in tpg_calc_frameline()
1753 return tpg->crop.top + src_y * 2 + 1; in tpg_calc_frameline()
[all …]
Dvivid-vid-cap.c642 struct v4l2_rect *crop = &dev->crop_cap; in vivid_s_fmt_vid_cap() local
690 rect_set_min_size(crop, &min_r); in vivid_s_fmt_vid_cap()
691 rect_set_max_size(crop, &max_r); in vivid_s_fmt_vid_cap()
692 rect_map_inside(crop, &dev->crop_bounds_cap); in vivid_s_fmt_vid_cap()
705 rect_set_min_size(crop, &min_r); in vivid_s_fmt_vid_cap()
706 rect_set_max_size(crop, &max_r); in vivid_s_fmt_vid_cap()
707 rect_map_inside(crop, &dev->crop_bounds_cap); in vivid_s_fmt_vid_cap()
711 rect_set_size_to(crop, &r); in vivid_s_fmt_vid_cap()
712 rect_map_inside(crop, &dev->crop_bounds_cap); in vivid_s_fmt_vid_cap()
713 r = *crop; in vivid_s_fmt_vid_cap()
[all …]
Dvivid-tpg.h106 struct v4l2_rect crop; member
214 void tpg_s_crop_compose(struct tpg_data *tpg, const struct v4l2_rect *crop,
/linux-4.4.14/drivers/media/platform/s3c-camif/
Dcamif-capture.c734 struct v4l2_rect *crop = &camif->camif_crop; in __camif_video_try_format() local
750 pix->width, pix->height, crop->width, crop->height, in __camif_video_try_format()
756 sc_hrmax = min(SCALER_MAX_RATIO, 1 << (ffs(crop->width) - 3)); in __camif_video_try_format()
757 sc_vrmax = min(SCALER_MAX_RATIO, 1 << (ffs(crop->height) - 1)); in __camif_video_try_format()
759 wmin = max_t(u32, pix_lim->min_out_width, crop->width / sc_hrmax); in __camif_video_try_format()
761 hmin = max_t(u32, 8, crop->height / sc_vrmax); in __camif_video_try_format()
1288 struct v4l2_rect *crop = &camif->camif_crop; in __camif_subdev_try_format() local
1289 v4l_bound_align_image(&mf->width, 8, crop->width, in __camif_subdev_try_format()
1291 &mf->height, 8, crop->height, in __camif_subdev_try_format()
1304 struct v4l2_rect *crop = &camif->camif_crop; in s3c_camif_subdev_set_fmt() local
[all …]
Dcamif-regs.c134 struct v4l2_rect *crop = &camif->camif_crop; in camif_hw_set_camera_crop() local
141 cfg |= (crop->left << 16) | crop->top; in camif_hw_set_camera_crop()
142 if (crop->left != 0 || crop->top != 0) in camif_hw_set_camera_crop()
147 hoff2 = mf->width - crop->width - crop->left; in camif_hw_set_camera_crop()
148 voff2 = mf->height - crop->height - crop->top; in camif_hw_set_camera_crop()
/linux-4.4.14/drivers/media/platform/soc_camera/
Dsoc_scale_crop.c43 struct v4l2_crop crop; in soc_camera_client_g_rect() local
47 crop.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; in soc_camera_client_g_rect()
49 ret = v4l2_subdev_call(sd, video, g_crop, &crop); in soc_camera_client_g_rect()
51 *rect = crop.c; in soc_camera_client_g_rect()
97 struct v4l2_crop *crop, struct v4l2_crop *cam_crop, in soc_camera_client_s_crop() argument
100 struct v4l2_rect *rect = &crop->c, *cam_rect = &cam_crop->c; in soc_camera_client_s_crop()
106 v4l2_subdev_call(sd, video, s_crop, crop); in soc_camera_client_s_crop()
Dsoc_scale_crop.h35 struct v4l2_crop *crop, struct v4l2_crop *cam_crop,
Domap1_camera.c1220 const struct v4l2_crop *crop) in omap1_cam_set_crop() argument
1222 const struct v4l2_rect *rect = &crop->c; in omap1_cam_set_crop()
1234 ret = subdev_call_with_sense(pcdev, dev, icd, sd, video, s_crop, crop); in omap1_cam_set_crop()
/linux-4.4.14/drivers/media/platform/sti/bdisp/
Dbdisp-hw.c337 src_w = ctx->src.crop.width; in bdisp_hw_get_hv_inc()
338 src_h = ctx->src.crop.height; in bdisp_hw_get_hv_inc()
339 dst_w = ctx->dst.crop.width; in bdisp_hw_get_hv_inc()
340 dst_h = ctx->dst.crop.height; in bdisp_hw_get_hv_inc()
470 struct v4l2_rect src_rect = src->crop; in bdisp_hw_build_node()
471 struct v4l2_rect dst_rect = dst->crop; in bdisp_hw_build_node()
473 s32 dst_width = dst->crop.width; in bdisp_hw_build_node()
486 dst_x_offset = (src_x_offset * dst_width) / ctx->src.crop.width; in bdisp_hw_build_node()
488 dst_rect.width = (src_rect.width * dst_width) / ctx->src.crop.width; in bdisp_hw_build_node()
733 if (src_x_offset >= ctx->src.crop.width) in bdisp_hw_build_all_nodes()
Dbdisp-debug.c459 src.crop.width, src.crop.height, in bdisp_dbg_last_request()
460 src.crop.left, src.crop.top, in bdisp_dbg_last_request()
461 dst.crop.width, dst.crop.height, in bdisp_dbg_last_request()
462 dst.crop.left, dst.crop.top); in bdisp_dbg_last_request()
Dbdisp-v4l2.c116 .crop = {0, 0, BDISP_DEF_WIDTH, BDISP_DEF_HEIGHT},
837 frame->crop.width = frame->width; in bdisp_s_fmt()
838 frame->crop.height = frame->height; in bdisp_s_fmt()
839 frame->crop.left = 0; in bdisp_s_fmt()
840 frame->crop.top = 0; in bdisp_s_fmt()
867 s->r = frame->crop; in bdisp_g_selection()
888 s->r = frame->crop; in bdisp_g_selection()
1000 frame->crop = out; in bdisp_s_selection()
Dbdisp.h76 struct v4l2_rect crop; member
/linux-4.4.14/drivers/media/platform/davinci/
Dvpfe_capture.c343 ccdc_dev->hw_ops.set_image_window(&vpfe_dev->crop); in vpfe_config_ccdc_image_format()
407 vpfe_dev->crop.top = 0; in vpfe_config_image_format()
408 vpfe_dev->crop.left = 0; in vpfe_config_image_format()
409 vpfe_dev->crop.width = vpfe_dev->std_info.active_pixels; in vpfe_config_image_format()
410 vpfe_dev->crop.height = vpfe_dev->std_info.active_lines; in vpfe_config_image_format()
411 pix->width = vpfe_dev->crop.width; in vpfe_config_image_format()
412 pix->height = vpfe_dev->crop.height; in vpfe_config_image_format()
1607 struct v4l2_cropcap *crop) in vpfe_cropcap() argument
1616 memset(crop, 0, sizeof(struct v4l2_cropcap)); in vpfe_cropcap()
1617 crop->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; in vpfe_cropcap()
[all …]
Dvpbe_display.c655 const struct v4l2_crop *crop) in vpbe_display_s_crop() argument
662 struct v4l2_rect rect = crop->c; in vpbe_display_s_crop()
668 if (crop->type != V4L2_BUF_TYPE_VIDEO_OUTPUT) { in vpbe_display_s_crop()
723 struct v4l2_crop *crop) in vpbe_display_g_crop() argument
729 struct v4l2_rect *rect = &crop->c; in vpbe_display_g_crop()
735 if (crop->type != V4L2_BUF_TYPE_VIDEO_OUTPUT) { in vpbe_display_g_crop()
/linux-4.4.14/drivers/media/platform/am437x/
Dam437x-vpfe.c1064 vpfe_ccdc_set_image_window(&vpfe->ccdc, &vpfe->crop, vpfe->bpp); in vpfe_config_ccdc_image_format()
1130 vpfe->crop.top = vpfe->crop.left = 0; in vpfe_config_image_format()
1131 vpfe->crop.width = vpfe->std_info.active_pixels; in vpfe_config_image_format()
1132 vpfe->crop.height = vpfe->std_info.active_lines; in vpfe_config_image_format()
1133 pix->width = vpfe->crop.width; in vpfe_config_image_format()
1134 pix->height = vpfe->crop.height; in vpfe_config_image_format()
1148 vpfe->crop.width = pix->width; in vpfe_config_image_format()
1149 vpfe->crop.height = pix->height; in vpfe_config_image_format()
1600 vpfe->crop.width = fmt->fmt.pix.width; in vpfe_s_fmt()
1601 vpfe->crop.height = fmt->fmt.pix.height; in vpfe_s_fmt()
[all …]
Dam437x-vpfe.h264 struct v4l2_rect crop; member
/linux-4.4.14/drivers/media/usb/pvrusb2/
Dpvrusb2-v4l2.c710 static int pvr2_g_crop(struct file *file, void *priv, struct v4l2_crop *crop) in pvr2_g_crop() argument
717 if (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) in pvr2_g_crop()
723 crop->c.left = val; in pvr2_g_crop()
728 crop->c.top = val; in pvr2_g_crop()
733 crop->c.width = val; in pvr2_g_crop()
738 crop->c.height = val; in pvr2_g_crop()
742 static int pvr2_s_crop(struct file *file, void *priv, const struct v4l2_crop *crop) in pvr2_s_crop() argument
748 if (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) in pvr2_s_crop()
752 crop->c.left); in pvr2_s_crop()
757 crop->c.top); in pvr2_s_crop()
[all …]
/linux-4.4.14/drivers/media/i2c/smiapp/
Dsmiapp-core.c313 max = sensor->pixel_array->crop[SMIAPP_PA_PAD_SRC].height in __smiapp_update_exposure_limits()
462 sensor->pixel_array->crop[SMIAPP_PA_PAD_SRC].height in smiapp_set_ctrl()
468 sensor->pixel_array->crop[SMIAPP_PA_PAD_SRC].width in smiapp_set_ctrl()
883 sensor->pixel_array->crop[SMIAPP_PA_PAD_SRC].height); in smiapp_update_blanking()
885 sensor->pixel_array->crop[SMIAPP_PA_PAD_SRC].height; in smiapp_update_blanking()
891 sensor->pixel_array->crop[SMIAPP_PA_PAD_SRC].width, in smiapp_update_blanking()
894 sensor->pixel_array->crop[SMIAPP_PA_PAD_SRC].width; in smiapp_update_blanking()
908 sensor->src->crop[SMIAPP_PAD_SRC].width, in smiapp_update_mode()
909 sensor->src->crop[SMIAPP_PAD_SRC].height); in smiapp_update_mode()
950 ((sensor->pixel_array->crop[SMIAPP_PA_PAD_SRC].width in smiapp_update_mode()
[all …]
Dsmiapp.h167 struct v4l2_rect crop[2]; member
/linux-4.4.14/drivers/media/pci/zoran/
Dzoran_driver.c2397 static int zoran_g_crop(struct file *file, void *__fh, struct v4l2_crop *crop) in zoran_g_crop() argument
2401 int type = crop->type, res = 0; in zoran_g_crop()
2403 memset(crop, 0, sizeof(*crop)); in zoran_g_crop()
2404 crop->type = type; in zoran_g_crop()
2406 if (crop->type != V4L2_BUF_TYPE_VIDEO_OUTPUT && in zoran_g_crop()
2407 (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE || in zoran_g_crop()
2417 crop->c.top = fh->jpg_settings.img_y; in zoran_g_crop()
2418 crop->c.left = fh->jpg_settings.img_x; in zoran_g_crop()
2419 crop->c.width = fh->jpg_settings.img_width; in zoran_g_crop()
2420 crop->c.height = fh->jpg_settings.img_height; in zoran_g_crop()
[all …]
/linux-4.4.14/include/media/davinci/
Dvpfe_capture.h152 struct v4l2_rect crop; member
/linux-4.4.14/drivers/staging/media/davinci_vpfe/
Ddm365_isif.h188 struct v4l2_rect crop; member
Ddm365_isif.c197 struct v4l2_rect *win = &isif->crop; in isif_set_image_window()
244 vpfe_isif->crop.left = 0; in isif_config_format()
245 vpfe_isif->crop.top = 0; in isif_config_format()
246 vpfe_isif->crop.width = format.width; in isif_config_format()
247 vpfe_isif->crop.height = format.height; in isif_config_format()
1574 vpfe_isif->crop = sel->r; in isif_pad_set_selection()
1581 memcpy(rect, &vpfe_isif->crop, sizeof(*rect)); in isif_pad_set_selection()
1611 sel->r = vpfe_isif->crop; in isif_pad_get_selection()
/linux-4.4.14/include/uapi/drm/
Dexynos_drm.h187 __u32 crop; member
/linux-4.4.14/include/media/
Dv4l2-subdev.h404 int (*g_crop)(struct v4l2_subdev *sd, struct v4l2_crop *crop);
405 int (*s_crop)(struct v4l2_subdev *sd, const struct v4l2_crop *crop);
/linux-4.4.14/drivers/media/pci/saa7134/
Dsaa7134-video.c1612 static int saa7134_g_crop(struct file *file, void *f, struct v4l2_crop *crop) in saa7134_g_crop() argument
1616 if (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE && in saa7134_g_crop()
1617 crop->type != V4L2_BUF_TYPE_VIDEO_OVERLAY) in saa7134_g_crop()
1619 crop->c = dev->crop_current; in saa7134_g_crop()
1623 static int saa7134_s_crop(struct file *file, void *f, const struct v4l2_crop *crop) in saa7134_s_crop() argument
1629 if (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE && in saa7134_s_crop()
1630 crop->type != V4L2_BUF_TYPE_VIDEO_OVERLAY) in saa7134_s_crop()
1638 *c = crop->c; in saa7134_s_crop()
/linux-4.4.14/drivers/media/platform/exynos4-is/
Dfimc-m2m.c488 static int fimc_m2m_s_crop(struct file *file, void *fh, const struct v4l2_crop *crop) in fimc_m2m_s_crop() argument
492 struct v4l2_crop cr = *crop; in fimc_m2m_s_crop()
/linux-4.4.14/Documentation/console/
Dconsole.txt138 The current crop of console drivers should still work correctly, but binding
/linux-4.4.14/drivers/gpu/drm/exynos/
Dexynos_drm_gsc.c1358 prop_list->crop = 1; in gsc_init_prop_list()
1436 if ((i == EXYNOS_DRM_OPS_SRC) && (pp->crop)) { in gsc_ippdrv_check_property()
Dexynos_drm_rotator.c482 prop_list->crop = 0; in rotator_init_prop_list()
Dexynos_drm_fimc.c1258 prop_list->crop = 1; in fimc_init_prop_list()
1336 if ((i == EXYNOS_DRM_OPS_SRC) && (pp->crop)) { in fimc_ippdrv_check_property()
/linux-4.4.14/drivers/media/usb/gspca/
Dov519.c4120 int qvga, crop; in set_ov_sensor_window() local
4140 crop = gspca_dev->cam.cam_mode[gspca_dev->curr_mode].priv & 2; in set_ov_sensor_window()
4167 if (crop) { in set_ov_sensor_window()
/linux-4.4.14/fs/fuse/
Dfile.c1509 size_t crop = i_size_read(inode); in fuse_flush_writepages() local
1515 fuse_send_writepage(fc, req, crop); in fuse_flush_writepages()
/linux-4.4.14/Documentation/security/
DSmack.txt349 community. There are also some terms from Linux that are likely to crop up: