[Ffmpeg-devel] Incorrect JPEG decoding with patch

Guillaume POIRIER poirierg
Fri Nov 17 19:22:40 CET 2006


Hi,

On 11/17/06, Cyril Russo <cyril.russo at nexvision.fr> wrote:
> Hi all,
>
>  I've reported earlier that there was a bug with ffmpeg while decoding
> my pictures.
> I've dug into mjpeg.c file, and I've found that ffmpeg didn't support
> multiple scans JPEG.
>
> Well, not yet ;-)
>
> I've modified the JPEG decoder so it can handle multiple scans JPEG too.
> Currently, 95% of JPEG file have only one interleaved scan.
> Bad luck, the JPEG stream I must decode are 3 single scans (Y, Cr, Cb).
>
> Multiple scans are allowed in JFIF specification 1.02, but lacked until
> now in current mjpeg.c implementation.
> I've attached the patch, and I ask the devs for review.
> For testing the new features, download and decode from
> http://xryl669ny.free.fr/MyFile000.jpg



> -static int mjpeg_decode_scan(MJpegDecodeContext *s){
> +/* Modified by Cyril Russo, This function decodes interleaved scans, and was renamed as specified */
> +static int mjpeg_decode_iscan(MJpegDecodeContext *s){
>      int i, mb_x, mb_y;

Please add doxygen comments to document this function's prototype.


>
> +/* Added by Cyril Russo, this functions decode a scan when multiple scan are present inside the JPEG stream */
> +static int mjpeg_decode_scan(MJpegDecodeContext *s, int id){


same here

> +
>  static int mjpeg_decode_sos(MJpegDecodeContext *s)
>  {

and here

Guillaume
-- 
With DADVSI (http://en.wikipedia.org/wiki/DADVSI), France finally has
a lead on USA on selling out individuals right to corporations!
Vive la France!




More information about the ffmpeg-devel mailing list