summaryrefslogtreecommitdiff
path: root/libavcodec/utils.c
diff options
context:
space:
mode:
authorRafaël Carré <funman@videolan.org>2011-12-13 15:32:34 +0100
committerLuca Barbato <lu_zero@gentoo.org>2011-12-21 00:00:23 +0100
commit37c0dc626d2f8254ef623d987eb5077f9120755f (patch)
tree3c27a18f219d6c1b30623278a4c14da95d479311 /libavcodec/utils.c
parent91b1e6f0c678e5d096185c2011f4ca56a3290a20 (diff)
lavc: always align height by 32 pixel
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>
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 9d17ee4edb..20b01f5df4 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -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: