]> git.sesse.net Git - vlc/commitdiff
omxil: Adjust the slice height according to the crop rect for the TI color format
authorMartin Storsjö <martin@martin.st>
Wed, 4 Apr 2012 12:17:55 +0000 (15:17 +0300)
committerJean-Baptiste Kempf <jb@videolan.org>
Wed, 4 Apr 2012 12:08:38 +0000 (14:08 +0200)
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@videolan.org>
modules/codec/omxil/omxil.c

index fef6345e4c302e996ee400fb99d4122916bcf27b..5638232977ae9c0ef752ed9d0eb8ea509b85d662 100644 (file)
@@ -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
         {