[vlc-devel] [PATCH 2/6] omxil: Try to enable YUV420p mode on Samsung Galaxy S II

Martin Storsjö martin at martin.st
Mon Dec 19 16:03:00 CET 2011


This is similar to the ThumbnailMode on Nexus S, except that
the index doesn't seem to be queryable dynamically
(I don't seem to find any string in the binaries that
would be the right one at least).
---
 modules/codec/omxil/omxil.c       |    8 ++++++++
 modules/codec/omxil/omxil_utils.h |    2 ++
 2 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/modules/codec/omxil/omxil.c b/modules/codec/omxil/omxil.c
index d12d09c..56a0c52 100644
--- a/modules/codec/omxil/omxil.c
+++ b/modules/codec/omxil/omxil.c
@@ -692,6 +692,14 @@ static OMX_ERRORTYPE InitialiseComponent(decoder_t *p_dec,
             OMX_BOOL enable = OMX_TRUE;
             omx_error = OMX_SetConfig(omx_handle, index, &enable);
             CHECK_ERROR(omx_error, "Unable to set ThumbnailMode");
+        } else {
+            OMX_BOOL enable = OMX_TRUE;
+            /* Needed on Samsung Galaxy S II */
+            omx_error = OMX_SetConfig(omx_handle, OMX_IndexVendorSetYUV420pMode, &enable);
+            if (omx_error == OMX_ErrorNone)
+                msg_Dbg(p_dec, "Set OMX_IndexVendorSetYUV420pMode successfully");
+            else
+                msg_Dbg(p_dec, "Unable to set OMX_IndexVendorSetYUV420pMode: %x", omx_error);
         }
     }
 
diff --git a/modules/codec/omxil/omxil_utils.h b/modules/codec/omxil/omxil_utils.h
index 4294170..f5bc2b1 100644
--- a/modules/codec/omxil/omxil_utils.h
+++ b/modules/codec/omxil/omxil_utils.h
@@ -185,3 +185,5 @@ unsigned int GetAudioParamSize(OMX_INDEXTYPE index);
  * Vendor specific color formats
  *****************************************************************************/
 #define OMX_QCOM_COLOR_FormatYVU420SemiPlanar 0x7FA30C00
+
+#define OMX_IndexVendorSetYUV420pMode 0x7f000003
-- 
1.7.2.5




More information about the vlc-devel mailing list