From 07912f50930cf8cea2bc5f8f94e014c31af583b6 Mon Sep 17 00:00:00 2001 From: Haynes Mathew George Date: Wed, 20 Jun 2012 18:20:52 -0700 Subject: [PATCH 1/3] Add vendor specific color format to OMX_IVCommon.h - Add Qualcomm specific color format to OMX_IVCommon.h Change-Id: I77a7196307d079348a50d7bb67c80cd2642a72df --- include/media/openmax/OMX_IVCommon.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/media/openmax/OMX_IVCommon.h b/include/media/openmax/OMX_IVCommon.h index 8bb4dede8..effbaaebe 100644 --- a/include/media/openmax/OMX_IVCommon.h +++ b/include/media/openmax/OMX_IVCommon.h @@ -159,6 +159,7 @@ typedef enum OMX_COLOR_FORMATTYPE { OMX_COLOR_FormatAndroidOpaque = 0x7F000789, OMX_TI_COLOR_FormatYUV420PackedSemiPlanar = 0x7F000100, OMX_QCOM_COLOR_FormatYVU420SemiPlanar = 0x7FA30C00, + OMX_QCOM_COLOR_FormatYUV420PackedSemiPlanar64x32Tile2m8ka = 0x7FA30C03, OMX_COLOR_FormatMax = 0x7FFFFFFF } OMX_COLOR_FORMATTYPE; From 0bc64be3f5198f8dda1ced21bbc957a1d76efbb7 Mon Sep 17 00:00:00 2001 From: Naseer Ahmed Date: Fri, 29 Jun 2012 12:02:32 -0700 Subject: [PATCH 2/3] libs/ui: Add support for triple framebuffers Change-Id: I90dd38deeeda9a3785b87286cc7d252c6f948750 --- include/ui/FramebufferNativeWindow.h | 5 +++-- libs/ui/FramebufferNativeWindow.cpp | 18 ++++++++++++------ 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/include/ui/FramebufferNativeWindow.h b/include/ui/FramebufferNativeWindow.h index b202b95b1..8dd21097a 100644 --- a/include/ui/FramebufferNativeWindow.h +++ b/include/ui/FramebufferNativeWindow.h @@ -28,7 +28,8 @@ #include #include -#define NUM_FRAME_BUFFERS 2 +#define MIN_NUM_FRAME_BUFFERS 2 +#define MAX_NUM_FRAME_BUFFERS 3 extern "C" EGLNativeWindowType android_createDisplaySurface(void); @@ -74,7 +75,7 @@ private: framebuffer_device_t* fbDev; alloc_device_t* grDev; - sp buffers[NUM_FRAME_BUFFERS]; + sp buffers[MAX_NUM_FRAME_BUFFERS]; sp front; mutable Mutex mutex; diff --git a/libs/ui/FramebufferNativeWindow.cpp b/libs/ui/FramebufferNativeWindow.cpp index dec99b6c7..a1f204c06 100644 --- a/libs/ui/FramebufferNativeWindow.cpp +++ b/libs/ui/FramebufferNativeWindow.cpp @@ -92,8 +92,13 @@ FramebufferNativeWindow::FramebufferNativeWindow() mUpdateOnDemand = (fbDev->setUpdateRect != 0); // initialize the buffer FIFO - mNumBuffers = NUM_FRAME_BUFFERS; - mNumFreeBuffers = NUM_FRAME_BUFFERS; + if(fbDev->numFramebuffers >= MIN_NUM_FRAME_BUFFERS && + fbDev->numFramebuffers <= MAX_NUM_FRAME_BUFFERS){ + mNumBuffers = fbDev->numFramebuffers; + } else { + mNumBuffers = MIN_NUM_FRAME_BUFFERS; + } + mNumFreeBuffers = mNumBuffers; mBufferHead = mNumBuffers-1; /* @@ -154,10 +159,11 @@ FramebufferNativeWindow::FramebufferNativeWindow() FramebufferNativeWindow::~FramebufferNativeWindow() { if (grDev) { - if (buffers[0] != NULL) - grDev->free(grDev, buffers[0]->handle); - if (buffers[1] != NULL) - grDev->free(grDev, buffers[1]->handle); + for(int i = 0; i < mNumBuffers; i++) { + if (buffers[i] != NULL) { + grDev->free(grDev, buffers[i]->handle); + } + } gralloc_close(grDev); } From e64a4035523aa5e15091a4b6b15612a5bcd1ad01 Mon Sep 17 00:00:00 2001 From: Edwin Wong Date: Tue, 17 Jul 2012 14:38:28 -0700 Subject: [PATCH 3/3] Merge from jb-dev for "sample video corruption in MediaCodec mode." DO NOT MERGE jb-dev commit: fa2b8f243eb048fb2b8e5a14356190f69eb31a36 Change-Id: Ic2a28663d25e3007c95e15ecbb0d44b820045f85 related-to-bug: 6732061 --- include/media/hardware/CryptoAPI.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/media/hardware/CryptoAPI.h b/include/media/hardware/CryptoAPI.h index 810a443e8..ee5dec18a 100644 --- a/include/media/hardware/CryptoAPI.h +++ b/include/media/hardware/CryptoAPI.h @@ -70,7 +70,7 @@ struct CryptoPlugin { // At the java level these special errors will then trigger a // MediaCodec.CryptoException that gives clients access to both // the error code and the errorDetailMsg. - virtual status_t decrypt( + virtual ssize_t decrypt( bool secure, const uint8_t key[16], const uint8_t iv[16],