Lines Matching defs:crop
1941 static int saa7134_g_crop(struct file *file, void *f, struct v4l2_crop *crop)
1946 if (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE &&
1947 crop->type != V4L2_BUF_TYPE_VIDEO_OVERLAY)
1949 crop->c = dev->crop_current;
1953 static int saa7134_s_crop(struct file *file, void *f, struct v4l2_crop *crop)
1959 if (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE &&
1960 crop->type != V4L2_BUF_TYPE_VIDEO_OVERLAY)
1962 if (crop->c.height < 0)
1964 if (crop->c.width < 0)
1972 if (crop->c.top < b->top)
1973 crop->c.top = b->top;
1974 if (crop->c.top > b->top + b->height)
1975 crop->c.top = b->top + b->height;
1976 if (crop->c.height > b->top - crop->c.top + b->height)
1977 crop->c.height = b->top - crop->c.top + b->height;
1979 if (crop->c.left < b->left)
1980 crop->c.left = b->left;
1981 if (crop->c.left > b->left + b->width)
1982 crop->c.left = b->left + b->width;
1983 if (crop->c.width > b->left - crop->c.left + b->width)
1984 crop->c.width = b->left - crop->c.left + b->width;
1986 dev->crop_current = crop->c;