[vlc-commits] omxil: Try to enable YUV420p mode on Samsung Galaxy S II

Martin Storsjö git at videolan.org
Mon Dec 19 21:54:07 CET 2011


vlc | branch: master | Martin Storsjö <martin at martin.st> | Mon Dec 19 17:03:00 2011 +0200| [95b27424f19019af490cb6486797b1a8f124817b] | committer: Jean-Baptiste Kempf

omxil: Try to enable YUV420p mode on Samsung Galaxy S II

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).

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=95b27424f19019af490cb6486797b1a8f124817b
---

 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



More information about the vlc-commits mailing list