[FFmpeg-devel] [PATCH]Simplify decoding of ljpeg files

Carl Eugen Hoyos cehoyos
Sun Nov 23 00:09:24 CET 2008


Hi!

Attached patch simplifies both encoding and decoding of 
lossless jpeg:
With current svn, LJPG does not automatically set a colourspace when 
encoding, which makes encoding painful if you don't know exactly what to 
do.
Decoding of ljpeg files is currently difficult, ffplay can't autodetect 
them correctly.

With the patch, ffmpeg -i tests/lena.pnm lena.ljpg encodes a file that can 
be decoded with autodetection and shown with ffplay lena.ljpg.

Carl Eugen
-------------- next part --------------
Index: libavformat/img2.c
===================================================================
--- libavformat/img2.c	(Revision 15909)
+++ libavformat/img2.c	(Arbeitskopie)
@@ -41,7 +41,7 @@
 static const IdStrMap img_tags[] = {
     { CODEC_ID_MJPEG     , "jpeg"},
     { CODEC_ID_MJPEG     , "jpg"},
-    { CODEC_ID_LJPEG     , "ljpg"},
+    { CODEC_ID_JPEGLS    , "ljpg"},
     { CODEC_ID_PNG       , "png"},
     { CODEC_ID_PNG       , "mng"},
     { CODEC_ID_PPM       , "ppm"},



More information about the ffmpeg-devel mailing list