]> git.sesse.net Git - ffmpeg/commitdiff
lavc: always align height by 32 pixel
authorRafaël Carré <funman@videolan.org>
Tue, 13 Dec 2011 14:32:34 +0000 (15:32 +0100)
committerLuca Barbato <lu_zero@gentoo.org>
Tue, 20 Dec 2011 23:00:23 +0000 (00:00 +0100)
Interlaced content for most codec requires it.
This patch is a stop-gap pending a serious rework to support
codecs with non 16 pixel macroblocks.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
libavcodec/utils.c

index 9d17ee4edb4a6473fbfe5daf40134ab2d28a6868..20b01f5df42570080090eff82d7ffe4d2b412052 100644 (file)
@@ -166,10 +166,8 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
     case PIX_FMT_GBRP9BE:
     case PIX_FMT_GBRP10LE:
     case PIX_FMT_GBRP10BE:
-        w_align= 16; //FIXME check for non mpeg style codecs and use less alignment
-        h_align= 16;
-        if(s->codec_id == CODEC_ID_MPEG2VIDEO || s->codec_id == CODEC_ID_MJPEG || s->codec_id == CODEC_ID_AMV || s->codec_id == CODEC_ID_THP || s->codec_id == CODEC_ID_H264)
-            h_align= 32; // interlaced is rounded up to 2 MBs
+        w_align = 16; //FIXME assume 16 pixel per macroblock
+        h_align = 16 * 2; // interlaced needs 2 macroblocks height
         break;
     case PIX_FMT_YUV411P:
     case PIX_FMT_UYYVYY411: