diff options
Diffstat (limited to 'drivers/media/platform/vivid/vivid-kthread-cap.c')
-rw-r--r-- | drivers/media/platform/vivid/vivid-kthread-cap.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/media/platform/vivid/vivid-kthread-cap.c b/drivers/media/platform/vivid/vivid-kthread-cap.c index 9034281944a4..3b8c10108dfa 100644 --- a/drivers/media/platform/vivid/vivid-kthread-cap.c +++ b/drivers/media/platform/vivid/vivid-kthread-cap.c @@ -36,6 +36,7 @@ #include <media/v4l2-ioctl.h> #include <media/v4l2-fh.h> #include <media/v4l2-event.h> +#include <media/v4l2-rect.h> #include "vivid-core.h" #include "vivid-vid-common.h" @@ -184,15 +185,15 @@ static void vivid_precalc_copy_rects(struct vivid_dev *dev) dev->compose_out.width, dev->compose_out.height }; - dev->loop_vid_copy = rect_intersect(&dev->crop_cap, &dev->compose_out); + v4l2_rect_intersect(&dev->loop_vid_copy, &dev->crop_cap, &dev->compose_out); dev->loop_vid_out = dev->loop_vid_copy; - rect_scale(&dev->loop_vid_out, &dev->compose_out, &dev->crop_out); + v4l2_rect_scale(&dev->loop_vid_out, &dev->compose_out, &dev->crop_out); dev->loop_vid_out.left += dev->crop_out.left; dev->loop_vid_out.top += dev->crop_out.top; dev->loop_vid_cap = dev->loop_vid_copy; - rect_scale(&dev->loop_vid_cap, &dev->crop_cap, &dev->compose_cap); + v4l2_rect_scale(&dev->loop_vid_cap, &dev->crop_cap, &dev->compose_cap); dprintk(dev, 1, "loop_vid_copy: %dx%d@%dx%d loop_vid_out: %dx%d@%dx%d loop_vid_cap: %dx%d@%dx%d\n", @@ -203,13 +204,13 @@ static void vivid_precalc_copy_rects(struct vivid_dev *dev) dev->loop_vid_cap.width, dev->loop_vid_cap.height, dev->loop_vid_cap.left, dev->loop_vid_cap.top); - r_overlay = rect_intersect(&r_fb, &r_overlay); + v4l2_rect_intersect(&r_overlay, &r_fb, &r_overlay); /* shift r_overlay to the same origin as compose_out */ r_overlay.left += dev->compose_out.left - dev->overlay_out_left; r_overlay.top += dev->compose_out.top - dev->overlay_out_top; - dev->loop_vid_overlay = rect_intersect(&r_overlay, &dev->loop_vid_copy); + v4l2_rect_intersect(&dev->loop_vid_overlay, &r_overlay, &dev->loop_vid_copy); dev->loop_fb_copy = dev->loop_vid_overlay; /* shift dev->loop_fb_copy back again to the fb origin */ @@ -217,7 +218,7 @@ static void vivid_precalc_copy_rects(struct vivid_dev *dev) dev->loop_fb_copy.top -= dev->compose_out.top - dev->overlay_out_top; dev->loop_vid_overlay_cap = dev->loop_vid_overlay; - rect_scale(&dev->loop_vid_overlay_cap, &dev->crop_cap, &dev->compose_cap); + v4l2_rect_scale(&dev->loop_vid_overlay_cap, &dev->crop_cap, &dev->compose_cap); dprintk(dev, 1, "loop_fb_copy: %dx%d@%dx%d loop_vid_overlay: %dx%d@%dx%d loop_vid_overlay_cap: %dx%d@%dx%d\n", |