)
# 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
)
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})
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})
*/
/*
- * compareRAWimages.c
+ * compare_raw_files.c
*
* Created on: 31 August 2011
* Author: mickael
+ *
+ * This is equivalent to the UNIX `cmp` command
*/
#include <stdio.h>
/*******************************************************************************
* 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");
/* Get parameters from command line*/
if (parse_cmdline_cmp(argc, argv, &inParam))
{
- compareRAWimages_help_display();
+ compare_raw_files_help_display();
goto cleanup;
}
# )
# 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}
# 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}
# )
# 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}
# 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}
# )
# 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}
# 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}
# )
# 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}
# 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}
# )
# 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}
# 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}
# )
# 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}
# 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}
)
add_test(NAME ETS-C1P0-${filenameInput}-compare2ref
- COMMAND comparePGXimages
+ COMMAND compare_images
-b ${BASELINE_CONF}/${filenameRef}
-t ${TEMP}/c1${filenameInput}.pgx
-n ${nbComponents}
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}
)
add_test(NAME ETS-C1P1-${filenameInput}-compare2ref
- COMMAND comparePGXimages
+ COMMAND compare_images
-b ${BASELINE_CONF}/${filenameRef}
-t ${TEMP}/c1${filenameInput}.pgx
-n ${nbComponents}
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}
)
add_test(NAME ETS-JP2-${filenameInput}-compare2ref
- COMMAND comparePGXimages
+ COMMAND compare_images
-b ${BASELINE_CONF}/${filenameRef}
-t ${TEMP}/${filenameInput}.tif
-n 3
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