[FFmpeg-devel] [PATCH]Fix linesize for pix_fmt pal8
Carl Eugen Hoyos
cehoyos at ag.or.at
Thu Jun 14 08:42:04 CEST 2012
Stefano Sabatini <stefasab <at> gmail.com> writes:
> > + else if (desc->flags & PIX_FMT_PAL) {
> > + // 2 would be sufficient for QuickTime,
> > + // but 4 works and is what avi and mov samples use
> > + linesize = FFALIGN(linesize, 4);
> > + }
> > return linesize;
>
> Can you elaborate why this is needed?
$ ./ffmpeg -i tests/lena.pnm -s 257x257 -pix_fmt pal8 -vcodec rawvideo out.avi
$ ./ffplay out.avi
> Note that the alignment is defined by av_image_alloc(), and in general
> I don't see why a paletted image should need an aligned size, so I'd
> prefer to avoid the special casing, or in other words this seems more
> a libavcodec issue (and should be addressed there).
Please elaborate.
Carl Eugen
More information about the ffmpeg-devel
mailing list