[FFmpeg-devel] Issues with ljpeg

Michael Niedermayer michaelni
Fri Aug 15 23:40:17 CEST 2008


On Fri, Aug 15, 2008 at 07:31:13PM +0200, Mathieu Malaterre wrote:
> A couple of comments on ljpeg encoder:
> 
> 1. (minor) There is no such thing as Ss=8 in JPEG lossless.
> 
>  $ ffmpeg -f image2 -i beach.jpg -f image2 -pred 7 -vcodec ljpeg
> /tmp/out0.ljpeg
> 
> As far as I under the code when pred is > 7 then predictor=7 is used
> (see PREDICT macro in mjpeg.h). But Ss=8 is stored in the jpeg header.
> 

> 2. A more serious issue is for pred=4, pred=5 and pred=6. I made some
> snapshots of what I can see using IJG decompressor (+lossless patch)
> here:

what is "IJG decompressor (+lossless patch)" ?


> 
> http://jpeg.sourceforge.net/ffmpeg/
> 
>   Using the following command lines:
> 
> ./ffmpeg -f image2 -i beach.jpg -f image2 -pred 6 -vcodec ljpeg  /tmp/out6.ljpeg
> ./ffmpeg -f image2 -i beach.jpg -f image2 -pred 5 -vcodec ljpeg  /tmp/out5.ljpeg
> ./ffmpeg -f image2 -i beach.jpg -f image2 -pred 4 -vcodec ljpeg  /tmp/out4.ljpeg
> 
> Sorry I could not find the issue, but if anyone understand where the
> issue could be coming from, I volunteer to prepare the patch.

look at the int8_t casts and &0x1FF
i think these are wrong, patch welcome and dont forget
1. the regression tests, they might need to be updated
2. check samples.mplayerhq.hu that the change does not break any ljpegs from
   there


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Concerning the gods, I have no means of knowing whether they exist or not
or of what sort they may be, because of the obscurity of the subject, and
the brevity of human life -- Protagoras
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080815/1c64bb5b/attachment.pgp>



More information about the ffmpeg-devel mailing list