[trunk] Cleanup commit. Rename compare family since comparePGX now support TIFF.

Rename compareRAWimage for clarity since it merely compare files (not images).
This commit is contained in:
Mathieu Malaterre 2014-03-07 16:24:24 +00:00
parent aedff8a000
commit 6b94237679
5 changed files with 37 additions and 35 deletions

View File

@ -11,7 +11,7 @@ include_directories(
)
# First thing define the common source:
set(comparePGXimages_SRCS comparePGXimages.c
set(compare_images_SRCS compare_images.c
${OPENJPEG_SOURCE_DIR}/src/bin/jp2/convert.c
${OPENJPEG_SOURCE_DIR}/src/bin/common/opj_getopt.c
)
@ -19,19 +19,19 @@ set(comparePGXimages_SRCS comparePGXimages.c
set(compare_dump_files_SRCS compare_dump_files.c
${OPENJPEG_SOURCE_DIR}/src/bin/common/opj_getopt.c)
set(compareRAWimages_SRCS compareRAWimages.c
set(compare_raw_files_SRCS compare_raw_files.c
${OPENJPEG_SOURCE_DIR}/src/bin/common/opj_getopt.c)
add_executable(comparePGXimages ${comparePGXimages_SRCS})
target_link_libraries(comparePGXimages
add_executable(compare_images ${compare_images_SRCS})
target_link_libraries(compare_images
${OPENJPEG_LIBRARY_NAME}
${PNG_LIBNAME} ${TIFF_LIBNAME}
)
# To support universal exe:
if(ZLIB_FOUND AND APPLE)
target_link_libraries(comparePGXimages z)
target_link_libraries(compare_images z)
else(ZLIB_FOUND AND APPLE)
target_link_libraries(comparePGXimages ${Z_LIBNAME})
target_link_libraries(compare_images ${Z_LIBNAME})
endif()
add_executable(compare_dump_files ${compare_dump_files_SRCS})
@ -39,7 +39,7 @@ add_executable(compare_dump_files ${compare_dump_files_SRCS})
add_executable(j2k_random_tile_access j2k_random_tile_access.c)
target_link_libraries(j2k_random_tile_access ${OPENJPEG_LIBRARY_NAME})
add_executable(compareRAWimages ${compareRAWimages_SRCS})
add_executable(compare_raw_files ${compare_raw_files_SRCS})
add_executable(test_tile_encoder test_tile_encoder.c)
target_link_libraries(test_tile_encoder ${OPENJPEG_LIBRARY_NAME})

View File

@ -25,7 +25,7 @@
*/
/*
* comparePGXimages.c
* compare_images.c
*
* Created on: 8 juil. 2011
* Author: mickael
@ -79,9 +79,9 @@ static double* parseToleranceValues( char* inArg, const int nbcomp)
/*******************************************************************************
* Command line help function
*******************************************************************************/
static void comparePGXimages_help_display(void)
static void compare_images_help_display(void)
{
fprintf(stdout,"\nList of parameters for the comparePGX function \n");
fprintf(stdout,"\nList of parameters for the compare_images function \n");
fprintf(stdout,"\n");
fprintf(stdout," -b \t REQUIRED \t filename to the reference/baseline PGX image \n");
fprintf(stdout," -t \t REQUIRED \t filename to the test PGX image\n");
@ -623,7 +623,7 @@ int main(int argc, char **argv)
/* Get parameters from command line*/
if( parse_cmdline_cmp(argc, argv, &inParam) )
{
comparePGXimages_help_display();
compare_images_help_display();
goto cleanup;
}

View File

@ -25,10 +25,12 @@
*/
/*
* compareRAWimages.c
* compare_raw_files.c
*
* Created on: 31 August 2011
* Author: mickael
*
* This is equivalent to the UNIX `cmp` command
*/
#include <stdio.h>
@ -49,8 +51,8 @@ typedef struct test_cmp_parameters
/*******************************************************************************
* Command line help function
*******************************************************************************/
static void compareRAWimages_help_display(void) {
fprintf(stdout,"\nList of parameters for the comparePGX function \n");
static void compare_raw_files_help_display(void) {
fprintf(stdout,"\nList of parameters for the compare_raw_files function \n");
fprintf(stdout,"\n");
fprintf(stdout," -b \t REQUIRED \t filename to the reference/baseline RAW image \n");
fprintf(stdout," -t \t REQUIRED \t filename to the test RAW image\n");
@ -123,7 +125,7 @@ int main(int argc, char **argv)
/* Get parameters from command line*/
if (parse_cmdline_cmp(argc, argv, &inParam))
{
compareRAWimages_help_display();
compare_raw_files_help_display();
goto cleanup;
}

View File

@ -59,7 +59,7 @@ set(COMMENTCODEVAR FALSE)
# )
# add_test(ETS-C0P0-${filenameInput}-r0-compare2ref
# ${EXECUTABLE_OUTPUT_PATH}/comparePGXimages
# ${EXECUTABLE_OUTPUT_PATH}/compare_images
# -b ${BASELINE_CONF}/${filenameRefSub}r0.pgx
# -t ${TEMP}/c0${filenameInput}-r0.pgx
# -n ${nbComponents}
@ -73,7 +73,7 @@ set(COMMENTCODEVAR FALSE)
# ETS-C0P0-${filenameInput}-r0-decode)
# add_test(NR-C0P0-${filenameInput}-r0-compare2base
# ${EXECUTABLE_OUTPUT_PATH}/comparePGXimages
# ${EXECUTABLE_OUTPUT_PATH}/compare_images
# -b ${BASELINE_NR}/opj_${filenameRefSub}-r0.pgx
# -t ${TEMP}/c0${filenameInput}-r0.pgx
# -n ${nbComponents}
@ -94,7 +94,7 @@ set(COMMENTCODEVAR FALSE)
# )
# add_test(ETS-C0P0-${filenameInput}-r1-compare2ref
# ${EXECUTABLE_OUTPUT_PATH}/comparePGXimages
# ${EXECUTABLE_OUTPUT_PATH}/compare_images
# -b ${BASELINE_CONF}/${filenameRefSub}r1.pgx
# -t ${TEMP}/c0${filenameInput}-r1.pgx
# -n ${nbComponents}
@ -108,7 +108,7 @@ set(COMMENTCODEVAR FALSE)
# ETS-C0P0-${filenameInput}-r1-decode)
# add_test(NR-C0P0-${filenameInput}-r1-compare2base
# ${EXECUTABLE_OUTPUT_PATH}/comparePGXimages
# ${EXECUTABLE_OUTPUT_PATH}/compare_images
# -b ${BASELINE_NR}/opj_${filenameRefSub}-r1.pgx
# -t ${TEMP}/c0${filenameInput}-r1.pgx
# -n ${nbComponents}
@ -130,7 +130,7 @@ set(COMMENTCODEVAR FALSE)
# )
# add_test(ETS-C0P0-${filenameInput}-compare2ref
# ${EXECUTABLE_OUTPUT_PATH}/comparePGXimages
# ${EXECUTABLE_OUTPUT_PATH}/compare_images
# -b ${BASELINE_CONF}/${filenameRef}
# -t ${TEMP}/c0${filenameInput}.pgx
# -n ${nbComponents}
@ -144,7 +144,7 @@ set(COMMENTCODEVAR FALSE)
# ETS-C0P0-${filenameInput}-decode)
# add_test(NR-C0P0-${filenameInput}-compare2base
# ${EXECUTABLE_OUTPUT_PATH}/comparePGXimages
# ${EXECUTABLE_OUTPUT_PATH}/compare_images
# -b ${BASELINE_NR}/opj_${filenameRef}
# -t ${TEMP}/c0${filenameInput}.pgx
# -n ${nbComponents}
@ -198,7 +198,7 @@ set(COMMENTCODEVAR FALSE)
# )
# add_test(ETS-C0P1-${filenameInput}-r0-compare2ref
# ${EXECUTABLE_OUTPUT_PATH}/comparePGXimages
# ${EXECUTABLE_OUTPUT_PATH}/compare_images
# -b ${BASELINE_CONF}/${filenameRefSub}r0.pgx
# -t ${TEMP}/c0${filenameInput}-r0.pgx
# -n ${nbComponents}
@ -212,7 +212,7 @@ set(COMMENTCODEVAR FALSE)
# ETS-C0P1-${filenameInput}-r0-decode)
# add_test(NR-C0P1-${filenameInput}-r0-compare2base
# ${EXECUTABLE_OUTPUT_PATH}/comparePGXimages
# ${EXECUTABLE_OUTPUT_PATH}/compare_images
# -b ${BASELINE_NR}/opj_${filenameRefSub}-r0.pgx
# -t ${TEMP}/c0${filenameInput}-r0.pgx
# -n ${nbComponents}
@ -233,7 +233,7 @@ set(COMMENTCODEVAR FALSE)
# )
# add_test(ETS-C0P1-${filenameInput}-r3-compare2ref
# ${EXECUTABLE_OUTPUT_PATH}/comparePGXimages
# ${EXECUTABLE_OUTPUT_PATH}/compare_images
# -b ${BASELINE_CONF}/${filenameRefSub}r3.pgx
# -t ${TEMP}/c0${filenameInput}-r3.pgx
# -n ${nbComponents}
@ -247,7 +247,7 @@ set(COMMENTCODEVAR FALSE)
# ETS-C0P1-${filenameInput}-r3-decode)
# add_test(NR-C0P1-${filenameInput}-r3-compare2base
# ${EXECUTABLE_OUTPUT_PATH}/comparePGXimages
# ${EXECUTABLE_OUTPUT_PATH}/compare_images
# -b ${BASELINE_NR}/opj_${filenameRefSub}-r3.pgx
# -t ${TEMP}/c0${filenameInput}-r3.pgx
# -n ${nbComponents}
@ -269,7 +269,7 @@ set(COMMENTCODEVAR FALSE)
# )
# add_test(ETS-C0P1-${filenameInput}-compare2ref
# ${EXECUTABLE_OUTPUT_PATH}/comparePGXimages
# ${EXECUTABLE_OUTPUT_PATH}/compare_images
# -b ${BASELINE_CONF}/${filenameRef}
# -t ${TEMP}/c0${filenameInput}.pgx
# -n ${nbComponents}
@ -283,7 +283,7 @@ set(COMMENTCODEVAR FALSE)
# ETS-C0P1-${filenameInput}-decode)
# add_test(NR-C0P1-${filenameInput}-compare2base
# ${EXECUTABLE_OUTPUT_PATH}/comparePGXimages
# ${EXECUTABLE_OUTPUT_PATH}/compare_images
# -b ${BASELINE_NR}/opj_${filenameRef}
# -t ${TEMP}/c0${filenameInput}.pgx
# -n ${nbComponents}
@ -335,7 +335,7 @@ foreach(numFileC1P0 RANGE 1 16)
)
add_test(NAME ETS-C1P0-${filenameInput}-compare2ref
COMMAND comparePGXimages
COMMAND compare_images
-b ${BASELINE_CONF}/${filenameRef}
-t ${TEMP}/c1${filenameInput}.pgx
-n ${nbComponents}
@ -349,7 +349,7 @@ foreach(numFileC1P0 RANGE 1 16)
ETS-C1P0-${filenameInput}-decode)
add_test(NAME NR-C1P0-${filenameInput}-compare2base
COMMAND comparePGXimages
COMMAND compare_images
-b ${BASELINE_NR}/opj_${filenameRef}
-t ${TEMP}/c1${filenameInput}.pgx
-n ${nbComponents}
@ -392,7 +392,7 @@ foreach(numFileC1P1 RANGE 1 7)
)
add_test(NAME ETS-C1P1-${filenameInput}-compare2ref
COMMAND comparePGXimages
COMMAND compare_images
-b ${BASELINE_CONF}/${filenameRef}
-t ${TEMP}/c1${filenameInput}.pgx
-n ${nbComponents}
@ -406,7 +406,7 @@ foreach(numFileC1P1 RANGE 1 7)
ETS-C1P1-${filenameInput}-decode)
add_test(NAME NR-C1P1-${filenameInput}-compare2base
COMMAND comparePGXimages
COMMAND compare_images
-b ${BASELINE_NR}/opj_${filenameRef}
-t ${TEMP}/c1${filenameInput}.pgx
-n ${nbComponents}
@ -444,7 +444,7 @@ foreach(numFileJP2 RANGE 1 9)
)
add_test(NAME ETS-JP2-${filenameInput}-compare2ref
COMMAND comparePGXimages
COMMAND compare_images
-b ${BASELINE_CONF}/${filenameRef}
-t ${TEMP}/${filenameInput}.tif
-n 3
@ -458,7 +458,7 @@ foreach(numFileJP2 RANGE 1 9)
ETS-JP2-${filenameInput}-decode)
add_test(NAME NR-JP2-${filenameInput}-compare2base
COMMAND comparePGXimages
COMMAND compare_images
-b ${BASELINE_NR}/opj_${filenameRef}
-t ${TEMP}/${filenameInput}.tif
-n 3

View File

@ -289,7 +289,7 @@ foreach(OPJ_TEST_CMD_LINE ${OPJ_TEST_CMD_LINE_LIST})
# Compare the decoding file with baseline generated from the kdu_expand and baseline.j2k
add_test(NAME NR-ENC-${INPUT_FILENAME_NAME}-${IT_TEST_ENC}-compare_dec-ref-out2base
COMMAND compareRAWimages
COMMAND compare_raw_files
-b ${BASELINE_NR}/opj_${OUTPUT_FILENAME_NAME_WE}-ENC-${IT_TEST_ENC}.raw
-t ${OUTPUT_FILENAME}.raw
)
@ -330,7 +330,7 @@ foreach(OPJ_TEST_CMD_LINE ${OPJ_TEST_CMD_LINE_LIST})
# FIXME: add a compare2base function base on raw which
# can output png diff files if necesary
# add_test(NR-${filename}-compare2base
# ${EXECUTABLE_OUTPUT_PATH}/comparePGXimages
# ${EXECUTABLE_OUTPUT_PATH}/compare_images
# -b ${BASELINE_NR}/opj_${filenameRef}
# -t ${TEMP}/${filename}.pgx
# -n ${nbComponents}