]> granicus.if.org Git - openjpeg/commitdiff
[trunk] Cleanup commit. Rename compare family since comparePGX now support TIFF.
authorMathieu Malaterre <mathieu.malaterre@gmail.com>
Fri, 7 Mar 2014 16:24:24 +0000 (16:24 +0000)
committerMathieu Malaterre <mathieu.malaterre@gmail.com>
Fri, 7 Mar 2014 16:24:24 +0000 (16:24 +0000)
Rename compareRAWimage for clarity since it merely compare files (not images).

tests/CMakeLists.txt
tests/compare_images.c [moved from tests/comparePGXimages.c with 99% similarity]
tests/compare_raw_files.c [moved from tests/compareRAWimages.c with 96% similarity]
tests/conformance/CMakeLists.txt
tests/nonregression/CMakeLists.txt

index b40af1c5c4e05544718391045fd002ff895d3bd9..625199f7600aaaf89026e95233f411195f902f68 100644 (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})
similarity index 99%
rename from tests/comparePGXimages.c
rename to tests/compare_images.c
index 978b9610349745d27f7144de69d5d40137e05fcc..9f15f04de9b3dd80df35dba67d523cede9b0dbba 100644 (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;
     }
 
similarity index 96%
rename from tests/compareRAWimages.c
rename to tests/compare_raw_files.c
index d913cf9b8e97ed1e80428e3e68bd11506e278973..e7ab8c94167cb12a3f9a6d24c4bac982c5579b72 100644 (file)
  */
 
 /*
- * 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;
     }
 
index 57fd256817187b5253ca96008012f285fcffc3e6..e47002f19c2274835b633b595df2fcfa9761d564 100644 (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
index 8b85827c95c97b744c3dc9e2c6cb030dd02b2ad1..f21a090844acc7b080ebc690fcea53ab78ab1cf4 100644 (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}