[vlc-commits] omxil: Adjust the slice height according to the crop rect for the TI color format

Martin Storsjö git at videolan.org
Wed Apr 4 15:06:08 CEST 2012


vlc | branch: master | Martin Storsjö <martin at martin.st> | Wed Apr  4 15:17:55 2012 +0300| [23b30335711f1fba234d8e93ee11cff1c0adbaec] | committer: Jean-Baptiste Kempf

omxil: Adjust the slice height according to the crop rect for the TI color format

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.

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

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

 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
         {



More information about the vlc-commits mailing list