diff options
author | Angus Ainslie <angus.ainslie@linaro.org> | 2011-12-13 10:51:58 -0700 |
---|---|---|
committer | Angus Ainslie <angus.ainslie@linaro.org> | 2011-12-13 10:51:58 -0700 |
commit | c54aa2c979254bbfd527216723cc081f99a67743 (patch) | |
tree | 3a700df775921036c007b48e2cbc5b6109e988ca | |
parent | 02528952cc72d744444660a668f663a1c62eb548 (diff) | |
download | gralloc_ump-linaro_android_4.0.1.tar.gz |
samsung: update gralloc_ump to the r2p3 releaselinaro_android_4.0.1
Bring the gralloc_ump library directories up to version r2p3-01rel0
Change-Id: I8e9dd3ddabfa064644d2ba398bcad69d426561b8
Signed-off-by: Angus Ainslie <angus.ainslie@linaro.org>
-rw-r--r-- | alloc_device.cpp | 15 | ||||
-rw-r--r-- | gralloc_module.cpp | 2 | ||||
-rw-r--r-- | gralloc_priv.h | 2 |
3 files changed, 4 insertions, 15 deletions
diff --git a/alloc_device.cpp b/alloc_device.cpp index d46704b..30320a1 100644 --- a/alloc_device.cpp +++ b/alloc_device.cpp @@ -168,22 +168,11 @@ static int alloc_device_alloc(alloc_device_t* dev, int w, int h, int format, int size_t size; size_t stride; - if (format == HAL_PIXEL_FORMAT_YCbCr_420_SP || - format == HAL_PIXEL_FORMAT_YCbCr_422_SP || - format == HAL_PIXEL_FORMAT_YV12 ) + if (format == HAL_PIXEL_FORMAT_YCrCb_420_SP || format == HAL_PIXEL_FORMAT_YV12 ) { - int vstride; switch (format) { - case HAL_PIXEL_FORMAT_YCbCr_420_SP: - stride = (w + 1) & ~1; - size = stride * h * 2; - break; - case HAL_PIXEL_FORMAT_YCbCr_422_SP: - stride = (w + 1) & ~1; - vstride = (h+1) & ~1; - size = (stride * vstride) + (w/2 * h/2) * 2; - break; + case HAL_PIXEL_FORMAT_YCrCb_420_SP: case HAL_PIXEL_FORMAT_YV12: stride = (w + 15) & ~15; size = h * (stride + stride/2); diff --git a/gralloc_module.cpp b/gralloc_module.cpp index 2f4bda2..1d65a2e 100644 --- a/gralloc_module.cpp +++ b/gralloc_module.cpp @@ -69,7 +69,7 @@ static int gralloc_register_buffer(gralloc_module_t const* module, buffer_handle if (!s_ump_is_open) { - ump_result res = ump_open(); + ump_result res = ump_open(); // TODO: Fix a ump_close() somewhere??? if (res != UMP_OK) { pthread_mutex_unlock(&s_map_lock); diff --git a/gralloc_priv.h b/gralloc_priv.h index 2c4e492..bf3e05e 100644 --- a/gralloc_priv.h +++ b/gralloc_priv.h @@ -32,7 +32,7 @@ #define GRALLOC_ARM_UMP_MODULE 1 enum { - /* OEM specific HAL formats */ + /* OEM specific HAL formats - this number should be greater than 0x100 */ HAL_PIXEL_FORMAT_YCbCr_420_SP = 0x100, }; |