[vlc-devel] [PATCH 08/21] Pass the slice height to CopyOmxPicture

Martin Storsjo martin at martin.st
Sun Sep 4 14:54:13 CEST 2011


From: Martin Storsjö <martin at martin.st>

This is necessary for handling omx buffers with padding between
the planes, indicated by a larger slice height than the actual
frame height, occurring on Nexus One with recent CyanogenMod
with the OpenMAX driver built from source (opposed to the older
ones with a binary-only OpenMAX driver).
---
 modules/codec/omxil/omxil.c       |    2 +-
 modules/codec/omxil/omxil_utils.h |    2 +-
 modules/codec/omxil/utils.c       |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/codec/omxil/omxil.c b/modules/codec/omxil/omxil.c
index e353fd9..d51917d 100644
--- a/modules/codec/omxil/omxil.c
+++ b/modules/codec/omxil/omxil.c
@@ -1080,7 +1080,7 @@ static picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block )
                 p_pic = decoder_NewPicture( p_dec );
                 if( !p_pic ) break; /* No picture available */
 
-                CopyOmxPicture(p_dec, p_pic, p_header);
+                CopyOmxPicture(p_dec, p_pic, p_header, p_sys->out.definition.format.video.nSliceHeight);
             }
 
             p_pic->date = p_header->nTimeStamp;
diff --git a/modules/codec/omxil/omxil_utils.h b/modules/codec/omxil/omxil_utils.h
index ab1a5b5..63c23c3 100644
--- a/modules/codec/omxil/omxil_utils.h
+++ b/modules/codec/omxil/omxil_utils.h
@@ -119,7 +119,7 @@ OMX_ERRORTYPE WaitForSpecificOmxEvent(decoder_t *p_dec,
 /*****************************************************************************
  * Picture utility functions
  *****************************************************************************/
-void CopyOmxPicture( decoder_t *, picture_t *, OMX_BUFFERHEADERTYPE * );
+void CopyOmxPicture( decoder_t *, picture_t *, OMX_BUFFERHEADERTYPE *, int );
 void CopyVlcPicture( decoder_t *, OMX_BUFFERHEADERTYPE *, picture_t * );
 
 /*****************************************************************************
diff --git a/modules/codec/omxil/utils.c b/modules/codec/omxil/utils.c
index 20283a6..00b45a7 100644
--- a/modules/codec/omxil/utils.c
+++ b/modules/codec/omxil/utils.c
@@ -125,7 +125,7 @@ OMX_ERRORTYPE WaitForSpecificOmxEvent(decoder_t *p_dec,
  * Picture utility functions
  *****************************************************************************/
 void CopyOmxPicture( decoder_t *p_dec, picture_t *p_pic,
-                     OMX_BUFFERHEADERTYPE *p_header )
+                     OMX_BUFFERHEADERTYPE *p_header, int i_slice_height )
 {
     decoder_sys_t *p_sys = p_dec->p_sys;
     int i_src_stride, i_dst_stride;
-- 
1.7.2.5




More information about the vlc-devel mailing list