OSDN Git Service

[media] omap4iss: Fix overlapping luma/chroma planes
authorNate Weibley <nweibley@gmail.com>
Mon, 9 Nov 2015 21:51:47 +0000 (19:51 -0200)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Thu, 19 Nov 2015 13:13:54 +0000 (11:13 -0200)
The chroma data base address for NV12 formatted data should begin offset
rows*bytes_per_row from the base address for luminance data. We were OBO
causing a stripe of green pixels at the bottom of the frame.

Signed-off-by: Nate Weibley <nweibley@gmail.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/staging/media/omap4iss/iss_resizer.c

index 9c8180b..108961e 100644 (file)
@@ -158,8 +158,8 @@ static void resizer_set_outaddr(struct iss_resizer_device *resizer, u32 addr)
        /* Program UV buffer address... Hardcoded to be contiguous! */
        if ((informat->code == MEDIA_BUS_FMT_UYVY8_1X16) &&
            (outformat->code == MEDIA_BUS_FMT_YUYV8_1_5X8)) {
-               u32 c_addr = addr + (resizer->video_out.bpl_value *
-                                    (outformat->height - 1));
+               u32 c_addr = addr + resizer->video_out.bpl_value
+                          * outformat->height;
 
                /* Ensure Y_BAD_L[6:0] = C_BAD_L[6:0]*/
                if ((c_addr ^ addr) & 0x7f) {