set(INPUT_CONF ${OPJ_DATA_ROOT}/input/conformance)
-# List of components by file (normaly p0_13.j2k have 257 components but for this
+# List of components by file (normally p0_13.j2k have 257 components but for this
#set of test we consider only 4)
set( CP0_nbC_list "not_used;1;1;1;3;4;4;3;3;1;3;1;1;4;3;1;1")
set( CP1_nbC_list "not_used;1;3;4;1;3;3;2")
# compare to ref file
# non regression comparison
-# Tolerances given by Table G.1
+# Tolerances given by Part 4 - Table G.1
+# Peak is set to 4 only
foreach(numFileJP2 RANGE 1 9)
set( filenameInput "file${numFileJP2}.jp2" )
set( filenameRef jp2_${numFileJP2}.tif )
- # Get corresponding tests parameters
- list(GET JP2_PEAK_list ${numFileJP2} PEAK_limit)
-
add_test(NAME ETS-JP2-${filenameInput}-decode
COMMAND opj_decompress
-i ${INPUT_CONF}/${filenameInput}
-o ${TEMP}/${filenameInput}.tif
+ -p 8S
+ -force-rgb
)
add_test(NAME ETS-JP2-${filenameInput}-compare2ref
-t ${TEMP}/${filenameInput}.tif
-n 3
-p 4:4:4
- -m 4:4:4
+ -m 1:1:1
-s b_t_
)
set( filenameInput "${kdu_file}.j2c" )
set( filenameRef "${kdu_file}.ppm" )
+ if("${kdu_file}" STREQUAL "a6_mono_colr")
+ set(kdu_test_args -upsample -split-pnm )
+ else()
+ set(kdu_test_args -upsample )
+ endif()
+
add_test(NAME ETS-KDU-${filenameInput}-decode
COMMAND opj_decompress
-i ${INPUT_CONF}/${filenameInput}
-o ${TEMP}/${filenameInput}.ppm
+ ${kdu_test_args}
)
+ if("${kdu_file}" STREQUAL "a6_mono_colr")
+ set(kdu_test_args -n 4 -s b_t_ )
+ set(kdu_test_args_tol -p 4:4:4:4 -m 1:1:1:1)
+ else()
+ set(kdu_test_args -n 1 )
+ set(kdu_test_args_tol -p 4:4:4 -m 1:1:1)
+ endif()
+
add_test(NAME ETS-KDU-${filenameInput}-compare2ref
COMMAND compare_images
-b ${BASELINE_CONF}/${filenameRef}
-t ${TEMP}/${filenameInput}.ppm
- -n 3
- -p 4:4:4
- -m 4:4:4
- -s b_t_
+ ${kdu_test_args}
+ ${kdu_test_args_tol}
)
set_tests_properties(ETS-KDU-${filenameInput}-compare2ref
COMMAND compare_images
-b ${BASELINE_NR}/opj_${filenameRef}
-t ${TEMP}/${filenameInput}.ppm
- -n 3
+ ${kdu_test_args}
-d
- -s b_t_
)
set_tests_properties(NR-KDU-${filenameInput}-compare2base
ETS-KDU-${filenameInput}-decode)
endforeach()
+#--------------------------------------------------------------------------
+# Tests about Richter/J2K file
+# try to decode
+# compare to ref file
+# non regression comparison
+
+# Tolerances given by ???
+
+set(richter_jp2_conf_files
+ subsampling_1
+ subsampling_2
+ zoo1
+ zoo2
+)
+
+foreach(r_file ${richter_jp2_conf_files})
+
+ # Build filenames
+ set( filenameInput "${r_file}.jp2" )
+ set( filenameRef "${r_file}.ppm" )
+
+ add_test(NAME ETS-RIC-${filenameInput}-decode
+ COMMAND opj_decompress
+ -i ${INPUT_CONF}/${filenameInput}
+ -o ${TEMP}/${filenameInput}.ppm
+ )
+
+ set(ric_test_args -n 1)
+
+ add_test(NAME ETS-RIC-${filenameInput}-compare2ref
+ COMMAND compare_images
+ -b ${BASELINE_CONF}/${filenameRef}
+ -t ${TEMP}/${filenameInput}.ppm
+ ${ric_test_args}
+ -p 4:4:4
+ -m 2:2:2
+ )
+
+ set_tests_properties(ETS-RIC-${filenameInput}-compare2ref
+ PROPERTIES DEPENDS
+ ETS-RIC-${filenameInput}-decode)
+
+ add_test(NAME NR-RIC-${filenameInput}-compare2base
+ COMMAND compare_images
+ -b ${BASELINE_NR}/opj_${filenameRef}
+ -t ${TEMP}/${filenameInput}.ppm
+ ${ric_test_args}
+ -d
+ )
+
+ set_tests_properties(NR-RIC-${filenameInput}-compare2base
+ PROPERTIES DEPENDS
+ ETS-RIC-${filenameInput}-decode)
+endforeach()
+
#--------------------------------------------------------------------------#
#--------------------------------------------------------------------------#
#--------------------------------------------------------------------------#
#--------------------------------------------------------------------------
# Tests about dump of profile 0 file
-# try to dump image and codestream informations into a file
+# try to dump image and codestream information into a file
# non regression comparison this file to the baseline
foreach(numFileP0 RANGE 1 16)
#--------------------------------------------------------------------------
# Tests about dump of profile 1 file
-# try to dump image and codestream informations into a file
+# try to dump image and codestream information into a file
# non regression comparison this file to the baseline
foreach(numFileP1 RANGE 1 7)
#--------------------------------------------------------------------------
# Tests about dump of JP2 file
-# try to dump image and codestream informations into a file
+# try to dump image and codestream information into a file
# non regression comparison this file to the baseline
foreach(numFileJP2 RANGE 1 9)