[FFmpeg-devel] Issues with ljpeg
Mathieu Malaterre
mathieu.malaterre
Fri Aug 15 19:31:13 CEST 2008
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:
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.
Thanks,
--
Mathieu
More information about the ffmpeg-devel
mailing list