From 1a47f6d2c169c5067abff128b069ef35e10086e4 Mon Sep 17 00:00:00 2001
From: Phil Edworthy <phil.edworthy@renesas.com>
Date: Thu, 16 Dec 2010 11:53:56 +0000
Subject: [PATCH 1/4] sh772x: Update calls to libshjpeg for current api


Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
---
 gfxdrivers/sh772x/sh7722_jpeg.c |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)

diff --git a/gfxdrivers/sh772x/sh7722_jpeg.c b/gfxdrivers/sh772x/sh7722_jpeg.c
index 22eee55..6ff0894 100644
--- a/gfxdrivers/sh772x/sh7722_jpeg.c
+++ b/gfxdrivers/sh772x/sh7722_jpeg.c
@@ -257,9 +257,6 @@ IDirectFBImageProvider_SH7722_JPEG_RenderTo( IDirectFBImageProvider *thiz,
      /* calculate physical address according to destination rect */
      unsigned long phys = lock.phys + DFB_BYTES_PER_LINE(dst_surface->config.format, rect.x) + rect.y * lock.pitch;
 
-     /* physical address of the c plane */
-     unsigned long cphys = 0;
-
      shjpeg_pixelformat pixelfmt;
 
      switch (dst_surface->config.format) {
@@ -274,12 +271,9 @@ IDirectFBImageProvider_SH7722_JPEG_RenderTo( IDirectFBImageProvider *thiz,
                break;
           case DSPF_NV12:
                pixelfmt = SHJPEG_PF_NV12;
-               cphys = lock.phys + lock.pitch * dst_surface->config.size.h 
-                         + DFB_BYTES_PER_LINE(dst_surface->config.format, rect.x) + (rect.y/2) * lock.pitch;
                break;
           case DSPF_NV16:
                pixelfmt = SHJPEG_PF_NV16;
-               cphys = phys + lock.pitch * dst_surface->config.size.h;
                break;
           case DSPF_A8:
                pixelfmt = SHJPEG_PF_GRAYSCALE;
@@ -290,7 +284,7 @@ IDirectFBImageProvider_SH7722_JPEG_RenderTo( IDirectFBImageProvider *thiz,
      }
 
 
-     if (shjpeg_decode_run( data->info, pixelfmt, phys, cphys, rect.w, rect.h, lock.pitch) < 0)
+     if (shjpeg_decode_run( data->info, pixelfmt, phys, rect.w, rect.h, lock.pitch) < 0)
           ret = DFB_FAILURE;
 
      dfb_surface_unlock_buffer( dst_surface, &lock );
-- 
1.7.1

