• Home
  • Raw
  • Download

Lines Matching refs:rect

1602 static int sn9c102_set_crop(struct sn9c102_device* cam, struct v4l2_rect* rect)  in sn9c102_set_crop()  argument
1605 u8 h_start = (u8)(rect->left - s->cropcap.bounds.left), in sn9c102_set_crop()
1606 v_start = (u8)(rect->top - s->cropcap.bounds.top), in sn9c102_set_crop()
1607 h_size = (u8)(rect->width / 16), in sn9c102_set_crop()
1608 v_size = (u8)(rect->height / 16); in sn9c102_set_crop()
1630 struct v4l2_rect* rect; in sn9c102_init() local
1638 rect = &(s->cropcap.defrect); in sn9c102_init()
1641 rect = &(s->_rect); in sn9c102_init()
1644 err += sn9c102_set_scale(cam, rect->width / s->pix_format.width); in sn9c102_init()
1645 err += sn9c102_set_crop(cam, rect); in sn9c102_init()
1688 if ((err = s->set_crop(cam, rect))) { in sn9c102_init()
2360 struct v4l2_rect* rect; in sn9c102_vidioc_s_crop() local
2372 rect = &(crop.c); in sn9c102_vidioc_s_crop()
2386 rect->left = (s->_rect.left & 1L) ? rect->left | 1L : rect->left & ~1L; in sn9c102_vidioc_s_crop()
2387 rect->top = (s->_rect.top & 1L) ? rect->top | 1L : rect->top & ~1L; in sn9c102_vidioc_s_crop()
2389 if (rect->width < 16) in sn9c102_vidioc_s_crop()
2390 rect->width = 16; in sn9c102_vidioc_s_crop()
2391 if (rect->height < 16) in sn9c102_vidioc_s_crop()
2392 rect->height = 16; in sn9c102_vidioc_s_crop()
2393 if (rect->width > bounds->width) in sn9c102_vidioc_s_crop()
2394 rect->width = bounds->width; in sn9c102_vidioc_s_crop()
2395 if (rect->height > bounds->height) in sn9c102_vidioc_s_crop()
2396 rect->height = bounds->height; in sn9c102_vidioc_s_crop()
2397 if (rect->left < bounds->left) in sn9c102_vidioc_s_crop()
2398 rect->left = bounds->left; in sn9c102_vidioc_s_crop()
2399 if (rect->top < bounds->top) in sn9c102_vidioc_s_crop()
2400 rect->top = bounds->top; in sn9c102_vidioc_s_crop()
2401 if (rect->left + rect->width > bounds->left + bounds->width) in sn9c102_vidioc_s_crop()
2402 rect->left = bounds->left+bounds->width - rect->width; in sn9c102_vidioc_s_crop()
2403 if (rect->top + rect->height > bounds->top + bounds->height) in sn9c102_vidioc_s_crop()
2404 rect->top = bounds->top+bounds->height - rect->height; in sn9c102_vidioc_s_crop()
2406 rect->width &= ~15L; in sn9c102_vidioc_s_crop()
2407 rect->height &= ~15L; in sn9c102_vidioc_s_crop()
2412 a = rect->width * rect->height; in sn9c102_vidioc_s_crop()
2430 err = sn9c102_set_crop(cam, rect); in sn9c102_vidioc_s_crop()
2432 err += s->set_crop(cam, rect); in sn9c102_vidioc_s_crop()
2443 s->pix_format.width = rect->width/scale; in sn9c102_vidioc_s_crop()
2444 s->pix_format.height = rect->height/scale; in sn9c102_vidioc_s_crop()
2445 memcpy(&(s->_rect), rect, sizeof(*rect)); in sn9c102_vidioc_s_crop()
2587 struct v4l2_rect rect; in sn9c102_vidioc_try_s_fmt() local
2602 memcpy(&rect, &(s->_rect), sizeof(rect)); in sn9c102_vidioc_try_s_fmt()
2606 a = rect.width * rect.height; in sn9c102_vidioc_try_s_fmt()
2611 rect.width = scale * pix->width; in sn9c102_vidioc_try_s_fmt()
2612 rect.height = scale * pix->height; in sn9c102_vidioc_try_s_fmt()
2614 if (rect.width < 16) in sn9c102_vidioc_try_s_fmt()
2615 rect.width = 16; in sn9c102_vidioc_try_s_fmt()
2616 if (rect.height < 16) in sn9c102_vidioc_try_s_fmt()
2617 rect.height = 16; in sn9c102_vidioc_try_s_fmt()
2618 if (rect.width > bounds->left + bounds->width - rect.left) in sn9c102_vidioc_try_s_fmt()
2619 rect.width = bounds->left + bounds->width - rect.left; in sn9c102_vidioc_try_s_fmt()
2620 if (rect.height > bounds->top + bounds->height - rect.top) in sn9c102_vidioc_try_s_fmt()
2621 rect.height = bounds->top + bounds->height - rect.top; in sn9c102_vidioc_try_s_fmt()
2623 rect.width &= ~15L; in sn9c102_vidioc_try_s_fmt()
2624 rect.height &= ~15L; in sn9c102_vidioc_try_s_fmt()
2628 a = rect.width * rect.height; in sn9c102_vidioc_try_s_fmt()
2633 pix->width = rect.width / scale; in sn9c102_vidioc_try_s_fmt()
2634 pix->height = rect.height / scale; in sn9c102_vidioc_try_s_fmt()
2687 err += sn9c102_set_crop(cam, &rect); in sn9c102_vidioc_try_s_fmt()
2691 err += s->set_crop(cam, &rect); in sn9c102_vidioc_try_s_fmt()
2703 memcpy(&(s->_rect), &rect, sizeof(rect)); in sn9c102_vidioc_try_s_fmt()