aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafaël Carré <funman@videolan.org>2011-12-13 15:32:34 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-01-03 20:01:13 +0100
commitfa86884dbc8b261e7f2861fe49dbfa2375e82ff3 (patch)
tree74c617ad572f7fecf9636a7abab528ff8d17f727
parent3d207417fb72f404ca8b01fef4010bdb08fff476 (diff)
downloadffmpeg-fa86884dbc8b261e7f2861fe49dbfa2375e82ff3.tar.gz
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> (cherry picked from commit 37c0dc626d2f8254ef623d987eb5077f9120755f) Conflicts: libavcodec/utils.c Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/utils.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 8b4290eb4c..8cef043cb2 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -167,10 +167,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 || s->codec_id == CODEC_ID_PRORES)
- 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: