diff options
author | Tyler Luu <tluu@ti.com> | 2012-06-01 22:43:28 -0500 |
---|---|---|
committer | Daniel Levin <dendy@ti.com> | 2012-11-26 18:22:46 +0200 |
commit | 54b31989d9eaa26760b748066c9a4b724b7efe9c (patch) | |
tree | ddacea99bc5422695449bc0ff0a89e4aa3a6bdf2 /camera/BufferSourceAdapter.cpp | |
parent | 677b111ba13ad196de4913874cf5729c31e7efaf (diff) | |
download | hardware_ti_omap4-54b31989d9eaa26760b748066c9a4b724b7efe9c.tar.gz hardware_ti_omap4-54b31989d9eaa26760b748066c9a4b724b7efe9c.tar.bz2 hardware_ti_omap4-54b31989d9eaa26760b748066c9a4b724b7efe9c.zip |
camera: Common functions for size calculation and image format
Use common functions for calculating buffer size and
getting image format constant since they are used in several
places in CameraHal. The common functions are implemented
as static functions in the CameraHal class.
Change-Id: I242435ebcdebea0bc9a7452a5dc38e3f96f5be11
Signed-off-by: Tyler Luu <tluu@ti.com>
Signed-off-by: Vladimir Petrov <vppetrov@mm-sol.com>
Signed-off-by: Daniel Levin <dendy@ti.com>
Diffstat (limited to 'camera/BufferSourceAdapter.cpp')
-rw-r--r-- | camera/BufferSourceAdapter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/camera/BufferSourceAdapter.cpp b/camera/BufferSourceAdapter.cpp index e00cec7..acb4653 100644 --- a/camera/BufferSourceAdapter.cpp +++ b/camera/BufferSourceAdapter.cpp @@ -387,7 +387,7 @@ CameraBuffer* BufferSourceAdapter::allocateBufferList(int width, int height, con mBuffers[i].type = CAMERA_BUFFER_ANW; mFramesWithCameraAdapterMap.add(handle, i); - bytes = getBufSize(format, width, height); + bytes = CameraHal::calculateBufferSize(format, width, height); } for( i = 0; i < mBufferCount-undequeued; i++ ) { @@ -422,7 +422,7 @@ CameraBuffer* BufferSourceAdapter::allocateBufferList(int width, int height, con mFramesWithCameraAdapterMap.removeItem((buffer_handle_t *) mBuffers[i].opaque); } - mPixelFormat = getPixFormatConstant(format); + mPixelFormat = CameraHal::getPixelFormatConstant(format); mFrameWidth = width; mFrameHeight = height; mBufferSourceDirection = BUFFER_SOURCE_TAP_OUT; |