From a8f0334ef5706875f2c73a2690a2f1fc3e5fee27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tapani=20P=C3=A4lli?= Date: Fri, 18 Jan 2013 15:01:43 +0200 Subject: gralloc: implement yuv offset query as hw specific function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch reverts earlier cca14cfd... and introduces a new hw specific hook to query yuv components offsets which can vary between different hw, decoders, cameras etc. Change-Id: Ib60bc8ee28df7bc9425b6d7934294fe36fc55354 Depends-Change-Id: I1aa5368b21e588d5d711c1005fff2a5296e143a0 Signed-off-by: Tapani Pälli --- gralloc_drm_handle.h | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'gralloc_drm_handle.h') diff --git a/gralloc_drm_handle.h b/gralloc_drm_handle.h index 621f500..430b480 100644 --- a/gralloc_drm_handle.h +++ b/gralloc_drm_handle.h @@ -61,22 +61,4 @@ static inline struct gralloc_drm_handle_t *gralloc_drm_handle(buffer_handle_t _h return handle; } -static inline void gralloc_drm_yuv_offsets(buffer_handle_t _handle, - int *y, int *u, int *v) -{ - struct gralloc_drm_handle_t *handle = gralloc_drm_handle(_handle); - if (handle && *y && *u && *v) { - *y = 0; - switch (handle->format) { - case HAL_PIXEL_FORMAT_YV12: - *v = handle->stride * handle->height; - *u = *v + handle->height/2; - break; - case HAL_PIXEL_FORMAT_DRM_NV12: - *u = *v = handle->stride * handle->height; - break; - } - } -} - #endif /* _GRALLOC_DRM_HANDLE_H_ */ -- cgit v1.1