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 37c0dc626d
)
Conflicts:
libavcodec/utils.c
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:

committed by
Michael Niedermayer

parent
3d207417fb
commit
fa86884dbc
@@ -167,10 +167,8 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
|
|||||||
case PIX_FMT_GBRP9BE:
|
case PIX_FMT_GBRP9BE:
|
||||||
case PIX_FMT_GBRP10LE:
|
case PIX_FMT_GBRP10LE:
|
||||||
case PIX_FMT_GBRP10BE:
|
case PIX_FMT_GBRP10BE:
|
||||||
w_align= 16; //FIXME check for non mpeg style codecs and use less alignment
|
w_align = 16; //FIXME assume 16 pixel per macroblock
|
||||||
h_align= 16;
|
h_align = 16 * 2; // interlaced needs 2 macroblocks height
|
||||||
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
|
|
||||||
break;
|
break;
|
||||||
case PIX_FMT_YUV411P:
|
case PIX_FMT_YUV411P:
|
||||||
case PIX_FMT_UYYVYY411:
|
case PIX_FMT_UYYVYY411:
|
||||||
|
Reference in New Issue
Block a user