/linux-4.1.27/drivers/media/platform/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) omap_vout_default_crop() 46 crop->width = (pix->width < fbuf->fmt.width) ? omap_vout_default_crop() 48 crop->height = (pix->height < fbuf->fmt.height) ? omap_vout_default_crop() 50 crop->width &= ~1; omap_vout_default_crop() 51 crop->height &= ~1; omap_vout_default_crop() 52 crop->left = ((pix->width - crop->width) >> 1) & ~1; omap_vout_default_crop() 53 crop->top = ((pix->height - crop->height) >> 1) & ~1; omap_vout_default_crop() 104 * nearest supported configuration. The image cropping window in crop 107 * successful, new_win, vout->win, and crop are updated. 111 int omap_vout_new_window(struct v4l2_rect *crop, omap_vout_new_window() argument 129 if ((crop->height/win->w.height) >= 2) omap_vout_new_window() 130 crop->height = win->w.height * 2; omap_vout_new_window() 132 if ((crop->width/win->w.width) >= 2) omap_vout_new_window() 133 crop->width = win->w.width * 2; omap_vout_new_window() 135 if (crop->width > 768) { omap_vout_new_window() 140 if (crop->height != win->w.height) omap_vout_new_window() 141 crop->width = 768; omap_vout_new_window() 145 if ((crop->height/win->w.height) >= 4) omap_vout_new_window() 146 crop->height = win->w.height * 4; omap_vout_new_window() 148 if ((crop->width/win->w.width) >= 4) omap_vout_new_window() 149 crop->width = win->w.width * 4; omap_vout_new_window() 160 * will also be adjusted to maintain the rescaling ratios. If successful, crop 166 struct v4l2_rect *crop, struct v4l2_window *win, omap_vout_new_crop() 202 * crop width wider than 768 pixels. omap_vout_new_crop() 269 *crop = try_crop; omap_vout_new_crop() 274 /* Given a new format in pix and fbuf, crop and win 275 * structures are initialized to default values. crop 277 * crop window is centered in the image. win is initialized to 278 * the same size as crop and is centered on the display. 282 struct v4l2_framebuffer *fbuf, struct v4l2_rect *crop, omap_vout_new_format() 285 /* crop defines the preview source window in the image capture omap_vout_new_format() 288 omap_vout_default_crop(pix, fbuf, crop); omap_vout_new_format() 291 win->w.width = crop->width; omap_vout_new_format() 292 win->w.height = crop->height; omap_vout_new_format() 43 omap_vout_default_crop(struct v4l2_pix_format *pix, struct v4l2_framebuffer *fbuf, struct v4l2_rect *crop) omap_vout_default_crop() 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) omap_vout_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) omap_vout_new_format() argument
|
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_vout_vrfb.c | 297 struct v4l2_rect *crop = &vout->crop; omap_vout_calculate_vrfb_offset() local 329 ctop = (pix->height - crop->height) - crop->top; omap_vout_calculate_vrfb_offset() 330 cleft = (pix->width - crop->width) - crop->left; omap_vout_calculate_vrfb_offset() 342 temp_ps * cleft + crop->top * temp_ps; omap_vout_calculate_vrfb_offset() 345 cleft + crop->top * temp_ps + (line_length * omap_vout_calculate_vrfb_offset() 346 ((crop->width / (vr_ps)) - 1) * ps); omap_vout_calculate_vrfb_offset() 361 (crop->height - 1) * ps); omap_vout_calculate_vrfb_offset() 370 temp_ps * crop->left + ctop * ps; omap_vout_calculate_vrfb_offset() 373 temp_ps * crop->left + ctop * ps + omap_vout_calculate_vrfb_offset() 374 (line_length * ((crop->width / vr_ps) - 1) * omap_vout_calculate_vrfb_offset() 381 crop->top + (crop->left / vr_ps) * ps; omap_vout_calculate_vrfb_offset() 384 crop->top + (crop->left / vr_ps) * ps + omap_vout_calculate_vrfb_offset() 385 (line_length * (crop->height - 1) * ps); omap_vout_calculate_vrfb_offset() 389 *cropped_offset = (line_length * ps * crop->top) / omap_vout_calculate_vrfb_offset() 390 vr_ps + (crop->left * ps) / vr_ps + omap_vout_calculate_vrfb_offset() 391 ((crop->width / vr_ps) - 1) * ps; omap_vout_calculate_vrfb_offset()
|
H A D | omap_vout.c | 291 struct v4l2_rect *crop = &vout->crop; omap_vout_calculate_offset() local 314 crop->top + crop->left * ps; omap_vout_calculate_offset() 390 cropheight = vout->crop.width; omapvid_setup_overlay() 391 cropwidth = vout->crop.height; omapvid_setup_overlay() 394 cropheight = vout->crop.height; omapvid_setup_overlay() 395 cropwidth = vout->crop.width; omapvid_setup_overlay() 1175 /* set default crop and win */ vidioc_s_fmt_vid_out() 1176 omap_vout_new_format(&vout->pix, &vout->fbuf, &vout->crop, &vout->win); vidioc_s_fmt_vid_out() 1222 ret = omap_vout_new_window(&vout->crop, &vout->win, &vout->fbuf, win); vidioc_s_fmt_vid_overlay() 1280 static int vidioc_g_crop(struct file *file, void *fh, struct v4l2_crop *crop) vidioc_g_crop() argument 1284 if (crop->type != V4L2_BUF_TYPE_VIDEO_OUTPUT) vidioc_g_crop() 1286 crop->c = vout->crop; vidioc_g_crop() 1290 static int vidioc_s_crop(struct file *file, void *fh, const struct v4l2_crop *crop) vidioc_s_crop() argument 1323 if (crop->type == V4L2_BUF_TYPE_VIDEO_OUTPUT) vidioc_s_crop() 1324 ret = omap_vout_new_crop(&vout->pix, &vout->crop, &vout->win, vidioc_s_crop() 1325 &vout->fbuf, &crop->c); vidioc_s_crop() 1908 omap_vout_new_format(pix, &vout->fbuf, &vout->crop, &vout->win); omap_vout_setup_video_data()
|
H A D | omap_voutdef.h | 145 struct v4l2_rect crop; member in struct:omap_vout_device
|
/linux-4.1.27/drivers/media/platform/vsp1/ |
H A D | vsp1_rwpf.c | 82 return &rwpf->crop; vsp1_rwpf_get_crop() 104 struct v4l2_rect *crop; vsp1_rwpf_set_format() local 133 /* Update the sink crop rectangle. */ vsp1_rwpf_set_format() 134 crop = vsp1_rwpf_get_crop(rwpf, cfg, fmt->which); vsp1_rwpf_set_format() 135 crop->left = 0; vsp1_rwpf_set_format() 136 crop->top = 0; vsp1_rwpf_set_format() 137 crop->width = fmt->format.width; vsp1_rwpf_set_format() 138 crop->height = fmt->format.height; vsp1_rwpf_set_format() 186 struct v4l2_rect *crop; vsp1_rwpf_set_selection() local 195 /* Make sure the crop rectangle is entirely contained in the image. The vsp1_rwpf_set_selection() 211 crop = vsp1_rwpf_get_crop(rwpf, cfg, sel->which); vsp1_rwpf_set_selection() 212 *crop = sel->r; vsp1_rwpf_set_selection() 217 format->width = crop->width; vsp1_rwpf_set_selection() 218 format->height = crop->height; vsp1_rwpf_set_selection()
|
H A D | vsp1_rpf.c | 80 const struct v4l2_rect *crop = &rpf->crop; rpf_s_stream() local 92 /* Source size, stride and crop offsets. rpf_s_stream() 94 * The crop offsets correspond to the location of the crop rectangle top rpf_s_stream() 99 (crop->width << VI6_RPF_SRC_BSIZE_BHSIZE_SHIFT) | rpf_s_stream() 100 (crop->height << VI6_RPF_SRC_BSIZE_BVSIZE_SHIFT)); rpf_s_stream() 102 (crop->width << VI6_RPF_SRC_ESIZE_EHSIZE_SHIFT) | rpf_s_stream() 103 (crop->height << VI6_RPF_SRC_ESIZE_EVSIZE_SHIFT)); rpf_s_stream() 105 rpf->offsets[0] = crop->top * format->plane_fmt[0].bytesperline rpf_s_stream() 106 + crop->left * fmtinfo->bpp[0] / 8; rpf_s_stream() 114 rpf->offsets[1] = crop->top * format->plane_fmt[1].bytesperline rpf_s_stream() 115 + crop->left * fmtinfo->bpp[1] / 8; rpf_s_stream()
|
H A D | vsp1_wpf.c | 79 const struct v4l2_rect *crop = &wpf->crop; wpf_s_stream() local 125 (crop->left << VI6_WPF_SZCLIP_OFST_SHIFT) | wpf_s_stream() 126 (crop->width << VI6_WPF_SZCLIP_SIZE_SHIFT)); wpf_s_stream() 128 (crop->top << VI6_WPF_SZCLIP_OFST_SHIFT) | wpf_s_stream() 129 (crop->height << VI6_WPF_SZCLIP_SIZE_SHIFT)); wpf_s_stream()
|
H A D | vsp1_rwpf.h | 39 struct v4l2_rect crop; member in struct:vsp1_rwpf
|
/linux-4.1.27/drivers/media/platform/omap3isp/ |
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
|
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; __resizer_get_crop() 496 * where the input width and height are the resizer input crop rectangle size. 508 clock = div_u64((u64)limit * res->crop.active.height, ofmt->height); omap3isp_resizer_max_rate() 510 *max_rate = div_u64((u64)clock * res->crop.active.width, ofmt->width); omap3isp_resizer_max_rate() 589 requests_per_frame = DIV_ROUND_UP(res->crop.active.width * 2, 256) resizer_adjust_bandwidth() 590 * res->crop.active.height; resizer_adjust_bandwidth() 626 /* This will handle crop settings in stream off state */ resizer_set_inaddr() 772 * compute the input crop rectangle as the last step. 897 /* Center the new crop rectangle. */ resizer_calc_ratios() 926 /* Calculate additional offset for crop */ resizer_set_crop_params() 927 res->crop_offset = (res->crop.active.top * input->width + resizer_set_crop_params() 928 res->crop.active.left) * 2; resizer_set_crop_params() 947 resizer_set_start(res, res->crop.active.left * 2, resizer_set_crop_params() 948 res->crop.active.top); resizer_set_crop_params() 955 resizer_set_input_size(res, res->crop.active.width, resizer_set_crop_params() 956 res->crop.active.height); resizer_set_crop_params() 1182 * resizer_try_crop - mangles crop parameters. 1186 struct v4l2_rect *crop) resizer_try_crop() 1203 crop->width = clamp_t(u32, crop->width, min_width, max_width); resizer_try_crop() 1204 crop->height = clamp_t(u32, crop->height, min_height, max_height); resizer_try_crop() 1207 crop->left = clamp_t(u32, crop->left, 0, sink->width - MIN_IN_WIDTH); resizer_try_crop() 1208 crop->width = clamp_t(u32, crop->width, MIN_IN_WIDTH, resizer_try_crop() 1209 sink->width - crop->left); resizer_try_crop() 1210 crop->top = clamp_t(u32, crop->top, 0, sink->height - MIN_IN_HEIGHT); resizer_try_crop() 1211 crop->height = clamp_t(u32, crop->height, MIN_IN_HEIGHT, resizer_try_crop() 1212 sink->height - crop->top); resizer_try_crop() 1221 * The only supported rectangles are the crop rectangles on the sink pad. 1271 * The only supported rectangle is the actual crop rectangle on the sink pad. 1304 /* Clamp the crop rectangle to the bounds, and then mangle it further to resizer_set_selection() 1307 * application sets the output format, the current crop rectangle is resizer_set_selection() 1308 * mangled during crop rectangle computation, which would lead to a new, resizer_set_selection() 1309 * smaller input crop rectangle every time the output size is set if we resizer_set_selection() 1328 /* Update the source format, resizing ratios and crop rectangle. If resizer_set_selection() 1338 res->crop.active = sel->r; resizer_set_selection() 1383 struct v4l2_rect crop; resizer_try_format() local 1401 crop = *__resizer_get_crop(res, cfg, which); resizer_try_format() 1402 resizer_calc_ratios(res, &crop, fmt, &ratio); resizer_try_format() 1504 struct v4l2_rect *crop; resizer_set_format() local 1514 /* reset crop rectangle */ resizer_set_format() 1515 crop = __resizer_get_crop(res, cfg, fmt->which); resizer_set_format() 1516 crop->left = 0; resizer_set_format() 1517 crop->top = 0; resizer_set_format() 1518 crop->width = fmt->format.width; resizer_set_format() 1519 crop->height = fmt->format.height; resizer_set_format() 1530 /* Compute and store the active crop rectangle and resizer resizer_set_format() 1534 res->crop.active = res->crop.request; resizer_set_format() 1535 resizer_calc_ratios(res, &res->crop.active, format, resizer_set_format() 1184 resizer_try_crop(const struct v4l2_mbus_framefmt *sink, const struct v4l2_mbus_framefmt *source, struct v4l2_rect *crop) resizer_try_crop() argument
|
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 1073 unsigned int sph = prev->crop.left; preview_config_input_size() 1074 unsigned int eph = prev->crop.left + prev->crop.width - 1; preview_config_input_size() 1075 unsigned int slv = prev->crop.top; preview_config_input_size() 1076 unsigned int elv = prev->crop.top + prev->crop.height - 1; preview_config_input_size() 1705 return &prev->crop; __preview_get_crop() 1736 * engine limits and the format and crop rectangles on other pads. 1744 struct v4l2_rect *crop; preview_try_format() local 1795 * is not supported yet, hardcode the output size to the crop preview_try_format() 1798 crop = __preview_get_crop(prev, cfg, which); preview_try_format() 1799 fmt->width = crop->width; preview_try_format() 1800 fmt->height = crop->height; preview_try_format() 1810 * preview_try_crop - Validate a crop rectangle 1813 * @crop: crop rectangle to be validated 1816 * depending on which filters are enabled. Enforce minimum crop margins to 1823 struct v4l2_rect *crop) preview_try_crop() 1853 crop->left &= ~1; preview_try_crop() 1854 crop->top &= ~1; preview_try_crop() 1856 crop->left = clamp_t(u32, crop->left, left, right - PREV_MIN_OUT_WIDTH); preview_try_crop() 1857 crop->top = clamp_t(u32, crop->top, top, bottom - PREV_MIN_OUT_HEIGHT); preview_try_crop() 1858 crop->width = clamp_t(u32, crop->width, PREV_MIN_OUT_WIDTH, preview_try_crop() 1859 right - crop->left); preview_try_crop() 1860 crop->height = clamp_t(u32, crop->height, PREV_MIN_OUT_HEIGHT, preview_try_crop() 1861 bottom - crop->top); preview_try_crop() 1931 * The only supported rectangles are the crop rectangles on the sink pad. 1974 * The only supported rectangle is the actual crop rectangle on the sink pad. 1989 /* The crop rectangle can't be changed while streaming. */ preview_set_selection() 1993 /* Modifying the crop rectangle always changes the format on the source preview_set_selection() 1994 * pad. If the KEEP_CONFIG flag is set, just return the current crop preview_set_selection() 2046 struct v4l2_rect *crop; preview_set_format() local 2057 /* Reset the crop rectangle. */ preview_set_format() 2058 crop = __preview_get_crop(prev, cfg, fmt->which); preview_set_format() 2059 crop->left = 0; preview_set_format() 2060 crop->top = 0; preview_set_format() 2061 crop->width = fmt->format.width; preview_set_format() 2062 crop->height = fmt->format.height; preview_set_format() 2064 preview_try_crop(prev, &fmt->format, crop); preview_set_format() 1821 preview_try_crop(struct isp_prev_device *prev, const struct v4l2_mbus_framefmt *sink, struct v4l2_rect *crop) preview_try_crop() argument
|
H A D | ispccdc.h | 106 * @crop: Active crop rectangle on the OF source pad 134 struct v4l2_rect crop; member in struct:isp_ccdc_device
|
H A D | isppreview.h | 110 * @crop: Active crop rectangle 127 struct v4l2_rect crop; member in struct:isp_prev_device
|
H A D | ispccdc.c | 1121 const struct v4l2_rect *crop; ccdc_configure() local 1230 crop = &ccdc->crop; ccdc_configure() 1238 sph = crop->left * 2; ccdc_configure() 1239 nph = crop->width * 2 - 1; ccdc_configure() 1241 sph = crop->left; ccdc_configure() 1242 nph = crop->width - 1; ccdc_configure() 1248 isp_reg_writel(isp, (crop->top << ISPCCDC_VERT_START_SLV0_SHIFT) | ccdc_configure() 1249 (crop->top << ISPCCDC_VERT_START_SLV1_SHIFT), ccdc_configure() 1251 isp_reg_writel(isp, (crop->height - 1) ccdc_configure() 1954 return &ccdc->crop; __ccdc_get_crop() 1973 struct v4l2_rect *crop; ccdc_try_format() local 2025 /* Hardcode the output size to the crop rectangle size. */ ccdc_try_format() 2026 crop = __ccdc_get_crop(ccdc, cfg, which); ccdc_try_format() 2027 fmt->width = crop->width; ccdc_try_format() 2028 fmt->height = crop->height; ccdc_try_format() 2070 * ccdc_try_crop - Validate a crop rectangle 2073 * @crop: crop rectangle to be validated 2077 struct v4l2_rect *crop) ccdc_try_crop() 2087 crop->left &= ~1; ccdc_try_crop() 2088 crop->top &= ~1; ccdc_try_crop() 2091 crop->left = clamp_t(u32, crop->left, 0, sink->width - CCDC_MIN_WIDTH); ccdc_try_crop() 2092 crop->top = clamp_t(u32, crop->top, 0, sink->height - CCDC_MIN_HEIGHT); ccdc_try_crop() 2099 max_width = (sink->width - crop->left + 15) & ~15; ccdc_try_crop() 2100 crop->width = clamp_t(u32, crop->width, CCDC_MIN_WIDTH, max_width) ccdc_try_crop() 2102 crop->height = clamp_t(u32, crop->height, CCDC_MIN_HEIGHT, ccdc_try_crop() 2103 sink->height - crop->top); ccdc_try_crop() 2107 crop->width &= ~1; ccdc_try_crop() 2108 crop->height &= ~1; ccdc_try_crop() 2221 * The only supported rectangles are the crop rectangles on the output formatter 2263 * The only supported rectangle is the actual crop rectangle on the output 2278 /* The crop rectangle can't be changed while streaming. */ ccdc_set_selection() 2282 /* Modifying the crop rectangle always changes the format on the source ccdc_set_selection() 2283 * pad. If the KEEP_CONFIG flag is set, just return the current crop ccdc_set_selection() 2339 struct v4l2_rect *crop; ccdc_set_format() local 2350 /* Reset the crop rectangle. */ ccdc_set_format() 2351 crop = __ccdc_get_crop(ccdc, cfg, fmt->which); ccdc_set_format() 2352 crop->left = 0; ccdc_set_format() 2353 crop->top = 0; ccdc_set_format() 2354 crop->width = fmt->format.width; ccdc_set_format() 2355 crop->height = fmt->format.height; ccdc_set_format() 2357 ccdc_try_crop(ccdc, &fmt->format, crop); ccdc_set_format() 2075 ccdc_try_crop(struct isp_ccdc_device *ccdc, const struct v4l2_mbus_framefmt *sink, struct v4l2_rect *crop) ccdc_try_crop() argument
|
H A D | ispvideo.c | 733 isp_video_get_crop(struct file *file, void *fh, struct v4l2_crop *crop) isp_video_get_crop() argument 745 /* Try the get crop operation first and fallback to get format if not isp_video_get_crop() 748 ret = v4l2_subdev_call(subdev, video, g_crop, crop); isp_video_get_crop() 758 crop->c.left = 0; isp_video_get_crop() 759 crop->c.top = 0; isp_video_get_crop() 760 crop->c.width = format.format.width; isp_video_get_crop() 761 crop->c.height = format.format.height; isp_video_get_crop() 767 isp_video_set_crop(struct file *file, void *fh, const struct v4l2_crop *crop) isp_video_set_crop() argument 778 ret = v4l2_subdev_call(subdev, video, s_crop, crop); isp_video_set_crop()
|
H A D | ispvideo.h | 156 struct mutex mutex; /* format and crop settings */
|
/linux-4.1.27/drivers/media/i2c/ |
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; mt9m032_update_timing() local 204 row_time = mt9m032_row_time(sensor, crop->width); mt9m032_update_timing() 208 - crop->height; mt9m032_update_timing() 214 div_u64((crop->height + MT9M032_VBLANK_MAX) * mt9m032_update_timing() 219 - crop->height; mt9m032_update_timing() 234 sensor->crop.width - 1); mt9m032_update_geom_timing() 237 sensor->crop.height - 1); mt9m032_update_geom_timing() 240 sensor->crop.left); mt9m032_update_geom_timing() 243 sensor->crop.top); mt9m032_update_geom_timing() 346 * __mt9m032_get_pad_crop() - get crop rect 348 * @cfg: v4l2_subdev_pad_config for getting the try crop rect from 349 * @which: select try or active crop rect 351 * Returns a pointer the current active or fh relative try crop rect 361 return &sensor->crop; __mt9m032_get_pad_crop() 461 /* Clamp the crop rectangle boundaries and align them to a multiple of 2 mt9m032_set_pad_selection() 481 /* Reset the output image size if the crop rectangle size has mt9m032_set_pad_selection() 761 sensor->crop.left = MT9M032_COLUMN_START_DEF; mt9m032_probe() 762 sensor->crop.top = MT9M032_ROW_START_DEF; mt9m032_probe() 763 sensor->crop.width = MT9M032_COLUMN_SIZE_DEF; mt9m032_probe() 764 sensor->crop.height = MT9M032_ROW_SIZE_DEF; mt9m032_probe() 766 sensor->format.width = sensor->crop.width; mt9m032_probe() 767 sensor->format.height = sensor->crop.height; mt9m032_probe()
|
H A D | mt9t001.c | 129 struct v4l2_rect crop; member in struct:mt9t001 268 return &mt9t001->crop; __mt9t001_get_pad_crop() 281 struct v4l2_rect *crop = &mt9t001->crop; mt9t001_s_stream() local 298 hratio = DIV_ROUND_CLOSEST(crop->width, format->width); mt9t001_s_stream() 299 vratio = DIV_ROUND_CLOSEST(crop->height, format->height); mt9t001_s_stream() 309 ret = mt9t001_write(client, MT9T001_COLUMN_START, crop->left); mt9t001_s_stream() 313 ret = mt9t001_write(client, MT9T001_ROW_START, crop->top); mt9t001_s_stream() 317 ret = mt9t001_write(client, MT9T001_WINDOW_WIDTH, crop->width - 1); mt9t001_s_stream() 321 ret = mt9t001_write(client, MT9T001_WINDOW_HEIGHT, crop->height - 1); mt9t001_s_stream() 429 /* Clamp the crop rectangle boundaries and align them to a multiple of 2 mt9t001_set_selection() 453 /* Reset the output image size if the crop rectangle size has mt9t001_set_selection() 791 struct v4l2_rect *crop; mt9t001_open() local 793 crop = v4l2_subdev_get_try_crop(subdev, fh->pad, 0); mt9t001_open() 794 crop->left = MT9T001_COLUMN_START_DEF; mt9t001_open() 795 crop->top = MT9T001_ROW_START_DEF; mt9t001_open() 796 crop->width = MT9T001_WINDOW_WIDTH_DEF + 1; mt9t001_open() 797 crop->height = MT9T001_WINDOW_HEIGHT_DEF + 1; mt9t001_open() 920 mt9t001->crop.left = MT9T001_COLUMN_START_DEF; mt9t001_probe() 921 mt9t001->crop.top = MT9T001_ROW_START_DEF; mt9t001_probe() 922 mt9t001->crop.width = MT9T001_WINDOW_WIDTH_DEF + 1; mt9t001_probe() 923 mt9t001->crop.height = MT9T001_WINDOW_HEIGHT_DEF + 1; mt9t001_probe()
|
H A D | mt9v032.c | 239 struct v4l2_rect crop; member in struct:mt9v032 296 struct v4l2_rect *crop = &mt9v032->crop; mt9v032_update_hblank() local 302 min_hblank = max_t(int, mt9v032->model->data->min_row_time - crop->width, mt9v032_update_hblank() 398 return &mt9v032->crop; __mt9v032_get_pad_crop() 410 struct v4l2_rect *crop = &mt9v032->crop; mt9v032_s_stream() local 429 ret = regmap_write(map, MT9V032_COLUMN_START, crop->left); mt9v032_s_stream() 433 ret = regmap_write(map, MT9V032_ROW_START, crop->top); mt9v032_s_stream() 437 ret = regmap_write(map, MT9V032_WINDOW_WIDTH, crop->width); mt9v032_s_stream() 441 ret = regmap_write(map, MT9V032_WINDOW_HEIGHT, crop->height); mt9v032_s_stream() 583 /* Clamp the crop rectangle boundaries and align them to a non multiple mt9v032_set_selection() 607 /* Reset the output image size if the crop rectangle size has mt9v032_set_selection() 814 struct v4l2_rect *crop; mt9v032_open() local 816 crop = v4l2_subdev_get_try_crop(subdev, fh->pad, 0); mt9v032_open() 817 crop->left = MT9V032_COLUMN_START_DEF; mt9v032_open() 818 crop->top = MT9V032_ROW_START_DEF; mt9v032_open() 819 crop->width = MT9V032_WINDOW_WIDTH_DEF; mt9v032_open() 820 crop->height = MT9V032_WINDOW_HEIGHT_DEF; mt9v032_open() 1022 mt9v032->crop.left = MT9V032_COLUMN_START_DEF; mt9v032_probe() 1023 mt9v032->crop.top = MT9V032_ROW_START_DEF; mt9v032_probe() 1024 mt9v032->crop.width = MT9V032_WINDOW_WIDTH_DEF; mt9v032_probe() 1025 mt9v032->crop.height = MT9V032_WINDOW_HEIGHT_DEF; mt9v032_probe()
|
H A D | mt9p031.c | 125 struct v4l2_rect crop; /* Sensor window */ member in struct:mt9p031 387 const struct v4l2_rect *crop = &mt9p031->crop; mt9p031_set_params() local 402 ret = mt9p031_write(client, MT9P031_COLUMN_START, crop->left); mt9p031_set_params() 405 ret = mt9p031_write(client, MT9P031_ROW_START, crop->top); mt9p031_set_params() 408 ret = mt9p031_write(client, MT9P031_WINDOW_WIDTH, crop->width - 1); mt9p031_set_params() 411 ret = mt9p031_write(client, MT9P031_WINDOW_HEIGHT, crop->height - 1); mt9p031_set_params() 418 xskip = DIV_ROUND_CLOSEST(crop->width, format->width); mt9p031_set_params() 419 yskip = DIV_ROUND_CLOSEST(crop->height, format->height); mt9p031_set_params() 529 return &mt9p031->crop; __mt9p031_get_pad_crop() 609 /* Clamp the crop rectangle boundaries and align them to a multiple of 2 mt9p031_set_selection() 631 /* Reset the output image size if the crop rectangle size has mt9p031_set_selection() 947 struct v4l2_rect *crop; mt9p031_open() local 949 crop = v4l2_subdev_get_try_crop(subdev, fh->pad, 0); mt9p031_open() 950 crop->left = MT9P031_COLUMN_START_DEF; mt9p031_open() 951 crop->top = MT9P031_ROW_START_DEF; mt9p031_open() 952 crop->width = MT9P031_WINDOW_WIDTH_DEF; mt9p031_open() 953 crop->height = MT9P031_WINDOW_HEIGHT_DEF; mt9p031_open() 1121 mt9p031->crop.width = MT9P031_WINDOW_WIDTH_DEF; mt9p031_probe() 1122 mt9p031->crop.height = MT9P031_WINDOW_HEIGHT_DEF; mt9p031_probe() 1123 mt9p031->crop.left = MT9P031_COLUMN_START_DEF; mt9p031_probe() 1124 mt9p031->crop.top = MT9P031_ROW_START_DEF; mt9p031_probe()
|
H A D | s5k6aa.c | 1117 struct v4l2_rect *crop; s5k6aa_set_fmt() local 1125 crop = v4l2_subdev_get_try_crop(sd, cfg, 0); s5k6aa_set_fmt() 1131 crop = &s5k6aa->ccd_rect; s5k6aa_set_fmt() 1143 * Make sure the crop window is valid, i.e. its size is s5k6aa_set_fmt() 1147 crop->width = clamp_t(unsigned int, crop->width, mf->width, s5k6aa_set_fmt() 1149 crop->height = clamp_t(unsigned int, crop->height, mf->height, s5k6aa_set_fmt() 1151 crop->left = clamp_t(unsigned int, crop->left, 0, s5k6aa_set_fmt() 1152 S5K6AA_WIN_WIDTH_MAX - crop->width); s5k6aa_set_fmt() 1153 crop->top = clamp_t(unsigned int, crop->top, 0, s5k6aa_set_fmt() 1154 S5K6AA_WIN_HEIGHT_MAX - crop->height); s5k6aa_set_fmt() 1181 v4l2_dbg(1, debug, sd, "Current crop rectangle: (%d,%d)/%dx%d\n", s5k6aa_get_selection() 1223 v4l2_dbg(1, debug, sd, "Set crop rectangle: (%d,%d)/%dx%d\n", s5k6aa_set_selection() 1428 struct v4l2_rect *crop = v4l2_subdev_get_try_crop(sd, fh->pad, 0); s5k6aa_open() local 1436 crop->width = S5K6AA_WIN_WIDTH_MAX; s5k6aa_open() 1437 crop->height = S5K6AA_WIN_HEIGHT_MAX; s5k6aa_open() 1438 crop->left = 0; s5k6aa_open() 1439 crop->top = 0; s5k6aa_open()
|
H A D | s5k5baf.c | 887 /* retry crop with frame interval set to max */ s5k5baf_hw_set_crop_rects() 895 "crop error on max frame interval: %d\n", err); s5k5baf_hw_set_crop_rects() 902 v4l2_err(&state->sd, "crop error: %d\n", err); s5k5baf_hw_set_crop_rects()
|
H A D | s5k4ecgx.c | 122 /* Fixed sensor matrix crop rectangle */
|
H A D | ov7670.c | 58 #define COM3_DCWEN 0x04 /* Enable downsamp/crop/window */
|
/linux-4.1.27/drivers/media/platform/soc_camera/ |
H A D | soc_scale_crop.c | 40 /* Get and store current client crop */ soc_camera_client_g_rect() 43 struct v4l2_crop crop; soc_camera_client_g_rect() local 47 crop.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; soc_camera_client_g_rect() 49 ret = v4l2_subdev_call(sd, video, g_crop, &crop); soc_camera_client_g_rect() 51 *rect = crop.c; soc_camera_client_g_rect() 66 /* Client crop has changed, update our sub-rectangle to remain within the area */ update_subrect() 97 struct v4l2_crop *crop, struct v4l2_crop *cam_crop, soc_camera_client_s_crop() 100 struct v4l2_rect *rect = &crop->c, *cam_rect = &cam_crop->c; soc_camera_client_s_crop() 106 v4l2_subdev_call(sd, video, s_crop, crop); soc_camera_client_s_crop() 214 /* Iterative s_mbus_fmt, also updates cached client crop on success */ client_s_fmt() 318 * client crop cache and the imaginary sub-rectangle). soc_camera_client_scale() 341 * 8. Calculate new host crop - apply camera scales to previously soc_camera_client_scale() 342 * updated "effective" crop. soc_camera_client_scale() 355 * client crop. New scales are calculated from the requested output format and 356 * host crop, mapped backed onto the client input (subrect). 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) soc_camera_client_s_crop() argument
|
H A D | soc_scale_crop.h | 35 struct v4l2_crop *crop, struct v4l2_crop *cam_crop,
|
H A D | sh_mobile_ceu_camera.c | 1127 /* We are called with current camera crop, initialise subrect with it */ sh_mobile_ceu_get_formats() 1200 * CEU can scale and crop, but we don't want to waste bandwidth and kill the 1244 /* On success cam_crop contains current camera crop */ sh_mobile_ceu_set_crop() 1326 /* 6. Use CEU cropping to crop to the new window. */ sh_mobile_ceu_set_crop() 1433 /* 9. Prepare CEU crop */ sh_mobile_ceu_set_fmt() 1607 /* Do the crop, if it fails, there's nothing more we can do */ sh_mobile_ceu_set_livecrop() 1610 dev_geo(icd->parent, "Output after crop: %ux%u\n", icd->user_width, icd->user_height); sh_mobile_ceu_set_livecrop()
|
H A D | omap1_camera.c | 1216 const struct v4l2_crop *crop) omap1_cam_set_crop() 1218 const struct v4l2_rect *rect = &crop->c; omap1_cam_set_crop() 1227 ret = subdev_call_with_sense(pcdev, dev, icd, sd, s_crop, crop); omap1_cam_set_crop() 1229 dev_warn(dev, "%s: failed to crop to %ux%u@%u:%u\n", __func__, omap1_cam_set_crop() 1215 omap1_cam_set_crop(struct soc_camera_device *icd, const struct v4l2_crop *crop) omap1_cam_set_crop() argument
|
H A D | rcar_vin.c | 1397 * We are called with current camera crop, rcar_vin_get_formats() 1494 /* On success cam_crop contains current camera crop */ rcar_vin_set_crop() 1514 /* Use VIN cropping to crop to the new window. */ rcar_vin_set_crop() 1638 /* Prepare VIN crop */ rcar_vin_set_fmt()
|
H A D | pxa_camera.c | 1363 dev_warn(dev, "Failed to crop to %ux%u@%u:%u\n", pxa_camera_set_crop()
|
H A D | soc_camera.c | 1062 "S_CROP denied: getting current crop failed\n"); soc_camera_s_crop()
|
/linux-4.1.27/drivers/media/v4l2-core/ |
H A D | v4l2-subdev.c | 142 static int check_crop(struct v4l2_subdev *sd, struct v4l2_subdev_crop *crop) check_crop() argument 144 if (crop->which != V4L2_SUBDEV_FORMAT_TRY && check_crop() 145 crop->which != V4L2_SUBDEV_FORMAT_ACTIVE) check_crop() 148 if (crop->pad >= sd->entity.num_pads) check_crop() 278 struct v4l2_subdev_crop *crop = arg; subdev_do_ioctl() local 281 rval = check_crop(sd, crop); subdev_do_ioctl() 286 sel.which = crop->which; subdev_do_ioctl() 287 sel.pad = crop->pad; subdev_do_ioctl() 293 crop->rect = sel.r; subdev_do_ioctl() 299 struct v4l2_subdev_crop *crop = arg; subdev_do_ioctl() local 302 rval = check_crop(sd, crop); subdev_do_ioctl() 307 sel.which = crop->which; subdev_do_ioctl() 308 sel.pad = crop->pad; subdev_do_ioctl() 310 sel.r = crop->rect; subdev_do_ioctl() 315 crop->rect = sel.r; subdev_do_ioctl()
|
H A D | v4l2-ioctl.c | 1853 /* simulate capture crop using selection api */ v4l_g_crop() 1855 /* crop means compose for output devices */ v4l_g_crop() 1880 /* simulate capture crop using selection api */ v4l_s_crop() 1882 /* crop means compose for output devices */ v4l_s_crop()
|
/linux-4.1.27/drivers/media/platform/exynos-gsc/ |
H A D | gsc-core.c | 233 frame->crop.width = width; gsc_set_frame_size() 234 frame->crop.height = height; gsc_set_frame_size() 235 frame->crop.left = 0; gsc_set_frame_size() 236 frame->crop.top = 0; gsc_set_frame_size() 291 remainder = s_frame->crop.width % (*wratio * walign); gsc_check_src_scale_info() 293 s_frame->crop.width -= remainder; gsc_check_src_scale_info() 294 gsc_cal_prescaler_ratio(var, s_frame->crop.width, tx, wratio); gsc_check_src_scale_info() 296 s_frame->crop.width + remainder, s_frame->crop.width); gsc_check_src_scale_info() 299 remainder = s_frame->crop.height % (*hratio * halign); gsc_check_src_scale_info() 301 s_frame->crop.height -= remainder; gsc_check_src_scale_info() 302 gsc_cal_prescaler_ratio(var, s_frame->crop.height, ty, hratio); gsc_check_src_scale_info() 304 s_frame->crop.height + remainder, s_frame->crop.height); gsc_check_src_scale_info() 514 cr->c = frame->crop; gsc_g_crop() 645 ret = gsc_check_scaler_ratio(variant, s_frame->crop.width, gsc_set_scaler_info() 646 s_frame->crop.height, d_frame->crop.width, d_frame->crop.height, gsc_set_scaler_info() 655 ty = d_frame->crop.width; gsc_set_scaler_info() 656 tx = d_frame->crop.height; gsc_set_scaler_info() 658 tx = d_frame->crop.width; gsc_set_scaler_info() 659 ty = d_frame->crop.height; gsc_set_scaler_info() 667 ret = gsc_cal_prescaler_ratio(variant, s_frame->crop.width, gsc_set_scaler_info() 674 ret = gsc_cal_prescaler_ratio(variant, s_frame->crop.height, gsc_set_scaler_info() 687 sc->main_hratio = (s_frame->crop.width << 16) / tx; gsc_set_scaler_info() 688 sc->main_vratio = (s_frame->crop.height << 16) / ty; gsc_set_scaler_info() 691 s_frame->crop.width, s_frame->crop.height, tx, ty); gsc_set_scaler_info() 722 ctx->s_frame.crop.width, __gsc_s_ctrl() 723 ctx->s_frame.crop.height, __gsc_s_ctrl() 724 ctx->d_frame.crop.width, __gsc_s_ctrl() 725 ctx->d_frame.crop.height, __gsc_s_ctrl()
|
H A D | gsc-regs.c | 131 cfg = GSC_SRCIMG_OFFSET_X(frame->crop.left); gsc_hw_set_in_size() 132 cfg |= GSC_SRCIMG_OFFSET_Y(frame->crop.top); gsc_hw_set_in_size() 141 cfg = GSC_CROPPED_WIDTH(frame->crop.width); gsc_hw_set_in_size() 142 cfg |= GSC_CROPPED_HEIGHT(frame->crop.height); gsc_hw_set_in_size() 245 cfg = GSC_DSTIMG_OFFSET_X(frame->crop.left); gsc_hw_set_out_size() 246 cfg |= GSC_DSTIMG_OFFSET_Y(frame->crop.top); gsc_hw_set_out_size() 257 cfg = GSC_SCALED_WIDTH(frame->crop.height); gsc_hw_set_out_size() 258 cfg |= GSC_SCALED_HEIGHT(frame->crop.width); gsc_hw_set_out_size() 260 cfg = GSC_SCALED_WIDTH(frame->crop.width); gsc_hw_set_out_size() 261 cfg |= GSC_SCALED_HEIGHT(frame->crop.height); gsc_hw_set_out_size()
|
H A D | gsc-m2m.c | 474 s->r.left = frame->crop.left; gsc_m2m_g_selection() 475 s->r.top = frame->crop.top; gsc_m2m_g_selection() 476 s->r.width = frame->crop.width; gsc_m2m_g_selection() 477 s->r.height = frame->crop.height; gsc_m2m_g_selection() 535 cr.c.height, ctx->d_frame.crop.width, gsc_m2m_s_selection() 536 ctx->d_frame.crop.height, gsc_m2m_s_selection() 540 ctx->s_frame.crop.width, gsc_m2m_s_selection() 541 ctx->s_frame.crop.height, cr.c.width, gsc_m2m_s_selection() 552 frame->crop = cr.c; gsc_m2m_s_selection()
|
H A D | gsc-core.h | 193 * @crop: cropped(source)/scaled(destination) size 203 struct v4l2_rect crop; member in struct:gsc_frame 261 * @real_w: minimum input crop pixel width 262 * @real_h: minimum input crop pixel height
|
/linux-4.1.27/drivers/media/platform/s3c-camif/ |
H A D | camif-capture.c | 735 struct v4l2_rect *crop = &camif->camif_crop; __camif_video_try_format() local 750 pr_debug("fmt: %ux%u, crop: %ux%u, bytesperline: %u\n", __camif_video_try_format() 751 pix->width, pix->height, crop->width, crop->height, __camif_video_try_format() 755 * camera input interface crop rectangle and the resizer's capabilities. __camif_video_try_format() 757 sc_hrmax = min(SCALER_MAX_RATIO, 1 << (ffs(crop->width) - 3)); __camif_video_try_format() 758 sc_vrmax = min(SCALER_MAX_RATIO, 1 << (ffs(crop->height) - 1)); __camif_video_try_format() 760 wmin = max_t(u32, pix_lim->min_out_width, crop->width / sc_hrmax); __camif_video_try_format() 762 hmin = max_t(u32, 8, crop->height / sc_vrmax); __camif_video_try_format() 1254 /* crop rectangle at camera interface input */ s3c_camif_subdev_get_fmt() 1289 struct v4l2_rect *crop = &camif->camif_crop; __camif_subdev_try_format() local 1290 v4l_bound_align_image(&mf->width, 8, crop->width, __camif_subdev_try_format() 1292 &mf->height, 8, crop->height, __camif_subdev_try_format() 1305 struct v4l2_rect *crop = &camif->camif_crop; s3c_camif_subdev_set_fmt() local 1337 /* Reset sink crop rectangle. */ s3c_camif_subdev_set_fmt() 1338 crop->width = mf->width; s3c_camif_subdev_set_fmt() 1339 crop->height = mf->height; s3c_camif_subdev_set_fmt() 1340 crop->left = 0; s3c_camif_subdev_set_fmt() 1341 crop->top = 0; s3c_camif_subdev_set_fmt() 1343 * Reset source format (the camif's crop rectangle) s3c_camif_subdev_set_fmt() 1348 frame->rect = *crop; s3c_camif_subdev_set_fmt() 1357 mf->width = crop->width; s3c_camif_subdev_set_fmt() 1358 mf->height = crop->height; s3c_camif_subdev_set_fmt() 1371 struct v4l2_rect *crop = &camif->camif_crop; s3c_camif_subdev_get_selection() local 1387 sel->r = *crop; s3c_camif_subdev_get_selection() 1388 } else { /* crop bounds */ s3c_camif_subdev_get_selection() 1397 v4l2_dbg(1, debug, sd, "%s: crop: (%d,%d) %dx%d, size: %ux%u\n", s3c_camif_subdev_get_selection() 1398 __func__, crop->left, crop->top, crop->width, s3c_camif_subdev_get_selection() 1399 crop->height, mf->width, mf->height); s3c_camif_subdev_get_selection() 1415 * - crop rectangle size and position must be aligned __camif_try_crop() 1432 * width and height. Just return current crop rectangle if __camif_try_crop() 1449 v4l2_dbg(1, debug, &camif->v4l2_dev, "crop: (%d,%d)/%dx%d, fmt: %ux%u\n", __camif_try_crop() 1458 struct v4l2_rect *crop = &camif->camif_crop; s3c_camif_subdev_set_selection() local 1474 *crop = sel->r; s3c_camif_subdev_set_selection() 1490 __func__, crop->left, crop->top, crop->width, crop->height, s3c_camif_subdev_set_selection()
|
H A D | camif-regs.c | 134 struct v4l2_rect *crop = &camif->camif_crop; camif_hw_set_camera_crop() local 141 cfg |= (crop->left << 16) | crop->top; camif_hw_set_camera_crop() 142 if (crop->left != 0 || crop->top != 0) camif_hw_set_camera_crop() 147 hoff2 = mf->width - crop->width - crop->left; camif_hw_set_camera_crop() 148 voff2 = mf->height - crop->height - crop->top; camif_hw_set_camera_crop()
|
H A D | camif-core.h | 118 * @rect: crop/composition rectangle 249 * @camif_crop: camera input interface crop rectangle
|
H A D | camif-core.c | 467 * Set initial pixel format, resolution and crop rectangle. s3c_camif_probe()
|
/linux-4.1.27/drivers/media/pci/bt8xx/ |
H A D | bttv-risc.c | 362 geo->crop = ((width>>8)&0x03) | ((geo->hdelay>>6)&0x0c) | bttv_calc_geo_old() 386 const struct v4l2_rect * crop) bttv_calc_geo() 392 if ((crop->left == tvnorm->cropcap.defrect.left bttv_calc_geo() 393 && crop->top == tvnorm->cropcap.defrect.top bttv_calc_geo() 394 && crop->width == tvnorm->cropcap.defrect.width bttv_calc_geo() 395 && crop->height == tvnorm->cropcap.defrect.height bttv_calc_geo() 405 c_width = min((unsigned int) crop->width, width * 16); bttv_calc_geo() 406 c_height = min((unsigned int) crop->height, height * 16); bttv_calc_geo() 411 geo->hdelay = ((crop->left * width + c_width) / c_width) & ~1; bttv_calc_geo() 414 geo->vdelay = crop->top - tvnorm->cropcap.bounds.top + MIN_VDELAY; bttv_calc_geo() 421 geo->crop = (((geo->width >> 8) & 0x03) | bttv_calc_geo() 454 btwrite(geo->crop, BT848_E_CROP+off); bttv_apply_geo() 609 unsigned int crop, vdelay; bttv_buffer_activate_vbi() local 615 crop = btread(BT848_E_CROP); bttv_buffer_activate_vbi() 616 vdelay = btread(BT848_E_VDELAY_LO) + ((crop & 0xc0) << 2); bttv_buffer_activate_vbi() 620 crop = (crop & 0x3f) | ((vbi->geo.vdelay >> 2) & 0xc0); bttv_buffer_activate_vbi() 623 btwrite(crop, BT848_E_CROP); bttv_buffer_activate_vbi() 625 btwrite(crop, BT848_O_CROP); bttv_buffer_activate_vbi() 723 tvnorm,&buf->crop); bttv_buffer_risc() 777 tvnorm,&buf->crop); bttv_buffer_risc() 786 tvnorm,&buf->crop); bttv_buffer_risc() 795 tvnorm,&buf->crop); bttv_buffer_risc() 818 tvnorm,&buf->crop); bttv_buffer_risc() 849 1,tvnorm,&buf->crop); bttv_buffer_risc() 880 &bttv_tvnorms[ov->tvnorm],&buf->crop); bttv_overlay_risc() 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) bttv_calc_geo() argument
|
H A D | bttv-driver.c | 703 /* Do crop - use current, don't - use default parameters. */ check_alloc_btres_lock() 704 __s32 top = btv->crop[!!fh->do_crop].rect.top; check_alloc_btres_lock() 710 Claim scan lines crop[].rect.top to bottom. */ check_alloc_btres_lock() 755 u8 crop; disclaim_video_lines() local 765 crop = btread(BT848_E_CROP) | 0xc0; disclaim_video_lines() 766 btwrite(crop, BT848_E_CROP); disclaim_video_lines() 768 btwrite(crop, BT848_O_CROP); disclaim_video_lines() 1159 bttv_crop_reset(&btv->crop[0], norm); set_tvnorm() 1160 btv->crop[1] = btv->crop[0]; /* current = default */ set_tvnorm() 1595 c = btv->crop[!!fh->do_crop]; bttv_prepare_buffer() 1606 /* btv->crop counts frame lines. Max. scale bttv_prepare_buffer() 1627 buf->crop.top != c.rect.top || bttv_prepare_buffer() 1628 buf->crop.left != c.rect.left || bttv_prepare_buffer() 1629 buf->crop.width != c.rect.width || bttv_prepare_buffer() 1630 buf->crop.height != c.rect.height) { bttv_prepare_buffer() 1636 buf->crop = c.rect; bttv_prepare_buffer() 2015 /* Do crop - use current, don't - use default parameters. */ limit_scaled_size_lock() 2016 c = &btv->crop[!!fh->do_crop]; limit_scaled_size_lock() 2026 than crop.rect we adjust the crop.rect as required limit_scaled_size_lock() 2072 /* Move the crop window out of the way. */ limit_scaled_size_lock() 2131 height2 = fh->btv->crop[!!fh->do_crop].rect.height >> 1; verify_window_lock() 2238 new->crop = btv->crop[!!fh->do_crop].rect; setup_window_lock() 2382 height2 = btv->crop[!!fh->do_crop].rect.height >> 1; bttv_try_fmt_vid_cap() 2629 new->crop = btv->crop[!!fh->do_crop].rect; bttv_overlay() 2701 new->crop = btv->crop[!!fh->do_crop].rect; bttv_s_fbuf() 2824 static int bttv_g_crop(struct file *file, void *f, struct v4l2_crop *crop) bttv_g_crop() argument 2829 if (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE && bttv_g_crop() 2830 crop->type != V4L2_BUF_TYPE_VIDEO_OVERLAY) bttv_g_crop() 2833 /* No fh->do_crop = 1; because btv->crop[1] may be bttv_g_crop() 2837 crop->c = btv->crop[!!fh->do_crop].rect; bttv_g_crop() 2842 static int bttv_s_crop(struct file *file, void *f, const struct v4l2_crop *crop) bttv_s_crop() argument 2854 if (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE && bttv_s_crop() 2855 crop->type != V4L2_BUF_TYPE_VIDEO_OVERLAY) bttv_s_crop() 2879 c.rect.left = clamp_t(s32, crop->c.left, b_left, b_right - 48); bttv_s_crop() 2882 c.rect.width = clamp_t(s32, crop->c.width, bttv_s_crop() 2885 c.rect.top = clamp_t(s32, crop->c.top, b_top, b_bottom - 32); bttv_s_crop() 2889 c.rect.height = clamp_t(s32, crop->c.height, bttv_s_crop() 2895 btv->crop[1] = c; bttv_s_crop() 3059 which only change on request. These are stored in btv->crop[1]. bttv_open() 3063 will use btv->crop[0], the default cropping parameters for the bttv_open() 4220 bttv_crop_reset(&btv->crop[0], btv->tvnorm); bttv_probe() 4221 btv->crop[1] = btv->crop[0]; /* current = default */ bttv_probe()
|
H A D | bttvp.h | 151 u8 vtc,crop,comb; member in struct:bttv_geometry 168 struct v4l2_rect crop; member in struct:bttv_buffer 207 /* Scaled image size limits with this crop rect. Divide 497 struct bttv_crop crop[2]; member in struct:bttv 504 /* Latest possible end of VBI capturing (= crop[x].rect.top when
|
/linux-4.1.27/drivers/media/platform/vivid/ |
H A D | vivid-vid-out.c | 436 struct v4l2_rect *crop = &dev->crop_out; vivid_s_fmt_vid_out() local 473 rect_map_inside(crop, &r); vivid_s_fmt_vid_out() 475 *crop = r; vivid_s_fmt_vid_out() 494 crop->width / MAX_ZOOM, vivid_s_fmt_vid_out() 495 factor * crop->height / MAX_ZOOM vivid_s_fmt_vid_out() 499 crop->width * MAX_ZOOM, vivid_s_fmt_vid_out() 500 factor * crop->height * MAX_ZOOM vivid_s_fmt_vid_out() 508 rect_set_size_to(crop, &r); vivid_s_fmt_vid_out() 513 rect_map_inside(crop, &r); vivid_s_fmt_vid_out() 520 crop->top *= factor; vivid_s_fmt_vid_out() 521 crop->height *= factor; vivid_s_fmt_vid_out() 522 rect_set_size_to(crop, compose); vivid_s_fmt_vid_out() 523 rect_map_inside(crop, &r); vivid_s_fmt_vid_out() 524 crop->top /= factor; vivid_s_fmt_vid_out() 525 crop->height /= factor; vivid_s_fmt_vid_out() 530 rect_set_size_to(crop, &r); vivid_s_fmt_vid_out() 665 struct v4l2_rect *crop = &dev->crop_out; vivid_vid_out_s_selection() local 721 *crop = s->r; vivid_vid_out_s_selection() 754 rect_set_min_size(crop, &min_rect); vivid_vid_out_s_selection() 755 rect_set_max_size(crop, &max_rect); vivid_vid_out_s_selection() 766 rect_set_size_to(crop, &s->r); vivid_vid_out_s_selection() 767 rect_map_inside(crop, &dev->fmt_out_rect); vivid_vid_out_s_selection() 773 rect_set_size_to(crop, &s->r); vivid_vid_out_s_selection() 774 crop->height /= factor; vivid_vid_out_s_selection() 775 rect_map_inside(crop, &dev->fmt_out_rect); vivid_vid_out_s_selection()
|
H A D | vivid-tpg.c | 102 tpg->crop.width = tpg->compose.width = w; tpg_init() 103 tpg->crop.height = tpg->compose.height = h; tpg_init() 368 void tpg_s_crop_compose(struct tpg_data *tpg, const struct v4l2_rect *crop, tpg_s_crop_compose() argument 371 tpg->crop = *crop; tpg_s_crop_compose() 374 tpg->crop.width - 1) / tpg->crop.width; tpg_s_crop_compose() 395 tpg->crop.top = tpg->crop.left = 0; tpg_reset_source() 396 tpg->crop.width = width; tpg_reset_source() 397 tpg->crop.height = height; tpg_reset_source() 1545 /* Map the line number relative to the crop rectangle to a frame line number */ tpg_calc_frameline() 1551 return tpg->crop.top + src_y * 2; tpg_calc_frameline() 1553 return tpg->crop.top + src_y * 2 + 1; tpg_calc_frameline() 1555 return src_y + tpg->crop.top; tpg_calc_frameline() 1722 params->wss_width = tpg->crop.left < tpg->src_width / 2 ? tpg_fill_params_extras() 1723 tpg->src_width / 2 - tpg->crop.left : 0; tpg_fill_params_extras() 1724 if (params->wss_width > tpg->crop.width) tpg_fill_params_extras() 1725 params->wss_width = tpg->crop.width; tpg_fill_params_extras() 1730 if (tpg->crop.left < tpg->border.left) { tpg_fill_params_extras() 1731 left_pillar_width = tpg->border.left - tpg->crop.left; tpg_fill_params_extras() 1732 if (left_pillar_width > tpg->crop.width) tpg_fill_params_extras() 1733 left_pillar_width = tpg->crop.width; tpg_fill_params_extras() 1738 if (tpg->crop.left + tpg->crop.width > tpg_fill_params_extras() 1741 tpg->border.left + tpg->border.width - tpg->crop.left; tpg_fill_params_extras() 1762 const struct v4l2_rect *c = &tpg->crop; tpg_fill_plane_extras() 1864 unsigned line_offset = tpg_hscale_div(tpg, p, tpg->crop.left); tpg_fill_plane_pattern() 2002 unsigned int_part = (tpg->crop.height / factor) / tpg->compose.height; tpg_fill_plane_buffer() 2003 unsigned fract_part = (tpg->crop.height / factor) % tpg->compose.height; tpg_fill_plane_buffer()
|
H A D | vivid-vid-cap.c | 629 struct v4l2_rect *crop = &dev->crop_cap; vivid_s_fmt_vid_cap() local 677 rect_set_min_size(crop, &min_r); vivid_s_fmt_vid_cap() 678 rect_set_max_size(crop, &max_r); vivid_s_fmt_vid_cap() 679 rect_map_inside(crop, &dev->crop_bounds_cap); vivid_s_fmt_vid_cap() 692 rect_set_min_size(crop, &min_r); vivid_s_fmt_vid_cap() 693 rect_set_max_size(crop, &max_r); vivid_s_fmt_vid_cap() 694 rect_map_inside(crop, &dev->crop_bounds_cap); vivid_s_fmt_vid_cap() 698 rect_set_size_to(crop, &r); vivid_s_fmt_vid_cap() 699 rect_map_inside(crop, &dev->crop_bounds_cap); vivid_s_fmt_vid_cap() 700 r = *crop; vivid_s_fmt_vid_cap() 707 rect_set_max_size(crop, &r); vivid_s_fmt_vid_cap() 708 rect_map_inside(crop, &dev->crop_bounds_cap); vivid_s_fmt_vid_cap() 711 rect_set_size_to(compose, crop); vivid_s_fmt_vid_cap() 731 rect_set_size_to(crop, &r); vivid_s_fmt_vid_cap() 861 struct v4l2_rect *crop = &dev->crop_cap; vivid_vid_cap_s_selection() local 932 *crop = s->r; vivid_vid_cap_s_selection() 962 rect_set_min_size(crop, &min_rect); vivid_vid_cap_s_selection() 963 rect_set_max_size(crop, &max_rect); vivid_vid_cap_s_selection() 964 rect_map_inside(crop, &dev->crop_bounds_cap); vivid_vid_cap_s_selection() 970 rect_set_size_to(crop, &s->r); vivid_vid_cap_s_selection() 971 rect_map_inside(crop, &dev->crop_bounds_cap); vivid_vid_cap_s_selection() 990 tpg_s_crop_compose(&dev->tpg, crop, compose); vivid_vid_cap_s_selection()
|
H A D | vivid-tpg.h | 105 /* crop coordinates are frame-based */ 106 struct v4l2_rect crop; member in struct:tpg_data 207 void tpg_s_crop_compose(struct tpg_data *tpg, const struct v4l2_rect *crop,
|
H A D | vivid-core.c | 94 MODULE_PARM_DESC(ccs_cap_mode, " capture crop/compose/scale mode:\n" 95 "\t\t bit 0=crop, 1=compose, 2=scale,\n" 100 MODULE_PARM_DESC(ccs_out_mode, " output crop/compose/scale mode:\n" 101 "\t\t bit 0=crop, 1=compose, 2=scale,\n" 744 /* can we do crop/compose/scaling while capturing? */ vivid_create_instance() 759 /* can we do crop/compose/scaling with video output? */ vivid_create_instance()
|
/linux-4.1.27/include/uapi/drm/ |
H A D | exynos_drm.h | 170 * @crop: flag of crop supporting. 174 * @crop_min: crop min resolution. 175 * @crop_max: crop max resolution. 187 __u32 crop; member in struct:drm_exynos_ipp_prop_list
|
/linux-4.1.27/drivers/media/platform/davinci/ |
H A D | vpfe_capture.c | 343 ccdc_dev->hw_ops.set_image_window(&vpfe_dev->crop); vpfe_config_ccdc_image_format() 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; vpfe_config_image_format() 405 vpfe_dev->crop.left = 0; vpfe_config_image_format() 406 vpfe_dev->crop.width = vpfe_dev->std_info.active_pixels; vpfe_config_image_format() 407 vpfe_dev->crop.height = vpfe_dev->std_info.active_lines; vpfe_config_image_format() 408 pix->width = vpfe_dev->crop.width; vpfe_config_image_format() 409 pix->height = vpfe_dev->crop.height; vpfe_config_image_format() 1604 struct v4l2_cropcap *crop) vpfe_cropcap() 1613 memset(crop, 0, sizeof(struct v4l2_cropcap)); vpfe_cropcap() 1614 crop->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; vpfe_cropcap() 1615 crop->bounds.width = crop->defrect.width = vpfe_cropcap() 1617 crop->bounds.height = crop->defrect.height = vpfe_cropcap() 1619 crop->pixelaspect = vpfe_standards[vpfe_dev->std_index].pixelaspect; vpfe_cropcap() 1624 struct v4l2_crop *crop) vpfe_g_crop() 1630 crop->c = vpfe_dev->crop; vpfe_g_crop() 1635 const struct v4l2_crop *crop) vpfe_s_crop() 1638 struct v4l2_rect rect = crop->c; vpfe_s_crop() 1646 "Cannot change crop when streaming is ON\n"); vpfe_s_crop() 1681 vpfe_dev->crop = rect; vpfe_s_crop() 1603 vpfe_cropcap(struct file *file, void *priv, struct v4l2_cropcap *crop) vpfe_cropcap() argument 1623 vpfe_g_crop(struct file *file, void *priv, struct v4l2_crop *crop) vpfe_g_crop() argument 1634 vpfe_s_crop(struct file *file, void *priv, const struct v4l2_crop *crop) vpfe_s_crop() argument
|
H A D | vpbe_display.c | 450 * the crop coordinates for cropped or scaled display. if crop vpbe_disp_calculate_scale_factor() 454 * to begin with, set the crop window same as expected. Later we vpbe_disp_calculate_scale_factor() 493 /* no scaling, only cropping. Set display area to crop area */ vpbe_disp_calculate_scale_factor() 524 /* no scaling, only cropping. Set display area to crop area */ vpbe_disp_calculate_scale_factor() 528 "crop display xsize = %d, ysize = %d\n", vpbe_disp_calculate_scale_factor() 654 const struct v4l2_crop *crop) vpbe_display_s_crop() 661 struct v4l2_rect rect = crop->c; vpbe_display_s_crop() 667 if (crop->type != V4L2_BUF_TYPE_VIDEO_OUTPUT) { vpbe_display_s_crop() 722 struct v4l2_crop *crop) vpbe_display_g_crop() 728 struct v4l2_rect *rect = &crop->c; vpbe_display_g_crop() 734 if (crop->type != V4L2_BUF_TYPE_VIDEO_OUTPUT) { vpbe_display_g_crop() 653 vpbe_display_s_crop(struct file *file, void *priv, const struct v4l2_crop *crop) vpbe_display_s_crop() argument 721 vpbe_display_g_crop(struct file *file, void *priv, struct v4l2_crop *crop) vpbe_display_g_crop() argument
|
H A D | vpbe.c | 100 * vpbe_g_cropcap - Get crop capabilities of the display 104 * Update the crop capabilities in crop cap for current
|
/linux-4.1.27/drivers/staging/media/davinci_vpfe/ |
H A D | dm365_isif.h | 74 /* isif crop window */ 188 struct v4l2_rect crop; member in struct:vpfe_isif_device
|
H A D | dm365_isif.c | 197 struct v4l2_rect *win = &isif->crop; isif_set_image_window() 244 vpfe_isif->crop.left = 0; isif_config_format() 245 vpfe_isif->crop.top = 0; isif_config_format() 246 vpfe_isif->crop.width = format.width; isif_config_format() 247 vpfe_isif->crop.height = format.height; isif_config_format() 1538 * isif_pad_set_selection() - set crop rectangle on pad 1561 /* check wether crop rect is within limits */ isif_pad_set_selection() 1574 vpfe_isif->crop = sel->r; isif_pad_set_selection() 1581 memcpy(rect, &vpfe_isif->crop, sizeof(*rect)); isif_pad_set_selection() 1587 * isif_pad_get_selection() - get crop rectangle on pad 1611 sel->r = vpfe_isif->crop; isif_pad_get_selection()
|
H A D | dm365_resizer.c | 1798 /* Register the crop resizer subdev */ vpfe_resizer_register_entities() 1801 pr_err("Failed to register crop resizer as v4l2-subdev\n"); vpfe_resizer_register_entities()
|
/linux-4.1.27/include/uapi/linux/ |
H A D | v4l2-subdev.h | 55 * struct v4l2_subdev_crop - Pad-level crop settings 58 * @rect: pad crop rectangle boundaries
|
/linux-4.1.27/drivers/media/i2c/smiapp/ |
H A D | smiapp-reg.h | 61 /* digital crop right before scaler */
|
H A D | smiapp-core.c | 313 max = sensor->pixel_array->crop[SMIAPP_PA_PAD_SRC].height __smiapp_update_exposure_limits() 462 sensor->pixel_array->crop[SMIAPP_PA_PAD_SRC].height smiapp_set_ctrl() 468 sensor->pixel_array->crop[SMIAPP_PA_PAD_SRC].width smiapp_set_ctrl() 883 sensor->pixel_array->crop[SMIAPP_PA_PAD_SRC].height); smiapp_update_blanking() 885 sensor->pixel_array->crop[SMIAPP_PA_PAD_SRC].height; smiapp_update_blanking() 891 sensor->pixel_array->crop[SMIAPP_PA_PAD_SRC].width, smiapp_update_blanking() 894 sensor->pixel_array->crop[SMIAPP_PA_PAD_SRC].width; smiapp_update_blanking() 908 sensor->src->crop[SMIAPP_PAD_SRC].width, smiapp_update_mode() 909 sensor->src->crop[SMIAPP_PAD_SRC].height); smiapp_update_mode() 950 ((sensor->pixel_array->crop[SMIAPP_PA_PAD_SRC].width smiapp_update_mode() 952 (sensor->pixel_array->crop[SMIAPP_PA_PAD_SRC].height smiapp_update_mode() 1406 /* Analog crop start coordinates */ smiapp_start_streaming() 1408 sensor->pixel_array->crop[SMIAPP_PA_PAD_SRC].left); smiapp_start_streaming() 1413 sensor->pixel_array->crop[SMIAPP_PA_PAD_SRC].top); smiapp_start_streaming() 1417 /* Analog crop end coordinates */ smiapp_start_streaming() 1420 sensor->pixel_array->crop[SMIAPP_PA_PAD_SRC].left smiapp_start_streaming() 1421 + sensor->pixel_array->crop[SMIAPP_PA_PAD_SRC].width - 1); smiapp_start_streaming() 1427 sensor->pixel_array->crop[SMIAPP_PA_PAD_SRC].top smiapp_start_streaming() 1428 + sensor->pixel_array->crop[SMIAPP_PA_PAD_SRC].height - 1); smiapp_start_streaming() 1437 /* Digital crop */ smiapp_start_streaming() 1442 sensor->scaler->crop[SMIAPP_PAD_SINK].left); smiapp_start_streaming() 1448 sensor->scaler->crop[SMIAPP_PAD_SINK].top); smiapp_start_streaming() 1454 sensor->scaler->crop[SMIAPP_PAD_SINK].width); smiapp_start_streaming() 1460 sensor->scaler->crop[SMIAPP_PAD_SINK].height); smiapp_start_streaming() 1481 sensor->src->crop[SMIAPP_PAD_SRC].width); smiapp_start_streaming() 1485 sensor->src->crop[SMIAPP_PAD_SRC].height); smiapp_start_streaming() 1625 r = &ssd->crop[ssd->source_pad]; __smiapp_get_format() 1663 crops[i] = &ssd->crop[i]; smiapp_get_crop_compose() 2078 /* We only implement crop in three places. */ __smiapp_sel_supported() 2742 this->crop[this->source_pad] = this->compose; smiapp_init() 2745 this->crop[this->sink_pad] = this->compose; smiapp_init()
|
H A D | smiapp.h | 167 struct v4l2_rect crop[2]; member in struct:smiapp_subdev
|
/linux-4.1.27/arch/x86/kernel/ |
H A D | crash_dump_32.c | 21 * non-PAE kdump kernel executed from a PAE one will crop high pte is_crashed_pfn_valid()
|
/linux-4.1.27/drivers/media/usb/pvrusb2/ |
H A D | pvrusb2-v4l2.c | 710 static int pvr2_g_crop(struct file *file, void *priv, struct v4l2_crop *crop) pvr2_g_crop() argument 717 if (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) pvr2_g_crop() 723 crop->c.left = val; pvr2_g_crop() 728 crop->c.top = val; pvr2_g_crop() 733 crop->c.width = val; pvr2_g_crop() 738 crop->c.height = val; pvr2_g_crop() 742 static int pvr2_s_crop(struct file *file, void *priv, const struct v4l2_crop *crop) pvr2_s_crop() argument 748 if (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) pvr2_s_crop() 752 crop->c.left); pvr2_s_crop() 757 crop->c.top); pvr2_s_crop() 762 crop->c.width); pvr2_s_crop() 767 crop->c.height); pvr2_s_crop()
|
H A D | pvrusb2-hdw.c | 1065 .desc = "Capture crop left margin", 1075 .desc = "Capture crop top margin", 1085 .desc = "Capture crop width", 1094 .desc = "Capture crop height", 2991 /* Unable to set crop parameters; there is apparently no equivalent pvr2_subdev_update() 3114 * res_*_dirty && crop window < output format ==> enlarge crop. pvr2_hdw_commit_execute()
|
/linux-4.1.27/drivers/media/platform/am437x/ |
H A D | am437x-vpfe.c | 1062 vpfe_ccdc_set_image_window(&vpfe->ccdc, &vpfe->crop, vpfe->bpp); vpfe_config_ccdc_image_format() 1096 * pix format & crop values in the vpfe device and ccdc. It first 1099 * values based on that.Sets crop values to match with scan resolution 1128 vpfe->crop.top = vpfe->crop.left = 0; vpfe_config_image_format() 1129 vpfe->crop.width = vpfe->std_info.active_pixels; vpfe_config_image_format() 1130 vpfe->crop.height = vpfe->std_info.active_lines; vpfe_config_image_format() 1131 pix->width = vpfe->crop.width; vpfe_config_image_format() 1132 pix->height = vpfe->crop.height; vpfe_config_image_format() 1145 /* Update the crop window based on found values */ vpfe_config_image_format() 1146 vpfe->crop.width = pix->width; vpfe_config_image_format() 1147 vpfe->crop.height = pix->height; vpfe_config_image_format() 1610 /* Update the crop window based on found values */ vpfe_s_fmt() 1611 vpfe->crop.width = fmt->fmt.pix.width; vpfe_s_fmt() 1612 vpfe->crop.height = fmt->fmt.pix.height; vpfe_s_fmt() 2093 struct v4l2_cropcap *crop) vpfe_cropcap() 2102 memset(crop, 0, sizeof(struct v4l2_cropcap)); vpfe_cropcap() 2104 crop->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; vpfe_cropcap() 2105 crop->defrect.width = vpfe_standards[vpfe->std_index].width; vpfe_cropcap() 2106 crop->bounds.width = crop->defrect.width; vpfe_cropcap() 2107 crop->defrect.height = vpfe_standards[vpfe->std_index].height; vpfe_cropcap() 2108 crop->bounds.height = crop->defrect.height; vpfe_cropcap() 2109 crop->pixelaspect = vpfe_standards[vpfe->std_index].pixelaspect; vpfe_cropcap() 2123 s->r.width = vpfe->crop.width; vpfe_g_selection() 2124 s->r.height = vpfe->crop.height; vpfe_g_selection() 2128 s->r = vpfe->crop; vpfe_g_selection() 2156 struct v4l2_rect cr = vpfe->crop; vpfe_s_selection() 2181 s->r = vpfe->crop = r; vpfe_s_selection() 2092 vpfe_cropcap(struct file *file, void *priv, struct v4l2_cropcap *crop) vpfe_cropcap() argument
|
H A D | am437x-vpfe.h | 260 * used when IMP is chained to store the crop window which 263 struct v4l2_rect crop; member in struct:vpfe_device
|
/linux-4.1.27/drivers/staging/media/omap4iss/ |
H A D | iss_video.c | 661 iss_video_get_crop(struct file *file, void *fh, struct v4l2_crop *crop) iss_video_get_crop() argument 673 /* Try the get crop operation first and fallback to get format if not iss_video_get_crop() 676 ret = v4l2_subdev_call(subdev, video, g_crop, crop); iss_video_get_crop() 686 crop->c.left = 0; iss_video_get_crop() 687 crop->c.top = 0; iss_video_get_crop() 688 crop->c.width = format.format.width; iss_video_get_crop() 689 crop->c.height = format.format.height; iss_video_get_crop() 695 iss_video_set_crop(struct file *file, void *fh, const struct v4l2_crop *crop) iss_video_set_crop() argument 706 ret = v4l2_subdev_call(subdev, video, s_crop, crop); iss_video_set_crop()
|
H A D | iss_video.h | 151 struct mutex mutex; /* format and crop settings */
|
/linux-4.1.27/drivers/media/platform/exynos4-is/ |
H A D | fimc-lite.h | 58 * @win_hor_offs_align: minimum camera interface crop window horizontal 85 * @rect: crop/composition rectangle
|
H A D | fimc-capture.c | 151 * spinlock held. It updates the camera pixel crop, rotation and 580 * Format and crop negotiation helpers 628 /* Can't scale or crop in transparent (JPEG) transfer mode */ fimc_capture_try_format() 697 * - maximum crop size depends if the rotator is used or not; fimc_capture_try_selection() 699 * prescaler ratios determined by sink pad size and source pad crop, fimc_capture_try_selection() 718 /* Adjust left/top if crop/compose rectangle is out of bounds */ fimc_capture_try_selection() 1519 /* Sink pads crop rectangle size */ fimc_subdev_get_fmt() 1576 /* Sink pads crop rectangle size */ fimc_subdev_set_fmt() 1593 /* Reset the crop rectangle if required. */ fimc_subdev_set_fmt()
|
H A D | fimc-isp.h | 61 * @rect: crop/composition rectangle
|
H A D | fimc-lite.c | 567 * Format and crop negotiation helpers 645 same as size of the sink crop rectangle. */ fimc_lite_try_compose() 1095 /* crop size */ fimc_lite_subdev_get_fmt() 1148 /* Set sink crop rectangle */ fimc_lite_subdev_set_fmt() 1153 /* Reset source format and crop rectangle */ fimc_lite_subdev_set_fmt() 1218 /* Same crop rectangle on the source pad */ fimc_lite_subdev_set_selection()
|
H A D | fimc-m2m.c | 487 static int fimc_m2m_s_crop(struct file *file, void *fh, const struct v4l2_crop *crop) fimc_m2m_s_crop() argument 491 struct v4l2_crop cr = *crop; fimc_m2m_s_crop()
|
/linux-4.1.27/drivers/media/platform/s5p-jpeg/ |
H A D | jpeg-core.h | 187 * @crop_rect: a rectangle representing crop area of the output buffer 190 * @crop_altered: set if crop rectangle has been altered by the user space
|
H A D | jpeg-core.c | 1376 * if crop rectangle hasn't been altered by the user space e.g. with s5p_jpeg_s_fmt()
|
/linux-4.1.27/include/media/davinci/ |
H A D | vpfe_capture.h | 149 * used when IMP is chained to store the crop window which 152 struct v4l2_rect crop; member in struct:vpfe_device
|
H A D | vpbe.h | 107 /* crop cap for the display */
|
H A D | isif.h | 459 /* ISIF crop window */
|
/linux-4.1.27/drivers/gpu/drm/exynos/ |
H A D | exynos_drm_rotator.c | 28 * Rotator supports image crop/rotator and input/output DMA operations. 32 * M2M operation : supports crop/scale/rotation/csc so on. 260 /* Set crop image position configuration */ rotator_src_set_size() 397 /* Set crop image position configuration */ rotator_dst_set_size() 482 prop_list->crop = 0; rotator_init_prop_list()
|
H A D | exynos_drm_gsc.c | 34 * M2M operation : supports crop/scale/rotation/csc so on. 1344 prop_list->crop = 1; gsc_init_prop_list() 1421 /* check for crop */ for_each_ipp_ops() 1422 if ((i == EXYNOS_DRM_OPS_SRC) && (pp->crop)) { for_each_ipp_ops() 1428 DRM_ERROR("out of crop size.\n"); for_each_ipp_ops() 1436 DRM_ERROR("out of crop size.\n"); for_each_ipp_ops()
|
H A D | exynos_drm_fimc.c | 37 * M2M operation : supports crop/scale/rotation/csc so on. 1275 prop_list->crop = 1; fimc_init_prop_list() 1352 /* check for crop */ for_each_ipp_ops() 1353 if ((i == EXYNOS_DRM_OPS_SRC) && (pp->crop)) { for_each_ipp_ops() 1359 DRM_ERROR("out of crop size.\n"); for_each_ipp_ops() 1367 DRM_ERROR("out of crop size.\n"); for_each_ipp_ops()
|
/linux-4.1.27/drivers/media/pci/zoran/ |
H A D | zoran_driver.c | 2546 static int zoran_g_crop(struct file *file, void *__fh, struct v4l2_crop *crop) zoran_g_crop() argument 2550 int type = crop->type, res = 0; zoran_g_crop() 2552 memset(crop, 0, sizeof(*crop)); zoran_g_crop() 2553 crop->type = type; zoran_g_crop() 2557 if (crop->type != V4L2_BUF_TYPE_VIDEO_OUTPUT && zoran_g_crop() 2558 (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE || zoran_g_crop() 2568 crop->c.top = fh->jpg_settings.img_y; zoran_g_crop() 2569 crop->c.left = fh->jpg_settings.img_x; zoran_g_crop() 2570 crop->c.width = fh->jpg_settings.img_width; zoran_g_crop() 2571 crop->c.height = fh->jpg_settings.img_height; zoran_g_crop() 2579 static int zoran_s_crop(struct file *file, void *__fh, const struct v4l2_crop *crop) zoran_s_crop() argument 2598 if (crop->type != V4L2_BUF_TYPE_VIDEO_OUTPUT && zoran_s_crop() 2599 (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE || zoran_s_crop() 2609 settings.img_x = crop->c.left; zoran_s_crop() 2610 settings.img_y = crop->c.top; zoran_s_crop() 2611 settings.img_width = crop->c.width; zoran_s_crop() 2612 settings.img_height = crop->c.height; zoran_s_crop()
|
H A D | zoran.h | 171 int img_x, img_y, img_width, img_height; /* crop settings (subframe capture) */
|
/linux-4.1.27/drivers/net/ethernet/freescale/fs_enet/ |
H A D | mii-bitbang.c | 38 /* FIXME: If any other users of GPIO crop up, then these will have to
|
/linux-4.1.27/drivers/media/pci/saa7134/ |
H A D | saa7134-video.c | 1604 static int saa7134_g_crop(struct file *file, void *f, struct v4l2_crop *crop) saa7134_g_crop() argument 1608 if (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE && saa7134_g_crop() 1609 crop->type != V4L2_BUF_TYPE_VIDEO_OVERLAY) saa7134_g_crop() 1611 crop->c = dev->crop_current; saa7134_g_crop() 1615 static int saa7134_s_crop(struct file *file, void *f, const struct v4l2_crop *crop) saa7134_s_crop() argument 1621 if (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE && saa7134_s_crop() 1622 crop->type != V4L2_BUF_TYPE_VIDEO_OVERLAY) saa7134_s_crop() 1630 *c = crop->c; saa7134_s_crop()
|
H A D | saa7134.h | 634 /* crop */
|
/linux-4.1.27/drivers/media/pci/ivtv/ |
H A D | ivtv-yuv.c | 716 /* Falls off the upper edge - crop */ ivtv_yuv_window_setup() 726 /* Falls off the lower edge - crop */ ivtv_yuv_window_setup() 734 /* Fall off the left edge - crop */ ivtv_yuv_window_setup() 744 /* Falls off the right edge - crop */ ivtv_yuv_window_setup()
|
/linux-4.1.27/drivers/crypto/nx/ |
H A D | nx.c | 215 * @delta: is the amount we need to crop in order to bound the list. 239 /* There are cases where we need to crop list in order to make it trim_sg_list()
|
/linux-4.1.27/drivers/media/platform/s5p-tv/ |
H A D | mixer.h | 72 /** description of crop configuration for image */
|
/linux-4.1.27/arch/powerpc/platforms/powernv/ |
H A D | opal-lpc.c | 250 * user wants, but in order to "crop" to the right size, we need to lpc_debug_read()
|
/linux-4.1.27/arch/powerpc/sysdev/ |
H A D | fsl_gtm.c | 280 * crop precision of the "usec" argument, thus usec is limited to 16 bits
|
H A D | ppc4xx_pci.c | 222 * The trick here is we just crop those top bits and ignore them when ppc4xx_setup_one_pci_PMM()
|
/linux-4.1.27/drivers/media/platform/s5p-mfc/ |
H A D | s5p_mfc_dec.c | 343 further processing stages should crop to this vidioc_g_fmt() 776 mfc_err("Cannont set crop\n"); vidioc_g_crop()
|
/linux-4.1.27/include/media/ |
H A D | v4l2-subdev.h | 327 int (*g_crop)(struct v4l2_subdev *sd, struct v4l2_crop *crop); 328 int (*s_crop)(struct v4l2_subdev *sd, const struct v4l2_crop *crop);
|
/linux-4.1.27/drivers/media/platform/ti-vpe/ |
H A D | vpe.c | 318 struct v4l2_rect c_rect; /* crop/compose rectangle */ 1627 * bound and default crop/compose targets are invalid targets to __vpe_try_selection() 1733 "requested crop/compose values are already set\n"); vpe_s_selection()
|
H A D | vpdma.c | 684 * @c_rect: crop params of input image
|
/linux-4.1.27/drivers/media/i2c/soc_camera/ |
H A D | mt9m001.c | 283 /* No support for scaling so far, just crop. TODO: use skipping */ mt9m001_s_fmt()
|
H A D | mt9v022.c | 427 /* No support for scaling on this camera, just crop. */ mt9v022_s_fmt()
|
/linux-4.1.27/drivers/media/platform/s5p-g2d/ |
H A D | g2d.c | 395 /* Reset crop settings */ vidioc_s_fmt()
|
/linux-4.1.27/drivers/media/usb/stkwebcam/ |
H A D | stk-sensor.c | 103 #define COM3_DCWEN 0x04 /* Enable downsamp/crop/window */
|
/linux-4.1.27/drivers/gpu/drm/msm/mdp/mdp5/ |
H A D | mdp5_crtc.c | 425 * width and ROI height need to be evaluated to crop the cursor image get_roi()
|
/linux-4.1.27/arch/powerpc/mm/ |
H A D | tlb_nohash.c | 737 * We crop it to the size of the first MEMBLOCK to setup_initial_memory_limit()
|
/linux-4.1.27/drivers/media/platform/coda/ |
H A D | coda-bit.c | 1824 /* frame crop information */ coda_finish_decode() 1833 /* Keep current crop information */ coda_finish_decode()
|
/linux-4.1.27/fs/fuse/ |
H A D | file.c | 1509 size_t crop = i_size_read(inode); variable 1515 fuse_send_writepage(fc, req, crop); 1536 * Skip fuse_flush_writepages() to make it easy to crop requests fuse_writepage_end()
|
/linux-4.1.27/drivers/gpu/drm/nouveau/nvkm/engine/gr/ |
H A D | ctxgk104.c | 948 nv_mask(priv, 0x408958, 0x0000000f, fbp_count); /* crop */ gk104_grctx_generate_rop_active_fbps()
|
H A D | ctxgm204.c | 943 nv_mask(priv, 0x408958, 0x0000000f, fbp_count); /* crop */ gm204_grctx_generate_rop_active_fbps()
|
/linux-4.1.27/drivers/media/platform/ |
H A D | fsl-viu.c | 185 /* crop */
|
/linux-4.1.27/drivers/media/usb/gspca/ |
H A D | cpia1.c | 1539 if (priv & 0x01) { /* crop */ sd_start()
|
H A D | ov519.c | 4120 int qvga, crop; set_ov_sensor_window() local 4140 crop = gspca_dev->cam.cam_mode[gspca_dev->curr_mode].priv & 2; set_ov_sensor_window() 4167 if (crop) { set_ov_sensor_window()
|
/linux-4.1.27/drivers/hid/ |
H A D | wacom_sys.c | 589 * Touch Ring and crop mark LED luminance may take on wacom_led_control()
|
/linux-4.1.27/drivers/gpu/drm/vmwgfx/ |
H A D | svga3d_reg.h | 1701 * crop a vertex buffer without modifying their index
|
/linux-4.1.27/arch/powerpc/kernel/ |
H A D | prom_init.c | 2211 * few pages), crop to 1MB, as this is our "chunk" size flatten_device_tree()
|
/linux-4.1.27/kernel/ |
H A D | kexec.c | 174 * special cases crop of when we don't do this. The most sanity_check_segment_list()
|
/linux-4.1.27/drivers/usb/dwc2/ |
H A D | gadget.c | 2545 * these next two seem to crop-up occasionally causing the core s3c_hsotg_irq()
|