[vlc-commits] omxil: Ignore nSliceHeight on Galaxy S II
    Martin Storsjö 
    git at videolan.org
       
    Tue Dec 20 00:23:48 CET 2011
    
    
  
vlc/vlc-1.2 | branch: master | Martin Storsjö <martin at martin.st> | Mon Dec 19 17:02:59 2011 +0200| [51ad7ca72450703756387d32ddee8a0f28c04688] | committer: Jean-Baptiste Kempf
omxil: Ignore nSliceHeight on Galaxy S II
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
(cherry picked from commit 6d71b5c008e15f1718b8966b094f3701714c0f6a)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.2.git/?a=commit;h=51ad7ca72450703756387d32ddee8a0f28c04688
---
 modules/codec/omxil/omxil.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/modules/codec/omxil/omxil.c b/modules/codec/omxil/omxil.c
index dde8126..d12d09c 100644
--- a/modules/codec/omxil/omxil.c
+++ b/modules/codec/omxil/omxil.c
@@ -445,6 +445,18 @@ static OMX_ERRORTYPE GetPortDefinition(decoder_t *p_dec, OmxPort *p_port,
                     strlen("OMX.qcom.video.decoder")))
             def->format.video.eColorFormat = OMX_QCOM_COLOR_FormatYVU420SemiPlanar;
 
+        /* Hack: Galaxy S II (stock firmware) gives a slice height larger
+         * than the video height, but this doesn't imply padding between
+         * the video planes. Nexus S also has a slice height larger than
+         * the video height, but there it actually is real padding, thus
+         * Galaxy S II is the buggy one. The Galaxy S II decoder is
+         * named OMX.SEC.avcdec while the one on Nexus S is
+         * OMX.SEC.AVC.Decoder. Thus do this for any OMX.SEC. that don't
+         * contain the string ".Decoder". */
+        if(!strncmp(p_sys->psz_component, "OMX.SEC.", strlen("OMX.SEC.")) &&
+           !strstr(p_sys->psz_component, ".Decoder"))
+            def->format.video.nSliceHeight = 0;
+
         if(!GetVlcVideoFormat( def->format.video.eCompressionFormat,
                                &p_fmt->i_codec, 0 ) )
         {
    
    
More information about the vlc-commits
mailing list