Revision d3b4b74c

View differences:

libavcodec/ljpegenc.c
141 141
                                }
142 142

  
143 143
                                if(i==0)
144
                                    ff_mjpeg_encode_dc(s, (int8_t)(*ptr - pred), m->huff_size_dc_luminance, m->huff_code_dc_luminance); //FIXME ugly
144
                                    ff_mjpeg_encode_dc(s, *ptr - pred, m->huff_size_dc_luminance, m->huff_code_dc_luminance); //FIXME ugly
145 145
                                else
146
                                    ff_mjpeg_encode_dc(s, (int8_t)(*ptr - pred), m->huff_size_dc_chrominance, m->huff_code_dc_chrominance);
146
                                    ff_mjpeg_encode_dc(s, *ptr - pred, m->huff_size_dc_chrominance, m->huff_code_dc_chrominance);
147 147
                            }
148 148
                        }
149 149
                    }
......
164 164
                                PREDICT(pred, ptr[-linesize-1], ptr[-linesize], ptr[-1], predictor);
165 165

  
166 166
                                if(i==0)
167
                                    ff_mjpeg_encode_dc(s, (int8_t)(*ptr - pred), m->huff_size_dc_luminance, m->huff_code_dc_luminance); //FIXME ugly
167
                                    ff_mjpeg_encode_dc(s, *ptr - pred, m->huff_size_dc_luminance, m->huff_code_dc_luminance); //FIXME ugly
168 168
                                else
169
                                    ff_mjpeg_encode_dc(s, (int8_t)(*ptr - pred), m->huff_size_dc_chrominance, m->huff_code_dc_chrominance);
169
                                    ff_mjpeg_encode_dc(s, *ptr - pred, m->huff_size_dc_chrominance, m->huff_code_dc_chrominance);
170 170
                            }
171 171
                        }
172 172
                    }
tests/ffmpeg.regression.ref
110 110
1567580 ./tests/data/a-mjpeg.avi
111 111
18c3a76f984e717dd886d21fa04355f6 *./tests/data/mjpeg.vsynth.out.yuv
112 112
stddev:    7.93 PSNR: 30.13 bytes:  7603200/  7603200
113
5a662e3833d900b56cca79ba5ed5ec06 *./tests/data/a-ljpeg.avi
114
6264498 ./tests/data/a-ljpeg.avi
113
7c79e97bbe4b2eac12a4bef0568eeb93 *./tests/data/a-ljpeg.avi
114
6312866 ./tests/data/a-ljpeg.avi
115 115
799d3db687f6cdd7a837ec156efc171f *./tests/data/ljpeg.vsynth.out.yuv
116 116
stddev:    0.00 PSNR:999.99 bytes:  7603200/  7603200
117 117
dca9d700da7857217408c310c501b9bc *./tests/data/a-jpegls.avi
tests/rotozoom.regression.ref
110 110
703564 ./tests/data/a-mjpeg.avi
111 111
b1aa72cfb6f9cc3f525b27abc86a8f51 *./tests/data/mjpeg.rotozoom.out.yuv
112 112
stddev:    4.38 PSNR: 35.28 bytes:  7603200/  7603200
113
bc0d8c868c1a05db0ff03f41768f6c5e *./tests/data/a-ljpeg.avi
114
4766558 ./tests/data/a-ljpeg.avi
113
554a4a6a5a9058c588f8bf2de405bc70 *./tests/data/a-ljpeg.avi
114
4766914 ./tests/data/a-ljpeg.avi
115 115
dde5895817ad9d219f79a52d0bdfb001 *./tests/data/ljpeg.rotozoom.out.yuv
116 116
stddev:    0.00 PSNR:999.99 bytes:  7603200/  7603200
117 117
f67cd488dfd06c03ad1d6d94d81b80c8 *./tests/data/a-jpegls.avi
tests/seek.regression.ref
997 997
ret:-1 st:-1 ts:-0.645825 flags:1
998 998
----------------
999 999
tests/data/a-ljpeg.avi
1000
ret: 0 st: 0 dts:0.000000 pts:0.000000 pos:101714 size:96046 flags:1
1000
ret: 0 st: 0 dts:0.000000 pts:0.000000 pos:101738 size:96069 flags:1
1001 1001
ret: 0 st:-1 ts:-1.000000 flags:0
1002
ret: 0 st: 0 dts:0.000000 pts:0.000000 pos:101714 size:96046 flags:1
1002
ret: 0 st: 0 dts:0.000000 pts:0.000000 pos:101738 size:96069 flags:1
1003 1003
ret: 0 st:-1 ts:1.894167 flags:1
1004
ret: 0 st: 0 dts:1.880000 pts:1.880000 pos:4576420 size:94867 flags:1
1004
ret: 0 st: 0 dts:1.880000 pts:1.880000 pos:4576754 size:94870 flags:1
1005 1005
ret: 0 st: 0 ts:0.800000 flags:0
1006
ret: 0 st: 0 dts:0.800000 pts:0.800000 pos:1997656 size:95452 flags:1
1006
ret: 0 st: 0 dts:0.800000 pts:0.800000 pos:1997804 size:95465 flags:1
1007 1007
ret:-1 st: 0 ts:-0.320000 flags:1
1008 1008
ret:-1 st:-1 ts:2.576668 flags:0
1009 1009
ret: 0 st:-1 ts:1.470835 flags:1
1010
ret: 0 st: 0 dts:1.480000 pts:1.480000 pos:3623216 size:95720 flags:1
1010
ret: 0 st: 0 dts:1.480000 pts:1.480000 pos:3623468 size:95724 flags:1
1011 1011
ret: 0 st: 0 ts:0.360000 flags:0
1012
ret: 0 st: 0 dts:0.360000 pts:0.360000 pos:949522 size:94624 flags:1
1012
ret: 0 st: 0 dts:0.360000 pts:0.360000 pos:949600 size:94635 flags:1
1013 1013
ret:-1 st: 0 ts:-0.760000 flags:1
1014 1014
ret:-1 st:-1 ts:2.153336 flags:0
1015 1015
ret: 0 st:-1 ts:1.047503 flags:1
1016
ret: 0 st: 0 dts:1.040000 pts:1.040000 pos:2571070 size:95642 flags:1
1016
ret: 0 st: 0 dts:1.040000 pts:1.040000 pos:2571236 size:95649 flags:1
1017 1017
ret: 0 st: 0 ts:-0.040000 flags:0
1018
ret: 0 st: 0 dts:0.000000 pts:0.000000 pos:101714 size:96046 flags:1
1018
ret: 0 st: 0 dts:0.000000 pts:0.000000 pos:101738 size:96069 flags:1
1019 1019
ret: 0 st: 0 ts:2.840000 flags:1
1020
ret: 0 st: 0 dts:1.960000 pts:1.960000 pos:-1 size:94581 flags:1
1020
ret: 0 st: 0 dts:1.960000 pts:1.960000 pos:-1 size:94595 flags:1
1021 1021
ret: 0 st:-1 ts:1.730004 flags:0
1022
ret: 0 st: 0 dts:1.720000 pts:1.720000 pos:4196396 size:95340 flags:1
1022
ret: 0 st: 0 dts:1.720000 pts:1.720000 pos:4196712 size:95353 flags:1
1023 1023
ret: 0 st:-1 ts:0.624171 flags:1
1024
ret: 0 st: 0 dts:0.640000 pts:0.640000 pos:1615596 size:95411 flags:1
1024
ret: 0 st: 0 dts:0.640000 pts:0.640000 pos:1615714 size:95410 flags:1
1025 1025
ret: 0 st: 0 ts:-0.480000 flags:0
1026
ret: 0 st: 0 dts:0.000000 pts:0.000000 pos:101714 size:96046 flags:1
1026
ret: 0 st: 0 dts:0.000000 pts:0.000000 pos:101738 size:96069 flags:1
1027 1027
ret: 0 st: 0 ts:2.400000 flags:1
1028
ret: 0 st: 0 dts:1.960000 pts:1.960000 pos:-1 size:94581 flags:1
1028
ret: 0 st: 0 dts:1.960000 pts:1.960000 pos:-1 size:94595 flags:1
1029 1029
ret: 0 st:-1 ts:1.306672 flags:0
1030
ret: 0 st: 0 dts:1.320000 pts:1.320000 pos:3240494 size:95577 flags:1
1030
ret: 0 st: 0 dts:1.320000 pts:1.320000 pos:3240722 size:95587 flags:1
1031 1031
ret: 0 st:-1 ts:0.200839 flags:1
1032
ret: 0 st: 0 dts:0.200000 pts:0.200000 pos:571462 size:94255 flags:1
1032
ret: 0 st: 0 dts:0.200000 pts:0.200000 pos:571508 size:94261 flags:1
1033 1033
ret: 0 st: 0 ts:-0.920000 flags:0
1034
ret: 0 st: 0 dts:0.000000 pts:0.000000 pos:101714 size:96046 flags:1
1034
ret: 0 st: 0 dts:0.000000 pts:0.000000 pos:101738 size:96069 flags:1
1035 1035
ret: 0 st: 0 ts:2.000000 flags:1
1036
ret: 0 st: 0 dts:1.960000 pts:1.960000 pos:-1 size:94581 flags:1
1036
ret: 0 st: 0 dts:1.960000 pts:1.960000 pos:-1 size:94595 flags:1
1037 1037
ret: 0 st:-1 ts:0.883340 flags:0
1038
ret: 0 st: 0 dts:0.880000 pts:0.880000 pos:2188690 size:95527 flags:1
1038
ret: 0 st: 0 dts:0.880000 pts:0.880000 pos:2188850 size:95528 flags:1
1039 1039
ret:-1 st:-1 ts:-0.222493 flags:1
1040 1040
ret:-1 st: 0 ts:2.680000 flags:0
1041 1041
ret: 0 st: 0 ts:1.560000 flags:1
1042
ret: 0 st: 0 dts:1.560000 pts:1.560000 pos:3814484 size:95608 flags:1
1042
ret: 0 st: 0 dts:1.560000 pts:1.560000 pos:3814762 size:95615 flags:1
1043 1043
ret: 0 st:-1 ts:0.460008 flags:0
1044
ret: 0 st: 0 dts:0.480000 pts:0.480000 pos:1234190 size:95024 flags:1
1044
ret: 0 st: 0 dts:0.480000 pts:0.480000 pos:1234290 size:95032 flags:1
1045 1045
ret:-1 st:-1 ts:-0.645825 flags:1
1046 1046
----------------
1047 1047
tests/data/a-mjpeg.avi

Also available in: Unified diff