e00e98537be8539590b06860b60b982637a3964b
[openjpeg.git] / tests / conformance / CMakeLists.txt
1 # CONFORMANCE TESTS AND NON-REGRESSION ON THIS DATASET
2
3 file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Temporary)
4
5 set(TEMP ${CMAKE_CURRENT_BINARY_DIR}/Temporary)
6 set(BASELINE_CONF ${OPJ_DATA_ROOT}/baseline/conformance)
7 set(BASELINE_NR ${OPJ_DATA_ROOT}/baseline/nonregression)
8 set(INPUT_CONF ${OPJ_DATA_ROOT}/input/conformance)
9
10
11 # List of components by file (normaly p0_13.j2k have 257 components but for this
12 #set of test we consider only 4)
13 set( CP0_nbC_list "not_used;1;1;1;3;4;4;3;3;1;3;1;1;4;3;1;1")
14 set( CP1_nbC_list "not_used;1;3;4;1;3;3;2")
15
16 set(COMMENTCODEVAR FALSE)
17
18
19 ##--------------------------------------------------------------------------
20 ## Tests about class 0 profile 0
21 ## try to decode
22 ## compare to ref file provided by the Executable Test Suite
23 ## non regression comparison
24
25 ## Parameters and tolerances given by Table C.1
26 #set( C0P0_ResFactor_list "not_used;0;0;0;3;3;3;0;5;2;0;0;0;0;2;0;0")
27 #set( C0P0_PEAK_list "not_used;0;0;0;33;54;109;10;7;4;10;0;0;0;0;0;0")
28 #set( C0P0_MSE_list "not_used;0;0;0;55.8;68;743;0.34;6.72;1.47;2.84;0;0;0;0;0;0")
29
30 #foreach(numFileC0P0 RANGE 1 16)
31
32 #  # Build filenames
33 #  if(${numFileC0P0} LESS 10)
34 #    set( filenameInput p0_0${numFileC0P0}.j2k )
35 #    set( filenameRef   c0p0_0${numFileC0P0}.pgx )
36 #  else()
37 #    set( filenameInput p0_${numFileC0P0}.j2k )
38 #    set( filenameRef   c0p0_${numFileC0P0}.pgx )
39 #  endif()
40
41 #  # Get corresponding tests parameters
42 #  list(GET C0P0_ResFactor_list ${numFileC0P0}  ResFactor)
43 #  #For Class-0 testing, we always focus on the first component only
44 #  #list(GET CP0_nbC_list ${numFileC0P0}  nbComponents)
45 #  set( nbComponents "1")
46 #  list(GET C0P0_PEAK_list ${numFileC0P0}  PEAK_limit)
47 #  list(GET C0P0_MSE_list ${numFileC0P0}  MSE_limit)
48
49 #  # Manage cases which need to try different resolution reduction
50 #  if (numFileC0P0 EQUAL 3 OR numFileC0P0 EQUAL 15)
51 #    get_filename_component(filenameRefSub ${filenameRef} NAME_WE)
52 #    #r = 0
53
54 #    add_test(ETS-C0P0-${filenameInput}-r0-decode
55 #        ${EXECUTABLE_OUTPUT_PATH}/opj_decompress
56 #        -i ${INPUT_CONF}/${filenameInput}
57 #        -o ${TEMP}/c0${filenameInput}-r0.pgx
58 #        -r 0
59 #        )
60
61 #    add_test(ETS-C0P0-${filenameInput}-r0-compare2ref
62 #        ${EXECUTABLE_OUTPUT_PATH}/compare_images
63 #        -b ${BASELINE_CONF}/${filenameRefSub}r0.pgx
64 #        -t ${TEMP}/c0${filenameInput}-r0.pgx
65 #        -n ${nbComponents}
66 #        -p ${PEAK_limit}
67 #        -m ${MSE_limit}
68 #        -s t_
69 #        )
70
71 #    set_tests_properties(ETS-C0P0-${filenameInput}-r0-compare2ref
72 #                         PROPERTIES DEPENDS
73 #                         ETS-C0P0-${filenameInput}-r0-decode)
74
75 #    add_test(NR-C0P0-${filenameInput}-r0-compare2base
76 #        ${EXECUTABLE_OUTPUT_PATH}/compare_images
77 #        -b ${BASELINE_NR}/opj_${filenameRefSub}-r0.pgx
78 #        -t ${TEMP}/c0${filenameInput}-r0.pgx
79 #        -n ${nbComponents}
80 #        -d
81 #        -s b_t_
82 #        )
83
84 #    set_tests_properties(NR-C0P0-${filenameInput}-r0-compare2base
85 #                         PROPERTIES DEPENDS
86 #                         ETS-C0P0-${filenameInput}-r0-decode)
87
88 #    #r = 1
89 #    add_test(ETS-C0P0-${filenameInput}-r1-decode
90 #        ${EXECUTABLE_OUTPUT_PATH}/opj_decompress
91 #        -i ${INPUT_CONF}/${filenameInput}
92 #        -o ${TEMP}/c0${filenameInput}-r1.pgx
93 #        -r 1
94 #        )
95
96 #    add_test(ETS-C0P0-${filenameInput}-r1-compare2ref
97 #        ${EXECUTABLE_OUTPUT_PATH}/compare_images
98 #        -b ${BASELINE_CONF}/${filenameRefSub}r1.pgx
99 #        -t ${TEMP}/c0${filenameInput}-r1.pgx
100 #        -n ${nbComponents}
101 #        -p ${PEAK_limit}
102 #        -m ${MSE_limit}
103 #        -s t_
104 #        )
105
106 #    set_tests_properties(ETS-C0P0-${filenameInput}-r1-compare2ref
107 #                         PROPERTIES DEPENDS
108 #                         ETS-C0P0-${filenameInput}-r1-decode)
109
110 #    add_test(NR-C0P0-${filenameInput}-r1-compare2base
111 #        ${EXECUTABLE_OUTPUT_PATH}/compare_images
112 #        -b ${BASELINE_NR}/opj_${filenameRefSub}-r1.pgx
113 #        -t ${TEMP}/c0${filenameInput}-r1.pgx
114 #        -n ${nbComponents}
115 #        -d
116 #        -s b_t_
117 #        )
118
119 #    set_tests_properties(NR-C0P0-${filenameInput}-r1-compare2base
120 #                         PROPERTIES DEPENDS
121 #                         ETS-C0P0-${filenameInput}-r1-decode)
122
123 #  else()
124
125 #    add_test(ETS-C0P0-${filenameInput}-decode
126 #        ${EXECUTABLE_OUTPUT_PATH}/opj_decompress
127 #        -i ${INPUT_CONF}/${filenameInput}
128 #        -o ${TEMP}/c0${filenameInput}.pgx
129 #        -r ${ResFactor}
130 #        )
131
132 #    add_test(ETS-C0P0-${filenameInput}-compare2ref
133 #        ${EXECUTABLE_OUTPUT_PATH}/compare_images
134 #        -b ${BASELINE_CONF}/${filenameRef}
135 #        -t ${TEMP}/c0${filenameInput}.pgx
136 #        -n ${nbComponents}
137 #        -p ${PEAK_limit}
138 #        -m ${MSE_limit}
139 #        -s t_
140 #        )
141
142 #    set_tests_properties(ETS-C0P0-${filenameInput}-compare2ref
143 #                         PROPERTIES DEPENDS
144 #                         ETS-C0P0-${filenameInput}-decode)
145
146 #    add_test(NR-C0P0-${filenameInput}-compare2base
147 #        ${EXECUTABLE_OUTPUT_PATH}/compare_images
148 #        -b ${BASELINE_NR}/opj_${filenameRef}
149 #        -t ${TEMP}/c0${filenameInput}.pgx
150 #        -n ${nbComponents}
151 #        -d
152 #        -s b_t_
153 #        )
154
155 #    set_tests_properties(NR-C0P0-${filenameInput}-compare2base
156 #                         PROPERTIES DEPENDS
157 #                         ETS-C0P0-${filenameInput}-decode)
158
159 #  endif()
160
161 #endforeach()
162
163 ##--------------------------------------------------------------------------
164 ## Tests about class 0 profile 1
165 ## try to decode
166 ## compare to ref file
167 ## non regression comparison
168
169 ## Parameters and tolerances given by Table C.4
170 #set( C0P1_ResFactor_list "not_used;0;3;3;0;4;1;0")
171 #set( C0P1_PEAK_list "not_used;0;35;28;2;128;128;0")
172 #set( C0P1_MSE_list "not_used;0;74;18.8;0.550;16384;16384;0")
173
174 #foreach(numFileC0P1 RANGE 1 7)
175
176 #  # Build filenames
177 #  set( filenameInput p1_0${numFileC0P1}.j2k )
178 #  set( filenameRef   c0p1_0${numFileC0P1}.pgx )
179
180 #  # Get corresponding tests parameters
181 #  list(GET C0P1_ResFactor_list ${numFileC0P1}  ResFactor)
182 #  #For Class-0 testing, we always focus on the first component only
183 #  #list(GET CP0_nbC_list ${numFileC0P0}  nbComponents)
184 #  set( nbComponents "1")
185 #  list(GET C0P1_PEAK_list ${numFileC0P1}  PEAK_limit)
186 #  list(GET C0P1_MSE_list ${numFileC0P1}  MSE_limit)
187
188 #  # Manage cases which need to try different resolution reduction
189 #  if (numFileC0P1 EQUAL 4 )
190 #    get_filename_component(filenameRefSub ${filenameRef} NAME_WE)
191
192 #    #r = 0
193 #    add_test(ETS-C0P1-${filenameInput}-r0-decode
194 #        ${EXECUTABLE_OUTPUT_PATH}/opj_decompress
195 #        -i ${INPUT_CONF}/${filenameInput}
196 #        -o ${TEMP}/c0${filenameInput}-r0.pgx
197 #        -r 0
198 #        )
199
200 #    add_test(ETS-C0P1-${filenameInput}-r0-compare2ref
201 #        ${EXECUTABLE_OUTPUT_PATH}/compare_images
202 #        -b ${BASELINE_CONF}/${filenameRefSub}r0.pgx
203 #        -t ${TEMP}/c0${filenameInput}-r0.pgx
204 #        -n ${nbComponents}
205 #        -p ${PEAK_limit}
206 #        -m ${MSE_limit}
207 #        -s t_
208 #        )
209
210 #    set_tests_properties(ETS-C0P1-${filenameInput}-r0-compare2ref
211 #                         PROPERTIES DEPENDS
212 #                         ETS-C0P1-${filenameInput}-r0-decode)
213
214 #    add_test(NR-C0P1-${filenameInput}-r0-compare2base
215 #        ${EXECUTABLE_OUTPUT_PATH}/compare_images
216 #        -b ${BASELINE_NR}/opj_${filenameRefSub}-r0.pgx
217 #        -t ${TEMP}/c0${filenameInput}-r0.pgx
218 #        -n ${nbComponents}
219 #        -d
220 #        -s b_t_
221 #        )
222
223 #    set_tests_properties(NR-C0P1-${filenameInput}-r0-compare2base
224 #                         PROPERTIES DEPENDS
225 #                         ETS-C0P1-${filenameInput}-r0-decode)
226
227 #    #r = 3
228 #    add_test(ETS-C0P1-${filenameInput}-r3-decode
229 #        ${EXECUTABLE_OUTPUT_PATH}/opj_decompress
230 #        -i ${INPUT_CONF}/${filenameInput}
231 #        -o ${TEMP}/c0${filenameInput}-r3.pgx
232 #        -r 3
233 #        )
234
235 #    add_test(ETS-C0P1-${filenameInput}-r3-compare2ref
236 #        ${EXECUTABLE_OUTPUT_PATH}/compare_images
237 #        -b ${BASELINE_CONF}/${filenameRefSub}r3.pgx
238 #        -t ${TEMP}/c0${filenameInput}-r3.pgx
239 #        -n ${nbComponents}
240 #        -p ${PEAK_limit}
241 #        -m ${MSE_limit}
242 #        -s t_
243 #        )
244
245 #    set_tests_properties(ETS-C0P1-${filenameInput}-r3-compare2ref
246 #                         PROPERTIES DEPENDS
247 #                         ETS-C0P1-${filenameInput}-r3-decode)
248
249 #    add_test(NR-C0P1-${filenameInput}-r3-compare2base
250 #        ${EXECUTABLE_OUTPUT_PATH}/compare_images
251 #        -b ${BASELINE_NR}/opj_${filenameRefSub}-r3.pgx
252 #        -t ${TEMP}/c0${filenameInput}-r3.pgx
253 #        -n ${nbComponents}
254 #        -d
255 #        -s b_t_
256 #        )
257
258 #    set_tests_properties(NR-C0P1-${filenameInput}-r3-compare2base
259 #                         PROPERTIES DEPENDS
260 #                         ETS-C0P1-${filenameInput}-r3-decode)
261
262 #  else()
263
264 #    add_test(ETS-C0P1-${filenameInput}-decode
265 #        ${EXECUTABLE_OUTPUT_PATH}/opj_decompress
266 #        -i ${INPUT_CONF}/${filenameInput}
267 #        -o ${TEMP}/c0${filenameInput}.pgx
268 #        -r ${ResFactor}
269 #        )
270
271 #    add_test(ETS-C0P1-${filenameInput}-compare2ref
272 #        ${EXECUTABLE_OUTPUT_PATH}/compare_images
273 #        -b ${BASELINE_CONF}/${filenameRef}
274 #        -t ${TEMP}/c0${filenameInput}.pgx
275 #        -n ${nbComponents}
276 #        -p ${PEAK_limit}
277 #        -m ${MSE_limit}
278 #        -s t_
279 #        )
280
281 #    set_tests_properties(ETS-C0P1-${filenameInput}-compare2ref
282 #                         PROPERTIES DEPENDS
283 #                         ETS-C0P1-${filenameInput}-decode)
284
285 #    add_test(NR-C0P1-${filenameInput}-compare2base
286 #        ${EXECUTABLE_OUTPUT_PATH}/compare_images
287 #        -b ${BASELINE_NR}/opj_${filenameRef}
288 #        -t ${TEMP}/c0${filenameInput}.pgx
289 #        -n ${nbComponents}
290 #        -d
291 #        -s b_t_
292 #        )
293
294 #    set_tests_properties(NR-C0P1-${filenameInput}-compare2base
295 #                         PROPERTIES DEPENDS
296 #                         ETS-C0P1-${filenameInput}-decode)
297
298 #  endif()
299
300 #endforeach()
301
302 #--------------------------------------------------------------------------
303 # Tests about class 1 profile 0
304 # try to decode
305 # compare to ref file
306 # non regression comparison
307
308 # Parameters and tolerances given by Table C.6
309 set( C1P0_ResFactor_list "not_used;0;0;0;0;0;0;0;1;0;0;0;0;0;0;0;0")
310 set( C1P0_PEAK_list "not_used;0;0;0;5:4:6;2:2:2:0;635:403:378:0;0:0:0;0:0:0;0;0:0:0;0;0;0:0:0:0;0:0:0;0;0")
311 set( C1P0_MSE_list  "not_used;0;0;0;0.776:0.626:1.070;0.302:0.307:0.269:0;11287:6124:3968:0;0:0:0;0:0:0;0;0:0:0;0;0;0:0:0:0;0:0:0;0;0")
312
313 foreach(numFileC1P0 RANGE 1 16)
314
315   # Build filenames
316   if(${numFileC1P0} LESS 10)
317     set( filenameInput p0_0${numFileC1P0}.j2k )
318     set( filenameRef   c1p0_0${numFileC1P0}.pgx )
319   else()
320     set( filenameInput p0_${numFileC1P0}.j2k )
321     set( filenameRef   c1p0_${numFileC1P0}.pgx )
322   endif()
323
324   # Get corresponding tests parameters
325   list(GET CP0_nbC_list ${numFileC1P0}  nbComponents)
326   list(GET C1P0_ResFactor_list ${numFileC1P0}  ResFactor)
327   list(GET C1P0_PEAK_list ${numFileC1P0}  PEAK_limit)
328   list(GET C1P0_MSE_list ${numFileC1P0}  MSE_limit)
329
330   add_test(NAME ETS-C1P0-${filenameInput}-decode
331       COMMAND opj_decompress
332       -i ${INPUT_CONF}/${filenameInput}
333       -o ${TEMP}/c1${filenameInput}.pgx
334       -r ${ResFactor}
335       )
336
337   add_test(NAME ETS-C1P0-${filenameInput}-compare2ref
338       COMMAND compare_images
339      -b ${BASELINE_CONF}/${filenameRef}
340      -t ${TEMP}/c1${filenameInput}.pgx
341      -n ${nbComponents}
342      -p ${PEAK_limit}
343      -m ${MSE_limit}
344      -s b_t_
345      )
346
347   set_tests_properties(ETS-C1P0-${filenameInput}-compare2ref
348                        PROPERTIES DEPENDS
349                        ETS-C1P0-${filenameInput}-decode)
350
351   add_test(NAME NR-C1P0-${filenameInput}-compare2base
352       COMMAND compare_images
353      -b ${BASELINE_NR}/opj_${filenameRef}
354      -t ${TEMP}/c1${filenameInput}.pgx
355      -n ${nbComponents}
356      -d
357      -s b_t_
358      )
359
360   set_tests_properties(NR-C1P0-${filenameInput}-compare2base
361                        PROPERTIES DEPENDS
362                        ETS-C1P0-${filenameInput}-decode)
363
364 endforeach()
365
366 #--------------------------------------------------------------------------
367 # Tests about class 1 profile 1
368 # try to decode
369 # compare to ref file
370 # non regression comparison
371
372 # Parameters and tolerances given by Table C.7
373 set( C1P1_PEAK_list "not_used;0;5:4:6;2:2:1:0;624;40:40:40;2:2:2;0:0")
374 set( C1P1_MSE_list  "not_used;0;0.765:0.616:1.051;0.3:0.210:0.200:0;3080;8.458:9.816:10.154;0.6:0.6:0.6;0:0")
375
376 foreach(numFileC1P1 RANGE 1 7)
377
378   # Build filenames
379   set( filenameInput p1_0${numFileC1P1}.j2k )
380   set( filenameRef   c1p1_0${numFileC1P1}.pgx )
381
382   # Get corresponding tests parameters
383   list(GET CP1_nbC_list ${numFileC1P1}  nbComponents)
384   list(GET C1P1_PEAK_list ${numFileC1P1}  PEAK_limit)
385   list(GET C1P1_MSE_list ${numFileC1P1}  MSE_limit)
386
387   add_test(NAME ETS-C1P1-${filenameInput}-decode
388       COMMAND opj_decompress
389       -i ${INPUT_CONF}/${filenameInput}
390       -o ${TEMP}/c1${filenameInput}.pgx
391       -r 0
392       )
393
394   add_test(NAME ETS-C1P1-${filenameInput}-compare2ref
395       COMMAND compare_images
396      -b ${BASELINE_CONF}/${filenameRef}
397      -t ${TEMP}/c1${filenameInput}.pgx
398      -n ${nbComponents}
399      -p ${PEAK_limit}
400      -m ${MSE_limit}
401      -s b_t_
402      )
403
404   set_tests_properties(ETS-C1P1-${filenameInput}-compare2ref
405                        PROPERTIES DEPENDS
406                        ETS-C1P1-${filenameInput}-decode)
407
408   add_test(NAME NR-C1P1-${filenameInput}-compare2base
409       COMMAND compare_images
410      -b ${BASELINE_NR}/opj_${filenameRef}
411      -t ${TEMP}/c1${filenameInput}.pgx
412      -n ${nbComponents}
413      -d
414      -s b_t_
415      )
416
417   set_tests_properties(NR-C1P1-${filenameInput}-compare2base
418                        PROPERTIES DEPENDS
419                        ETS-C1P1-${filenameInput}-decode)
420
421 endforeach()
422
423 #--------------------------------------------------------------------------
424 # Tests about JP2 file
425 # try to decode
426 # compare to ref file
427 # non regression comparison
428
429 # Tolerances given by Table G.1
430
431 foreach(numFileJP2 RANGE 1 9)
432
433   # Build filenames
434   set( filenameInput "file${numFileJP2}.jp2" )
435   set( filenameRef   jp2_${numFileJP2}.tif )
436
437   # Get corresponding tests parameters
438   list(GET JP2_PEAK_list ${numFileJP2}  PEAK_limit)
439
440   add_test(NAME ETS-JP2-${filenameInput}-decode
441     COMMAND opj_decompress
442     -i ${INPUT_CONF}/${filenameInput}
443     -o ${TEMP}/${filenameInput}.tif
444   )
445
446   add_test(NAME ETS-JP2-${filenameInput}-compare2ref
447     COMMAND compare_images
448     -b ${BASELINE_CONF}/${filenameRef}
449     -t ${TEMP}/${filenameInput}.tif
450     -n 3
451     -p 4:4:4
452     -m 4:4:4
453     -s b_t_
454   )
455
456   set_tests_properties(ETS-JP2-${filenameInput}-compare2ref
457     PROPERTIES DEPENDS
458     ETS-JP2-${filenameInput}-decode)
459
460   add_test(NAME NR-JP2-${filenameInput}-compare2base
461     COMMAND compare_images
462     -b ${BASELINE_NR}/opj_${filenameRef}
463     -t ${TEMP}/${filenameInput}.tif
464     -n 3
465     -d
466     -s b_t_
467   )
468
469   set_tests_properties(NR-JP2-${filenameInput}-compare2base
470     PROPERTIES DEPENDS
471     ETS-JP2-${filenameInput}-decode)
472
473 endforeach()
474
475 #--------------------------------------------------------------------------
476 # Tests about Kakadu/J2K file
477 # try to decode
478 # compare to ref file
479 # non regression comparison
480
481 # Tolerances given by ???
482
483 set(kdu_j2k_conf_files
484   a1_mono
485   a2_colr
486   a3_mono
487   a4_colr
488   a5_mono
489   a6_mono_colr
490   b1_mono
491   b2_mono
492   b3_mono
493   c1_mono
494   c2_mono
495   d1_colr
496   d2_colr
497   e1_colr
498   e2_colr
499   f1_mono
500   f2_mono
501   g1_colr
502   g2_colr
503   g3_colr
504   g4_colr
505 )
506
507 foreach(kdu_file ${kdu_j2k_conf_files})
508
509   # Build filenames
510   set( filenameInput "${kdu_file}.j2c" )
511   set( filenameRef   "${kdu_file}.ppm" )
512
513   add_test(NAME ETS-KDU-${filenameInput}-decode
514     COMMAND opj_decompress
515     -i ${INPUT_CONF}/${filenameInput}
516     -o ${TEMP}/${filenameInput}.ppm
517   )
518
519   if("${kdu_file}" STREQUAL "a6_mono_colr")
520     set(kdu_test_args "-n 4 -s b_t_")
521   else()
522     set(kdu_test_args "-n 1")
523   endif()
524
525   add_test(NAME ETS-KDU-${filenameInput}-compare2ref
526     COMMAND compare_images
527     -b ${BASELINE_CONF}/${filenameRef}
528     -t ${TEMP}/${filenameInput}.ppm
529     ${kdu_test_args}
530     -p 4:4:4
531     -m 4:4:4
532   )
533
534   set_tests_properties(ETS-KDU-${filenameInput}-compare2ref
535     PROPERTIES DEPENDS
536     ETS-KDU-${filenameInput}-decode)
537
538   add_test(NAME NR-KDU-${filenameInput}-compare2base
539     COMMAND compare_images
540     -b ${BASELINE_NR}/opj_${filenameRef}
541     -t ${TEMP}/${filenameInput}.ppm
542     ${kdu_test_args}
543     -d
544   )
545
546   set_tests_properties(NR-KDU-${filenameInput}-compare2base
547     PROPERTIES DEPENDS
548     ETS-KDU-${filenameInput}-decode)
549 endforeach()
550
551 #--------------------------------------------------------------------------#
552 #--------------------------------------------------------------------------#
553 #--------------------------------------------------------------------------#
554
555 #--------------------------------------------------------------------------
556 # Tests about dump of profile 0 file
557 # try to dump image and codestream informations into a file
558 # non regression comparison this file to the baseline
559
560 foreach(numFileP0 RANGE 1 16)
561
562   # Build filenames
563   if(${numFileP0} LESS 10)
564     set( filenameInput p0_0${numFileP0}.j2k )
565   else()
566     set( filenameInput p0_${numFileP0}.j2k )
567   endif()
568   get_filename_component(filenameRefSub ${filenameInput} NAME_WE)
569
570
571   add_test(NAME NR-${filenameInput}-dump
572       COMMAND opj_dump
573      -i ${INPUT_CONF}/${filenameInput}
574      -o ${TEMP}/${filenameInput}.txt
575      )
576
577   add_test(NAME NR-${filenameInput}-compare_dump2base
578       COMMAND compare_dump_files
579      -b ${BASELINE_NR}/opj_v2_${filenameRefSub}.txt
580      -t ${TEMP}/${filenameInput}.txt
581      )
582
583   set_tests_properties(NR-${filenameInput}-compare_dump2base
584                        PROPERTIES DEPENDS
585                        NR-${filenameInput}-dump)
586
587 endforeach()
588
589 #--------------------------------------------------------------------------
590 # Tests about dump of profile 1 file
591 # try to dump image and codestream informations into a file
592 # non regression comparison this file to the baseline
593
594 foreach(numFileP1 RANGE 1 7)
595
596   # Build filenames
597   set( filenameInput p1_0${numFileP1}.j2k )
598   get_filename_component(filenameInputSub ${filenameInput} NAME_WE)
599
600   add_test(NAME NR-${filenameInput}-dump
601       COMMAND opj_dump
602      -i ${INPUT_CONF}/${filenameInput}
603      -o ${TEMP}/${filenameInput}.txt
604      )
605
606   add_test(NAME NR-${filenameInput}-compare_dump2base
607       COMMAND compare_dump_files
608      -b ${BASELINE_NR}/opj_v2_${filenameInputSub}.txt
609      -t ${TEMP}/${filenameInput}.txt
610      )
611
612   set_tests_properties(NR-${filenameInput}-compare_dump2base
613                        PROPERTIES DEPENDS
614                        NR-${filenameInput}-dump)
615
616 endforeach()
617
618 #--------------------------------------------------------------------------
619 # Tests about dump of JP2 file
620 # try to dump image and codestream informations into a file
621 # non regression comparison this file to the baseline
622
623 foreach(numFileJP2 RANGE 1 9)
624
625   # Build filenames
626   set( filenameInput "file${numFileJP2}.jp2" )
627   get_filename_component(filenameInputSub ${filenameInput} NAME_WE)
628
629   add_test(NAME NR-${filenameInput}-dump
630       COMMAND opj_dump
631      -i ${INPUT_CONF}/${filenameInput}
632      -o ${TEMP}/${filenameInput}.txt
633      )
634
635   add_test(NAME NR-${filenameInput}-compare_dump2base
636       COMMAND compare_dump_files
637      -b ${BASELINE_NR}/opj_v2_${filenameInputSub}.txt
638      -t ${TEMP}/${filenameInput}.txt
639      )
640
641   set_tests_properties(NR-${filenameInput}-compare_dump2base
642                        PROPERTIES DEPENDS
643                        NR-${filenameInput}-dump)
644
645 endforeach()