From dd00120e96f063e9c18f7c0705e6a9deec9e38a2 Mon Sep 17 00:00:00 2001 From: mayeut Date: Tue, 8 Sep 2015 22:24:06 +0200 Subject: [PATCH 01/19] Add Kakadu tests --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index 1f7966f4..6a376bfd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,8 +6,12 @@ before_install: - cmake --version - git clone --depth=1 --branch=master git://github.com/uclouvain/openjpeg-data.git data - wget -qO - https://github.com/openpreserve/jpylyzer/archive/1.14.2.tar.gz | tar -xvz + - wget -q http://kakadusoftware.com/wp-content/uploads/2014/06/KDU77_Demo_Apps_for_Linux-x86-64_150710.zip install: - chmod +x jpylyzer-1.14.2/jpylyzer/jpylyzer.py + - cmake -E tar -xf KDU77_Demo_Apps_for_Linux-x86-64_150710.zip + - export LD_LIBRARY_PATH=${PWD}/KDU77_Demo_Apps_for_Linux-x86-64_150710:${LD_LIBRARY_PATH} + - export PATH=${PWD}/KDU77_Demo_Apps_for_Linux-x86-64_150710:${PATH} script: - mkdir build From 0a27667878009ae271ebe45283d74537daedaef0 Mon Sep 17 00:00:00 2001 From: mayeut Date: Wed, 9 Sep 2015 21:35:50 +0200 Subject: [PATCH 02/19] Add notice for kakadu use --- .travis.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6a376bfd..3ea5dfcd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,10 +6,15 @@ before_install: - cmake --version - git clone --depth=1 --branch=master git://github.com/uclouvain/openjpeg-data.git data - wget -qO - https://github.com/openpreserve/jpylyzer/archive/1.14.2.tar.gz | tar -xvz - - wget -q http://kakadusoftware.com/wp-content/uploads/2014/06/KDU77_Demo_Apps_for_Linux-x86-64_150710.zip +# When OPJ_NONCOMMERCIAL=1, kakadu trial binaries are used for testing. Here's the copyright notice from kakadu: +# Copyright is owned by NewSouth Innovations Pty Limited, commercial arm of the UNSW Australia in Sydney. +# You are free to trial these executables and even to re-distribute them, +# so long as such use or re-distribution is accompanied with this copyright notice and is not for commercial gain. +# Note: Binaries can only be used for non-commercial purposes. + - if [ "${OPJ_NONCOMMERCIAL:-}" == "1" ]; then wget -q http://kakadusoftware.com/wp-content/uploads/2014/06/KDU77_Demo_Apps_for_Linux-x86-64_150710.zip; fi install: - chmod +x jpylyzer-1.14.2/jpylyzer/jpylyzer.py - - cmake -E tar -xf KDU77_Demo_Apps_for_Linux-x86-64_150710.zip + - if [ "${OPJ_NONCOMMERCIAL:-}" == "1" ]; then cmake -E tar -xf KDU77_Demo_Apps_for_Linux-x86-64_150710.zip; fi - export LD_LIBRARY_PATH=${PWD}/KDU77_Demo_Apps_for_Linux-x86-64_150710:${LD_LIBRARY_PATH} - export PATH=${PWD}/KDU77_Demo_Apps_for_Linux-x86-64_150710:${PATH} From 4f5ec07c315872bdee0885be085ebf57cede2db9 Mon Sep 17 00:00:00 2001 From: mayeut Date: Wed, 9 Sep 2015 23:38:46 +0200 Subject: [PATCH 03/19] Remove C++ comment --- src/bin/common/color.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/common/color.c b/src/bin/common/color.c index 98a4cec8..d38f3372 100644 --- a/src/bin/common/color.c +++ b/src/bin/common/color.c @@ -581,7 +581,7 @@ void color_apply_conversion(opj_image_t *image) row = (int*)image->icc_profile_buf; enumcs = row[0]; - if(enumcs == 14)// CIELab + if(enumcs == 14) /* CIELab */ { int *L, *a, *b, *red, *green, *blue; int *src0, *src1, *src2, *dst0, *dst1, *dst2; From 5f02757eef51dc834401e2ba5500312a9edab95e Mon Sep 17 00:00:00 2001 From: mayeut Date: Thu, 10 Sep 2015 00:39:23 +0200 Subject: [PATCH 04/19] Correct lossless issue on linux x86 Update uclouvain/openjpeg#571 --- src/lib/openjp2/tcd.c | 4 ++-- tests/compare_images.c | 2 +- tests/nonregression/CMakeLists.txt | 20 ++++++++++++++++++++ 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/src/lib/openjp2/tcd.c b/src/lib/openjp2/tcd.c index 8f1c9410..df9272ff 100644 --- a/src/lib/openjp2/tcd.c +++ b/src/lib/openjp2/tcd.c @@ -268,7 +268,7 @@ void opj_tcd_makelayer( opj_tcd_t *tcd, n = passno + 1; continue; } - if (dd / dr >= thresh) + if (dd / dr > thresh) n = passno + 1; } @@ -565,7 +565,7 @@ OPJ_BOOL opj_tcd_rateallocate( opj_tcd_t *tcd, opj_t2_destroy(t2); } else { success = OPJ_TRUE; - goodthresh = min; + goodthresh = min - DBL_MAX; /* do not rely on float equality for lossless transform */ } if (!success) { diff --git a/tests/compare_images.c b/tests/compare_images.c index cb1b1301..fa15d13e 100644 --- a/tests/compare_images.c +++ b/tests/compare_images.c @@ -85,7 +85,7 @@ static void compare_images_help_display(void) fprintf(stdout,"\n"); fprintf(stdout," -b \t REQUIRED \t filename to the reference/baseline PGX/TIF/PNM image \n"); fprintf(stdout," -t \t REQUIRED \t filename to the test PGX/TIF/PNM image\n"); - fprintf(stdout," -n \t REQUIRED \t number of component of the image (used to generate correct filename)\n"); + fprintf(stdout," -n \t REQUIRED \t number of component of the image (used to generate correct filename, not used when both input files are TIF)\n"); fprintf(stdout," -m \t OPTIONAL \t list of MSE tolerances, separated by : (size must correspond to the number of component) of \n"); fprintf(stdout," -p \t OPTIONAL \t list of PEAK tolerances, separated by : (size must correspond to the number of component) \n"); fprintf(stdout," -s \t OPTIONAL \t 1 or 2 filename separator to take into account PGX/PNM image with different components, " diff --git a/tests/nonregression/CMakeLists.txt b/tests/nonregression/CMakeLists.txt index 2527f8cb..5ce37c81 100644 --- a/tests/nonregression/CMakeLists.txt +++ b/tests/nonregression/CMakeLists.txt @@ -353,6 +353,26 @@ foreach(OPJ_TEST_CMD_LINE ${OPJ_TEST_CMD_LINE_LIST}) ) endif() endif(JPYLYZER_EXECUTABLE) + + # If lossless compression (simple test is 4 arguments), decompress & compare + list(LENGTH CMD_ARG_LIST_2 ARG_COUNT) + if (ARG_COUNT EQUAL 4) + # can we compare with the input image ? + if (${INPUT_FILENAME_NAME} MATCHES "\\.tif$") + add_test(NAME NR-ENC-${INPUT_FILENAME_NAME}-${IT_TEST_ENC}-lossless-decode + COMMAND opj_decompress -i ${OUTPUT_FILENAME} -o ${OUTPUT_FILENAME}.lossless.tif + ) + set_tests_properties(NR-ENC-${INPUT_FILENAME_NAME}-${IT_TEST_ENC}-lossless-decode PROPERTIES + DEPENDS NR-ENC-${INPUT_FILENAME_NAME}-${IT_TEST_ENC}-encode + ) + add_test(NAME NR-ENC-${INPUT_FILENAME_NAME}-${IT_TEST_ENC}-lossless-compare + COMMAND compare_images -b ${INPUT_FILENAME} -t ${OUTPUT_FILENAME}.lossless.tif -n 1 -d + ) + set_tests_properties(NR-ENC-${INPUT_FILENAME_NAME}-${IT_TEST_ENC}-lossless-compare PROPERTIES + DEPENDS NR-ENC-${INPUT_FILENAME_NAME}-${IT_TEST_ENC}-lossless-decode + ) + endif() + endif() endif() # DECODER TEST SUITE From 4cde646cd7a1dd4a364bd2b2fabaf832149728a5 Mon Sep 17 00:00:00 2001 From: mayeut Date: Thu, 10 Sep 2015 01:24:46 +0200 Subject: [PATCH 05/19] Add test for uclouvain/openjpeg#571 --- tests/nonregression/test_suite.ctest.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/nonregression/test_suite.ctest.in b/tests/nonregression/test_suite.ctest.in index 6f9bba83..7e3a35a8 100644 --- a/tests/nonregression/test_suite.ctest.in +++ b/tests/nonregression/test_suite.ctest.in @@ -134,6 +134,9 @@ opj_compress -i @INPUT_NR_PATH@/pngsuite/ftp0n2c08.png -o @TEMP_PATH@/ftp0n2c08. opj_compress -i @INPUT_NR_PATH@/pngsuite/ftp0n3p08.png -o @TEMP_PATH@/ftp0n3p08.png.jp2 opj_compress -i @INPUT_NR_PATH@/pngsuite/ftp1n3p08.png -o @TEMP_PATH@/ftp1n3p08.png.jp2 +# issue 571 Lossless is not lossless on linux x86 +opj_compress -i @INPUT_NR_PATH@/issue571.tif -o @TEMP_PATH@/issue571.tif.j2k + # DECODER TEST SUITE opj_decompress -i @INPUT_NR_PATH@/Bretagne2.j2k -o @TEMP_PATH@/Bretagne2.j2k.pgx opj_decompress -i @INPUT_NR_PATH@/_00042.j2k -o @TEMP_PATH@/_00042.j2k.pgx From d7d9f84707a8a93a393666fafedd7b77c59eff37 Mon Sep 17 00:00:00 2001 From: mayeut Date: Thu, 10 Sep 2015 08:04:59 +0200 Subject: [PATCH 06/19] Remove invalid assert in compare_images --- tests/compare_images.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/compare_images.c b/tests/compare_images.c index fa15d13e..b28d4957 100644 --- a/tests/compare_images.c +++ b/tests/compare_images.c @@ -279,8 +279,6 @@ static opj_image_t* readImageFromFileTIF(const char* filename, int nbFilenamePGX return NULL; } - /* \postconditions */ - assert( image_read->numcomps == 1 || image_read->numcomps == 3 ); return image_read; } From ccdce606f1baa945e5c717064bc17e8218b7cb29 Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Thu, 10 Sep 2015 15:10:14 +0200 Subject: [PATCH 07/19] Fix threshold calculation It doesn't change the outcome of the test suite, that's weird... --- src/lib/openjp2/tcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/openjp2/tcd.c b/src/lib/openjp2/tcd.c index df9272ff..d227e388 100644 --- a/src/lib/openjp2/tcd.c +++ b/src/lib/openjp2/tcd.c @@ -565,7 +565,7 @@ OPJ_BOOL opj_tcd_rateallocate( opj_tcd_t *tcd, opj_t2_destroy(t2); } else { success = OPJ_TRUE; - goodthresh = min - DBL_MAX; /* do not rely on float equality for lossless transform */ + goodthresh = min - DBL_EPSILON; /* do not rely on float equality for lossless transform */ } if (!success) { From ee0f3138482fc5ef44f92e6164206bc8df34efe4 Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Thu, 10 Sep 2015 15:46:51 +0200 Subject: [PATCH 08/19] Update check in opj_tcd_makelayer to be robust to different float precisions --- src/lib/openjp2/tcd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/openjp2/tcd.c b/src/lib/openjp2/tcd.c index d227e388..32db260b 100644 --- a/src/lib/openjp2/tcd.c +++ b/src/lib/openjp2/tcd.c @@ -268,7 +268,7 @@ void opj_tcd_makelayer( opj_tcd_t *tcd, n = passno + 1; continue; } - if (dd / dr > thresh) + if (thresh - (dd / dr) <= DBL_EPSILON) /* do not rely on float equality, check with DBL_EPSILON margin */ n = passno + 1; } @@ -565,7 +565,7 @@ OPJ_BOOL opj_tcd_rateallocate( opj_tcd_t *tcd, opj_t2_destroy(t2); } else { success = OPJ_TRUE; - goodthresh = min - DBL_EPSILON; /* do not rely on float equality for lossless transform */ + goodthresh = min; } if (!success) { From bac2c9e0a37a79a35e39cbe18572ec40bcfc3f29 Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Fri, 11 Sep 2015 14:17:30 +0200 Subject: [PATCH 09/19] Change test in opj_tcd_makelayer Remove float equality test. Such a test has no meaning. --- src/lib/openjp2/tcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/openjp2/tcd.c b/src/lib/openjp2/tcd.c index 32db260b..2fccff1c 100644 --- a/src/lib/openjp2/tcd.c +++ b/src/lib/openjp2/tcd.c @@ -268,7 +268,7 @@ void opj_tcd_makelayer( opj_tcd_t *tcd, n = passno + 1; continue; } - if (thresh - (dd / dr) <= DBL_EPSILON) /* do not rely on float equality, check with DBL_EPSILON margin */ + if (thresh - (dd / dr) < DBL_EPSILON) /* do not rely on float equality, check with DBL_EPSILON margin */ n = passno + 1; } From 29ce132df414c00ac570ce10ed7086ca21d77557 Mon Sep 17 00:00:00 2001 From: mayeut Date: Fri, 11 Sep 2015 21:04:49 +0200 Subject: [PATCH 10/19] Echo Kakadu copyright notice --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 3ea5dfcd..b63aeffc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,6 +11,7 @@ before_install: # You are free to trial these executables and even to re-distribute them, # so long as such use or re-distribution is accompanied with this copyright notice and is not for commercial gain. # Note: Binaries can only be used for non-commercial purposes. + - if [ "${OPJ_NONCOMMERCIAL:-}" == "1" ]; then echo -e "Testing will use Kakadu trial binaries. Here's the copyright notice from kakadu:\nCopyright is owned by NewSouth Innovations Pty Limited, commercial arm of the UNSW Australia in Sydney.\nYou are free to trial these executables and even to re-distribute them,\nso long as such use or re-distribution is accompanied with this copyright notice and is not for commercial gain.\nNote: Binaries can only be used for non-commercial purposes.\n"; fi - if [ "${OPJ_NONCOMMERCIAL:-}" == "1" ]; then wget -q http://kakadusoftware.com/wp-content/uploads/2014/06/KDU77_Demo_Apps_for_Linux-x86-64_150710.zip; fi install: - chmod +x jpylyzer-1.14.2/jpylyzer/jpylyzer.py From cd10f46572a76efe68447f30d12406fc275d6a06 Mon Sep 17 00:00:00 2001 From: mayeut Date: Fri, 11 Sep 2015 21:15:17 +0200 Subject: [PATCH 11/19] Echo Kakadu copyright notice --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b63aeffc..86e6feb6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,7 @@ before_install: # You are free to trial these executables and even to re-distribute them, # so long as such use or re-distribution is accompanied with this copyright notice and is not for commercial gain. # Note: Binaries can only be used for non-commercial purposes. - - if [ "${OPJ_NONCOMMERCIAL:-}" == "1" ]; then echo -e "Testing will use Kakadu trial binaries. Here's the copyright notice from kakadu:\nCopyright is owned by NewSouth Innovations Pty Limited, commercial arm of the UNSW Australia in Sydney.\nYou are free to trial these executables and even to re-distribute them,\nso long as such use or re-distribution is accompanied with this copyright notice and is not for commercial gain.\nNote: Binaries can only be used for non-commercial purposes.\n"; fi + - if [ "${OPJ_NONCOMMERCIAL:-}" == "1" ]; then echo "Testing will use Kakadu trial binaries. Here's the copyright notice from kakadu:"; echo "Copyright is owned by NewSouth Innovations Pty Limited, commercial arm of the UNSW Australia in Sydney."; echo "You are free to trial these executables and even to re-distribute them,"; echo "so long as such use or re-distribution is accompanied with this copyright notice and is not for commercial gain."; echo "Note: Binaries can only be used for non-commercial purposes."; fi - if [ "${OPJ_NONCOMMERCIAL:-}" == "1" ]; then wget -q http://kakadusoftware.com/wp-content/uploads/2014/06/KDU77_Demo_Apps_for_Linux-x86-64_150710.zip; fi install: - chmod +x jpylyzer-1.14.2/jpylyzer/jpylyzer.py From c31a28fcd1337725b148de7ae5faf73856e9203e Mon Sep 17 00:00:00 2001 From: mayeut Date: Fri, 11 Sep 2015 21:21:22 +0200 Subject: [PATCH 12/19] Echo Kakadu copyright notice --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 86e6feb6..6883227c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,7 @@ before_install: # You are free to trial these executables and even to re-distribute them, # so long as such use or re-distribution is accompanied with this copyright notice and is not for commercial gain. # Note: Binaries can only be used for non-commercial purposes. - - if [ "${OPJ_NONCOMMERCIAL:-}" == "1" ]; then echo "Testing will use Kakadu trial binaries. Here's the copyright notice from kakadu:"; echo "Copyright is owned by NewSouth Innovations Pty Limited, commercial arm of the UNSW Australia in Sydney."; echo "You are free to trial these executables and even to re-distribute them,"; echo "so long as such use or re-distribution is accompanied with this copyright notice and is not for commercial gain."; echo "Note: Binaries can only be used for non-commercial purposes."; fi + - if [ "${OPJ_NONCOMMERCIAL:-}" == "1" ]; then echo "Testing will use Kakadu trial binaries. Here's the copyright notice from kakadu:"; echo "Copyright is owned by NewSouth Innovations Pty Limited, commercial arm of the UNSW Australia in Sydney."; echo "You are free to trial these executables and even to re-distribute them,"; echo "so long as such use or re-distribution is accompanied with this copyright notice and is not for commercial gain."; echo "Note:\ Binaries can only be used for non-commercial purposes."; fi - if [ "${OPJ_NONCOMMERCIAL:-}" == "1" ]; then wget -q http://kakadusoftware.com/wp-content/uploads/2014/06/KDU77_Demo_Apps_for_Linux-x86-64_150710.zip; fi install: - chmod +x jpylyzer-1.14.2/jpylyzer/jpylyzer.py From 47b7b2787b753a76426c6b4f59e2d8c9d78d5dd4 Mon Sep 17 00:00:00 2001 From: mayeut Date: Fri, 11 Sep 2015 21:25:45 +0200 Subject: [PATCH 13/19] Echo Kakadu copyright notice MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move to script so that travis-ci doesn’t hide this by default --- .travis.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6883227c..a7f975ee 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,6 @@ before_install: # You are free to trial these executables and even to re-distribute them, # so long as such use or re-distribution is accompanied with this copyright notice and is not for commercial gain. # Note: Binaries can only be used for non-commercial purposes. - - if [ "${OPJ_NONCOMMERCIAL:-}" == "1" ]; then echo "Testing will use Kakadu trial binaries. Here's the copyright notice from kakadu:"; echo "Copyright is owned by NewSouth Innovations Pty Limited, commercial arm of the UNSW Australia in Sydney."; echo "You are free to trial these executables and even to re-distribute them,"; echo "so long as such use or re-distribution is accompanied with this copyright notice and is not for commercial gain."; echo "Note:\ Binaries can only be used for non-commercial purposes."; fi - if [ "${OPJ_NONCOMMERCIAL:-}" == "1" ]; then wget -q http://kakadusoftware.com/wp-content/uploads/2014/06/KDU77_Demo_Apps_for_Linux-x86-64_150710.zip; fi install: - chmod +x jpylyzer-1.14.2/jpylyzer/jpylyzer.py @@ -20,10 +19,11 @@ install: - export PATH=${PWD}/KDU77_Demo_Apps_for_Linux-x86-64_150710:${PATH} script: - - mkdir build - - cd build - - cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DBUILD_CODEC=ON -DBUILD_THIRDPARTY=ON -DBUILD_TESTING=ON -DOPJ_DATA_ROOT=${PWD}/../data -DJPYLYZER_EXECUTABLE=${PWD}/../jpylyzer-1.14.2/jpylyzer/jpylyzer.py -DSITE=travis-ci.org -DBUILDNAME=${TRAVIS_OS_NAME}-${CC}$(${CC} -dumpversion)-x86_64-${TRAVIS_BRANCH}$( [[ "${TRAVIS_PULL_REQUEST}" != "false" ]] && echo "-pr${TRAVIS_PULL_REQUEST}" )-Release-3rdP .. - - ctest -D ExperimentalStart - - ctest -D ExperimentalBuild -V - - ctest -D ExperimentalTest -j2 || true - - ctest -D ExperimentalSubmit || true + - if [ "${OPJ_NONCOMMERCIAL:-}" == "1" ]; then echo -e "\nTesting will use Kakadu trial binaries. Here's the copyright notice from kakadu:\nCopyright is owned by NewSouth Innovations Pty Limited, commercial arm of the UNSW Australia in Sydney.\nYou are free to trial these executables and even to re-distribute them,\nso long as such use or re-distribution is accompanied with this copyright notice and is not for commercial gain.\nNote:\ Binaries can only be used for non-commercial purposes.\n"; fi + - mkdir build + - cd build + - cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DBUILD_CODEC=ON -DBUILD_THIRDPARTY=ON -DBUILD_TESTING=ON -DOPJ_DATA_ROOT=${PWD}/../data -DJPYLYZER_EXECUTABLE=${PWD}/../jpylyzer-1.14.2/jpylyzer/jpylyzer.py -DSITE=travis-ci.org -DBUILDNAME=${TRAVIS_OS_NAME}-${CC}$(${CC} -dumpversion)-x86_64-${TRAVIS_BRANCH}$( [[ "${TRAVIS_PULL_REQUEST}" != "false" ]] && echo "-pr${TRAVIS_PULL_REQUEST}" )-Release-3rdP .. + - ctest -D ExperimentalStart + - ctest -D ExperimentalBuild -V + - ctest -D ExperimentalTest -j2 || true + - ctest -D ExperimentalSubmit || true From 8d46ac19ff34bd1ac1c23cf2acba0951c1c69459 Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 12 Sep 2015 02:19:28 +0200 Subject: [PATCH 14/19] Setup travis matrix This is just to get some ideas of what can be done. Update uclouvain/openjpeg#581 --- .travis.yml | 33 +++++--------- tools/travis-ci/install.sh | 50 ++++++++++++++++++++ tools/travis-ci/run.sh | 93 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 154 insertions(+), 22 deletions(-) create mode 100755 tools/travis-ci/install.sh create mode 100755 tools/travis-ci/run.sh diff --git a/.travis.yml b/.travis.yml index a7f975ee..2bdeea7e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,29 +1,18 @@ language: c +os: + - linux + - osx compiler: - gcc + - clang + +matrix: + exclude: + - os: osx + - compiler: gcc -before_install: - - cmake --version - - git clone --depth=1 --branch=master git://github.com/uclouvain/openjpeg-data.git data - - wget -qO - https://github.com/openpreserve/jpylyzer/archive/1.14.2.tar.gz | tar -xvz -# When OPJ_NONCOMMERCIAL=1, kakadu trial binaries are used for testing. Here's the copyright notice from kakadu: -# Copyright is owned by NewSouth Innovations Pty Limited, commercial arm of the UNSW Australia in Sydney. -# You are free to trial these executables and even to re-distribute them, -# so long as such use or re-distribution is accompanied with this copyright notice and is not for commercial gain. -# Note: Binaries can only be used for non-commercial purposes. - - if [ "${OPJ_NONCOMMERCIAL:-}" == "1" ]; then wget -q http://kakadusoftware.com/wp-content/uploads/2014/06/KDU77_Demo_Apps_for_Linux-x86-64_150710.zip; fi install: - - chmod +x jpylyzer-1.14.2/jpylyzer/jpylyzer.py - - if [ "${OPJ_NONCOMMERCIAL:-}" == "1" ]; then cmake -E tar -xf KDU77_Demo_Apps_for_Linux-x86-64_150710.zip; fi - - export LD_LIBRARY_PATH=${PWD}/KDU77_Demo_Apps_for_Linux-x86-64_150710:${LD_LIBRARY_PATH} - - export PATH=${PWD}/KDU77_Demo_Apps_for_Linux-x86-64_150710:${PATH} + - ./tools/travis-ci/install.sh script: - - if [ "${OPJ_NONCOMMERCIAL:-}" == "1" ]; then echo -e "\nTesting will use Kakadu trial binaries. Here's the copyright notice from kakadu:\nCopyright is owned by NewSouth Innovations Pty Limited, commercial arm of the UNSW Australia in Sydney.\nYou are free to trial these executables and even to re-distribute them,\nso long as such use or re-distribution is accompanied with this copyright notice and is not for commercial gain.\nNote:\ Binaries can only be used for non-commercial purposes.\n"; fi - - mkdir build - - cd build - - cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DBUILD_CODEC=ON -DBUILD_THIRDPARTY=ON -DBUILD_TESTING=ON -DOPJ_DATA_ROOT=${PWD}/../data -DJPYLYZER_EXECUTABLE=${PWD}/../jpylyzer-1.14.2/jpylyzer/jpylyzer.py -DSITE=travis-ci.org -DBUILDNAME=${TRAVIS_OS_NAME}-${CC}$(${CC} -dumpversion)-x86_64-${TRAVIS_BRANCH}$( [[ "${TRAVIS_PULL_REQUEST}" != "false" ]] && echo "-pr${TRAVIS_PULL_REQUEST}" )-Release-3rdP .. - - ctest -D ExperimentalStart - - ctest -D ExperimentalBuild -V - - ctest -D ExperimentalTest -j2 || true - - ctest -D ExperimentalSubmit || true + - ./tools/travis-ci/run.sh diff --git a/tools/travis-ci/install.sh b/tools/travis-ci/install.sh new file mode 100755 index 00000000..d1ce8885 --- /dev/null +++ b/tools/travis-ci/install.sh @@ -0,0 +1,50 @@ +#!/bin/bash + +# This script executes the install step when running under travis-ci + +# Set-up some error handling +set -o nounset ## set -u : exit the script if you try to use an uninitialised variable +set -o errexit ## set -e : exit the script if any statement returns a non-true return value +set -o pipefail ## Fail on error in pipe + +function exit_handler () +{ + local exit_code="$?" + + test ${exit_code} == 0 && return; + + echo -e "\nInstall failed !!!\nLast command at line ${BASH_LINENO}: ${BASH_COMMAND}"; + exit "${exit_code}" +} +trap exit_handler EXIT +trap exit ERR + +# travis-ci doesn't dump cmake version in system info, let's print it +cmake --version + +# We need test data +if [ "${TRAVIS_BRANCH:-}" == "" ]; then + TRAVIS_BRANCH=master #default to master +fi +echo "Cloning openjpeg-data from ${TRAVIS_BRANCH} branch" +git clone --depth=1 --branch=${TRAVIS_BRANCH} git://github.com/uclouvain/openjpeg-data.git data + +# We need jpylyzer for the test suite +echo "Retrieving jpylyzer" +wget -qO - https://github.com/openpreserve/jpylyzer/archive/1.14.2.tar.gz | tar -xz +mv jpylyzer-1.14.2 jpylyzer +chmod +x jpylyzer/jpylyzer/jpylyzer.py + +# When OPJ_NONCOMMERCIAL=1, kakadu trial binaries are used for testing. Here's the copyright notice from kakadu: +# Copyright is owned by NewSouth Innovations Pty Limited, commercial arm of the UNSW Australia in Sydney. +# You are free to trial these executables and even to re-distribute them, +# so long as such use or re-distribution is accompanied with this copyright notice and is not for commercial gain. +# Note: Binaries can only be used for non-commercial purposes. +if [ "${OPJ_NONCOMMERCIAL:-}" == "1" ]; then + if [ "${TRAVIS_OS_NAME:-}" == "linux" ]; then + echo "Retrieving Kakadu" + wget -q http://kakadusoftware.com/wp-content/uploads/2014/06/KDU77_Demo_Apps_for_Linux-x86-64_150710.zip | tar -x + cmake -E tar -xf KDU77_Demo_Apps_for_Linux-x86-64_150710.zip + mv KDU77_Demo_Apps_for_Linux-x86-64_150710 kdu + fi +fi diff --git a/tools/travis-ci/run.sh b/tools/travis-ci/run.sh new file mode 100755 index 00000000..a1396cfe --- /dev/null +++ b/tools/travis-ci/run.sh @@ -0,0 +1,93 @@ +#!/bin/bash + +# This script executes the script step when running under travis-ci + +# Set-up some bash options +set -o nounset ## set -u : exit the script if you try to use an uninitialised variable +set -o errexit ## set -e : exit the script if any statement returns a non-true return value +set -o pipefail ## Fail on error in pipe + +# Set-up some variables +OPJ_SOURCE_DIR=$(cd $(dirname $0)/../.. && pwd) + +if [ "${TRAVIS_REPO_SLUG:-}" == "uclouvain/openjpeg" ]; then + OPJ_SITE="travis-ci.org" + OPJ_DO_SUBMIT=1 +else + OPJ_SITE="$(hostname)" + OPJ_DO_SUBMIT=0 # Do not flood cdash +fi + +if [ "${TRAVIS_OS_NAME:-}" == "" ]; then + # Let's guess OS for testing purposes + echo "Guessing OS" + if uname -s | grep -i Darwin &> /dev/null; then + TRAVIS_OS_NAME=osx + elif uname -s | grep -i Linux &> /dev/null; then + TRAVIS_OS_NAME=linux + if [ "${CC:-}" == "" ]; then + # default to gcc + export CC=gcc + fi + else + echo "Failed to guess OS"; exit 1 + fi + echo "${TRAVIS_OS_NAME}" +fi + +if [ "${TRAVIS_OS_NAME}" == "osx" ]; then + OPJ_OS_NAME=$(sw_vers -productName | tr -d ' ')$(sw_vers -productVersion | sed 's/\([^0-9]*\.[0-9]*\).*/\1/') + OPJ_CC_VERSION=$(xcodebuild -version | grep -i xcode) + OPJ_CC_VERSION=xcode${OPJ_CC_VERSION:6} +elif [ "${TRAVIS_OS_NAME}" == "linux" ]; then + OPJ_OS_NAME=linux + if which lsb_release > /dev/null; then + OPJ_OS_NAME=$(lsb_release -si)$(lsb_release -sr | sed 's/\([^0-9]*\.[0-9]*\).*/\1/') + fi + if [ "${CC}" == "gcc" ]; then + OPJ_CC_VERSION=gcc$(${CC} --version | head -1 | sed 's/.*\ \([0-9.]*[0-9]\)/\1/') + elif [ "${CC}" == "clang" ]; then + OPJ_CC_VERSION=clang$(${CC} --version | grep version | sed 's/.*version \([^0-9.]*[0-9.]*\).*/\1/') + else + echo "Compiler not supported: ${CC}" + fi +else + echo "OS not supported: ${TRAVIS_OS_NAME}" +fi + +if [ "${TRAVIS_BRANCH:-}" == "" ]; then + echo "Guessing branch" + TRAVIS_BRANCH=$(git -C ../openjpeg branch | grep '*' | tr -d '*[[:blank:]]') #default to master +fi + +OPJ_BUILDNAME=${OPJ_OS_NAME}-${OPJ_CC_VERSION}-${TRAVIS_BRANCH} +if [ "${TRAVIS_PULL_REQUEST:-}" != "false" ] && [ "${TRAVIS_PULL_REQUEST:-}" != "" ]; then + OPJ_BUILDNAME=${OPJ_BUILDNAME}-pr${TRAVIS_PULL_REQUEST} +fi +OPJ_BUILDNAME=${OPJ_BUILDNAME}-Release-3rdP + +if [ "${OPJ_NONCOMMERCIAL:-}" == "1" ] && [ -d kdu ]; then + echo " +Testing will use Kakadu trial binaries. Here's the copyright notice from kakadu: +Copyright is owned by NewSouth Innovations Pty Limited, commercial arm of the UNSW Australia in Sydney. +You are free to trial these executables and even to re-distribute them, +so long as such use or re-distribution is accompanied with this copyright notice and is not for commercial gain. +Note: Binaries can only be used for non-commercial purposes. +" +fi + +set -x +if [ "${OPJ_NONCOMMERCIAL:-}" == "1" ] && [ -d kdu ]; then + if [ "${TRAVIS_OS_NAME}" == "linux" ]; then + export LD_LIBRARY_PATH=${PWD}/kdu:${LD_LIBRARY_PATH} + fi + export PATH=${PWD}/kdu:${PATH} +fi + +mkdir build +cd build +cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DBUILD_CODEC=ON -DBUILD_THIRDPARTY=ON -DBUILD_TESTING=ON -DOPJ_DATA_ROOT=${PWD}/../data -DJPYLYZER_EXECUTABLE=${PWD}/../jpylyzer/jpylyzer/jpylyzer.py -DSITE=${OPJ_SITE} -DBUILDNAME=${OPJ_BUILDNAME} ${OPJ_SOURCE_DIR} +ctest -D ExperimentalStart +ctest -D ExperimentalBuild -V +ctest -D ExperimentalTest -j2 || true +ctest -D ExperimentalSubmit || true From e3579b6c1dde748399d67146bfe09383f6f766cb Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 12 Sep 2015 02:20:22 +0200 Subject: [PATCH 15/19] Revert "Setup travis matrix" This reverts commit 8d46ac19ff34bd1ac1c23cf2acba0951c1c69459. --- .travis.yml | 33 +++++++++----- tools/travis-ci/install.sh | 50 -------------------- tools/travis-ci/run.sh | 93 -------------------------------------- 3 files changed, 22 insertions(+), 154 deletions(-) delete mode 100755 tools/travis-ci/install.sh delete mode 100755 tools/travis-ci/run.sh diff --git a/.travis.yml b/.travis.yml index 2bdeea7e..a7f975ee 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,18 +1,29 @@ language: c -os: - - linux - - osx compiler: - gcc - - clang - -matrix: - exclude: - - os: osx - - compiler: gcc +before_install: + - cmake --version + - git clone --depth=1 --branch=master git://github.com/uclouvain/openjpeg-data.git data + - wget -qO - https://github.com/openpreserve/jpylyzer/archive/1.14.2.tar.gz | tar -xvz +# When OPJ_NONCOMMERCIAL=1, kakadu trial binaries are used for testing. Here's the copyright notice from kakadu: +# Copyright is owned by NewSouth Innovations Pty Limited, commercial arm of the UNSW Australia in Sydney. +# You are free to trial these executables and even to re-distribute them, +# so long as such use or re-distribution is accompanied with this copyright notice and is not for commercial gain. +# Note: Binaries can only be used for non-commercial purposes. + - if [ "${OPJ_NONCOMMERCIAL:-}" == "1" ]; then wget -q http://kakadusoftware.com/wp-content/uploads/2014/06/KDU77_Demo_Apps_for_Linux-x86-64_150710.zip; fi install: - - ./tools/travis-ci/install.sh + - chmod +x jpylyzer-1.14.2/jpylyzer/jpylyzer.py + - if [ "${OPJ_NONCOMMERCIAL:-}" == "1" ]; then cmake -E tar -xf KDU77_Demo_Apps_for_Linux-x86-64_150710.zip; fi + - export LD_LIBRARY_PATH=${PWD}/KDU77_Demo_Apps_for_Linux-x86-64_150710:${LD_LIBRARY_PATH} + - export PATH=${PWD}/KDU77_Demo_Apps_for_Linux-x86-64_150710:${PATH} script: - - ./tools/travis-ci/run.sh + - if [ "${OPJ_NONCOMMERCIAL:-}" == "1" ]; then echo -e "\nTesting will use Kakadu trial binaries. Here's the copyright notice from kakadu:\nCopyright is owned by NewSouth Innovations Pty Limited, commercial arm of the UNSW Australia in Sydney.\nYou are free to trial these executables and even to re-distribute them,\nso long as such use or re-distribution is accompanied with this copyright notice and is not for commercial gain.\nNote:\ Binaries can only be used for non-commercial purposes.\n"; fi + - mkdir build + - cd build + - cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DBUILD_CODEC=ON -DBUILD_THIRDPARTY=ON -DBUILD_TESTING=ON -DOPJ_DATA_ROOT=${PWD}/../data -DJPYLYZER_EXECUTABLE=${PWD}/../jpylyzer-1.14.2/jpylyzer/jpylyzer.py -DSITE=travis-ci.org -DBUILDNAME=${TRAVIS_OS_NAME}-${CC}$(${CC} -dumpversion)-x86_64-${TRAVIS_BRANCH}$( [[ "${TRAVIS_PULL_REQUEST}" != "false" ]] && echo "-pr${TRAVIS_PULL_REQUEST}" )-Release-3rdP .. + - ctest -D ExperimentalStart + - ctest -D ExperimentalBuild -V + - ctest -D ExperimentalTest -j2 || true + - ctest -D ExperimentalSubmit || true diff --git a/tools/travis-ci/install.sh b/tools/travis-ci/install.sh deleted file mode 100755 index d1ce8885..00000000 --- a/tools/travis-ci/install.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/bash - -# This script executes the install step when running under travis-ci - -# Set-up some error handling -set -o nounset ## set -u : exit the script if you try to use an uninitialised variable -set -o errexit ## set -e : exit the script if any statement returns a non-true return value -set -o pipefail ## Fail on error in pipe - -function exit_handler () -{ - local exit_code="$?" - - test ${exit_code} == 0 && return; - - echo -e "\nInstall failed !!!\nLast command at line ${BASH_LINENO}: ${BASH_COMMAND}"; - exit "${exit_code}" -} -trap exit_handler EXIT -trap exit ERR - -# travis-ci doesn't dump cmake version in system info, let's print it -cmake --version - -# We need test data -if [ "${TRAVIS_BRANCH:-}" == "" ]; then - TRAVIS_BRANCH=master #default to master -fi -echo "Cloning openjpeg-data from ${TRAVIS_BRANCH} branch" -git clone --depth=1 --branch=${TRAVIS_BRANCH} git://github.com/uclouvain/openjpeg-data.git data - -# We need jpylyzer for the test suite -echo "Retrieving jpylyzer" -wget -qO - https://github.com/openpreserve/jpylyzer/archive/1.14.2.tar.gz | tar -xz -mv jpylyzer-1.14.2 jpylyzer -chmod +x jpylyzer/jpylyzer/jpylyzer.py - -# When OPJ_NONCOMMERCIAL=1, kakadu trial binaries are used for testing. Here's the copyright notice from kakadu: -# Copyright is owned by NewSouth Innovations Pty Limited, commercial arm of the UNSW Australia in Sydney. -# You are free to trial these executables and even to re-distribute them, -# so long as such use or re-distribution is accompanied with this copyright notice and is not for commercial gain. -# Note: Binaries can only be used for non-commercial purposes. -if [ "${OPJ_NONCOMMERCIAL:-}" == "1" ]; then - if [ "${TRAVIS_OS_NAME:-}" == "linux" ]; then - echo "Retrieving Kakadu" - wget -q http://kakadusoftware.com/wp-content/uploads/2014/06/KDU77_Demo_Apps_for_Linux-x86-64_150710.zip | tar -x - cmake -E tar -xf KDU77_Demo_Apps_for_Linux-x86-64_150710.zip - mv KDU77_Demo_Apps_for_Linux-x86-64_150710 kdu - fi -fi diff --git a/tools/travis-ci/run.sh b/tools/travis-ci/run.sh deleted file mode 100755 index a1396cfe..00000000 --- a/tools/travis-ci/run.sh +++ /dev/null @@ -1,93 +0,0 @@ -#!/bin/bash - -# This script executes the script step when running under travis-ci - -# Set-up some bash options -set -o nounset ## set -u : exit the script if you try to use an uninitialised variable -set -o errexit ## set -e : exit the script if any statement returns a non-true return value -set -o pipefail ## Fail on error in pipe - -# Set-up some variables -OPJ_SOURCE_DIR=$(cd $(dirname $0)/../.. && pwd) - -if [ "${TRAVIS_REPO_SLUG:-}" == "uclouvain/openjpeg" ]; then - OPJ_SITE="travis-ci.org" - OPJ_DO_SUBMIT=1 -else - OPJ_SITE="$(hostname)" - OPJ_DO_SUBMIT=0 # Do not flood cdash -fi - -if [ "${TRAVIS_OS_NAME:-}" == "" ]; then - # Let's guess OS for testing purposes - echo "Guessing OS" - if uname -s | grep -i Darwin &> /dev/null; then - TRAVIS_OS_NAME=osx - elif uname -s | grep -i Linux &> /dev/null; then - TRAVIS_OS_NAME=linux - if [ "${CC:-}" == "" ]; then - # default to gcc - export CC=gcc - fi - else - echo "Failed to guess OS"; exit 1 - fi - echo "${TRAVIS_OS_NAME}" -fi - -if [ "${TRAVIS_OS_NAME}" == "osx" ]; then - OPJ_OS_NAME=$(sw_vers -productName | tr -d ' ')$(sw_vers -productVersion | sed 's/\([^0-9]*\.[0-9]*\).*/\1/') - OPJ_CC_VERSION=$(xcodebuild -version | grep -i xcode) - OPJ_CC_VERSION=xcode${OPJ_CC_VERSION:6} -elif [ "${TRAVIS_OS_NAME}" == "linux" ]; then - OPJ_OS_NAME=linux - if which lsb_release > /dev/null; then - OPJ_OS_NAME=$(lsb_release -si)$(lsb_release -sr | sed 's/\([^0-9]*\.[0-9]*\).*/\1/') - fi - if [ "${CC}" == "gcc" ]; then - OPJ_CC_VERSION=gcc$(${CC} --version | head -1 | sed 's/.*\ \([0-9.]*[0-9]\)/\1/') - elif [ "${CC}" == "clang" ]; then - OPJ_CC_VERSION=clang$(${CC} --version | grep version | sed 's/.*version \([^0-9.]*[0-9.]*\).*/\1/') - else - echo "Compiler not supported: ${CC}" - fi -else - echo "OS not supported: ${TRAVIS_OS_NAME}" -fi - -if [ "${TRAVIS_BRANCH:-}" == "" ]; then - echo "Guessing branch" - TRAVIS_BRANCH=$(git -C ../openjpeg branch | grep '*' | tr -d '*[[:blank:]]') #default to master -fi - -OPJ_BUILDNAME=${OPJ_OS_NAME}-${OPJ_CC_VERSION}-${TRAVIS_BRANCH} -if [ "${TRAVIS_PULL_REQUEST:-}" != "false" ] && [ "${TRAVIS_PULL_REQUEST:-}" != "" ]; then - OPJ_BUILDNAME=${OPJ_BUILDNAME}-pr${TRAVIS_PULL_REQUEST} -fi -OPJ_BUILDNAME=${OPJ_BUILDNAME}-Release-3rdP - -if [ "${OPJ_NONCOMMERCIAL:-}" == "1" ] && [ -d kdu ]; then - echo " -Testing will use Kakadu trial binaries. Here's the copyright notice from kakadu: -Copyright is owned by NewSouth Innovations Pty Limited, commercial arm of the UNSW Australia in Sydney. -You are free to trial these executables and even to re-distribute them, -so long as such use or re-distribution is accompanied with this copyright notice and is not for commercial gain. -Note: Binaries can only be used for non-commercial purposes. -" -fi - -set -x -if [ "${OPJ_NONCOMMERCIAL:-}" == "1" ] && [ -d kdu ]; then - if [ "${TRAVIS_OS_NAME}" == "linux" ]; then - export LD_LIBRARY_PATH=${PWD}/kdu:${LD_LIBRARY_PATH} - fi - export PATH=${PWD}/kdu:${PATH} -fi - -mkdir build -cd build -cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DBUILD_CODEC=ON -DBUILD_THIRDPARTY=ON -DBUILD_TESTING=ON -DOPJ_DATA_ROOT=${PWD}/../data -DJPYLYZER_EXECUTABLE=${PWD}/../jpylyzer/jpylyzer/jpylyzer.py -DSITE=${OPJ_SITE} -DBUILDNAME=${OPJ_BUILDNAME} ${OPJ_SOURCE_DIR} -ctest -D ExperimentalStart -ctest -D ExperimentalBuild -V -ctest -D ExperimentalTest -j2 || true -ctest -D ExperimentalSubmit || true From 49cbc11a194d41876da05481b05989248b35f8f6 Mon Sep 17 00:00:00 2001 From: mayeut Date: Sun, 13 Sep 2015 14:42:56 +0200 Subject: [PATCH 16/19] Correct leak in color_cielab_to_rgb --- src/bin/common/color.c | 8 ++++---- src/bin/common/color.h | 2 +- src/bin/jp2/opj_decompress.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/bin/common/color.c b/src/bin/common/color.c index d38f3372..f4fe7f10 100644 --- a/src/bin/common/color.c +++ b/src/bin/common/color.c @@ -599,13 +599,13 @@ void color_apply_conversion(opj_image_t *image) transform = cmsCreateTransform(in, TYPE_Lab_DBL, out, TYPE_RGB_16, INTENT_PERCEPTUAL, 0); -#ifdef HAVE_LIBLCMS2 +#ifdef OPJ_HAVE_LIBLCMS2 cmsCloseProfile(in); cmsCloseProfile(out); #endif if(transform == NULL) { -#ifdef HAVE_LIBLCMS1 +#ifdef OPJ_HAVE_LIBLCMS1 cmsCloseProfile(in); cmsCloseProfile(out); #endif @@ -662,7 +662,7 @@ void color_apply_conversion(opj_image_t *image) *blue++ = RGB[2]; } cmsDeleteTransform(transform); -#ifdef HAVE_LIBLCMS1 +#ifdef OPJ_HAVE_LIBLCMS1 cmsCloseProfile(in); cmsCloseProfile(out); #endif @@ -681,7 +681,7 @@ void color_apply_conversion(opj_image_t *image) fprintf(stderr,"%s:%d:\n\tenumCS %d not handled. Ignoring.\n", __FILE__,__LINE__, enumcs); }// color_apply_conversion() -#endif // HAVE_LIBLCMS2 || HAVE_LIBLCMS1 +#endif // OPJ_HAVE_LIBLCMS2 || OPJ_HAVE_LIBLCMS1 void color_cmyk_to_rgb(opj_image_t *image) { diff --git a/src/bin/common/color.h b/src/bin/common/color.h index c329f87f..0cd78e89 100644 --- a/src/bin/common/color.h +++ b/src/bin/common/color.h @@ -40,7 +40,7 @@ extern void color_sycc_to_rgb(opj_image_t *img); extern void color_apply_icc_profile(opj_image_t *image); -extern void color_apply_conversion(opj_image_t *image); +extern void color_cielab_to_rgb(opj_image_t *image); extern void color_cmyk_to_rgb(opj_image_t *image); extern void color_esycc_to_rgb(opj_image_t *image); diff --git a/src/bin/jp2/opj_decompress.c b/src/bin/jp2/opj_decompress.c index ac17b69d..da566ac2 100644 --- a/src/bin/jp2/opj_decompress.c +++ b/src/bin/jp2/opj_decompress.c @@ -1371,7 +1371,7 @@ int main(int argc, char **argv) if(image->icc_profile_len) color_apply_icc_profile(image); else - color_apply_conversion(image); + color_cielab_to_rgb(image); #endif free(image->icc_profile_buf); image->icc_profile_buf = NULL; image->icc_profile_len = 0; From c8a31176590fe1666bf821bc1479f28cb25b5f6a Mon Sep 17 00:00:00 2001 From: mayeut Date: Sun, 13 Sep 2015 14:51:00 +0200 Subject: [PATCH 17/19] Fix function name --- src/bin/common/color.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/common/color.c b/src/bin/common/color.c index f4fe7f10..3b0eb97b 100644 --- a/src/bin/common/color.c +++ b/src/bin/common/color.c @@ -562,7 +562,7 @@ fprintf(stderr,"%s:%d:color_apply_icc_profile\n\tcmsCreateTransform failed. " #endif }/* color_apply_icc_profile() */ -void color_apply_conversion(opj_image_t *image) +void color_cielab_to_rgb(opj_image_t *image) { int *row; int enumcs, numcomps; From 9c911c0e1ee4367207cc9654ef109fb7250c5969 Mon Sep 17 00:00:00 2001 From: Mathieu Malaterre Date: Wed, 16 Sep 2015 20:49:45 +0200 Subject: [PATCH 18/19] Update the version number --- doc/man/man1/opj_compress.1 | 2 +- doc/man/man1/opj_decompress.1 | 2 +- doc/man/man1/opj_dump.1 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/man/man1/opj_compress.1 b/doc/man/man1/opj_compress.1 index 51e5b1a5..cb37a427 100644 --- a/doc/man/man1/opj_compress.1 +++ b/doc/man/man1/opj_compress.1 @@ -29,7 +29,7 @@ .SP .fi .. -.TH opj_compress 1 "Version 1.4.0" "opj_compress" "converts to jpeg2000 files" +.TH opj_compress 1 "Version 2.1.1" "opj_compress" "converts to jpeg2000 files" .P .SH NAME opj_compress - diff --git a/doc/man/man1/opj_decompress.1 b/doc/man/man1/opj_decompress.1 index 470fd3c1..38a404a4 100644 --- a/doc/man/man1/opj_decompress.1 +++ b/doc/man/man1/opj_decompress.1 @@ -29,7 +29,7 @@ .SP .fi .. -.TH opj_decompress 1 "Version 1.4.0" "opj_decompress" "converts jpeg2000 files" +.TH opj_decompress 1 "Version 2.1.1" "opj_decompress" "converts jpeg2000 files" .P .SH NAME opj_decompress - diff --git a/doc/man/man1/opj_dump.1 b/doc/man/man1/opj_dump.1 index a6033c61..160af63a 100644 --- a/doc/man/man1/opj_dump.1 +++ b/doc/man/man1/opj_dump.1 @@ -29,7 +29,7 @@ .SP .fi .. -.TH opj_dump 1 "Version 1.4.0" "opj_dump" "dumps jpeg2000 files" +.TH opj_dump 1 "Version 2.1.1" "opj_dump" "dumps jpeg2000 files" .P .SH NAME opj_dump - From 6cb56b36f627194fdfb13e306d27925b956af63f Mon Sep 17 00:00:00 2001 From: Mathieu Malaterre Date: Wed, 16 Sep 2015 20:54:34 +0200 Subject: [PATCH 19/19] Update opj_decompress man page --- doc/man/man1/opj_decompress.1 | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/doc/man/man1/opj_decompress.1 b/doc/man/man1/opj_decompress.1 index 38a404a4..1e7b6c54 100644 --- a/doc/man/man1/opj_decompress.1 +++ b/doc/man/man1/opj_decompress.1 @@ -73,9 +73,19 @@ n is the maximum number of quality layers to decode. See LAYERS below) .B \-\^OutFor "ext" (extension for output files) .P +.SH JPIP OPTIONS +Options usable only if the library has been compiled with +.B BUILD_JPIP +.TP +.B -jpip +Embed index table box into the output JP2 file (compulsory for JPIP) +.TP +.B -TP R +Partition a tile into tile parts of different resolution levels (compulsory for JPT-stream) +.P .SH JPWL OPTIONS Options usable only if the library has been compiled with -.B -DUSE_JPWL +.B BUILD_JPWL .TP .B -W c\fR[=Nc] (Nc is the number of expected components in the codestream; default:3) .TP