[vlc-devel] [PATCH 4/9] omxil: Adjust the slice height according to the crop rect for the TI color format

Martin Storsjö martin at martin.st
Wed Apr 4 14:17:55 CEST 2012


This interpretation of nTop isn't too intuitive to me, but this is what
frameworks/base/media/libstagefright/colorconversion/ColorConverter.cpp
does for this pixel format.
---
 modules/codec/omxil/omxil.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/modules/codec/omxil/omxil.c b/modules/codec/omxil/omxil.c
index fef6345..5638232 100644
--- a/modules/codec/omxil/omxil.c
+++ b/modules/codec/omxil/omxil.c
@@ -453,6 +453,8 @@ static OMX_ERRORTYPE GetPortDefinition(decoder_t *p_dec, OmxPort *p_port,
             p_fmt->video.i_visible_width = crop_rect.nWidth;
             p_fmt->video.i_height = crop_rect.nHeight;
             p_fmt->video.i_visible_height = crop_rect.nHeight;
+            if (def->format.video.eColorFormat == OMX_TI_COLOR_FormatYUV420PackedSemiPlanar)
+                def->format.video.nSliceHeight -= crop_rect.nTop/2;
         }
         else
         {
-- 
1.7.2.5




More information about the vlc-devel mailing list