diff --git a/.kde-ci.yml b/.kde-ci.yml index 523d120..926db59 100644 --- a/.kde-ci.yml +++ b/.kde-ci.yml @@ -7,5 +7,5 @@ Dependencies: Options: test-before-installing: True require-passing-tests-on: ['Linux', 'FreeBSD', 'Windows'] - cmake-options: "-DKIMAGEFORMATS_WITH_KNOWN_CRASHES_JXR=ON -DKIMAGEFORMATS_HEIF=ON -DKIMAGEFORMATS_HEIF_TEST:STRING=OFF -DKIMAGEFORMATS_HEJ2_TEST:STRING=OFF -DKIMAGEFORMATS_AVCI_TEST:STRING=OFF" + cmake-options: "-DKIMAGEFORMATS_WITH_KNOWN_CRASHES_JXR=ON -DKIMAGEFORMATS_HEIF=ON -DKIMAGEFORMATS_HEIC_TEST:STRING=OFF -DKIMAGEFORMATS_HEIF_TEST:STRING=OFF -DKIMAGEFORMATS_HEJ2_TEST:STRING=OFF -DKIMAGEFORMATS_AVCI_TEST:STRING=OFF" per-test-timeout: 90 diff --git a/CMakeLists.txt b/CMakeLists.txt index 70eb6f2..30743f1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -65,8 +65,10 @@ set_package_properties(libavif PROPERTIES option(KIMAGEFORMATS_DDS "Enable plugin for DDS format" ON) option(KIMAGEFORMATS_HEIF "Enable plugin for HEIF format" OFF) -set(KIMAGEFORMATS_HEIF_TEST "ALL" CACHE STRING "Enable HEIF tests: OFF, READ_ONLY, ALL") -set_property(CACHE KIMAGEFORMATS_HEIF_TEST PROPERTY STRINGS "OFF" "READ_ONLY" "ALL") +set(KIMAGEFORMATS_HEIC_TEST "ALL" CACHE STRING "Enable HEIC tests: OFF, READ_ONLY, ALL") +set_property(CACHE KIMAGEFORMATS_HEIC_TEST PROPERTY STRINGS "OFF" "READ_ONLY" "ALL") +set(KIMAGEFORMATS_HEIF_TEST "ALL" CACHE STRING "Enable HEIF tests: OFF, ALL") +set_property(CACHE KIMAGEFORMATS_HEIF_TEST PROPERTY STRINGS "OFF" "ALL") set(KIMAGEFORMATS_HEJ2_TEST "ALL" CACHE STRING "Enable HEJ2 tests: OFF, READ_ONLY, ALL") set_property(CACHE KIMAGEFORMATS_HEJ2_TEST PROPERTY STRINGS "OFF" "READ_ONLY" "ALL") set(KIMAGEFORMATS_AVCI_TEST "ALL" CACHE STRING "Enable AVCI tests: OFF, ALL") diff --git a/README.md b/README.md index be305a7..6b37ef4 100644 --- a/README.md +++ b/README.md @@ -357,12 +357,18 @@ plugin: **If you are interested in compiling the plugin without running the tests, also use the following string options:** -- `KIMAGEFORMATS_HEIF_TEST` to change the behaviour of HEIF tests. Set to +- `KIMAGEFORMATS_HEIC_TEST` to change the behaviour of HEIC tests. Set to `"OFF"` (no test at all) or `"READ_ONLY"` (run read tests only). +Required codecs: HEVC / H.265. +- `KIMAGEFORMATS_HEIF_TEST` to change the behaviour of HEIF tests. Set to +`"OFF"` (no test at all). +Required codecs: uncompressed, deflate, zlib, brotli, jpeg. - `KIMAGEFORMATS_HEJ2_TEST` to change the behaviour of HEJ2 tests. Set to `"OFF"` (no test at all) or `"READ_ONLY"` (run read tests only). +Required codecs: JPEG 2000. - `KIMAGEFORMATS_AVCI_TEST` to change the behaviour of AVCI tests. Set to `"OFF"` (no test at all). +Required codecs: Advanced Video Coding / H.264. ### The EXR plugin diff --git a/autotests/CMakeLists.txt b/autotests/CMakeLists.txt index 1558c54..2ee89c0 100644 --- a/autotests/CMakeLists.txt +++ b/autotests/CMakeLists.txt @@ -119,15 +119,21 @@ if (TARGET avif) endif() if (LibHeif_FOUND) - if (KIMAGEFORMATS_HEIF_TEST STREQUAL "ALL" OR KIMAGEFORMATS_HEIF_TEST STREQUAL "READ_ONLY") + if (KIMAGEFORMATS_HEIC_TEST STREQUAL "ALL" OR KIMAGEFORMATS_HEIC_TEST STREQUAL "READ_ONLY") kimageformats_read_tests( - heif + heic ) endif() - if (KIMAGEFORMATS_HEIF_TEST STREQUAL "ALL") + if (KIMAGEFORMATS_HEIC_TEST STREQUAL "ALL") # because the plug-ins use RGB->YUV conversion which sometimes results in 1 value difference. kimageformats_write_tests(FUZZ 1 - heif-nodatacheck-lossless + heic-nodatacheck-lossless + ) + endif() + + if (KIMAGEFORMATS_HEIF_TEST STREQUAL "ALL") + kimageformats_read_tests( + heif ) endif() diff --git a/autotests/read/heif/crop_orientation1.heif b/autotests/read/heic/crop_orientation1.heic similarity index 100% rename from autotests/read/heif/crop_orientation1.heif rename to autotests/read/heic/crop_orientation1.heic diff --git a/autotests/read/heif/crop_orientation1.png b/autotests/read/heic/crop_orientation1.png similarity index 100% rename from autotests/read/heif/crop_orientation1.png rename to autotests/read/heic/crop_orientation1.png diff --git a/autotests/read/heif/crop_orientation2.heif b/autotests/read/heic/crop_orientation2.heic similarity index 100% rename from autotests/read/heif/crop_orientation2.heif rename to autotests/read/heic/crop_orientation2.heic diff --git a/autotests/read/heif/crop_orientation2.png b/autotests/read/heic/crop_orientation2.png similarity index 100% rename from autotests/read/heif/crop_orientation2.png rename to autotests/read/heic/crop_orientation2.png diff --git a/autotests/read/heif/crop_orientation3.heif b/autotests/read/heic/crop_orientation3.heic similarity index 100% rename from autotests/read/heif/crop_orientation3.heif rename to autotests/read/heic/crop_orientation3.heic diff --git a/autotests/read/heif/crop_orientation3.png b/autotests/read/heic/crop_orientation3.png similarity index 100% rename from autotests/read/heif/crop_orientation3.png rename to autotests/read/heic/crop_orientation3.png diff --git a/autotests/read/heif/crop_orientation4.heif b/autotests/read/heic/crop_orientation4.heic similarity index 100% rename from autotests/read/heif/crop_orientation4.heif rename to autotests/read/heic/crop_orientation4.heic diff --git a/autotests/read/heif/crop_orientation4.png b/autotests/read/heic/crop_orientation4.png similarity index 100% rename from autotests/read/heif/crop_orientation4.png rename to autotests/read/heic/crop_orientation4.png diff --git a/autotests/read/heif/crop_orientation5.heif b/autotests/read/heic/crop_orientation5.heic similarity index 100% rename from autotests/read/heif/crop_orientation5.heif rename to autotests/read/heic/crop_orientation5.heic diff --git a/autotests/read/heif/crop_orientation5.png b/autotests/read/heic/crop_orientation5.png similarity index 100% rename from autotests/read/heif/crop_orientation5.png rename to autotests/read/heic/crop_orientation5.png diff --git a/autotests/read/heif/crop_orientation6.heif b/autotests/read/heic/crop_orientation6.heic similarity index 100% rename from autotests/read/heif/crop_orientation6.heif rename to autotests/read/heic/crop_orientation6.heic diff --git a/autotests/read/heif/crop_orientation6.png b/autotests/read/heic/crop_orientation6.png similarity index 100% rename from autotests/read/heif/crop_orientation6.png rename to autotests/read/heic/crop_orientation6.png diff --git a/autotests/read/heif/crop_orientation7.heif b/autotests/read/heic/crop_orientation7.heic similarity index 100% rename from autotests/read/heif/crop_orientation7.heif rename to autotests/read/heic/crop_orientation7.heic diff --git a/autotests/read/heif/crop_orientation7.png b/autotests/read/heic/crop_orientation7.png similarity index 100% rename from autotests/read/heif/crop_orientation7.png rename to autotests/read/heic/crop_orientation7.png diff --git a/autotests/read/heif/crop_orientation8.heif b/autotests/read/heic/crop_orientation8.heic similarity index 100% rename from autotests/read/heif/crop_orientation8.heif rename to autotests/read/heic/crop_orientation8.heic diff --git a/autotests/read/heif/crop_orientation8.png b/autotests/read/heic/crop_orientation8.png similarity index 100% rename from autotests/read/heif/crop_orientation8.png rename to autotests/read/heic/crop_orientation8.png diff --git a/autotests/read/heif/metadata.heif b/autotests/read/heic/metadata.heic similarity index 100% rename from autotests/read/heif/metadata.heif rename to autotests/read/heic/metadata.heic diff --git a/autotests/read/heif/metadata.heif.json b/autotests/read/heic/metadata.heic.json similarity index 100% rename from autotests/read/heif/metadata.heif.json rename to autotests/read/heic/metadata.heic.json diff --git a/autotests/read/heif/metadata.png b/autotests/read/heic/metadata.png similarity index 100% rename from autotests/read/heif/metadata.png rename to autotests/read/heic/metadata.png diff --git a/autotests/read/heif/orientation1.heif b/autotests/read/heic/orientation1.heic similarity index 100% rename from autotests/read/heif/orientation1.heif rename to autotests/read/heic/orientation1.heic diff --git a/autotests/read/heif/orientation1.heif.json b/autotests/read/heic/orientation1.heic.json similarity index 100% rename from autotests/read/heif/orientation1.heif.json rename to autotests/read/heic/orientation1.heic.json diff --git a/autotests/read/heif/orientation2.heif b/autotests/read/heic/orientation2.heic similarity index 100% rename from autotests/read/heif/orientation2.heif rename to autotests/read/heic/orientation2.heic diff --git a/autotests/read/heif/orientation2.heif.json b/autotests/read/heic/orientation2.heic.json similarity index 100% rename from autotests/read/heif/orientation2.heif.json rename to autotests/read/heic/orientation2.heic.json diff --git a/autotests/read/heif/orientation3.heif b/autotests/read/heic/orientation3.heic similarity index 100% rename from autotests/read/heif/orientation3.heif rename to autotests/read/heic/orientation3.heic diff --git a/autotests/read/heif/orientation3.heif.json b/autotests/read/heic/orientation3.heic.json similarity index 100% rename from autotests/read/heif/orientation3.heif.json rename to autotests/read/heic/orientation3.heic.json diff --git a/autotests/read/heif/orientation4.heif b/autotests/read/heic/orientation4.heic similarity index 100% rename from autotests/read/heif/orientation4.heif rename to autotests/read/heic/orientation4.heic diff --git a/autotests/read/heif/orientation4.heif.json b/autotests/read/heic/orientation4.heic.json similarity index 100% rename from autotests/read/heif/orientation4.heif.json rename to autotests/read/heic/orientation4.heic.json diff --git a/autotests/read/heif/orientation5.heif b/autotests/read/heic/orientation5.heic similarity index 100% rename from autotests/read/heif/orientation5.heif rename to autotests/read/heic/orientation5.heic diff --git a/autotests/read/heif/orientation5.heif.json b/autotests/read/heic/orientation5.heic.json similarity index 100% rename from autotests/read/heif/orientation5.heif.json rename to autotests/read/heic/orientation5.heic.json diff --git a/autotests/read/heif/orientation6.heif b/autotests/read/heic/orientation6.heic similarity index 100% rename from autotests/read/heif/orientation6.heif rename to autotests/read/heic/orientation6.heic diff --git a/autotests/read/heif/orientation6.heif.json b/autotests/read/heic/orientation6.heic.json similarity index 100% rename from autotests/read/heif/orientation6.heif.json rename to autotests/read/heic/orientation6.heic.json diff --git a/autotests/read/heif/orientation7.heif b/autotests/read/heic/orientation7.heic similarity index 100% rename from autotests/read/heif/orientation7.heif rename to autotests/read/heic/orientation7.heic diff --git a/autotests/read/heif/orientation7.heif.json b/autotests/read/heic/orientation7.heic.json similarity index 100% rename from autotests/read/heif/orientation7.heif.json rename to autotests/read/heic/orientation7.heic.json diff --git a/autotests/read/heif/orientation8.heif b/autotests/read/heic/orientation8.heic similarity index 100% rename from autotests/read/heif/orientation8.heif rename to autotests/read/heic/orientation8.heic diff --git a/autotests/read/heif/orientation8.heif.json b/autotests/read/heic/orientation8.heic.json similarity index 100% rename from autotests/read/heif/orientation8.heif.json rename to autotests/read/heic/orientation8.heic.json diff --git a/autotests/read/heif/orientation_all.png b/autotests/read/heic/orientation_all.png similarity index 100% rename from autotests/read/heif/orientation_all.png rename to autotests/read/heic/orientation_all.png diff --git a/autotests/read/heif/rgb.heif b/autotests/read/heic/rgb.heic similarity index 100% rename from autotests/read/heif/rgb.heif rename to autotests/read/heic/rgb.heic diff --git a/autotests/read/heif/rgb.png b/autotests/read/heic/rgb.png similarity index 100% rename from autotests/read/heif/rgb.png rename to autotests/read/heic/rgb.png diff --git a/autotests/read/heif/rgba.heif b/autotests/read/heic/rgba.heic similarity index 100% rename from autotests/read/heif/rgba.heif rename to autotests/read/heic/rgba.heic diff --git a/autotests/read/heif/rgba.png b/autotests/read/heic/rgba.png similarity index 100% rename from autotests/read/heif/rgba.png rename to autotests/read/heic/rgba.png diff --git a/autotests/read/heif/brotli.heif b/autotests/read/heif/brotli.heif new file mode 100644 index 0000000..f80e7c6 Binary files /dev/null and b/autotests/read/heif/brotli.heif differ diff --git a/autotests/read/heif/brotli.png b/autotests/read/heif/brotli.png new file mode 100644 index 0000000..773d1ca Binary files /dev/null and b/autotests/read/heif/brotli.png differ diff --git a/autotests/read/heif/deflate.heif b/autotests/read/heif/deflate.heif new file mode 100644 index 0000000..6ee7104 Binary files /dev/null and b/autotests/read/heif/deflate.heif differ diff --git a/autotests/read/heif/deflate.png b/autotests/read/heif/deflate.png new file mode 100644 index 0000000..080113d Binary files /dev/null and b/autotests/read/heif/deflate.png differ diff --git a/autotests/read/heif/jpeg.heif b/autotests/read/heif/jpeg.heif new file mode 100644 index 0000000..3faa016 Binary files /dev/null and b/autotests/read/heif/jpeg.heif differ diff --git a/autotests/read/heif/jpeg.heif.json b/autotests/read/heif/jpeg.heif.json new file mode 100644 index 0000000..7c15475 --- /dev/null +++ b/autotests/read/heif/jpeg.heif.json @@ -0,0 +1,7 @@ +[ + { + "fileName" : "jpeg.png", + "fuzziness" : 1, + "description" : "Minimum fuzziness value to pass the test on all architectures." + } +] diff --git a/autotests/read/heif/jpeg.png b/autotests/read/heif/jpeg.png new file mode 100644 index 0000000..d58b820 Binary files /dev/null and b/autotests/read/heif/jpeg.png differ diff --git a/autotests/read/heif/uncompressed.heif b/autotests/read/heif/uncompressed.heif new file mode 100644 index 0000000..282ad7a Binary files /dev/null and b/autotests/read/heif/uncompressed.heif differ diff --git a/autotests/read/heif/uncompressed.png b/autotests/read/heif/uncompressed.png new file mode 100644 index 0000000..8b2aa87 Binary files /dev/null and b/autotests/read/heif/uncompressed.png differ diff --git a/autotests/read/heif/zlib.heif b/autotests/read/heif/zlib.heif new file mode 100644 index 0000000..698c5be Binary files /dev/null and b/autotests/read/heif/zlib.heif differ diff --git a/autotests/read/heif/zlib.png b/autotests/read/heif/zlib.png new file mode 100644 index 0000000..d551fe8 Binary files /dev/null and b/autotests/read/heif/zlib.png differ