summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/CameraSource.cpp
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2015-08-17 09:58:47 +0200
committerEthan Chen <intervigil@gmail.com>2015-11-04 11:45:19 -0800
commitf032c781e72f10bad56cc625152e6dffc87dd0a7 (patch)
treeed4038418a651cb4cc0b9711cf1263659fbed345 /media/libstagefright/CameraSource.cpp
parent85062db21be4a93cddde5b2db0c538c943846862 (diff)
downloadframeworks_av-f032c781e72f10bad56cc625152e6dffc87dd0a7.zip
frameworks_av-f032c781e72f10bad56cc625152e6dffc87dd0a7.tar.gz
frameworks_av-f032c781e72f10bad56cc625152e6dffc87dd0a7.tar.bz2
libstagefright: Add support for NV21 color format
This adds the native color format 'OMX_SEC_COLOR_FormatNV21Linear' of exynos5 which is NV21 and needed for the camera. You can turn it on with: BOARD_USE_SAMSUNG_COLORFORMAT_NV21 := true It requires const char CameraParameters::PIXEL_FORMAT_YUV420SP_NV21[] = "nv21"; to be specified in CameraExtraParameters.h. Change-Id: I64ca86d074468b1e7a2958a73c3c0380e64a9fc0 Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'media/libstagefright/CameraSource.cpp')
-rw-r--r--media/libstagefright/CameraSource.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/media/libstagefright/CameraSource.cpp b/media/libstagefright/CameraSource.cpp
index 27a6086..aea0f13 100644
--- a/media/libstagefright/CameraSource.cpp
+++ b/media/libstagefright/CameraSource.cpp
@@ -117,6 +117,13 @@ static int32_t getColorFormat(const char* colorFormat) {
return OMX_COLOR_FormatYUV420SemiPlanar;
}
+#ifdef USE_SAMSUNG_CAMERAFORMAT_NV21
+ if (!strcmp(colorFormat, CameraParameters::PIXEL_FORMAT_YUV420SP_NV21)) {
+ static const int OMX_SEC_COLOR_FormatNV21Linear = 0x7F000011;
+ return OMX_SEC_COLOR_FormatNV21Linear;
+ }
+#endif /* USE_SAMSUNG_CAMERAFORMAT_NV21 */
+
if (!strcmp(colorFormat, CameraParameters::PIXEL_FORMAT_YUV422I)) {
return OMX_COLOR_FormatYCbYCr;
}