mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-02 04:52:09 +00:00
avcodec/jpeg2000dwt: List differences for DWT test
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
aa594415a0
commit
6528b90dea
@ -615,6 +615,7 @@ void ff_dwt_destroy(DWTContext *s)
|
||||
static int test_dwt(int *array, int *ref, uint16_t border[2][2], int decomp_levels, int type, int max_diff) {
|
||||
int ret, j;
|
||||
DWTContext s1={{{0}}}, *s= &s1;
|
||||
int64_t err2 = 0;
|
||||
|
||||
ret = ff_jpeg2000_dwt_init(s, border, decomp_levels, type);
|
||||
if (ret < 0) {
|
||||
@ -637,10 +638,16 @@ static int test_dwt(int *array, int *ref, uint16_t border[2][2], int decomp_leve
|
||||
j, array[j], ref[j],decomp_levels, border[0][0], border[0][1], border[1][0], border[1][1]);
|
||||
return 2;
|
||||
}
|
||||
err2 += (array[j] - ref[j]) * (array[j] - ref[j]);
|
||||
array[j] = ref[j];
|
||||
}
|
||||
ff_dwt_destroy(s);
|
||||
|
||||
printf("%s, decomp:%2d border %3d %3d %3d %3d milli-err2:%9"PRId64"\n",
|
||||
type == FF_DWT53 ? "5/3i" : "9/7i",
|
||||
decomp_levels, border[0][0], border[0][1], border[1][0], border[1][1],
|
||||
1000*err2 / ((border[0][1] - border[0][0])*(border[1][1] - border[1][0])));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,6 @@ fate-mathops: REF = /dev/null
|
||||
FATE_LIBAVCODEC-$(CONFIG_JPEG2000_ENCODER) += fate-j2k-dwt
|
||||
fate-j2k-dwt: libavcodec/jpeg2000dwt-test$(EXESUF)
|
||||
fate-j2k-dwt: CMD = run libavcodec/jpeg2000dwt-test
|
||||
fate-j2k-dwt: REF = /dev/null
|
||||
|
||||
|
||||
FATE_LIBAVCODEC-$(call ENCDEC, FLAC, FLAC) += fate-api-flac
|
||||
|
40
tests/ref/fate/j2k-dwt
Normal file
40
tests/ref/fate/j2k-dwt
Normal file
@ -0,0 +1,40 @@
|
||||
5/3i, decomp:15 border 151 170 140 183 milli-err2: 0
|
||||
9/7i, decomp:15 border 151 170 140 183 milli-err2: 13030
|
||||
5/3i, decomp:21 border 173 201 81 189 milli-err2: 0
|
||||
9/7i, decomp:21 border 173 201 81 189 milli-err2: 21587
|
||||
5/3i, decomp:22 border 213 227 76 245 milli-err2: 0
|
||||
9/7i, decomp:22 border 213 227 76 245 milli-err2: 13454
|
||||
5/3i, decomp:13 border 134 157 184 203 milli-err2: 0
|
||||
9/7i, decomp:13 border 134 157 184 203 milli-err2: 19745
|
||||
5/3i, decomp: 1 border 204 237 6 106 milli-err2: 0
|
||||
9/7i, decomp: 1 border 204 237 6 106 milli-err2: 2236
|
||||
5/3i, decomp:28 border 76 211 13 210 milli-err2: 0
|
||||
9/7i, decomp:28 border 76 211 13 210 milli-err2: 22341
|
||||
5/3i, decomp:21 border 76 99 43 123 milli-err2: 0
|
||||
9/7i, decomp:21 border 76 99 43 123 milli-err2: 15450
|
||||
5/3i, decomp:15 border 192 243 174 204 milli-err2: 0
|
||||
9/7i, decomp:15 border 192 243 174 204 milli-err2: 56308
|
||||
5/3i, decomp:21 border 17 68 93 204 milli-err2: 0
|
||||
9/7i, decomp:21 border 17 68 93 204 milli-err2: 26234
|
||||
5/3i, decomp:11 border 142 168 82 174 milli-err2: 0
|
||||
9/7i, decomp:11 border 142 168 82 174 milli-err2: 14802
|
||||
5/3i, decomp:23 border 142 209 171 235 milli-err2: 0
|
||||
9/7i, decomp:23 border 142 209 171 235 milli-err2: 26230
|
||||
5/3i, decomp:30 border 37 185 79 245 milli-err2: 0
|
||||
9/7i, decomp:30 border 37 185 79 245 milli-err2: 18994
|
||||
5/3i, decomp: 5 border 129 236 30 243 milli-err2: 0
|
||||
9/7i, decomp: 5 border 129 236 30 243 milli-err2: 14600
|
||||
5/3i, decomp:10 border 5 160 146 247 milli-err2: 0
|
||||
9/7i, decomp:10 border 5 160 146 247 milli-err2: 43905
|
||||
5/3i, decomp: 5 border 104 162 6 47 milli-err2: 0
|
||||
9/7i, decomp: 5 border 104 162 6 47 milli-err2: 12942
|
||||
5/3i, decomp:24 border 78 250 102 218 milli-err2: 0
|
||||
9/7i, decomp:24 border 78 250 102 218 milli-err2: 24997
|
||||
5/3i, decomp:28 border 86 98 56 79 milli-err2: 0
|
||||
9/7i, decomp:28 border 86 98 56 79 milli-err2: 8112
|
||||
5/3i, decomp: 6 border 95 238 197 214 milli-err2: 0
|
||||
9/7i, decomp: 6 border 95 238 197 214 milli-err2: 12925
|
||||
5/3i, decomp:17 border 77 169 93 165 milli-err2: 0
|
||||
9/7i, decomp:17 border 77 169 93 165 milli-err2: 24949
|
||||
5/3i, decomp:22 border 178 187 7 119 milli-err2: 0
|
||||
9/7i, decomp:22 border 178 187 7 119 milli-err2: 9838
|
Loading…
Reference in New Issue
Block a user