[FFmpeg-devel] [PATCH]Fix linesize for pix_fmt pal8

Stefano Sabatini stefasab at gmail.com
Tue Jun 19 13:54:32 CEST 2012

On date Sunday 2012-06-17 21:24:23 +0000, Carl Eugen Hoyos encoded:
> Stefano Sabatini <stefasab <at> gmail.com> writes:
> > > $ ./ffmpeg -i tests/lena.pnm -s 257x257 -pix_fmt pal8 
> > > -vcodec rawvideo out.avi
> > > $ ./ffplay out.avi
> > Elaborating more...
> [...]
> Afaict what you write is correct.
> All I can add is that:
> Afaict, the decoder behaves correctly (matching WMP and QT).
> The encoder behaves differently and I don't think 
> avpicture_layout() is correct for PAL8 and any use case.

Check attached patch, it should fix the problem when coupled with the
new imgutils functions.

Note that I don't think rawenc+rawdec can still work, consider the
cases in rawdec.c/raw_decode:
    //2bpp and 4bpp raw in avi and mov (yes this is ugly ...)

they are not covered at all in rawenc.

Also we could rename the array ff_force_align_pix_fmts to
ff_force_align4_pix_fmts or even better create a function which maps
rawvideo pixel format -> alignment.
FFmpeg = Fiendish and Fancy Minimalistic Philosophical Ephemeral Generator
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006-lavc-consistently-set-forced-alignment-in-rawvideo-d.patch
Type: text/x-diff
Size: 4886 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120619/fc286525/attachment.bin>

More information about the ffmpeg-devel mailing list