summaryrefslogtreecommitdiff
Diffstat
-rw-r--r--Android.mk9
-rw-r--r--[-rwxr-xr-x]CameraHal.cpp4
-rw-r--r--[-rwxr-xr-x]CameraHal_Module.cpp3
-rw-r--r--[-rwxr-xr-x]V4LCameraAdapter/V4LCameraAdapter.cpp142
-rwxr-xr-xinc/mjpeg/colorspaces.h288
-rw-r--r--inc/mjpeg/defs.h57
-rwxr-xr-xinc/mjpeg/huffman.h99
-rwxr-xr-xinc/mjpeg/jutils.h149
-rwxr-xr-xmjpeg/colorspaces.c2016
-rwxr-xr-xmjpeg/jpegdec.c1040
10 files changed, 128 insertions, 3679 deletions
diff --git a/CameraHal.cpp b/CameraHal.cpp
index 284cb36..fe989df 100755..100644
--- a/CameraHal.cpp
+++ b/CameraHal.cpp
@@ -1435,7 +1435,11 @@ status_t CameraHal::allocVideoBufs(uint32_t width, uint32_t height, uint32_t buf
for (uint32_t i = 0; i< bufferCount; i++){
GraphicBufferAllocator &GrallocAlloc = GraphicBufferAllocator::get();
buffer_handle_t buf;
+#if PLATFORM_SDK_VERSION > 22
ret = GrallocAlloc.alloc(width, height, HAL_PIXEL_FORMAT_NV12, CAMHAL_GRALLOC_USAGE, &buf, &stride);
+#else
+ ret = GrallocAlloc.alloc(width, height, HAL_PIXEL_FORMAT_NV12, CAMHAL_GRALLOC_USAGE, &buf, (int32_t*)&stride);
+#endif
if (ret != NO_ERROR){
CAMHAL_LOGEA("Couldn't allocate video buffers using Gralloc");
ret = -NO_MEMORY;