[Ffmpeg-devel] Last jpeg patch to support multiple-scan JPEGs

Cyril Russo cyril.russo
Mon Nov 20 14:26:34 CET 2006


Hi,


 >> Worse, the patch from Kostya doesn't solve the multiple scan JPEG   
 >> decoding errors as (s)he pretends. The problem is fully unrelated.
 >> Interleaved JPEG != Progressive JPEG != Multiple scan JPEG
 >  
 >   kostya posted a second patch which adds Multiple scan JPEG sipport
 >   by removing 6 lines and chagning 2, while yours duplicates a whole 
   function (which btw ive complained about in my review and you ignored
 >   it)
    
No, it's wrong. Kostya's patch doesn't add multiple scan JPEG support. 
He (I make the assumption he is a male)
added progressive support. There is a big difference with multiple scan 
support.

Again, try to decode the JPEG I've posted before with kostya version, it 
will fail.

It will fail because the number of components in a multiple scan JPEG is 
1 and not 3 like in interleaved and progressive jpegs.
This also means that the scan contain a reference to the current plane 
being decoded which is not supported in kostya version
(hence the id in my "new function").

If you read the code I've posted, you'll see the function is not the 
same at all (index is used when required instead
of i within the decode_block), the pointer to the data member is also 
different and so on...

I could have added the modification in the current kostya decode_scan 
function, but this would have required adding
another parameters to the (already) 6 parameters function.
In function body, this would have created a 2 paths function (based on 
if (nb_components>1) etc..), which I think is neither good or slimmer.

The main thing to understand is that those patches as unrelated in what 
they do. There is no such thing as "my patch is 2 lines, yours is 6",
as the kostya patch is for progressive jpeg, and mine is for multiple 
baseline scans.

You've written:

>can the normal mjpeg_decode_scan() with nb_components=1 instead of 3 not
>be used?

The answer is no, because of the index of  the scan is required.
Please have a look to the attached patch.

-- 
Cyril RUSSO
Video product manager
NEXVISION [ www.nexvision.fr ]
+33 (0) 49 111 888 3

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: new_multiplescanjpeg.patch
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20061120/c0097cdf/attachment.txt>



More information about the ffmpeg-devel mailing list