[FFmpeg-devel] [PATCH]Avoid overflows when reading pgm with maxval != 255 and 65535

Carl Eugen Hoyos cehoyos at ag.or.at
Mon Jul 29 00:17:45 CEST 2013


Michael Niedermayer <michaelni <at> gmx.at> writes:

> > libjpeg v6b can write 12bit pgm files that show 
> > white noise with ImageMagick and gimp, FFmpeg 
> > shows recognizable but very broken images.

> > The reason is that the bits above maxval (4095) 
> > are not initialized.

The actual reason is that libjpeg v6b writes little 
endian 16bit pgm files, the specification requires 
big endian values.

> > Attached patch is only tested for the specific 
> > 12bit gray16 case.

> please upload the pmn file this patch is about

Uploaded to ticket #2812.

Carl Eugen



More information about the ffmpeg-devel mailing list