[FFmpeg-cvslog] r15055 - in trunk: libavcodec/ljpegenc.c tests/ffmpeg.regression.ref tests/rotozoom.regression.ref tests/seek.regression.ref

michael subversion
Sat Aug 30 22:39:12 CEST 2008


Author: michael
Date: Sat Aug 30 22:39:12 2008
New Revision: 15055

Log:
Fix lossless jpeg encoder to comply to spec and store full redundant
residuals, Note this does not change RGB32 as we need to check this
against some decoder that supports it.


Modified:
   trunk/libavcodec/ljpegenc.c
   trunk/tests/ffmpeg.regression.ref
   trunk/tests/rotozoom.regression.ref
   trunk/tests/seek.regression.ref

Modified: trunk/libavcodec/ljpegenc.c
==============================================================================
--- trunk/libavcodec/ljpegenc.c	(original)
+++ trunk/libavcodec/ljpegenc.c	Sat Aug 30 22:39:12 2008
@@ -141,9 +141,9 @@ static int encode_picture_lossless(AVCod
                                 }
 
                                 if(i==0)
-                                    ff_mjpeg_encode_dc(s, (int8_t)(*ptr - pred), m->huff_size_dc_luminance, m->huff_code_dc_luminance); //FIXME ugly
+                                    ff_mjpeg_encode_dc(s, *ptr - pred, m->huff_size_dc_luminance, m->huff_code_dc_luminance); //FIXME ugly
                                 else
-                                    ff_mjpeg_encode_dc(s, (int8_t)(*ptr - pred), m->huff_size_dc_chrominance, m->huff_code_dc_chrominance);
+                                    ff_mjpeg_encode_dc(s, *ptr - pred, m->huff_size_dc_chrominance, m->huff_code_dc_chrominance);
                             }
                         }
                     }
@@ -164,9 +164,9 @@ static int encode_picture_lossless(AVCod
                                 PREDICT(pred, ptr[-linesize-1], ptr[-linesize], ptr[-1], predictor);
 
                                 if(i==0)
-                                    ff_mjpeg_encode_dc(s, (int8_t)(*ptr - pred), m->huff_size_dc_luminance, m->huff_code_dc_luminance); //FIXME ugly
+                                    ff_mjpeg_encode_dc(s, *ptr - pred, m->huff_size_dc_luminance, m->huff_code_dc_luminance); //FIXME ugly
                                 else
-                                    ff_mjpeg_encode_dc(s, (int8_t)(*ptr - pred), m->huff_size_dc_chrominance, m->huff_code_dc_chrominance);
+                                    ff_mjpeg_encode_dc(s, *ptr - pred, m->huff_size_dc_chrominance, m->huff_code_dc_chrominance);
                             }
                         }
                     }

Modified: trunk/tests/ffmpeg.regression.ref
==============================================================================
--- trunk/tests/ffmpeg.regression.ref	(original)
+++ trunk/tests/ffmpeg.regression.ref	Sat Aug 30 22:39:12 2008
@@ -110,8 +110,8 @@ stddev:    6.34 PSNR: 32.07 bytes:  7603
 1567580 ./tests/data/a-mjpeg.avi
 18c3a76f984e717dd886d21fa04355f6 *./tests/data/mjpeg.vsynth.out.yuv
 stddev:    7.93 PSNR: 30.13 bytes:  7603200/  7603200
-5a662e3833d900b56cca79ba5ed5ec06 *./tests/data/a-ljpeg.avi
-6264498 ./tests/data/a-ljpeg.avi
+7c79e97bbe4b2eac12a4bef0568eeb93 *./tests/data/a-ljpeg.avi
+6312866 ./tests/data/a-ljpeg.avi
 799d3db687f6cdd7a837ec156efc171f *./tests/data/ljpeg.vsynth.out.yuv
 stddev:    0.00 PSNR:999.99 bytes:  7603200/  7603200
 dca9d700da7857217408c310c501b9bc *./tests/data/a-jpegls.avi

Modified: trunk/tests/rotozoom.regression.ref
==============================================================================
--- trunk/tests/rotozoom.regression.ref	(original)
+++ trunk/tests/rotozoom.regression.ref	Sat Aug 30 22:39:12 2008
@@ -110,8 +110,8 @@ b179402bba391073b5f5f9324a834061 *./test
 703564 ./tests/data/a-mjpeg.avi
 b1aa72cfb6f9cc3f525b27abc86a8f51 *./tests/data/mjpeg.rotozoom.out.yuv
 stddev:    4.38 PSNR: 35.28 bytes:  7603200/  7603200
-bc0d8c868c1a05db0ff03f41768f6c5e *./tests/data/a-ljpeg.avi
-4766558 ./tests/data/a-ljpeg.avi
+554a4a6a5a9058c588f8bf2de405bc70 *./tests/data/a-ljpeg.avi
+4766914 ./tests/data/a-ljpeg.avi
 dde5895817ad9d219f79a52d0bdfb001 *./tests/data/ljpeg.rotozoom.out.yuv
 stddev:    0.00 PSNR:999.99 bytes:  7603200/  7603200
 f67cd488dfd06c03ad1d6d94d81b80c8 *./tests/data/a-jpegls.avi

Modified: trunk/tests/seek.regression.ref
==============================================================================
--- trunk/tests/seek.regression.ref	(original)
+++ trunk/tests/seek.regression.ref	Sat Aug 30 22:39:12 2008
@@ -997,51 +997,51 @@ ret: 0 st: 0 dts:0.480000 pts:0.480000 p
 ret:-1 st:-1 ts:-0.645825 flags:1
 ----------------
 tests/data/a-ljpeg.avi
-ret: 0 st: 0 dts:0.000000 pts:0.000000 pos:101714 size:96046 flags:1
+ret: 0 st: 0 dts:0.000000 pts:0.000000 pos:101738 size:96069 flags:1
 ret: 0 st:-1 ts:-1.000000 flags:0
-ret: 0 st: 0 dts:0.000000 pts:0.000000 pos:101714 size:96046 flags:1
+ret: 0 st: 0 dts:0.000000 pts:0.000000 pos:101738 size:96069 flags:1
 ret: 0 st:-1 ts:1.894167 flags:1
-ret: 0 st: 0 dts:1.880000 pts:1.880000 pos:4576420 size:94867 flags:1
+ret: 0 st: 0 dts:1.880000 pts:1.880000 pos:4576754 size:94870 flags:1
 ret: 0 st: 0 ts:0.800000 flags:0
-ret: 0 st: 0 dts:0.800000 pts:0.800000 pos:1997656 size:95452 flags:1
+ret: 0 st: 0 dts:0.800000 pts:0.800000 pos:1997804 size:95465 flags:1
 ret:-1 st: 0 ts:-0.320000 flags:1
 ret:-1 st:-1 ts:2.576668 flags:0
 ret: 0 st:-1 ts:1.470835 flags:1
-ret: 0 st: 0 dts:1.480000 pts:1.480000 pos:3623216 size:95720 flags:1
+ret: 0 st: 0 dts:1.480000 pts:1.480000 pos:3623468 size:95724 flags:1
 ret: 0 st: 0 ts:0.360000 flags:0
-ret: 0 st: 0 dts:0.360000 pts:0.360000 pos:949522 size:94624 flags:1
+ret: 0 st: 0 dts:0.360000 pts:0.360000 pos:949600 size:94635 flags:1
 ret:-1 st: 0 ts:-0.760000 flags:1
 ret:-1 st:-1 ts:2.153336 flags:0
 ret: 0 st:-1 ts:1.047503 flags:1
-ret: 0 st: 0 dts:1.040000 pts:1.040000 pos:2571070 size:95642 flags:1
+ret: 0 st: 0 dts:1.040000 pts:1.040000 pos:2571236 size:95649 flags:1
 ret: 0 st: 0 ts:-0.040000 flags:0
-ret: 0 st: 0 dts:0.000000 pts:0.000000 pos:101714 size:96046 flags:1
+ret: 0 st: 0 dts:0.000000 pts:0.000000 pos:101738 size:96069 flags:1
 ret: 0 st: 0 ts:2.840000 flags:1
-ret: 0 st: 0 dts:1.960000 pts:1.960000 pos:-1 size:94581 flags:1
+ret: 0 st: 0 dts:1.960000 pts:1.960000 pos:-1 size:94595 flags:1
 ret: 0 st:-1 ts:1.730004 flags:0
-ret: 0 st: 0 dts:1.720000 pts:1.720000 pos:4196396 size:95340 flags:1
+ret: 0 st: 0 dts:1.720000 pts:1.720000 pos:4196712 size:95353 flags:1
 ret: 0 st:-1 ts:0.624171 flags:1
-ret: 0 st: 0 dts:0.640000 pts:0.640000 pos:1615596 size:95411 flags:1
+ret: 0 st: 0 dts:0.640000 pts:0.640000 pos:1615714 size:95410 flags:1
 ret: 0 st: 0 ts:-0.480000 flags:0
-ret: 0 st: 0 dts:0.000000 pts:0.000000 pos:101714 size:96046 flags:1
+ret: 0 st: 0 dts:0.000000 pts:0.000000 pos:101738 size:96069 flags:1
 ret: 0 st: 0 ts:2.400000 flags:1
-ret: 0 st: 0 dts:1.960000 pts:1.960000 pos:-1 size:94581 flags:1
+ret: 0 st: 0 dts:1.960000 pts:1.960000 pos:-1 size:94595 flags:1
 ret: 0 st:-1 ts:1.306672 flags:0
-ret: 0 st: 0 dts:1.320000 pts:1.320000 pos:3240494 size:95577 flags:1
+ret: 0 st: 0 dts:1.320000 pts:1.320000 pos:3240722 size:95587 flags:1
 ret: 0 st:-1 ts:0.200839 flags:1
-ret: 0 st: 0 dts:0.200000 pts:0.200000 pos:571462 size:94255 flags:1
+ret: 0 st: 0 dts:0.200000 pts:0.200000 pos:571508 size:94261 flags:1
 ret: 0 st: 0 ts:-0.920000 flags:0
-ret: 0 st: 0 dts:0.000000 pts:0.000000 pos:101714 size:96046 flags:1
+ret: 0 st: 0 dts:0.000000 pts:0.000000 pos:101738 size:96069 flags:1
 ret: 0 st: 0 ts:2.000000 flags:1
-ret: 0 st: 0 dts:1.960000 pts:1.960000 pos:-1 size:94581 flags:1
+ret: 0 st: 0 dts:1.960000 pts:1.960000 pos:-1 size:94595 flags:1
 ret: 0 st:-1 ts:0.883340 flags:0
-ret: 0 st: 0 dts:0.880000 pts:0.880000 pos:2188690 size:95527 flags:1
+ret: 0 st: 0 dts:0.880000 pts:0.880000 pos:2188850 size:95528 flags:1
 ret:-1 st:-1 ts:-0.222493 flags:1
 ret:-1 st: 0 ts:2.680000 flags:0
 ret: 0 st: 0 ts:1.560000 flags:1
-ret: 0 st: 0 dts:1.560000 pts:1.560000 pos:3814484 size:95608 flags:1
+ret: 0 st: 0 dts:1.560000 pts:1.560000 pos:3814762 size:95615 flags:1
 ret: 0 st:-1 ts:0.460008 flags:0
-ret: 0 st: 0 dts:0.480000 pts:0.480000 pos:1234190 size:95024 flags:1
+ret: 0 st: 0 dts:0.480000 pts:0.480000 pos:1234290 size:95032 flags:1
 ret:-1 st:-1 ts:-0.645825 flags:1
 ----------------
 tests/data/a-mjpeg.avi




More information about the ffmpeg-cvslog mailing list