├── android_jni ├── app │ ├── .gitignore │ ├── src │ │ ├── main │ │ │ ├── jniLibs │ │ │ │ ├── x86 │ │ │ │ │ ├── libheif.a │ │ │ │ │ ├── libyuv.a │ │ │ │ │ └── liblibde265.a │ │ │ │ ├── x86_64 │ │ │ │ │ ├── libheif.a │ │ │ │ │ ├── libyuv.a │ │ │ │ │ └── liblibde265.a │ │ │ │ ├── arm64-v8a │ │ │ │ │ ├── libheif.a │ │ │ │ │ ├── libyuv.a │ │ │ │ │ └── liblibde265.a │ │ │ │ └── armeabi-v7a │ │ │ │ │ ├── libheif.a │ │ │ │ │ ├── libyuv.a │ │ │ │ │ └── liblibde265.a │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── aliyun │ │ │ │ │ └── libheif │ │ │ │ │ ├── HeifSize.kt │ │ │ │ │ └── HeifInfo.kt │ │ │ └── include │ │ │ │ └── libheif │ │ │ │ └── heif_version.h │ │ ├── test │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── aliyun │ │ │ │ └── imm │ │ │ │ └── libheif │ │ │ │ └── ExampleUnitTest.kt │ │ └── androidTest │ │ │ └── java │ │ │ └── com │ │ │ └── aliyun │ │ │ └── imm │ │ │ └── libheif │ │ │ └── ExampleInstrumentedTest.kt │ ├── proguard-rules.pro │ └── build.gradle ├── demo │ ├── .gitignore │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── values │ │ │ │ │ ├── strings.xml │ │ │ │ │ ├── colors.xml │ │ │ │ │ └── themes.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ ├── ic_launcher.webp │ │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ ├── ic_launcher.webp │ │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ ├── ic_launcher.webp │ │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ ├── ic_launcher.webp │ │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ ├── ic_launcher.webp │ │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ │ ├── ic_launcher.xml │ │ │ │ │ └── ic_launcher_round.xml │ │ │ │ ├── values-night │ │ │ │ │ └── themes.xml │ │ │ │ └── layout │ │ │ │ │ └── activity_main.xml │ │ │ ├── assets │ │ │ │ └── test.heic │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── aliyun │ │ │ │ │ └── libheif │ │ │ │ │ └── demo │ │ │ │ │ └── glide │ │ │ │ │ ├── HeicGlideModule.kt │ │ │ │ │ ├── MyHeicModule.kt │ │ │ │ │ └── HeifByteBufferBitmapDecoder.kt │ │ │ └── AndroidManifest.xml │ │ ├── test │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── aliyun │ │ │ │ └── libheif │ │ │ │ └── demo │ │ │ │ └── ExampleUnitTest.kt │ │ └── androidTest │ │ │ └── java │ │ │ └── com │ │ │ └── aliyun │ │ │ └── libheif │ │ │ └── demo │ │ │ └── ExampleInstrumentedTest.kt │ ├── proguard-rules.pro │ └── build.gradle ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── settings.gradle ├── build.gradle └── gradle.properties ├── CPPLINT.cfg ├── third-party ├── libde265 │ ├── README │ ├── valgrind.supp │ ├── NEWS │ ├── ChangeLog │ ├── libde265.png │ ├── libde265 │ │ ├── arm_new │ │ │ ├── neon_common.cc │ │ │ ├── arm.h │ │ │ ├── CMakeLists.txt │ │ │ ├── neon_dbk.h │ │ │ ├── Makefile.am │ │ │ └── neon_dct.h │ │ ├── fallback-postfilter.cc │ │ ├── x86_new │ │ │ ├── x86.h │ │ │ ├── x86_dbk.h │ │ │ ├── CMakeLists.txt │ │ │ └── Makefile.am │ │ ├── encoder │ │ │ ├── CMakeLists.txt │ │ │ ├── algo │ │ │ │ ├── CMakeLists.txt │ │ │ │ └── Makefile.am │ │ │ ├── Makefile.am │ │ │ └── encoder-motion.h │ │ ├── x86 │ │ │ ├── Makefile.am │ │ │ ├── CMakeLists.txt │ │ │ ├── sse.h │ │ │ └── sse-dct.h │ │ ├── arm │ │ │ ├── Makefile.am │ │ │ ├── arm.h │ │ │ └── cpudetect.S │ │ ├── fallback.h │ │ ├── deblock.h │ │ ├── de265-version.h │ │ ├── de265-version.h.in │ │ ├── sao.h │ │ ├── md5.h │ │ └── alloc_pool.h │ ├── testfile │ │ ├── BasketballDrive_1920x1080_1.265 │ │ ├── BasketballDrive_1920x1080_25.265 │ │ └── BasketballDrive_1920x1080_32.265 │ ├── build │ │ ├── testfile │ │ │ └── BasketballDrive_1920x1080_1.265 │ │ └── .vscode │ │ │ ├── tasks.json │ │ │ └── launch.json │ ├── Makefile.vc7 │ ├── AUTHORS │ ├── libde265.pc.in │ ├── enc265 │ │ ├── CMakeLists.txt │ │ ├── Makefile.am │ │ ├── Makefile.vc7 │ │ └── COPYING │ ├── .github │ │ └── workflows │ │ │ ├── lint.yml │ │ │ ├── arm.yml │ │ │ ├── build.yml │ │ │ ├── mingw.yml │ │ │ └── osx.yml │ ├── acceleration-speed │ │ ├── Makefile.am │ │ └── dct-scalar.cc │ ├── Makefile.am │ ├── .vscode │ │ ├── tasks.json │ │ └── launch.json │ ├── dec265 │ │ ├── Makefile.vc7 │ │ ├── CMakeLists.txt │ │ ├── Makefile.am │ │ └── COPYING │ ├── extra │ │ └── libde265 │ │ │ └── de265-version.h │ ├── build.bat │ ├── sherlock265 │ │ ├── COPYING │ │ ├── README │ │ └── Makefile.am │ ├── autogen.sh │ ├── appveyor.yml │ ├── scripts │ │ ├── ci-before-script.sh │ │ └── ci-before-install-osx.sh │ └── tools │ │ └── Makefile.am ├── svt.cmd ├── libsharpyuv.cmd ├── rav1e.cmd ├── aom.cmd └── dav1d.cmd ├── examples ├── example.avif ├── example.heic ├── heif-thumbnailer.1 ├── heif-info.1 ├── heif-dec.1 ├── benchmark.h ├── COPYING ├── common.h ├── decoder_y4m.h ├── decoder_jpeg.h ├── decoder_tiff.h ├── decoder_png.h ├── test_c_api.c └── decoder.h ├── fuzzing ├── data │ ├── corpus │ │ ├── github_15.heic │ │ ├── github_20.heic │ │ ├── github_44.heic │ │ ├── github_45.heic │ │ ├── github_47.heic │ │ ├── github_48.heic │ │ ├── github_49.heic │ │ ├── github_50.heic │ │ ├── github_138.heic │ │ ├── github_367_1.heic │ │ ├── github_367_2.heic │ │ ├── github_46_1.heic │ │ ├── colors-no-alpha.heic │ │ ├── colors-with-alpha.heic │ │ ├── hbo_heif_context.h_126_1.heic │ │ ├── region-mask-missing-refs.heic │ │ ├── uaf_heif_context.h_117_1.heic │ │ ├── clap-overflow-divide-zero.heic │ │ ├── colors-no-alpha-thumbnail.heic │ │ ├── colors-with-alpha-thumbnail.heic │ │ ├── j2k-siz-segment-undersized.heic │ │ ├── crash-20ca2625096a205937b809a7841e7f019f0b2dc6.heic │ │ ├── clusterfuzz-testcase-minimized-file-fuzzer-4616081830051840.heic │ │ ├── clusterfuzz-testcase-minimized-file-fuzzer-5120279175102464.heic │ │ ├── clusterfuzz-testcase-minimized-file-fuzzer-5643900194127872.heic │ │ ├── clusterfuzz-testcase-minimized-file-fuzzer-5651556035198976.heic │ │ ├── clusterfuzz-testcase-minimized-file-fuzzer-5662360964956160.heic │ │ ├── clusterfuzz-testcase-minimized-file-fuzzer-5671864958976000.heic │ │ ├── clusterfuzz-testcase-minimized-file-fuzzer-5686319331672064.heic │ │ ├── clusterfuzz-testcase-minimized-file-fuzzer-5718632116518912.heic │ │ ├── clusterfuzz-testcase-minimized-file-fuzzer-5720856641142784.heic │ │ ├── clusterfuzz-testcase-minimized-file-fuzzer-5724458239655936.heic │ │ ├── clusterfuzz-testcase-minimized-file-fuzzer-5732616832024576.heic │ │ ├── clusterfuzz-testcase-minimized-file-fuzzer-5752063708495872.heic │ │ ├── clusterfuzz-testcase-minimized-file-fuzzer-5757633845264384.heic │ │ ├── clusterfuzz-testcase-minimized-file-fuzzer-6045213633282048.heic │ │ ├── clusterfuzz-testcase-minimized-color-conversion-fuzzer-6275694804467712 │ │ └── github_46_2.heic │ └── dictionary.txt ├── CMakeLists.txt └── box_fuzzer.cc ├── tests ├── data │ ├── uncompressed_pix_M.heif │ ├── uncompressed_row_M.heif │ ├── uncompressed_comp_M.heif │ ├── uncompressed_comp_RGB.heif │ ├── uncompressed_pix_ABGR.heif │ ├── uncompressed_pix_RGB.heif │ ├── uncompressed_pix_RGxB.heif │ ├── uncompressed_row_ABGR.heif │ ├── uncompressed_row_RGB.heif │ ├── uncompressed_row_RGxB.heif │ ├── uncompressed_comp_ABGR.heif │ ├── uncompressed_comp_RGxB.heif │ ├── uncompressed_comp_M_tiled.heif │ ├── uncompressed_comp_VUY_420.heif │ ├── uncompressed_comp_VUY_422.heif │ ├── uncompressed_comp_YUV_420.heif │ ├── uncompressed_comp_YUV_422.heif │ ├── uncompressed_comp_YVU_420.heif │ ├── uncompressed_comp_YVU_422.heif │ ├── uncompressed_mix_VUY_420.heif │ ├── uncompressed_mix_VUY_422.heif │ ├── uncompressed_mix_YUV_420.heif │ ├── uncompressed_mix_YUV_422.heif │ ├── uncompressed_mix_YVU_420.heif │ ├── uncompressed_mix_YVU_422.heif │ ├── uncompressed_pix_B16R16G16.heif │ ├── uncompressed_pix_M_tiled.heif │ ├── uncompressed_pix_RGB_tiled.heif │ ├── uncompressed_pix_YUV_tiled.heif │ ├── uncompressed_row_B16R16G16.heif │ ├── uncompressed_row_M_tiled.heif │ ├── uncompressed_row_RGB_tiled.heif │ ├── uncompressed_row_YUV_tiled.heif │ ├── uncompressed_tile_M_tiled.heif │ ├── rgb_generic_compressed_defl.heif │ ├── rgb_generic_compressed_zlib.heif │ ├── uncompressed_comp_ABGR_tiled.heif │ ├── uncompressed_comp_B16R16G16.heif │ ├── uncompressed_comp_RGB_tiled.heif │ ├── uncompressed_comp_RGxB_tiled.heif │ ├── uncompressed_comp_YUV_tiled.heif │ ├── uncompressed_pix_ABGR_tiled.heif │ ├── uncompressed_pix_RGxB_tiled.heif │ ├── uncompressed_row_ABGR_tiled.heif │ ├── uncompressed_row_RGxB_tiled.heif │ ├── uncompressed_tile_ABGR_tiled.heif │ ├── uncompressed_tile_RGB_tiled.heif │ ├── uncompressed_tile_RGxB_tiled.heif │ ├── uncompressed_tile_YUV_tiled.heif │ ├── rgb_generic_compressed_brotli.heif │ ├── uncompressed_comp_R5G6B5_tiled.heif │ ├── uncompressed_comp_R7G7B7_tiled.heif │ ├── uncompressed_comp_Y16U16V16_420.heif │ ├── uncompressed_comp_Y16U16V16_422.heif │ ├── uncompressed_mix_Y16U16V16_420.heif │ ├── uncompressed_mix_Y16U16V16_422.heif │ ├── uncompressed_pix_R5G6B5_tiled.heif │ ├── uncompressed_pix_R7G7+1B7_tiled.heif │ ├── uncompressed_pix_R7G7B7_tiled.heif │ ├── uncompressed_row_R5G6B5_tiled.heif │ ├── uncompressed_row_R7G7+1B7_tiled.heif │ ├── uncompressed_row_R7G7B7_tiled.heif │ ├── uncompressed_tile_R5G6B5_tiled.heif │ ├── uncompressed_tile_R7G7B7_tiled.heif │ ├── rgb_generic_compressed_zlib_rows.heif │ ├── rgb_generic_compressed_zlib_tiled.heif │ ├── uncompressed_comp_B16R16G16_tiled.heif │ ├── uncompressed_comp_R7G7+1B7_tiled.heif │ ├── uncompressed_pix_B16R16G16_tiled.heif │ ├── uncompressed_row_B16R16G16_tiled.heif │ ├── uncompressed_tile_B16R16G16_tiled.heif │ ├── uncompressed_tile_R7G7+1B7_tiled.heif │ ├── rgb_generic_compressed_tile_deflate.heif │ ├── uncompressed_comp_R7+1G7+1B7+1_tiled.heif │ ├── uncompressed_pix_R7+1G7+1B7+1_tiled.heif │ ├── uncompressed_row_R7+1G7+1B7+1_tiled.heif │ ├── uncompressed_tile_R7+1G7+1B7+1_tiled.heif │ ├── uncompressed_pix_R8G8B8A8_bsz0_psz5_tiled.heif │ ├── uncompressed_pix_R8G8B8_bsz0_psz10_tiled.heif │ ├── uncompressed_pix_R8G8B8_bsz0_psz5_tiled.heif │ ├── uncompressed_pix_RGB_tiled_row_tile_align.heif │ ├── uncompressed_row_RGB_tiled_row_tile_align.heif │ ├── uncompressed_comp_RGB_tiled_row_tile_align.heif │ ├── uncompressed_pix_R8G8B8A8_bsz0_psz10_tiled.heif │ └── uncompressed_tile_RGB_tiled_row_tile_align.heif ├── main.cc ├── test-config.cc.in └── test-config.h ├── gnome ├── CMakeLists.txt └── heif.thumbnailer ├── .clang-tidy ├── libheif.pc.in ├── cmake └── modules │ ├── FindDav1d.cmake │ ├── FindRav1e.cmake │ ├── FindUVG266.cmake │ ├── FindSvtEnc.cmake │ ├── FindOPENJPH.cmake │ ├── Findlibsharpyuv.cmake │ ├── FindBrotli.cmake │ ├── FindLibpng.cmake │ ├── Findkvazaar.cmake │ ├── FindX265.cmake │ ├── FindAOM.cmake │ ├── FindLibde265.cmake │ └── FindLibhevc.cmake ├── gdk-pixbuf └── CMakeLists.txt ├── libheif ├── exif.h ├── plugins │ ├── encoder_svt.h │ ├── decoder_aom.h │ ├── decoder_dav1d.h │ ├── decoder_vvdec.h │ ├── encoder_aom.h │ ├── encoder_rav1e.h │ ├── encoder_vvenc.h │ ├── decoder_jpeg.h │ ├── encoder_jpeg.h │ ├── decoder_libde265.h │ ├── decoder_ffmpeg.h │ ├── encoder_openjpeg.h │ ├── encoder_mask.h │ ├── decoder_openjpeg.h │ ├── encoder_openjph.h │ └── encoder_x265.h ├── api │ └── libheif │ │ ├── heif_version.h.in │ │ └── heif_plugin.cc ├── codecs │ └── jpeg.h └── plugins_unix.h ├── appveyor.yml └── scripts ├── configure-fuzzer.sh ├── install-emscripten.sh ├── check-gofmt.sh └── check-licenses.sh /android_jni/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /android_jni/demo/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /CPPLINT.cfg: -------------------------------------------------------------------------------- 1 | set noparent 2 | filter=-,+build/include_what_you_use 3 | -------------------------------------------------------------------------------- /third-party/libde265/README: -------------------------------------------------------------------------------- 1 | See README.md for further information. 2 | -------------------------------------------------------------------------------- /third-party/libde265/valgrind.supp: -------------------------------------------------------------------------------- 1 | # Add valgrind suppressions here. 2 | -------------------------------------------------------------------------------- /third-party/libde265/NEWS: -------------------------------------------------------------------------------- 1 | See https://github.com/strukturag/libde265 for further information. 2 | -------------------------------------------------------------------------------- /examples/example.avif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/examples/example.avif -------------------------------------------------------------------------------- /examples/example.heic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/examples/example.heic -------------------------------------------------------------------------------- /third-party/libde265/ChangeLog: -------------------------------------------------------------------------------- 1 | See https://github.com/strukturag/libde265 for further information. 2 | -------------------------------------------------------------------------------- /fuzzing/data/corpus/github_15.heic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/fuzzing/data/corpus/github_15.heic -------------------------------------------------------------------------------- /fuzzing/data/corpus/github_20.heic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/fuzzing/data/corpus/github_20.heic -------------------------------------------------------------------------------- /fuzzing/data/corpus/github_44.heic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/fuzzing/data/corpus/github_44.heic -------------------------------------------------------------------------------- /fuzzing/data/corpus/github_45.heic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/fuzzing/data/corpus/github_45.heic -------------------------------------------------------------------------------- /fuzzing/data/corpus/github_47.heic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/fuzzing/data/corpus/github_47.heic -------------------------------------------------------------------------------- /fuzzing/data/corpus/github_48.heic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/fuzzing/data/corpus/github_48.heic -------------------------------------------------------------------------------- /fuzzing/data/corpus/github_49.heic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/fuzzing/data/corpus/github_49.heic -------------------------------------------------------------------------------- /fuzzing/data/corpus/github_50.heic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/fuzzing/data/corpus/github_50.heic -------------------------------------------------------------------------------- /tests/data/uncompressed_pix_M.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_pix_M.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_row_M.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_row_M.heif -------------------------------------------------------------------------------- /third-party/libde265/libde265.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/third-party/libde265/libde265.png -------------------------------------------------------------------------------- /android_jni/demo/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | My Application 3 | -------------------------------------------------------------------------------- /fuzzing/data/corpus/github_138.heic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/fuzzing/data/corpus/github_138.heic -------------------------------------------------------------------------------- /fuzzing/data/corpus/github_367_1.heic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/fuzzing/data/corpus/github_367_1.heic -------------------------------------------------------------------------------- /fuzzing/data/corpus/github_367_2.heic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/fuzzing/data/corpus/github_367_2.heic -------------------------------------------------------------------------------- /fuzzing/data/corpus/github_46_1.heic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/fuzzing/data/corpus/github_46_1.heic -------------------------------------------------------------------------------- /tests/data/uncompressed_comp_M.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_comp_M.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_comp_RGB.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_comp_RGB.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_pix_ABGR.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_pix_ABGR.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_pix_RGB.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_pix_RGB.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_pix_RGxB.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_pix_RGxB.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_row_ABGR.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_row_ABGR.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_row_RGB.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_row_RGB.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_row_RGxB.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_row_RGxB.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_comp_ABGR.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_comp_ABGR.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_comp_RGxB.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_comp_RGxB.heif -------------------------------------------------------------------------------- /android_jni/demo/src/main/assets/test.heic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/android_jni/demo/src/main/assets/test.heic -------------------------------------------------------------------------------- /fuzzing/data/corpus/colors-no-alpha.heic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/fuzzing/data/corpus/colors-no-alpha.heic -------------------------------------------------------------------------------- /fuzzing/data/corpus/colors-with-alpha.heic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/fuzzing/data/corpus/colors-with-alpha.heic -------------------------------------------------------------------------------- /tests/data/uncompressed_comp_M_tiled.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_comp_M_tiled.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_comp_VUY_420.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_comp_VUY_420.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_comp_VUY_422.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_comp_VUY_422.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_comp_YUV_420.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_comp_YUV_420.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_comp_YUV_422.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_comp_YUV_422.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_comp_YVU_420.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_comp_YVU_420.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_comp_YVU_422.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_comp_YVU_422.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_mix_VUY_420.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_mix_VUY_420.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_mix_VUY_422.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_mix_VUY_422.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_mix_YUV_420.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_mix_YUV_420.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_mix_YUV_422.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_mix_YUV_422.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_mix_YVU_420.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_mix_YVU_420.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_mix_YVU_422.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_mix_YVU_422.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_pix_B16R16G16.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_pix_B16R16G16.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_pix_M_tiled.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_pix_M_tiled.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_pix_RGB_tiled.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_pix_RGB_tiled.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_pix_YUV_tiled.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_pix_YUV_tiled.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_row_B16R16G16.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_row_B16R16G16.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_row_M_tiled.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_row_M_tiled.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_row_RGB_tiled.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_row_RGB_tiled.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_row_YUV_tiled.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_row_YUV_tiled.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_tile_M_tiled.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_tile_M_tiled.heif -------------------------------------------------------------------------------- /tests/data/rgb_generic_compressed_defl.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/rgb_generic_compressed_defl.heif -------------------------------------------------------------------------------- /tests/data/rgb_generic_compressed_zlib.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/rgb_generic_compressed_zlib.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_comp_ABGR_tiled.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_comp_ABGR_tiled.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_comp_B16R16G16.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_comp_B16R16G16.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_comp_RGB_tiled.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_comp_RGB_tiled.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_comp_RGxB_tiled.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_comp_RGxB_tiled.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_comp_YUV_tiled.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_comp_YUV_tiled.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_pix_ABGR_tiled.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_pix_ABGR_tiled.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_pix_RGxB_tiled.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_pix_RGxB_tiled.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_row_ABGR_tiled.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_row_ABGR_tiled.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_row_RGxB_tiled.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_row_RGxB_tiled.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_tile_ABGR_tiled.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_tile_ABGR_tiled.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_tile_RGB_tiled.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_tile_RGB_tiled.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_tile_RGxB_tiled.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_tile_RGxB_tiled.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_tile_YUV_tiled.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_tile_YUV_tiled.heif -------------------------------------------------------------------------------- /android_jni/app/src/main/jniLibs/x86/libheif.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/android_jni/app/src/main/jniLibs/x86/libheif.a -------------------------------------------------------------------------------- /android_jni/app/src/main/jniLibs/x86/libyuv.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/android_jni/app/src/main/jniLibs/x86/libyuv.a -------------------------------------------------------------------------------- /android_jni/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/android_jni/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gnome/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if(TARGET heif-thumbnailer) 2 | install(FILES heif.thumbnailer DESTINATION ${CMAKE_INSTALL_DATADIR}/thumbnailers) 3 | endif() 4 | -------------------------------------------------------------------------------- /gnome/heif.thumbnailer: -------------------------------------------------------------------------------- 1 | [Thumbnailer Entry] 2 | TryExec=heif-thumbnailer 3 | Exec=heif-thumbnailer -s %s %i %o 4 | MimeType=image/heif;image/avif; 5 | -------------------------------------------------------------------------------- /tests/data/rgb_generic_compressed_brotli.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/rgb_generic_compressed_brotli.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_comp_R5G6B5_tiled.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_comp_R5G6B5_tiled.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_comp_R7G7B7_tiled.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_comp_R7G7B7_tiled.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_comp_Y16U16V16_420.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_comp_Y16U16V16_420.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_comp_Y16U16V16_422.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_comp_Y16U16V16_422.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_mix_Y16U16V16_420.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_mix_Y16U16V16_420.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_mix_Y16U16V16_422.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_mix_Y16U16V16_422.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_pix_R5G6B5_tiled.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_pix_R5G6B5_tiled.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_pix_R7G7+1B7_tiled.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_pix_R7G7+1B7_tiled.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_pix_R7G7B7_tiled.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_pix_R7G7B7_tiled.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_row_R5G6B5_tiled.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_row_R5G6B5_tiled.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_row_R7G7+1B7_tiled.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_row_R7G7+1B7_tiled.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_row_R7G7B7_tiled.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_row_R7G7B7_tiled.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_tile_R5G6B5_tiled.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_tile_R5G6B5_tiled.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_tile_R7G7B7_tiled.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_tile_R7G7B7_tiled.heif -------------------------------------------------------------------------------- /android_jni/app/src/main/jniLibs/x86_64/libheif.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/android_jni/app/src/main/jniLibs/x86_64/libheif.a -------------------------------------------------------------------------------- /android_jni/app/src/main/jniLibs/x86_64/libyuv.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/android_jni/app/src/main/jniLibs/x86_64/libyuv.a -------------------------------------------------------------------------------- /fuzzing/data/corpus/hbo_heif_context.h_126_1.heic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/fuzzing/data/corpus/hbo_heif_context.h_126_1.heic -------------------------------------------------------------------------------- /fuzzing/data/corpus/region-mask-missing-refs.heic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/fuzzing/data/corpus/region-mask-missing-refs.heic -------------------------------------------------------------------------------- /fuzzing/data/corpus/uaf_heif_context.h_117_1.heic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/fuzzing/data/corpus/uaf_heif_context.h_117_1.heic -------------------------------------------------------------------------------- /tests/data/rgb_generic_compressed_zlib_rows.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/rgb_generic_compressed_zlib_rows.heif -------------------------------------------------------------------------------- /tests/data/rgb_generic_compressed_zlib_tiled.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/rgb_generic_compressed_zlib_tiled.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_comp_B16R16G16_tiled.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_comp_B16R16G16_tiled.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_comp_R7G7+1B7_tiled.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_comp_R7G7+1B7_tiled.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_pix_B16R16G16_tiled.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_pix_B16R16G16_tiled.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_row_B16R16G16_tiled.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_row_B16R16G16_tiled.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_tile_B16R16G16_tiled.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_tile_B16R16G16_tiled.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_tile_R7G7+1B7_tiled.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_tile_R7G7+1B7_tiled.heif -------------------------------------------------------------------------------- /android_jni/app/src/main/jniLibs/arm64-v8a/libheif.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/android_jni/app/src/main/jniLibs/arm64-v8a/libheif.a -------------------------------------------------------------------------------- /android_jni/app/src/main/jniLibs/arm64-v8a/libyuv.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/android_jni/app/src/main/jniLibs/arm64-v8a/libyuv.a -------------------------------------------------------------------------------- /android_jni/app/src/main/jniLibs/x86/liblibde265.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/android_jni/app/src/main/jniLibs/x86/liblibde265.a -------------------------------------------------------------------------------- /fuzzing/data/corpus/clap-overflow-divide-zero.heic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/fuzzing/data/corpus/clap-overflow-divide-zero.heic -------------------------------------------------------------------------------- /fuzzing/data/corpus/colors-no-alpha-thumbnail.heic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/fuzzing/data/corpus/colors-no-alpha-thumbnail.heic -------------------------------------------------------------------------------- /fuzzing/data/corpus/colors-with-alpha-thumbnail.heic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/fuzzing/data/corpus/colors-with-alpha-thumbnail.heic -------------------------------------------------------------------------------- /fuzzing/data/corpus/j2k-siz-segment-undersized.heic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/fuzzing/data/corpus/j2k-siz-segment-undersized.heic -------------------------------------------------------------------------------- /tests/data/rgb_generic_compressed_tile_deflate.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/rgb_generic_compressed_tile_deflate.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_comp_R7+1G7+1B7+1_tiled.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_comp_R7+1G7+1B7+1_tiled.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_pix_R7+1G7+1B7+1_tiled.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_pix_R7+1G7+1B7+1_tiled.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_row_R7+1G7+1B7+1_tiled.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_row_R7+1G7+1B7+1_tiled.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_tile_R7+1G7+1B7+1_tiled.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_tile_R7+1G7+1B7+1_tiled.heif -------------------------------------------------------------------------------- /android_jni/app/src/main/jniLibs/armeabi-v7a/libheif.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/android_jni/app/src/main/jniLibs/armeabi-v7a/libheif.a -------------------------------------------------------------------------------- /android_jni/app/src/main/jniLibs/armeabi-v7a/libyuv.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/android_jni/app/src/main/jniLibs/armeabi-v7a/libyuv.a -------------------------------------------------------------------------------- /android_jni/app/src/main/jniLibs/x86_64/liblibde265.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/android_jni/app/src/main/jniLibs/x86_64/liblibde265.a -------------------------------------------------------------------------------- /android_jni/app/src/main/jniLibs/arm64-v8a/liblibde265.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/android_jni/app/src/main/jniLibs/arm64-v8a/liblibde265.a -------------------------------------------------------------------------------- /tests/data/uncompressed_pix_R8G8B8A8_bsz0_psz5_tiled.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_pix_R8G8B8A8_bsz0_psz5_tiled.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_pix_R8G8B8_bsz0_psz10_tiled.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_pix_R8G8B8_bsz0_psz10_tiled.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_pix_R8G8B8_bsz0_psz5_tiled.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_pix_R8G8B8_bsz0_psz5_tiled.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_pix_RGB_tiled_row_tile_align.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_pix_RGB_tiled_row_tile_align.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_row_RGB_tiled_row_tile_align.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_row_RGB_tiled_row_tile_align.heif -------------------------------------------------------------------------------- /third-party/libde265/libde265/arm_new/neon_common.cc: -------------------------------------------------------------------------------- 1 | #ifdef HAVE_CONFIG_H 2 | #include "config.h" 3 | #endif 4 | #include 5 | #include "neon_common.h" 6 | 7 | -------------------------------------------------------------------------------- /android_jni/app/src/main/jniLibs/armeabi-v7a/liblibde265.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/android_jni/app/src/main/jniLibs/armeabi-v7a/liblibde265.a -------------------------------------------------------------------------------- /android_jni/demo/src/main/res/mipmap-hdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/android_jni/demo/src/main/res/mipmap-hdpi/ic_launcher.webp -------------------------------------------------------------------------------- /android_jni/demo/src/main/res/mipmap-mdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/android_jni/demo/src/main/res/mipmap-mdpi/ic_launcher.webp -------------------------------------------------------------------------------- /android_jni/demo/src/main/res/mipmap-xhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/android_jni/demo/src/main/res/mipmap-xhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /tests/data/uncompressed_comp_RGB_tiled_row_tile_align.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_comp_RGB_tiled_row_tile_align.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_pix_R8G8B8A8_bsz0_psz10_tiled.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_pix_R8G8B8A8_bsz0_psz10_tiled.heif -------------------------------------------------------------------------------- /tests/data/uncompressed_tile_RGB_tiled_row_tile_align.heif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/tests/data/uncompressed_tile_RGB_tiled_row_tile_align.heif -------------------------------------------------------------------------------- /android_jni/demo/src/main/res/mipmap-xxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/android_jni/demo/src/main/res/mipmap-xxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /android_jni/demo/src/main/res/mipmap-xxxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/android_jni/demo/src/main/res/mipmap-xxxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /third-party/libde265/testfile/BasketballDrive_1920x1080_1.265: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/third-party/libde265/testfile/BasketballDrive_1920x1080_1.265 -------------------------------------------------------------------------------- /third-party/libde265/testfile/BasketballDrive_1920x1080_25.265: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/third-party/libde265/testfile/BasketballDrive_1920x1080_25.265 -------------------------------------------------------------------------------- /third-party/libde265/testfile/BasketballDrive_1920x1080_32.265: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/third-party/libde265/testfile/BasketballDrive_1920x1080_32.265 -------------------------------------------------------------------------------- /android_jni/demo/src/main/res/mipmap-hdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/android_jni/demo/src/main/res/mipmap-hdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /android_jni/demo/src/main/res/mipmap-mdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/android_jni/demo/src/main/res/mipmap-mdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /android_jni/demo/src/main/res/mipmap-xhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/android_jni/demo/src/main/res/mipmap-xhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /android_jni/demo/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/android_jni/demo/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /android_jni/demo/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/android_jni/demo/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /third-party/libde265/build/testfile/BasketballDrive_1920x1080_1.265: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/third-party/libde265/build/testfile/BasketballDrive_1920x1080_1.265 -------------------------------------------------------------------------------- /third-party/libde265/Makefile.vc7: -------------------------------------------------------------------------------- 1 | clean all: 2 | cd libde265 && $(MAKE) -f Makefile.vc7 $* 3 | cd dec265 && $(MAKE) -f Makefile.vc7 $* 4 | cd enc265 && $(MAKE) -f Makefile.vc7 $* 5 | -------------------------------------------------------------------------------- /fuzzing/data/corpus/crash-20ca2625096a205937b809a7841e7f019f0b2dc6.heic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/fuzzing/data/corpus/crash-20ca2625096a205937b809a7841e7f019f0b2dc6.heic -------------------------------------------------------------------------------- /fuzzing/data/corpus/clusterfuzz-testcase-minimized-file-fuzzer-4616081830051840.heic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/fuzzing/data/corpus/clusterfuzz-testcase-minimized-file-fuzzer-4616081830051840.heic -------------------------------------------------------------------------------- /fuzzing/data/corpus/clusterfuzz-testcase-minimized-file-fuzzer-5120279175102464.heic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/fuzzing/data/corpus/clusterfuzz-testcase-minimized-file-fuzzer-5120279175102464.heic -------------------------------------------------------------------------------- /fuzzing/data/corpus/clusterfuzz-testcase-minimized-file-fuzzer-5643900194127872.heic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/fuzzing/data/corpus/clusterfuzz-testcase-minimized-file-fuzzer-5643900194127872.heic -------------------------------------------------------------------------------- /fuzzing/data/corpus/clusterfuzz-testcase-minimized-file-fuzzer-5651556035198976.heic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/fuzzing/data/corpus/clusterfuzz-testcase-minimized-file-fuzzer-5651556035198976.heic -------------------------------------------------------------------------------- /fuzzing/data/corpus/clusterfuzz-testcase-minimized-file-fuzzer-5662360964956160.heic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/fuzzing/data/corpus/clusterfuzz-testcase-minimized-file-fuzzer-5662360964956160.heic -------------------------------------------------------------------------------- /fuzzing/data/corpus/clusterfuzz-testcase-minimized-file-fuzzer-5671864958976000.heic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/fuzzing/data/corpus/clusterfuzz-testcase-minimized-file-fuzzer-5671864958976000.heic -------------------------------------------------------------------------------- /fuzzing/data/corpus/clusterfuzz-testcase-minimized-file-fuzzer-5686319331672064.heic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/fuzzing/data/corpus/clusterfuzz-testcase-minimized-file-fuzzer-5686319331672064.heic -------------------------------------------------------------------------------- /fuzzing/data/corpus/clusterfuzz-testcase-minimized-file-fuzzer-5718632116518912.heic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/fuzzing/data/corpus/clusterfuzz-testcase-minimized-file-fuzzer-5718632116518912.heic -------------------------------------------------------------------------------- /fuzzing/data/corpus/clusterfuzz-testcase-minimized-file-fuzzer-5720856641142784.heic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/fuzzing/data/corpus/clusterfuzz-testcase-minimized-file-fuzzer-5720856641142784.heic -------------------------------------------------------------------------------- /fuzzing/data/corpus/clusterfuzz-testcase-minimized-file-fuzzer-5724458239655936.heic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/fuzzing/data/corpus/clusterfuzz-testcase-minimized-file-fuzzer-5724458239655936.heic -------------------------------------------------------------------------------- /fuzzing/data/corpus/clusterfuzz-testcase-minimized-file-fuzzer-5732616832024576.heic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/fuzzing/data/corpus/clusterfuzz-testcase-minimized-file-fuzzer-5732616832024576.heic -------------------------------------------------------------------------------- /fuzzing/data/corpus/clusterfuzz-testcase-minimized-file-fuzzer-5752063708495872.heic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/fuzzing/data/corpus/clusterfuzz-testcase-minimized-file-fuzzer-5752063708495872.heic -------------------------------------------------------------------------------- /fuzzing/data/corpus/clusterfuzz-testcase-minimized-file-fuzzer-5757633845264384.heic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/fuzzing/data/corpus/clusterfuzz-testcase-minimized-file-fuzzer-5757633845264384.heic -------------------------------------------------------------------------------- /fuzzing/data/corpus/clusterfuzz-testcase-minimized-file-fuzzer-6045213633282048.heic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/fuzzing/data/corpus/clusterfuzz-testcase-minimized-file-fuzzer-6045213633282048.heic -------------------------------------------------------------------------------- /fuzzing/data/corpus/clusterfuzz-testcase-minimized-color-conversion-fuzzer-6275694804467712: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliyun/heif-decoder-lib/HEAD/fuzzing/data/corpus/clusterfuzz-testcase-minimized-color-conversion-fuzzer-6275694804467712 -------------------------------------------------------------------------------- /third-party/libde265/AUTHORS: -------------------------------------------------------------------------------- 1 | Authors of libde265 2 | See also the files THANKS and ChangeLog 3 | 4 | Dirk Farin 5 | - designed and implemented libde265 6 | 7 | Joachim Bauch 8 | - bugfixes, optimizations and support for Windows 9 | -------------------------------------------------------------------------------- /third-party/libde265/libde265/fallback-postfilter.cc: -------------------------------------------------------------------------------- 1 | 2 | #include "fallback-postfilter.h" 3 | 4 | #if defined(_MSC_VER) || defined(__MINGW32__) 5 | # include 6 | #elif defined(HAVE_ALLOCA_H) 7 | # include 8 | #endif 9 | 10 | #include 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /android_jni/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Sep 21 15:51:42 CST 2022 2 | distributionBase=GRADLE_USER_HOME 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip 4 | distributionPath=wrapper/dists 5 | zipStorePath=wrapper/dists 6 | zipStoreBase=GRADLE_USER_HOME 7 | -------------------------------------------------------------------------------- /third-party/libde265/libde265/arm_new/arm.h: -------------------------------------------------------------------------------- 1 | /* 2 | * mingyuan.myy@alibaba-inc.com 3 | */ 4 | 5 | #ifndef LIBDE265_ARM_H 6 | #define LIBDE265_ARM_H 7 | 8 | #include "acceleration.h" 9 | 10 | void init_acceleration_functions_arm(struct acceleration_functions* accel); 11 | 12 | #endif // LIBDE265_ARM_H 13 | -------------------------------------------------------------------------------- /android_jni/demo/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android_jni/demo/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /third-party/libde265/libde265/x86_new/x86.h: -------------------------------------------------------------------------------- 1 | /* 2 | * H.265 video codec. 3 | * ASM speedup module 4 | * mingyuan.myy@alibaba-inc.com 5 | */ 6 | 7 | #ifndef DE265_X86_H 8 | #define DE265_X86_H 9 | 10 | #include 11 | #include "acceleration.h" 12 | 13 | void init_acceleration_functions_sse(struct acceleration_functions* accel); 14 | 15 | #endif -------------------------------------------------------------------------------- /android_jni/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /third-party/libde265/libde265.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: libde265 7 | Description: H.265/HEVC video decoder. 8 | URL: https://github.com/strukturag/libde265 9 | Version: @VERSION@ 10 | Requires: 11 | Libs: -lde265 -L@libdir@ 12 | Libs.private: @LIBS@ -lstdc++ 13 | Cflags: -I@includedir@ 14 | -------------------------------------------------------------------------------- /third-party/libde265/enc265/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable (enc265 2 | enc265.cc 3 | image-io-png.cc 4 | ) 5 | 6 | if(MSVC) 7 | target_sources(enc265 PRIVATE 8 | ../extra/getopt.c 9 | ../extra/getopt_long.c 10 | ) 11 | endif() 12 | 13 | target_link_libraries (enc265 PRIVATE ${PROJECT_NAME}) 14 | 15 | install (TARGETS enc265 DESTINATION ${CMAKE_INSTALL_BINDIR}) 16 | -------------------------------------------------------------------------------- /.clang-tidy: -------------------------------------------------------------------------------- 1 | --- 2 | Checks: > 3 | -clang-analyzer-security.insecureAPI.strcat, 4 | -clang-analyzer-security.insecureAPI.strcpy, 5 | modernize-shrink-to-fit, 6 | modernize-use-default-member-init, 7 | modernize-use-equals-default, 8 | modernize-use-equals-delete, 9 | modernize-use-override, 10 | performance-* 11 | HeaderFilterRegex: .* 12 | WarningsAsErrors: '*' 13 | ... 14 | -------------------------------------------------------------------------------- /android_jni/app/src/main/java/com/aliyun/libheif/HeifSize.kt: -------------------------------------------------------------------------------- 1 | package com.aliyun.libheif 2 | 3 | class HeifSize { 4 | var width = 0 5 | var height = 0 6 | // var bitDepth = 8 7 | 8 | override fun toString(): String { 9 | return "HeifSize{" + 10 | "width=" + width + 11 | ", height=" + height + 12 | '}' 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /libheif.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: libheif 7 | Description: HEIF image codec. 8 | URL: https://github.com/strukturag/libheif 9 | Version: @PROJECT_VERSION@ 10 | Requires: 11 | Requires.private: @REQUIRES_PRIVATE@ 12 | Libs: -L${libdir} -lheif 13 | Libs.private: @LIBS_PRIVATE@ 14 | Cflags: -I${includedir} 15 | -------------------------------------------------------------------------------- /android_jni/settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | gradlePluginPortal() 4 | google() 5 | mavenCentral() 6 | } 7 | } 8 | dependencyResolutionManagement { 9 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) 10 | repositories { 11 | google() 12 | mavenCentral() 13 | } 14 | } 15 | rootProject.name = "libheif" 16 | include ':app' 17 | include ':demo' 18 | -------------------------------------------------------------------------------- /android_jni/demo/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFBB86FC 4 | #FF6200EE 5 | #FF3700B3 6 | #FF03DAC5 7 | #FF018786 8 | #FF000000 9 | #FFFFFFFF 10 | -------------------------------------------------------------------------------- /android_jni/app/src/test/java/com/aliyun/imm/libheif/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.aliyun.imm.libheif 2 | 3 | import org.junit.Test 4 | 5 | import org.junit.Assert.* 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * See [testing documentation](http://d.android.com/tools/testing). 11 | */ 12 | class ExampleUnitTest { 13 | @Test 14 | fun addition_isCorrect() { 15 | assertEquals(4, 2 + 2) 16 | } 17 | } -------------------------------------------------------------------------------- /android_jni/demo/src/test/java/com/aliyun/libheif/demo/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.aliyun.libheif.demo 2 | 3 | import org.junit.Test 4 | 5 | import org.junit.Assert.* 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * See [testing documentation](http://d.android.com/tools/testing). 11 | */ 12 | class ExampleUnitTest { 13 | @Test 14 | fun addition_isCorrect() { 15 | assertEquals(4, 2 + 2) 16 | } 17 | } -------------------------------------------------------------------------------- /third-party/libde265/.github/workflows/lint.yml: -------------------------------------------------------------------------------- 1 | name: lint 2 | 3 | on: 4 | push: 5 | branches: [ master ] 6 | pull_request: 7 | branches: [ master ] 8 | 9 | jobs: 10 | licensecheck: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: actions/checkout@v2 14 | 15 | - name: Install dependencies 16 | run: | 17 | sudo apt install -qq licensecheck 18 | 19 | - name: Check licenses 20 | run: | 21 | ./scripts/check_licenses.sh 22 | -------------------------------------------------------------------------------- /third-party/libde265/libde265/x86_new/x86_dbk.h: -------------------------------------------------------------------------------- 1 | #ifndef X86_DBK_H 2 | #define X86_DBK_H 3 | 4 | #include 5 | #include 6 | 7 | 8 | #if HAVE_SSE4_1 9 | void ff_hevc_loop_filter_luma_8_sse4(uint8_t *_dst, bool vertical, ptrdiff_t _stride, int _beta, int* _tc, uint8_t *_no_p, uint8_t *_no_q, int bitdepth); 10 | 11 | 12 | void ff_hevc_loop_filter_chroma_8_sse4(uint8_t *_dst, bool vertical, ptrdiff_t _stride, int* _tc, uint8_t *no_p, uint8_t *no_q, int bitdepth); 13 | #endif 14 | 15 | #endif -------------------------------------------------------------------------------- /third-party/libde265/enc265/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | bin_PROGRAMS = enc265 3 | 4 | AM_CPPFLAGS = -I$(top_srcdir)/libde265 -I$(top_srcdir) 5 | 6 | enc265_DEPENDENCIES = ../libde265/libde265.la 7 | enc265_CXXFLAGS = 8 | enc265_LDFLAGS = 9 | enc265_LDADD = ../libde265/libde265.la -lstdc++ 10 | enc265_SOURCES = enc265.cc image-io-png.cc image-io-png.h 11 | 12 | if HAVE_VIDEOGFX 13 | enc265_CXXFLAGS += $(VIDEOGFX_CFLAGS) 14 | enc265_LDFLAGS += $(VIDEOGFX_LIBS) 15 | endif 16 | 17 | EXTRA_DIST = \ 18 | CMakeLists.txt \ 19 | Makefile.vc7 20 | -------------------------------------------------------------------------------- /third-party/libde265/libde265/arm_new/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set (arm_sources 2 | neon_common.cc neon_common.h neon_dbk.cc neon_dbk.h neon_dct.cc neon_dct.h neon_intrapred.cc neon_intrapred.h arm.cc arm.h 3 | ) 4 | 5 | #set (arm_neon_sources 6 | # neon_test.cc neon_test.h 7 | #) 8 | 9 | add_library(arm OBJECT ${arm_sources}) 10 | 11 | #add_library(arm_neon OBJECT ${arm_neon_sources}) 12 | 13 | #set(ARM_OBJECTS $ $ PARENT_SCOPE) 14 | 15 | set(DSP_OBJECTS $ PARENT_SCOPE) 16 | -------------------------------------------------------------------------------- /fuzzing/data/corpus/github_46_2.heic: -------------------------------------------------------------------------------- 1 | iprpiprp -------------------------------------------------------------------------------- /android_jni/demo/src/main/java/com/aliyun/libheif/demo/glide/HeicGlideModule.kt: -------------------------------------------------------------------------------- 1 | package com.aliyun.libheif.demo.glide 2 | 3 | import android.content.Context 4 | import android.util.Log 5 | import com.bumptech.glide.Registry 6 | import com.bumptech.glide.annotation.GlideModule 7 | import com.bumptech.glide.module.AppGlideModule 8 | 9 | @GlideModule 10 | class HeicGlideModule : AppGlideModule() { 11 | 12 | @Override fun registerComponents(context: Context, registry: Registry) { 13 | Log.d("HeicGlideModule", "registerComponents") 14 | } 15 | 16 | } -------------------------------------------------------------------------------- /third-party/libde265/acceleration-speed/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | bin_PROGRAMS = acceleration_speed 3 | 4 | AM_CPPFLAGS = -I$(top_srcdir)/libde265 -I$(top_srcdir) 5 | 6 | acceleration_speed_DEPENDENCIES = ../libde265/libde265.la 7 | acceleration_speed_CXXFLAGS = 8 | acceleration_speed_LDFLAGS = 9 | acceleration_speed_LDADD = ../libde265/libde265.la -lstdc++ 10 | acceleration_speed_SOURCES = \ 11 | acceleration-speed.cc acceleration-speed.h \ 12 | dct.cc dct.h \ 13 | dct-scalar.cc dct-scalar.h 14 | 15 | if ENABLE_SSE_OPT 16 | acceleration_speed_SOURCES += dct-sse.cc 17 | endif 18 | -------------------------------------------------------------------------------- /third-party/libde265/libde265/encoder/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set (encoder_sources 2 | encoder-core.cc encoder-core.h 3 | encoder-types.h encoder-types.cc 4 | encoder-params.h encoder-params.cc 5 | encoder-context.h encoder-context.cc 6 | encoder-syntax.h encoder-syntax.cc 7 | encoder-intrapred.h encoder-intrapred.cc 8 | encoder-motion.h encoder-motion.cc 9 | encpicbuf.h encpicbuf.cc 10 | sop.h sop.cc 11 | ) 12 | 13 | add_subdirectory (algo) 14 | add_library(encoder OBJECT ${encoder_sources}) 15 | set(ENCODER_OBJECTS $ ${ALGO_OBJECTS} PARENT_SCOPE) 16 | -------------------------------------------------------------------------------- /fuzzing/data/dictionary.txt: -------------------------------------------------------------------------------- 1 | "auxC" 2 | "auxl" 3 | "av1C" 4 | "avif" 5 | "cdsc" 6 | "clap" 7 | "colr" 8 | "dimg" 9 | "dinf" 10 | "dref" 11 | "ftyp" 12 | "grpl" 13 | "hdlr" 14 | "heic" 15 | "heix" 16 | "hevc" 17 | "hevx" 18 | "heim" 19 | "heis" 20 | "hevm" 21 | "hevs" 22 | "hvcC" 23 | "idat" 24 | "iinf" 25 | "iloc" 26 | "imir" 27 | "infe" 28 | "ipco" 29 | "ipma" 30 | "iprp" 31 | "iref" 32 | "irot" 33 | "ispe" 34 | "mdat" 35 | "meta" 36 | "mif1" 37 | "mime" 38 | "msf1" 39 | "nclx" 40 | "pict" 41 | "pitm" 42 | "pixi" 43 | "prof" 44 | "rICC" 45 | "thmb" 46 | "uri " 47 | "url " 48 | "uuid" 49 | -------------------------------------------------------------------------------- /fuzzing/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories(${libheif_BINARY_DIR} ${libheif_SOURCE_DIR}/libheif ${libheif_SOURCE_DIR}/libheif/api) 2 | 3 | 4 | add_executable(box_fuzzer box_fuzzer.cc) 5 | target_link_libraries(box_fuzzer PRIVATE heif) 6 | 7 | add_executable(color_conversion_fuzzer color_conversion_fuzzer.cc) 8 | target_link_libraries(color_conversion_fuzzer PRIVATE heif) 9 | 10 | add_executable(encoder_fuzzer encoder_fuzzer.cc) 11 | target_link_libraries(encoder_fuzzer PRIVATE heif) 12 | 13 | add_executable(file_fuzzer file_fuzzer.cc) 14 | target_link_libraries(file_fuzzer PRIVATE heif) 15 | -------------------------------------------------------------------------------- /third-party/libde265/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Makefile.am for libde265 2 | 3 | SUBDIRS = libde265 4 | 5 | ACLOCAL_AMFLAGS = -I m4 6 | 7 | if ENABLE_DEC265 8 | SUBDIRS+=dec265 9 | endif 10 | 11 | if ENABLE_ENCODER 12 | SUBDIRS+=enc265 13 | endif 14 | 15 | SUBDIRS+=tools 16 | SUBDIRS+=acceleration-speed 17 | 18 | if ENABLE_SHERLOCK265 19 | SUBDIRS+=sherlock265 20 | endif 21 | 22 | EXTRA_DIST = \ 23 | autogen.sh \ 24 | build.bat \ 25 | m4/m4_ax_check_compile_flag.m4 \ 26 | Makefile.vc7 \ 27 | CMakeLists.txt \ 28 | README.md \ 29 | libde265.png \ 30 | */COPYING 31 | 32 | pkgconfigdir = $(libdir)/pkgconfig 33 | pkgconfig_DATA = libde265.pc 34 | -------------------------------------------------------------------------------- /third-party/libde265/libde265/encoder/algo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set (algo_sources 2 | algo.h algo.cc 3 | coding-options.h coding-options.cc 4 | ctb-qscale.h ctb-qscale.cc 5 | cb-split.h cb-split.cc 6 | cb-intrapartmode.h cb-intrapartmode.cc 7 | cb-interpartmode.h cb-interpartmode.cc 8 | cb-skip.h cb-skip.cc 9 | cb-intra-inter.h cb-intra-inter.cc 10 | cb-mergeindex.h cb-mergeindex.cc 11 | tb-split.h tb-split.cc 12 | tb-transform.h tb-transform.cc 13 | tb-intrapredmode.h tb-intrapredmode.cc 14 | tb-rateestim.h tb-rateestim.cc 15 | pb-mv.h pb-mv.cc 16 | ) 17 | 18 | add_library(algo OBJECT ${algo_sources}) 19 | set(ALGO_OBJECTS $ PARENT_SCOPE) 20 | -------------------------------------------------------------------------------- /third-party/libde265/libde265/encoder/Makefile.am: -------------------------------------------------------------------------------- 1 | noinst_LTLIBRARIES = libde265_encoder.la 2 | 3 | libde265_encoder_la_CXXFLAGS = -I$(top_srcdir) -I$(top_builddir) -I$(top_srcdir)/libde265 4 | libde265_encoder_la_SOURCES = \ 5 | encoder-core.cc encoder-core.h \ 6 | encoder-types.h encoder-types.cc \ 7 | encoder-params.h encoder-params.cc \ 8 | encoder-context.h encoder-context.cc \ 9 | encoder-syntax.h encoder-syntax.cc \ 10 | encoder-intrapred.h encoder-intrapred.cc \ 11 | encoder-motion.h encoder-motion.cc \ 12 | encpicbuf.h encpicbuf.cc \ 13 | sop.h sop.cc 14 | 15 | SUBDIRS=algo 16 | libde265_encoder_la_LIBADD = algo/libde265_encoder_algo.la 17 | 18 | EXTRA_DIST = \ 19 | CMakeLists.txt 20 | -------------------------------------------------------------------------------- /cmake/modules/FindDav1d.cmake: -------------------------------------------------------------------------------- 1 | include(LibFindMacros) 2 | libfind_pkg_check_modules(DAV1D_PKGCONF dav1d) 3 | 4 | find_path(DAV1D_INCLUDE_DIR 5 | NAMES dav1d/dav1d.h 6 | HINTS ${DAV1D_PKGCONF_INCLUDE_DIRS} ${DAV1D_PKGCONF_INCLUDEDIR} 7 | PATH_SUFFIXES DAV1D 8 | ) 9 | 10 | find_library(DAV1D_LIBRARY 11 | NAMES libdav1d dav1d 12 | HINTS ${DAV1D_PKGCONF_LIBRARY_DIRS} ${DAV1D_PKGCONF_LIBDIR} 13 | ) 14 | 15 | set(DAV1D_PROCESS_LIBS DAV1D_LIBRARY) 16 | set(DAV1D_PROCESS_INCLUDES DAV1D_INCLUDE_DIR) 17 | libfind_process(DAV1D) 18 | 19 | include(FindPackageHandleStandardArgs) 20 | find_package_handle_standard_args(DAV1D 21 | REQUIRED_VARS 22 | DAV1D_INCLUDE_DIR 23 | DAV1D_LIBRARIES 24 | ) 25 | -------------------------------------------------------------------------------- /cmake/modules/FindRav1e.cmake: -------------------------------------------------------------------------------- 1 | include(LibFindMacros) 2 | libfind_pkg_check_modules(RAV1E_PKGCONF rav1e) 3 | 4 | find_path(RAV1E_INCLUDE_DIR 5 | NAMES rav1e.h 6 | HINTS ${RAV1E_PKGCONF_INCLUDE_DIRS} ${RAV1E_PKGCONF_INCLUDEDIR} 7 | PATH_SUFFIXES RAV1E rav1e 8 | ) 9 | 10 | find_library(RAV1E_LIBRARY 11 | NAMES librav1e rav1e rav1e.dll 12 | HINTS ${RAV1E_PKGCONF_LIBRARY_DIRS} ${RAV1E_PKGCONF_LIBDIR} 13 | ) 14 | 15 | set(RAV1E_PROCESS_LIBS RAV1E_LIBRARY) 16 | set(RAV1E_PROCESS_INCLUDES RAV1E_INCLUDE_DIR) 17 | libfind_process(RAV1E) 18 | 19 | include(FindPackageHandleStandardArgs) 20 | find_package_handle_standard_args(RAV1E 21 | REQUIRED_VARS 22 | RAV1E_INCLUDE_DIR 23 | RAV1E_LIBRARIES 24 | ) 25 | -------------------------------------------------------------------------------- /third-party/libde265/libde265/x86/Makefile.am: -------------------------------------------------------------------------------- 1 | noinst_LTLIBRARIES = libde265_x86.la libde265_x86_sse.la 2 | 3 | libde265_x86_la_CXXFLAGS = -I$(top_srcdir)/libde265 $(CFLAG_VISIBILITY) 4 | libde265_x86_la_SOURCES = sse.cc sse.h 5 | libde265_x86_la_LIBADD = libde265_x86_sse.la 6 | 7 | if HAVE_VISIBILITY 8 | libde265_x86_la_CXXFLAGS += -DHAVE_VISIBILITY 9 | endif 10 | 11 | 12 | # SSE4 specific functions 13 | 14 | libde265_x86_sse_la_CXXFLAGS = -msse4.1 -I$(top_srcdir) -I$(top_srcdir)/libde265 $(CFLAG_VISIBILITY) 15 | libde265_x86_sse_la_SOURCES = sse-motion.cc sse-motion.h sse-dct.h sse-dct.cc 16 | 17 | if HAVE_VISIBILITY 18 | libde265_x86_sse_la_CXXFLAGS += -DHAVE_VISIBILITY 19 | endif 20 | 21 | EXTRA_DIST = \ 22 | CMakeLists.txt 23 | -------------------------------------------------------------------------------- /cmake/modules/FindUVG266.cmake: -------------------------------------------------------------------------------- 1 | include(LibFindMacros) 2 | libfind_pkg_check_modules(UVG266_PKGCONF uvg266) 3 | 4 | find_path(UVG266_INCLUDE_DIR 5 | NAMES uvg266.h 6 | HINTS ${UVG266_PKGCONF_INCLUDE_DIRS} ${UVG266_PKGCONF_INCLUDEDIR} 7 | PATH_SUFFIXES UVG266 uvg266 8 | ) 9 | 10 | find_library(UVG266_LIBRARY 11 | NAMES libuvg266 uvg266 uvg266.dll 12 | HINTS ${UVG266_PKGCONF_LIBRARY_DIRS} ${UVG266_PKGCONF_LIBDIR} 13 | ) 14 | 15 | set(UVG266_PROCESS_LIBS UVG266_LIBRARY) 16 | set(UVG266_PROCESS_INCLUDES UVG266_INCLUDE_DIR) 17 | libfind_process(UVG266) 18 | 19 | include(FindPackageHandleStandardArgs) 20 | find_package_handle_standard_args(UVG266 21 | REQUIRED_VARS 22 | UVG266_INCLUDE_DIR 23 | UVG266_LIBRARIES 24 | ) 25 | -------------------------------------------------------------------------------- /third-party/libde265/libde265/x86/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set (x86_sources 2 | sse.cc sse.h 3 | ) 4 | 5 | set (x86_sse_sources 6 | sse-motion.cc sse-motion.h sse-dct.h sse-dct.cc 7 | ) 8 | 9 | add_library(x86 OBJECT ${x86_sources}) 10 | 11 | add_library(x86_sse OBJECT ${x86_sse_sources}) 12 | 13 | set(sse_flags "") 14 | 15 | if(NOT MSVC) 16 | if(CMAKE_SIZEOF_VOID_P EQUAL 8) 17 | set(sse_flags "${sse_flags} -msse4.1") 18 | else(CMAKE_SIZEOF_VOID_P EQUAL 8) 19 | set(sse_flags "${sse_flags} -msse2 -mssse3 -msse4.1") 20 | endif(CMAKE_SIZEOF_VOID_P EQUAL 8) 21 | endif() 22 | 23 | set(DSP_OBJECTS $ $ PARENT_SCOPE) 24 | 25 | SET_TARGET_PROPERTIES(x86_sse PROPERTIES COMPILE_FLAGS "${sse_flags}") 26 | -------------------------------------------------------------------------------- /cmake/modules/FindSvtEnc.cmake: -------------------------------------------------------------------------------- 1 | include(LibFindMacros) 2 | libfind_pkg_check_modules(SvtEnc_PKGCONF SvtAv1Enc) 3 | 4 | find_path(SvtEnc_INCLUDE_DIR 5 | NAMES svt-av1/EbSvtAv1Enc.h 6 | HINTS ${SvtEnc_PKGCONF_INCLUDE_DIRS} ${SvtEnc_PKGCONF_INCLUDEDIR} 7 | PATH_SUFFIXES SvtEnc 8 | ) 9 | 10 | find_library(SvtEnc_LIBRARY 11 | NAMES SvtAv1Enc libSvtAv1Enc 12 | HINTS ${SvtEnc_PKGCONF_LIBRARY_DIRS} ${SvtEnc_PKGCONF_LIBDIR} 13 | ) 14 | 15 | set(SvtEnc_PROCESS_LIBS SvtEnc_LIBRARY) 16 | set(SvtEnc_PROCESS_INCLUDES SvtEnc_INCLUDE_DIR) 17 | libfind_process(SvtEnc) 18 | 19 | include(FindPackageHandleStandardArgs) 20 | find_package_handle_standard_args(SvtEnc 21 | REQUIRED_VARS 22 | SvtEnc_INCLUDE_DIR 23 | SvtEnc_LIBRARIES 24 | ) 25 | -------------------------------------------------------------------------------- /cmake/modules/FindOPENJPH.cmake: -------------------------------------------------------------------------------- 1 | include(LibFindMacros) 2 | libfind_pkg_check_modules(OPENJPH_PKGCONF openjph) 3 | 4 | find_path(OPENJPH_INCLUDE_DIR 5 | NAMES openjph/ojph_version.h 6 | HINTS ${OPENJPH_PKGCONF_INCLUDE_DIRS} ${OPENJPH_PKGCONF_INCLUDEDIR} 7 | PATH_SUFFIXES OPENJPH 8 | ) 9 | 10 | find_library(OPENJPH_LIBRARY 11 | NAMES libopenjph openjph 12 | HINTS ${OPENJPH_PKGCONF_LIBRARY_DIRS} ${OPENJPH_PKGCONF_LIBDIR} 13 | ) 14 | 15 | set(OPENJPH_PROCESS_LIBS OPENJPH_LIBRARY) 16 | set(OPENJPH_PROCESS_INCLUDES OPENJPH_INCLUDE_DIR) 17 | libfind_process(OPENJPH) 18 | 19 | include(FindPackageHandleStandardArgs) 20 | find_package_handle_standard_args(OPENJPH 21 | REQUIRED_VARS 22 | OPENJPH_INCLUDE_DIR 23 | OPENJPH_LIBRARY 24 | ) 25 | -------------------------------------------------------------------------------- /third-party/libde265/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the tasks.json format 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "label": "run_de265", 8 | "type": "shell", 9 | "command": "./build/dec265/dec265", 10 | "args": [ 11 | "-v", 12 | "./testfile/BasketballDrive_1920x1080_32.265" 13 | ], 14 | "group": "build", 15 | "options": { 16 | "cwd": "${workspaceFolder}" 17 | }, 18 | // Use the standard MS compiler pattern to detect errors, warnings and infos 19 | "problemMatcher": "$msCompile" 20 | } 21 | ] 22 | } -------------------------------------------------------------------------------- /third-party/libde265/build/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the tasks.json format 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "label": "run_de265", 8 | "type": "shell", 9 | "command": "./dec265/dec265", 10 | "args": [ 11 | "-v", 12 | "./testfile/BasketballDrive_1920x1080_1.265" 13 | ], 14 | "group": "build", 15 | "options": { 16 | "cwd": "${workspaceFolder}" 17 | }, 18 | // Use the standard MS compiler pattern to detect errors, warnings and infos 19 | "problemMatcher": "$msCompile" 20 | } 21 | ] 22 | } -------------------------------------------------------------------------------- /third-party/libde265/libde265/encoder/algo/Makefile.am: -------------------------------------------------------------------------------- 1 | noinst_LTLIBRARIES = libde265_encoder_algo.la 2 | 3 | libde265_encoder_algo_la_CXXFLAGS = -I$(top_srcdir) -I$(top_builddir) 4 | libde265_encoder_algo_la_SOURCES = \ 5 | algo.h algo.cc \ 6 | coding-options.h coding-options.cc \ 7 | ctb-qscale.h ctb-qscale.cc \ 8 | cb-split.h cb-split.cc \ 9 | cb-intrapartmode.h cb-intrapartmode.cc \ 10 | cb-interpartmode.h cb-interpartmode.cc \ 11 | cb-skip.h cb-skip.cc \ 12 | cb-intra-inter.h cb-intra-inter.cc \ 13 | cb-mergeindex.h cb-mergeindex.cc \ 14 | tb-split.h tb-split.cc \ 15 | tb-transform.h tb-transform.cc \ 16 | tb-intrapredmode.h tb-intrapredmode.cc \ 17 | tb-rateestim.h tb-rateestim.cc \ 18 | pb-mv.h pb-mv.cc 19 | 20 | EXTRA_DIST = \ 21 | CMakeLists.txt 22 | -------------------------------------------------------------------------------- /third-party/libde265/libde265/x86_new/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set (x86_sources 2 | x86.cc x86.h 3 | ) 4 | 5 | set (x86_sse_sources 6 | x86_intrapred.cc x86_intrapred.h x86_idct.cc x86_idct.h x86_sao.cc x86_sao.h x86_dbk.cc x86_dbk.h 7 | ) 8 | 9 | add_library(x86 OBJECT ${x86_sources}) 10 | 11 | add_library(x86_sse OBJECT ${x86_sse_sources}) 12 | 13 | set(sse_flags "") 14 | 15 | if(NOT MSVC) 16 | if(CMAKE_SIZEOF_VOID_P EQUAL 8) 17 | set(sse_flags "${sse_flags} -msse4.1") 18 | else(CMAKE_SIZEOF_VOID_P EQUAL 8) 19 | set(sse_flags "${sse_flags} -msse2 -mssse3 -msse4.1") 20 | endif(CMAKE_SIZEOF_VOID_P EQUAL 8) 21 | endif() 22 | 23 | set(DSP_OBJECTS $ $ PARENT_SCOPE) 24 | 25 | SET_TARGET_PROPERTIES(x86_sse PROPERTIES COMPILE_FLAGS "${sse_flags}") -------------------------------------------------------------------------------- /cmake/modules/Findlibsharpyuv.cmake: -------------------------------------------------------------------------------- 1 | include(LibFindMacros) 2 | 3 | libfind_pkg_check_modules(LIBSHARPYUV_PKGCONF libsharpyuv) 4 | 5 | find_path(LIBSHARPYUV_INCLUDE_DIR 6 | NAMES sharpyuv/sharpyuv.h 7 | HINTS ${LIBSHARPYUV_PKGCONF_INCLUDE_DIRS} ${LIBSHARPYUV_PKGCONF_INCLUDEDIR} 8 | PATH_SUFFIXES LIBSHARPYUV 9 | ) 10 | 11 | find_library(LIBSHARPYUV_LIBRARY 12 | NAMES sharpyuv 13 | HINTS ${LIBSHARPYUV_PKGCONF_LIBRARY_DIRS} ${LIBSHARPYUV_PKGCONF_LIBDIR} 14 | ) 15 | 16 | set(LIBSHARPYUV_PROCESS_LIBS LIBSHARPYUV_LIBRARY) 17 | set(LIBSHARPYUV_PROCESS_INCLUDES LIBSHARPYUV_INCLUDE_DIR) 18 | libfind_process(LIBSHARPYUV) 19 | 20 | include(FindPackageHandleStandardArgs) 21 | find_package_handle_standard_args(libsharpyuv 22 | REQUIRED_VARS 23 | LIBSHARPYUV_INCLUDE_DIR 24 | LIBSHARPYUV_LIBRARIES 25 | ) 26 | -------------------------------------------------------------------------------- /android_jni/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | plugins { 3 | id 'com.android.application' version '7.2.2' apply false 4 | id 'com.android.library' version '7.2.2' apply false 5 | id 'org.jetbrains.kotlin.android' version '1.7.10' apply false 6 | id "io.github.gradle-nexus.publish-plugin" version '2.0.0' 7 | } 8 | 9 | 10 | task clean(type: Delete) { 11 | delete rootProject.buildDir 12 | } 13 | 14 | nexusPublishing { 15 | repositories { 16 | sonatype { 17 | nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/")) 18 | snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/")) 19 | packageGroup = "com.aliyun" 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /android_jni/app/src/androidTest/java/com/aliyun/imm/libheif/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.aliyun.imm.libheif 2 | 3 | import androidx.test.platform.app.InstrumentationRegistry 4 | import androidx.test.ext.junit.runners.AndroidJUnit4 5 | 6 | import org.junit.Test 7 | import org.junit.runner.RunWith 8 | 9 | import org.junit.Assert.* 10 | 11 | /** 12 | * Instrumented test, which will execute on an Android device. 13 | * 14 | * See [testing documentation](http://d.android.com/tools/testing). 15 | */ 16 | @RunWith(AndroidJUnit4::class) 17 | class ExampleInstrumentedTest { 18 | @Test 19 | fun useAppContext() { 20 | // Context of the app under test. 21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext 22 | assertEquals("com.aliyun.imm.libheif", appContext.packageName) 23 | } 24 | } -------------------------------------------------------------------------------- /android_jni/demo/src/androidTest/java/com/aliyun/libheif/demo/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.aliyun.libheif.demo 2 | 3 | import androidx.test.platform.app.InstrumentationRegistry 4 | import androidx.test.ext.junit.runners.AndroidJUnit4 5 | 6 | import org.junit.Test 7 | import org.junit.runner.RunWith 8 | 9 | import org.junit.Assert.* 10 | 11 | /** 12 | * Instrumented test, which will execute on an Android device. 13 | * 14 | * See [testing documentation](http://d.android.com/tools/testing). 15 | */ 16 | @RunWith(AndroidJUnit4::class) 17 | class ExampleInstrumentedTest { 18 | @Test 19 | fun useAppContext() { 20 | // Context of the app under test. 21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext 22 | assertEquals("com.aliyun.libheif.demo", appContext.packageName) 23 | } 24 | } -------------------------------------------------------------------------------- /third-party/libde265/dec265/Makefile.vc7: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for Microsoft Visual Studio 2003 3 | # 4 | CFLAGS=/I.. /I..\libde265 /I..\extra 5 | CC=cl /nologo 6 | LINK=link /nologo /subsystem:console 7 | DEFINES=/DWIN32 8 | 9 | CFLAGS=$(CFLAGS) /MT /Ob2 /Oi /W4 /EHsc 10 | CFLAGS=$(CFLAGS) $(DEFINES) 11 | 12 | # unreferenced formal parameter 13 | CFLAGS=$(CFLAGS) /wd4100 14 | 15 | OBJS=\ 16 | ..\extra\getopt_long.obj \ 17 | ..\extra\getopt.obj \ 18 | dec265.obj 19 | 20 | all: dec265.exe 21 | 22 | dec265.obj: dec265.cc 23 | $(CC) /c $*.cc /Fo$*.obj /TP $(CFLAGS) 24 | 25 | .c.obj: 26 | $(CC) /c $*.c /Fo$*.obj $(CFLAGS) 27 | 28 | .cc.obj: 29 | $(CC) /c $*.cc /Fo$*.obj $(CFLAGS) 30 | 31 | dec265.exe: $(OBJS) ..\libde265\libde265.lib 32 | $(LINK) /out:dec265.exe $** ..\libde265\libde265.lib 33 | 34 | clean: 35 | del dec265.exe 36 | del $(OBJS) 37 | -------------------------------------------------------------------------------- /cmake/modules/FindBrotli.cmake: -------------------------------------------------------------------------------- 1 | include(FindPackageHandleStandardArgs) 2 | 3 | find_path(BROTLI_DEC_INCLUDE_DIR "brotli/decode.h") 4 | find_path(BROTLI_ENC_INCLUDE_DIR "brotli/encode.h") 5 | 6 | find_library(BROTLI_COMMON_LIB NAMES brotlicommon) 7 | find_library(BROTLI_DEC_LIB NAMES brotlidec) 8 | find_library(BROTLI_ENC_LIB NAMES brotlienc) 9 | 10 | find_package_handle_standard_args(Brotli 11 | FOUND_VAR 12 | Brotli_FOUND 13 | REQUIRED_VARS 14 | BROTLI_COMMON_LIB 15 | BROTLI_DEC_INCLUDE_DIR 16 | BROTLI_DEC_LIB 17 | BROTLI_ENC_INCLUDE_DIR 18 | BROTLI_ENC_LIB 19 | FAIL_MESSAGE 20 | "Did not find Brotli" 21 | ) 22 | 23 | 24 | set(HAVE_BROTLI ${Brotli_FOUND}) 25 | set(BROTLI_INCLUDE_DIRS ${BROTLI_DEC_INCLUDE_DIR} ${BROTLI_ENC_INCLUDE_DIR}) 26 | set(BROTLI_LIBS "${BROTLICOMMON_LIBRARY}" "${BROTLI_DEC_LIB}" "${BROTLI_ENC_LIB}") -------------------------------------------------------------------------------- /android_jni/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /android_jni/demo/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /third-party/libde265/enc265/Makefile.vc7: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for Microsoft Visual Studio 2003 3 | # 4 | CFLAGS=/I.. /I..\libde265 /I..\extra 5 | CC=cl /nologo 6 | LINK=link /nologo /subsystem:console 7 | DEFINES=/DWIN32 8 | 9 | CFLAGS=$(CFLAGS) /MT /Ob2 /Oi /W4 /EHsc 10 | CFLAGS=$(CFLAGS) $(DEFINES) 11 | 12 | # unreferenced formal parameter 13 | CFLAGS=$(CFLAGS) /wd4100 14 | 15 | 16 | OBJS=\ 17 | ..\extra\getopt_long.obj \ 18 | ..\extra\getopt.obj \ 19 | enc265.obj 20 | 21 | all: enc265.exe 22 | 23 | enc265.obj: enc265.cc 24 | $(CC) /c $*.cc /Fo$*.obj /TP $(CFLAGS) 25 | 26 | .c.obj: 27 | $(CC) /c $*.c /Fo$*.obj $(CFLAGS) 28 | 29 | .cc.obj: 30 | $(CC) /c $*.cc /Fo$*.obj $(CFLAGS) 31 | 32 | enc265.exe: $(OBJS) ..\libde265\libde265.lib 33 | $(LINK) /out:enc265.exe $** ..\libde265\libde265.lib 34 | 35 | clean: 36 | del enc265.exe 37 | del $(OBJS) 38 | -------------------------------------------------------------------------------- /android_jni/demo/src/main/java/com/aliyun/libheif/demo/glide/MyHeicModule.kt: -------------------------------------------------------------------------------- 1 | package com.aliyun.libheif.demo.glide 2 | 3 | import android.content.Context 4 | import android.graphics.Bitmap 5 | import com.bumptech.glide.Glide 6 | import com.bumptech.glide.Registry 7 | import com.bumptech.glide.annotation.GlideModule 8 | import com.bumptech.glide.module.LibraryGlideModule 9 | import java.io.InputStream 10 | import java.nio.ByteBuffer 11 | 12 | @GlideModule(glideName = "MyHeic") 13 | open class MyHeicModule : LibraryGlideModule() { 14 | override fun registerComponents(context: Context, glide: Glide, registry: Registry) { 15 | registry.prepend(ByteBuffer::class.java, Bitmap::class.java, HeifByteBufferBitmapDecoder(glide.bitmapPool)) 16 | registry.prepend(InputStream::class.java, Bitmap::class.java, HeifStreamBitmapDecoder(glide.bitmapPool)) 17 | } 18 | } -------------------------------------------------------------------------------- /third-party/libde265/.github/workflows/arm.yml: -------------------------------------------------------------------------------- 1 | name: arm 2 | 3 | on: 4 | push: 5 | branches: [ master ] 6 | pull_request: 7 | branches: [ master ] 8 | 9 | jobs: 10 | build: 11 | strategy: 12 | matrix: 13 | env: 14 | - { TARGET_HOST: "arm-linux-gnueabihf" } 15 | env: ${{ matrix.env }} 16 | runs-on: ubuntu-latest 17 | steps: 18 | - uses: actions/checkout@v2 19 | 20 | - name: Checkout sample streams 21 | uses: actions/checkout@v2 22 | with: 23 | repository: strukturag/libde265-data 24 | path: libde265-data 25 | 26 | - name: Install dependencies 27 | run: | 28 | ./scripts/ci-before-install-linux.sh 29 | 30 | - name: Prepare CI 31 | run: | 32 | ./scripts/ci-before-script.sh 33 | 34 | - name: Run tests 35 | run: | 36 | ./scripts/ci-run.sh 37 | -------------------------------------------------------------------------------- /examples/heif-thumbnailer.1: -------------------------------------------------------------------------------- 1 | .TH HEIF-THUMBNAILER 1 2 | .SH NAME 3 | heif-thumbnailer \- create thumbnails from HEIC/HEIF files 4 | .SH SYNOPSIS 5 | .B heif-thumbnailer 6 | [\fB\-s\fR \fISIZE\fR] 7 | .IR filename 8 | .IR output 9 | .SH DESCRIPTION 10 | .B heif-thumbnailer 11 | Create thumbnail images from HEIC/HEIF files that can be used for example by Nautilus. 12 | .SH OPTIONS 13 | .TP 14 | .BR \-s\fR\ \fISIZE\fR 15 | Defines the maximum width and height of the thumbnail to generate. 16 | Default is 512 pixel. 17 | .SH EXIT STATUS 18 | .PP 19 | \fB0\fR 20 | .RS 4 21 | Success 22 | .RE 23 | .PP 24 | \fB1\fR 25 | .RS 4 26 | Failure (syntax or usage error; error while loading, converting or writing image). 27 | .RE 28 | .SH BUGS 29 | Please reports bugs or issues at https://github.com/strukturag/libheif 30 | .SH AUTHORS 31 | Dirk Farin, struktur AG 32 | .SH COPYRIGHT 33 | Copyright \[co] 2018 struktur AG 34 | -------------------------------------------------------------------------------- /third-party/libde265/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | 8 | { 9 | "name": "dec265_gdb", 10 | "type": "cppdbg", 11 | "request": "launch", 12 | // "program": "${command:cmake.launchTargetPath}", 13 | "program": "${workspaceFolder}/build/dec265/dec265", 14 | "args": [ 15 | "-v", 16 | "./testfile/BasketballDrive_1920x1080_32.265" 17 | ], 18 | "stopAtEntry": true, 19 | "cwd": "${workspaceFolder}", 20 | "environment": [], 21 | "externalConsole": false, 22 | } 23 | ] 24 | } -------------------------------------------------------------------------------- /third-party/libde265/build/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | 8 | { 9 | "name": "dec265_gdb", 10 | "type": "cppdbg", 11 | "request": "launch", 12 | // "program": "${command:cmake.launchTargetPath}", 13 | "program": "${workspaceFolder}/dec265/dec265", 14 | "args": [ 15 | "-v", 16 | "./testfile/BasketballDrive_1920x1080_1.265" 17 | ], 18 | "stopAtEntry": true, 19 | "cwd": "${workspaceFolder}", 20 | "environment": [], 21 | "externalConsole": false, 22 | } 23 | ] 24 | } -------------------------------------------------------------------------------- /third-party/libde265/dec265/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable (dec265 dec265.cc) 2 | target_link_libraries (dec265 PRIVATE ${PROJECT_NAME}) 3 | 4 | if(SDL_FOUND) 5 | target_sources(dec265 PRIVATE sdl.cc) 6 | target_compile_definitions(dec265 PRIVATE HAVE_SDL) 7 | target_include_directories (dec265 PRIVATE "${SDL_INCLUDE_DIR}") 8 | target_link_libraries (dec265 PRIVATE ${SDL_LIBRARY}) 9 | endif() 10 | 11 | if(MSVC) 12 | target_sources(dec265 PRIVATE 13 | ../extra/getopt.c 14 | ../extra/getopt_long.c 15 | ) 16 | endif() 17 | 18 | install (TARGETS dec265 DESTINATION ${CMAKE_INSTALL_BINDIR}) 19 | 20 | if(NOT MSVC) 21 | # hdrcopy uses internal APIs that are not available when compiled for Windows 22 | add_executable (hdrcopy hdrcopy.cc) 23 | 24 | target_link_libraries (hdrcopy PRIVATE ${PROJECT_NAME}) 25 | 26 | install (TARGETS hdrcopy DESTINATION ${CMAKE_INSTALL_BINDIR}) 27 | endif() 28 | -------------------------------------------------------------------------------- /third-party/svt.cmd: -------------------------------------------------------------------------------- 1 | : # This install script was originally taken from libavif but might have been modified. 2 | 3 | : # cmake and ninja must be in your PATH for compiling. 4 | 5 | : # If you want to enable the SVT-AV1 encoder, please check that the WITH_SvtEnc and WITH_SvtEnc_BUILTIN CMake variables are set correctly. 6 | : # You will also have to set the PKG_CONFIG_PATH to "third-party/SVT-AV1/Build/linux/Release" so that the local SVT-AV1 library is found. 7 | 8 | git clone -b v2.1.1 --depth 1 https://gitlab.com/AOMediaCodec/SVT-AV1.git 9 | 10 | cd SVT-AV1 11 | cd Build/linux 12 | 13 | ./build.sh release static no-apps prefix=$(pwd)/install install 14 | cd ../../.. 15 | 16 | echo "" 17 | echo "----- NOTE ----" 18 | echo "Please add the path to the pkg-config file to your PKG_CONFIG_PATH, like this:" 19 | echo "export PKG_CONFIG_PATH=\$PKG_CONFIG_PATH:$(pwd)/SVT-AV1/Build/linux/install/lib/pkgconfig" 20 | -------------------------------------------------------------------------------- /android_jni/demo/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /android_jni/demo/src/main/res/values-night/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /gdk-pixbuf/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if(UNIX OR MINGW) 2 | find_package(PkgConfig) 3 | pkg_check_modules(GDKPIXBUF2 gdk-pixbuf-2.0) 4 | 5 | if(GDKPIXBUF2_FOUND) 6 | execute_process( 7 | COMMAND ${PKG_CONFIG_EXECUTABLE} gdk-pixbuf-2.0 --variable gdk_pixbuf_moduledir 8 | --define-variable=prefix=${CMAKE_INSTALL_PREFIX} OUTPUT_VARIABLE GDKPIXBUF2_MODULE_DIR 9 | OUTPUT_STRIP_TRAILING_WHITESPACE) 10 | 11 | add_library(pixbufloader-heif MODULE pixbufloader-heif.c) 12 | 13 | target_include_directories(pixbufloader-heif PRIVATE ${GDKPIXBUF2_INCLUDE_DIRS} ${libheif_BINARY_DIR} ${libheif_SOURCE_DIR}/libheif/api) 14 | 15 | target_link_directories(pixbufloader-heif PRIVATE ${GDKPIXBUF2_LIBRARY_DIRS}) 16 | 17 | target_link_libraries(pixbufloader-heif PUBLIC ${GDKPIXBUF2_LIBRARIES} heif) 18 | 19 | install(TARGETS pixbufloader-heif DESTINATION ${GDKPIXBUF2_MODULE_DIR}) 20 | endif() 21 | endif() 22 | -------------------------------------------------------------------------------- /third-party/libde265/libde265/x86_new/Makefile.am: -------------------------------------------------------------------------------- 1 | noinst_LTLIBRARIES = libde265_x86.la libde265_x86_sse.la 2 | 3 | libde265_x86_la_CXXFLAGS = -I$(top_srcdir)/libde265 $(CFLAG_VISIBILITY) 4 | libde265_x86_la_SOURCES = x86.cc x86.h 5 | libde265_x86_la_LIBADD = libde265_x86_sse.la 6 | 7 | if HAVE_VISIBILITY 8 | libde265_x86_la_CXXFLAGS += -DHAVE_VISIBILITY 9 | endif 10 | 11 | 12 | # SSE4 specific functions 13 | 14 | libde265_x86_sse_la_CXXFLAGS = -I$(top_srcdir) -I$(top_srcdir)/libde265 $(CFLAG_VISIBILITY) 15 | if HAVE_SSE4_1 16 | libde265_x86_sse_la_CXXFLAGS += -msse4.1 17 | endif 18 | 19 | if HAVE_AVX2 20 | libde265_x86_sse_la_CXXFLAGS += -mavx2 21 | endif 22 | 23 | libde265_x86_sse_la_SOURCES = x86_intrapred.cc x86_intrapred.h x86_idct.cc x86_idct.h x86_sao.cc x86_sao.h x86_dbk.cc x86_dbk.h 24 | 25 | if HAVE_VISIBILITY 26 | libde265_x86_sse_la_CXXFLAGS += -DHAVE_VISIBILITY 27 | endif 28 | 29 | EXTRA_DIST = \ 30 | CMakeLists.txt 31 | -------------------------------------------------------------------------------- /third-party/libde265/.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: build 2 | 3 | on: 4 | push: 5 | branches: [ master ] 6 | pull_request: 7 | branches: [ master ] 8 | 9 | jobs: 10 | build: 11 | strategy: 12 | matrix: 13 | env: 14 | - { CC: "gcc", CXX: "g++" } 15 | - { CC: "clang", CXX: "clang++" } 16 | - { CMAKE: "cmake" } 17 | env: ${{ matrix.env }} 18 | runs-on: ubuntu-latest 19 | steps: 20 | - uses: actions/checkout@v2 21 | 22 | - name: Checkout sample streams 23 | uses: actions/checkout@v2 24 | with: 25 | repository: strukturag/libde265-data 26 | path: libde265-data 27 | 28 | - name: Install dependencies 29 | run: | 30 | ./scripts/ci-before-install-linux.sh 31 | 32 | - name: Prepare CI 33 | run: | 34 | ./scripts/ci-before-script.sh 35 | 36 | - name: Run tests 37 | run: | 38 | ./scripts/ci-run.sh 39 | -------------------------------------------------------------------------------- /third-party/libde265/.github/workflows/mingw.yml: -------------------------------------------------------------------------------- 1 | name: mingw 2 | 3 | on: 4 | push: 5 | branches: [ master ] 6 | pull_request: 7 | branches: [ master ] 8 | 9 | jobs: 10 | build: 11 | strategy: 12 | matrix: 13 | env: 14 | - { TARGET_HOST: "i686-w64-mingw32", WINE: "wine" } 15 | - { TARGET_HOST: "x86_64-w64-mingw32", WINE: "wine64" } 16 | env: ${{ matrix.env }} 17 | runs-on: ubuntu-18.04 18 | steps: 19 | - uses: actions/checkout@v2 20 | 21 | - name: Checkout sample streams 22 | uses: actions/checkout@v2 23 | with: 24 | repository: strukturag/libde265-data 25 | path: libde265-data 26 | 27 | - name: Install dependencies 28 | run: | 29 | ./scripts/ci-before-install-linux.sh 30 | 31 | - name: Prepare CI 32 | run: | 33 | ./scripts/ci-before-script.sh 34 | 35 | - name: Run tests 36 | run: | 37 | ./scripts/ci-run.sh 38 | -------------------------------------------------------------------------------- /third-party/libde265/.github/workflows/osx.yml: -------------------------------------------------------------------------------- 1 | name: osx 2 | 3 | on: 4 | push: 5 | branches: [ master ] 6 | pull_request: 7 | branches: [ master ] 8 | 9 | jobs: 10 | build: 11 | strategy: 12 | matrix: 13 | env: 14 | - { CC: "clang", CXX: "clang++" } 15 | - { CC: "gcc", CXX: "g++" } 16 | - { CC: "gcc", CXX: "g++", CMAKE: "cmake" } 17 | env: ${{ matrix.env }} 18 | 19 | runs-on: macos-10.15 20 | steps: 21 | - uses: actions/checkout@v2 22 | 23 | - name: Checkout sample streams 24 | uses: actions/checkout@v2 25 | with: 26 | repository: strukturag/libde265-data 27 | path: libde265-data 28 | 29 | - name: Install dependencies 30 | run: | 31 | ./scripts/ci-before-install-osx.sh 32 | 33 | - name: Prepare CI 34 | run: | 35 | ./scripts/ci-before-script.sh 36 | 37 | - name: Run tests 38 | run: | 39 | ./scripts/ci-run.sh 40 | -------------------------------------------------------------------------------- /third-party/libde265/dec265/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | bin_PROGRAMS = dec265 hdrcopy 3 | 4 | AM_CPPFLAGS = -I$(top_srcdir)/libde265 -I$(top_srcdir) 5 | 6 | dec265_DEPENDENCIES = ../libde265/libde265.la 7 | dec265_CXXFLAGS = 8 | dec265_LDFLAGS = 9 | dec265_LDADD = ../libde265/libde265.la -lstdc++ 10 | dec265_SOURCES = dec265.cc 11 | 12 | hdrcopy_DEPENDENCIES = ../libde265/libde265.la 13 | hdrcopy_CXXFLAGS = 14 | hdrcopy_LDFLAGS = 15 | hdrcopy_LDADD = ../libde265/libde265.la -lstdc++ 16 | hdrcopy_SOURCES = hdrcopy.cc 17 | 18 | if HAVE_VIDEOGFX 19 | dec265_CXXFLAGS += $(VIDEOGFX_CFLAGS) 20 | dec265_LDFLAGS += $(VIDEOGFX_LIBS) 21 | endif 22 | 23 | if HAVE_SDL 24 | dec265_CXXFLAGS += $(SDL_CFLAGS) 25 | dec265_LDFLAGS += $(SDL_LIBS) 26 | dec265_SOURCES += sdl.cc sdl.hh 27 | endif 28 | 29 | if MINGW 30 | dec265_LDFLAGS += -static-libgcc -static-libstdc++ 31 | endif 32 | 33 | EXTRA_DIST = Makefile.vc7 \ 34 | CMakeLists.txt \ 35 | ../extra/getopt.c \ 36 | ../extra/getopt.h \ 37 | ../extra/getopt_long.c 38 | -------------------------------------------------------------------------------- /third-party/libde265/libde265/arm/Makefile.am: -------------------------------------------------------------------------------- 1 | noinst_LTLIBRARIES = libde265_arm.la 2 | 3 | libde265_arm_la_CXXFLAGS = -I.. $(CFLAG_VISIBILITY) 4 | libde265_arm_la_SOURCES = arm.cc arm.h 5 | libde265_arm_la_LIBADD = 6 | 7 | if HAVE_VISIBILITY 8 | libde265_arm_la_CXXFLAGS += -DHAVE_VISIBILITY 9 | endif 10 | 11 | 12 | if ENABLE_NEON_OPT 13 | # NEON specific functions 14 | 15 | noinst_LTLIBRARIES += libde265_arm_neon.la 16 | libde265_arm_la_LIBADD += libde265_arm_neon.la 17 | libde265_arm_neon_la_CXXFLAGS = -mfpu=neon -I.. $(CFLAG_VISIBILITY) 18 | libde265_arm_neon_la_CCASFLAGS = -mfpu=neon -I.. \ 19 | -DHAVE_NEON \ 20 | -DEXTERN_ASM= \ 21 | -DHAVE_AS_FUNC \ 22 | -DHAVE_SECTION_DATA_REL_RO 23 | 24 | if ENABLE_ARM_THUMB 25 | libde265_arm_neon_la_CCASFLAGS += -DCONFIG_THUMB 26 | endif 27 | 28 | libde265_arm_neon_la_SOURCES = \ 29 | asm.S \ 30 | cpudetect.S \ 31 | hevcdsp_qpel_neon.S \ 32 | neon.S 33 | 34 | if HAVE_VISIBILITY 35 | libde265_arm_neon_la_CXXFLAGS += -DHAVE_VISIBILITY 36 | endif 37 | 38 | endif 39 | -------------------------------------------------------------------------------- /cmake/modules/FindLibpng.cmake: -------------------------------------------------------------------------------- 1 | include(LibFindMacros) 2 | libfind_pkg_check_modules(LIBPNG_PKGCONF libpng) 3 | 4 | find_path(LIBPNG_INCLUDE_DIR 5 | NAMES png.h 6 | HINTS ${LIBPNG_PKGCONF_INCLUDE_DIRS} ${LIBPNG_PKGCONF_INCLUDEDIR} 7 | PATH_SUFFIXES LIBPNG 8 | ) 9 | 10 | find_library(LIBPNG_LIBRARY 11 | NAMES libpng png 12 | HINTS ${LIBPNG_PKGCONF_LIBRARY_DIRS} ${LIBPNG_PKGCONF_LIBDIR} 13 | ) 14 | 15 | libfind_process(LIBPNG) 16 | 17 | set(LIBPNG_LINK_LIBRARIES ${LIBPNG_LIBRARY}) 18 | set(LIBPNG_INCLUDE_DIRS ${LIBPNG_INCLUDE_DIR}) 19 | 20 | #message(STATUS "xxx LIBPNG_LIBRARY = ${LIBPNG_LIBRARY}") 21 | #message(STATUS "xxx LIBPNG_INCLUDE_DIR = ${LIBPNG_INCLUDE_DIR}") 22 | #message(STATUS "xxx LIBPNG_LINK_LIBRARIES = ${LIBPNG_LINK_LIBRARIES}") 23 | #message(STATUS "xxx LIBPNG_INCLUDE_DIRS = ${LIBPNG_INCLUDE_DIRS}") 24 | 25 | 26 | include(FindPackageHandleStandardArgs) 27 | find_package_handle_standard_args(LIBPNG 28 | REQUIRED_VARS 29 | LIBPNG_INCLUDE_DIR 30 | LIBPNG_LIBRARIES 31 | ) 32 | 33 | -------------------------------------------------------------------------------- /third-party/libde265/libde265/arm_new/neon_dbk.h: -------------------------------------------------------------------------------- 1 | #ifndef LIBDE265_NEON_DBK_H 2 | #define LIBDE265_NEON_DBK_H 3 | 4 | void ff_hevc_loop_filter_luma_8_neon(uint8_t *_dst, bool vertical, ptrdiff_t _stride, int _beta, int* _tc, uint8_t *_no_p, uint8_t *_no_q, int bitdepth); 5 | 6 | #ifdef OPT_4 7 | void ff_hevc_loop_filter_chroma_8_neon(uint8_t *_dst, bool vertical, ptrdiff_t _stride, int* _tc, uint8_t *no_p, uint8_t *no_q, int bitdepth); 8 | #else 9 | void ff_hevc_loop_filter_chroma_8_neon(uint8_t *_dst, bool vertical, ptrdiff_t _stride, int tc, bool filterP, bool filterQ, int bitdepth); 10 | #endif 11 | 12 | 13 | void ff_hevc_sao_band_filter_8_neon(uint8_t *_dst, int stride_dst, /*const*/ uint8_t *_src, int stride_src, int cIdx, int ctuW, int ctuH, int saoLeftClass, const int8_t *saoOffsetVal, int bandShift, const int maxPixelValue); 14 | void ff_hevc_sao_edge_filter_8_neon(uint8_t* out_ptr, int out_stride, uint8_t* in_ptr , int in_stride, int SaoEoClass, int8_t* saoOffsetVal, int* edges, int ctuW, int ctuH, const int maxPixelValue); 15 | #endif -------------------------------------------------------------------------------- /examples/heif-info.1: -------------------------------------------------------------------------------- 1 | .TH HEIF-INFO 1 2 | .SH NAME 3 | heif-info \- show information on HEIC/HEIF file 4 | .SH SYNOPSIS 5 | .B heif-info 6 | [\fB\-d\fR|\fB--dump-boxes\fR] 7 | [\fB\-h\fR|\fB--help\fR] 8 | [\fB\-v\fR|\fB--version\fR] 9 | .IR filename 10 | .SH DESCRIPTION 11 | .B heif-info 12 | Show information on HEIC/HEIF file. 13 | .SH OPTIONS 14 | .TP 15 | .BR \-d ", " \-\-dump-boxes\fR 16 | Show a low-level dump of all MP4 file boxes. 17 | .TP 18 | .BR \-h ", " \-\-help\fR 19 | Show help. A filename is not required or used. 20 | .TP 21 | .BR \-v ", " \-\-version\fR 22 | Show version information for the tool, library version, and the plugin path. A filename is not required or used. 23 | .SH EXIT STATUS 24 | .PP 25 | \fB0\fR 26 | .RS 4 27 | Success 28 | .RE 29 | .PP 30 | \fB1\fR 31 | .RS 4 32 | Failure (syntax or usage error; error while loading image). 33 | .RE 34 | .SH BUGS 35 | Please reports bugs or issues at https://github.com/strukturag/libheif 36 | .SH AUTHORS 37 | Dirk Farin, struktur AG 38 | .SH COPYRIGHT 39 | Copyright \[co] 2017 struktur AG 40 | -------------------------------------------------------------------------------- /android_jni/demo/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 15 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /cmake/modules/Findkvazaar.cmake: -------------------------------------------------------------------------------- 1 | include(LibFindMacros) 2 | include(CheckStructHasMember) 3 | 4 | libfind_pkg_check_modules(KVAZAAR_PKGCONF kvazaar) 5 | 6 | find_path(KVAZAAR_INCLUDE_DIR 7 | NAMES kvazaar.h 8 | HINTS ${KVAZAAR_PKGCONF_INCLUDE_DIRS} ${KVAZAAR_PKGCONF_INCLUDEDIR} 9 | PATH_SUFFIXES KVAZAAR kvazaar 10 | ) 11 | 12 | find_library(KVAZAAR_LIBRARY 13 | NAMES libkvazaar kvazaar kvazaar.dll 14 | HINTS ${KVAZAAR_PKGCONF_LIBRARY_DIRS} ${KVAZAAR_PKGCONF_LIBDIR} 15 | ) 16 | 17 | set(KVAZAAR_PROCESS_LIBS KVAZAAR_LIBRARY) 18 | set(KVAZAAR_PROCESS_INCLUDES KVAZAAR_INCLUDE_DIR) 19 | libfind_process(KVAZAAR) 20 | 21 | set(CMAKE_REQUIRED_INCLUDES ${KVAZAAR_INCLUDE_DIR}) 22 | CHECK_STRUCT_HAS_MEMBER("struct kvz_config" enable_logging_output kvazaar.h 23 | HAVE_KVAZAAR_ENABLE_LOGGING LANGUAGE CXX) 24 | unset(CMAKE_REQUIRED_INCLUDES) 25 | 26 | include(FindPackageHandleStandardArgs) 27 | find_package_handle_standard_args(kvazaar 28 | REQUIRED_VARS 29 | KVAZAAR_INCLUDE_DIR 30 | KVAZAAR_LIBRARIES 31 | ) 32 | -------------------------------------------------------------------------------- /third-party/libsharpyuv.cmd: -------------------------------------------------------------------------------- 1 | : # This install script was originally taken from libavif but might have been modified. 2 | 3 | : # If you want to enable the libsharpyuv decoder, please check that the WITH_LIBSHARPYUV CMake variable is set correctly. 4 | : # You will also have to set the PKG_CONFIG_PATH to "third-party/libwebp/build/dist/lib/pkgconfig" so that the local libsharpyuv library is found. 5 | 6 | : # The odd choice of comment style in this file is to try to share this script between *nix and win32. 7 | 8 | : # meson and ninja must be in your PATH. 9 | 10 | : # If you're running this on Windows, be sure you've already run this (from your VC2019 install dir): 11 | : # "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars64.bat" 12 | git clone --single-branch https://chromium.googlesource.com/webm/libwebp 13 | 14 | cd libwebp 15 | mkdir build 16 | cd build 17 | cmake -G Ninja -DCMAKE_INSTALL_PREFIX="$(pwd)/dist" -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release .. 18 | ninja sharpyuv 19 | ninja install 20 | cd ../.. 21 | -------------------------------------------------------------------------------- /examples/heif-dec.1: -------------------------------------------------------------------------------- 1 | .TH HEIF-CONVERT 1 2 | .SH NAME 3 | heif-dec \- decode HEIC/HEIF image 4 | .SH SYNOPSIS 5 | .B heif-dec 6 | [\fB\-q\fR \fIQUALITY\fR] 7 | .IR filename 8 | .IR output[.jpg|.png|.y4m] 9 | .SH DESCRIPTION 10 | .B heif-dec 11 | Convert HEIC/HEIF image to a different image format. 12 | .SH OPTIONS 13 | .TP 14 | .BR \-q\fR\ \fIQUALITY\fR 15 | Defines quality level between 0 and 100 for the generated output file. Only used for JPEG. 16 | .SH EXIT STATUS 17 | .PP 18 | \fB0\fR 19 | .RS 4 20 | Success 21 | .RE 22 | .PP 23 | \fB1\fR 24 | .RS 4 25 | Failure (syntax or usage error; error while loading, converting or writing image). 26 | .RE 27 | .SH NOTES 28 | The available output formats depend on the libraries that were available at 29 | compile time. Supported are JPEG, PNG and Y4M, the file type is determined based 30 | on the extension of the output file. 31 | .SH BUGS 32 | Please reports bugs or issues at https://github.com/strukturag/libheif 33 | .SH AUTHORS 34 | Joachim Bauch, struktur AG 35 | .br 36 | Dirk Farin, struktur AG 37 | .SH COPYRIGHT 38 | Copyright \[co] 2017 struktur AG 39 | -------------------------------------------------------------------------------- /third-party/libde265/libde265/x86/sse.h: -------------------------------------------------------------------------------- 1 | /* 2 | * H.265 video codec. 3 | * Copyright (c) 2013-2014 struktur AG, Dirk Farin 4 | * 5 | * This file is part of libde265. 6 | * 7 | * libde265 is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation, either version 3 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * libde265 is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with libde265. If not, see . 19 | */ 20 | 21 | #ifndef DE265_SSE_H 22 | #define DE265_SSE_H 23 | 24 | #include "acceleration.h" 25 | 26 | void init_acceleration_functions_sse(struct acceleration_functions* accel); 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /third-party/libde265/libde265/fallback.h: -------------------------------------------------------------------------------- 1 | /* 2 | * H.265 video codec. 3 | * Copyright (c) 2013-2014 struktur AG, Dirk Farin 4 | * 5 | * This file is part of libde265. 6 | * 7 | * libde265 is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation, either version 3 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * libde265 is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with libde265. If not, see . 19 | */ 20 | 21 | #ifndef DE265_FALLBACK_H 22 | #define DE265_FALLBACK_H 23 | 24 | #include "acceleration.h" 25 | 26 | void init_acceleration_functions_fallback(struct acceleration_functions* lowlevel); 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /third-party/libde265/libde265/arm/arm.h: -------------------------------------------------------------------------------- 1 | /* 2 | * H.265 video codec. 3 | * Copyright (c) 2013-2015 struktur AG, Joachim Bauch 4 | * 5 | * This file is part of libde265. 6 | * 7 | * libde265 is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation, either version 3 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * libde265 is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with libde265. If not, see . 19 | */ 20 | 21 | #ifndef LIBDE265_ARM_H 22 | #define LIBDE265_ARM_H 23 | 24 | #include "acceleration.h" 25 | 26 | void init_acceleration_functions_arm(struct acceleration_functions* accel); 27 | 28 | #endif // LIBDE265_ARM_H 29 | -------------------------------------------------------------------------------- /examples/benchmark.h: -------------------------------------------------------------------------------- 1 | /* 2 | * HEIF codec. 3 | * Copyright (c) 2022 Dirk Farin 4 | * 5 | * This file is part of libheif. 6 | * 7 | * libheif is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation, either version 3 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * libheif is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with libheif. If not, see . 19 | */ 20 | 21 | 22 | #ifndef LIBHEIF_BENCHMARK_H 23 | #define LIBHEIF_BENCHMARK_H 24 | 25 | #include 26 | #include 27 | 28 | struct heif_image; 29 | 30 | double compute_psnr(heif_image* original_image, const std::string& encoded_file); 31 | 32 | #endif //LIBHEIF_BENCHMARK_H 33 | -------------------------------------------------------------------------------- /third-party/libde265/extra/libde265/de265-version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * H.265 video codec. 3 | * Copyright (c) 2013-2014 struktur AG, Dirk Farin 4 | * 5 | * This file is part of libde265. 6 | * 7 | * libde265 is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation, either version 3 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * libde265 is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with libde265. If not, see . 19 | */ 20 | 21 | #ifndef LIBDE265_VERSION_H 22 | #define LIBDE265_VERSION_H 23 | 24 | /* Numeric representation of the version */ 25 | #define LIBDE265_NUMERIC_VERSION 0x01000800 26 | 27 | #define LIBDE265_VERSION "1.0.8" 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /cmake/modules/FindX265.cmake: -------------------------------------------------------------------------------- 1 | include(LibFindMacros) 2 | libfind_pkg_check_modules(X265_PKGCONF x265) 3 | 4 | find_path(X265_INCLUDE_DIR 5 | NAMES x265.h 6 | HINTS ${X265_PKGCONF_INCLUDE_DIRS} ${X265_PKGCONF_INCLUDEDIR} 7 | PATH_SUFFIXES X265 8 | ) 9 | 10 | find_library(X265_LIBRARY 11 | NAMES libx265 x265 12 | HINTS ${X265_PKGCONF_LIBRARY_DIRS} ${X265_PKGCONF_LIBDIR} 13 | ) 14 | 15 | set(X265_PROCESS_LIBS X265_LIBRARY) 16 | set(X265_PROCESS_INCLUDES X265_INCLUDE_DIR) 17 | libfind_process(X265) 18 | 19 | if(X265_INCLUDE_DIR) 20 | set(x265_config_file "${X265_INCLUDE_DIR}/x265_config.h") 21 | if(EXISTS ${x265_config_file}) 22 | file(STRINGS 23 | ${x265_config_file} 24 | TMP 25 | REGEX "#define X265_BUILD .*$") 26 | string(REGEX REPLACE "#define X265_BUILD" "" TMP ${TMP}) 27 | string(REGEX MATCHALL "[0-9.]+" X265_BUILD ${TMP}) 28 | endif() 29 | endif() 30 | 31 | include(FindPackageHandleStandardArgs) 32 | find_package_handle_standard_args(X265 33 | REQUIRED_VARS 34 | X265_INCLUDE_DIR 35 | X265_LIBRARIES 36 | VERSION_VAR 37 | X265_BUILD 38 | ) 39 | -------------------------------------------------------------------------------- /examples/COPYING: -------------------------------------------------------------------------------- 1 | 2 | MIT License 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE. 21 | -------------------------------------------------------------------------------- /android_jni/app/src/main/java/com/aliyun/libheif/HeifInfo.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 aliyun 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.aliyun.libheif 17 | 18 | class HeifInfo { 19 | var frameNum = 0 20 | var duration = 0 21 | val frameList = ArrayList() 22 | 23 | @JvmOverloads 24 | fun addHeifSize(width: Int, height: Int, bitdepth: Int = 8) { 25 | val newframe = HeifSize() 26 | newframe.width = width 27 | newframe.height = height 28 | // newframe.bitDepth = bitdepth 29 | frameList.add(newframe) 30 | } 31 | } -------------------------------------------------------------------------------- /third-party/libde265/libde265/deblock.h: -------------------------------------------------------------------------------- 1 | /* 2 | * H.265 video codec. 3 | * Copyright (c) 2013-2014 struktur AG, Dirk Farin 4 | * 5 | * This file is part of libde265. 6 | * 7 | * libde265 is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation, either version 3 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * libde265 is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with libde265. If not, see . 19 | */ 20 | 21 | #ifndef DE265_DEBLOCK_H 22 | #define DE265_DEBLOCK_H 23 | 24 | #include "libde265/decctx.h" 25 | 26 | void add_deblocking_tasks(image_unit* imgunit); 27 | void apply_deblocking_filter(de265_image* img); //decoder_context* ctx); 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /libheif/exif.h: -------------------------------------------------------------------------------- 1 | /* 2 | * HEIF codec. 3 | * Copyright (c) 2022 Dirk Farin 4 | * 5 | * This file is part of libheif. 6 | * 7 | * libheif is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation, either version 3 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * libheif is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with libheif. If not, see . 19 | */ 20 | 21 | #ifndef LIBHEIF_EXIF_H 22 | #define LIBHEIF_EXIF_H 23 | 24 | #include 25 | #include 26 | 27 | int read_exif_orientation_tag(const uint8_t* exif, uint32_t size); 28 | 29 | void modify_exif_orientation_tag_if_it_exists(uint8_t* exifData, uint32_t size, uint16_t orientation); 30 | 31 | #endif //LIBHEIF_EXIF_H 32 | -------------------------------------------------------------------------------- /third-party/libde265/libde265/arm/cpudetect.S: -------------------------------------------------------------------------------- 1 | /* 2 | * H.265 video codec. 3 | * Copyright (c) 2013-2015 struktur AG, Joachim Bauch 4 | * 5 | * This file is part of libde265. 6 | * 7 | * libde265 is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation, either version 3 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * libde265 is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with libde265. If not, see . 19 | */ 20 | 21 | #include "asm.S" 22 | #include "neon.S" 23 | 24 | // we execute a simple NEON instruction and check if SIGILL is triggered to 25 | // detect if the CPU support NEON code 26 | function libde265_detect_neon, export=1 27 | vand q0, q0, q0 28 | bx lr 29 | endfunc 30 | -------------------------------------------------------------------------------- /third-party/libde265/libde265/arm_new/Makefile.am: -------------------------------------------------------------------------------- 1 | noinst_LTLIBRARIES = libde265_arm.la 2 | 3 | libde265_arm_la_CXXFLAGS = -I.. $(CFLAG_VISIBILITY) 4 | libde265_arm_la_SOURCES = neon_common.cc neon_common.h neon_intrapred.cc neon_intrapred.h neon_dbk.cc neon_dbk.h neon_dct.cc neon_dct.h arm.cc arm.h 5 | libde265_arm_la_LIBADD = 6 | 7 | if HAVE_VISIBILITY 8 | libde265_arm_la_CXXFLAGS += -DHAVE_VISIBILITY 9 | endif 10 | 11 | 12 | # if ENABLE_NEON_OPT 13 | # # NEON specific functions 14 | # 15 | # noinst_LTLIBRARIES += libde265_arm_neon.la 16 | # libde265_arm_la_LIBADD += libde265_arm_neon.la 17 | # libde265_arm_neon_la_CXXFLAGS = -mfpu=neon -I.. $(CFLAG_VISIBILITY) 18 | # libde265_arm_neon_la_CCASFLAGS = -mfpu=neon -I.. \ 19 | # -DHAVE_NEON \ 20 | # -DEXTERN_ASM= \ 21 | # -DHAVE_AS_FUNC \ 22 | # -DHAVE_SECTION_DATA_REL_RO 23 | # 24 | # if ENABLE_ARM_THUMB 25 | # libde265_arm_neon_la_CCASFLAGS += -DCONFIG_THUMB 26 | # endif 27 | # 28 | # #libde265_arm_neon_la_SOURCES = \ 29 | # # asm.S \ 30 | # # cpudetect.S \ 31 | # # hevcdsp_qpel_neon.S \ 32 | # # neon.S 33 | # 34 | # if HAVE_VISIBILITY 35 | # libde265_arm_neon_la_CXXFLAGS += -DHAVE_VISIBILITY 36 | # endif 37 | # 38 | # endif 39 | -------------------------------------------------------------------------------- /third-party/rav1e.cmd: -------------------------------------------------------------------------------- 1 | : # This install script was originally taken from libavif but might have been modified. 2 | 3 | : # If you want to enable the RAV1E encoder, please check that the WITH_RAV1E CMake variable is set correctly. 4 | : # You will also have to set the PKG_CONFIG_PATH to "third-party/rav1e/dist/lib/pkgconfig" so that the local RAV1E library is found. 5 | 6 | : # The odd choice of comment style in this file is to try to share this script between *nix and win32. 7 | 8 | : # cargo must be in your PATH. (use rustup or brew to install) 9 | 10 | : # If you're running this on Windows targeting Rust's windows-msvc, be sure you've already run this (from your VC2017 install dir): 11 | : # "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build\vcvars64.bat" 12 | : # 13 | : # Also, the error that "The target windows-msvc is not supported yet" can safely be ignored provided that rav1e/target/release 14 | : # contains rav1e.h and rav1e.lib. 15 | 16 | git clone -b 0.5 --depth 1 https://github.com/xiph/rav1e.git 17 | 18 | cd rav1e 19 | cargo install cargo-c 20 | cargo cinstall --crt-static --release --prefix="$(pwd)/dist" --library-type=staticlib 21 | cd .. 22 | -------------------------------------------------------------------------------- /libheif/plugins/encoder_svt.h: -------------------------------------------------------------------------------- 1 | /* 2 | * HEIF codec. 3 | * Copyright (c) 2022 Dirk Farin 4 | * 5 | * This file is part of libheif. 6 | * 7 | * libheif is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation, either version 3 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * libheif is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with libheif. If not, see . 19 | */ 20 | 21 | #ifndef LIBHEIF_ENCODER_SVT_H 22 | #define LIBHEIF_ENCODER_SVT_H 23 | 24 | #include "common_utils.h" 25 | 26 | const struct heif_encoder_plugin* get_encoder_plugin_svt(); 27 | 28 | #if PLUGIN_SvtEnc 29 | extern "C" { 30 | MAYBE_UNUSED LIBHEIF_API extern heif_plugin_info plugin_info; 31 | } 32 | #endif 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /third-party/libde265/build.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | if "%1" == "" goto all 3 | if /i %1 == x86 goto x86 4 | if /i %1 == x64 goto x64 5 | if /i %1 == amd64 goto x64 6 | goto all 7 | 8 | :all 9 | echo "Compiling libde265" 10 | cmd /c "%0" x86 11 | cmd /c "%0" x64 12 | pause 13 | goto :eof 14 | 15 | :x86 16 | echo "Compiling libde265 (x86)" 17 | call "%VS110COMNTOOLS%\..\..\VC\vcvarsall.bat" x86 18 | nmake -f Makefile.vc7 /nologo /s /c 19 | if not exist bin_x86\lib ( 20 | mkdir bin_x86\lib 21 | ) 22 | copy /y dec265\dec265.exe bin_x86\ 23 | copy /y enc265\enc265.exe bin_x86\ 24 | copy /y libde265\libde265.dll bin_x86\ 25 | copy /y libde265\libde265.lib bin_x86\lib\ 26 | copy /y libde265\libde265.exp bin_x86\lib\ 27 | goto exit 28 | 29 | :x64 30 | echo "Compiling libde265 (x64)" 31 | call "%VS110COMNTOOLS%\..\..\VC\vcvarsall.bat" x64 32 | nmake -f Makefile.vc7 /nologo /s /c 33 | if not exist bin_x64\lib ( 34 | mkdir bin_x64\lib 35 | ) 36 | copy /y dec265\dec265.exe bin_x64\ 37 | copy /y enc265\enc265.exe bin_x64\ 38 | copy /y libde265\libde265.dll bin_x64\ 39 | copy /y libde265\libde265.lib bin_x64\lib\ 40 | copy /y libde265\libde265.exp bin_x64\lib\ 41 | goto exit 42 | 43 | :exit 44 | -------------------------------------------------------------------------------- /third-party/libde265/dec265/COPYING: -------------------------------------------------------------------------------- 1 | 2 | MIT License 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE. 21 | -------------------------------------------------------------------------------- /third-party/libde265/enc265/COPYING: -------------------------------------------------------------------------------- 1 | 2 | MIT License 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE. 21 | -------------------------------------------------------------------------------- /libheif/plugins/decoder_aom.h: -------------------------------------------------------------------------------- 1 | /* 2 | * HEIF codec. 3 | * Copyright (c) 2017 Dirk Farin 4 | * 5 | * This file is part of libheif. 6 | * 7 | * libheif is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation, either version 3 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * libheif is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with libheif. If not, see . 19 | */ 20 | 21 | #ifndef LIBHEIF_DECODER_AOM_H 22 | #define LIBHEIF_DECODER_AOM_H 23 | 24 | #include "common_utils.h" 25 | 26 | const struct heif_decoder_plugin* get_decoder_plugin_aom(); 27 | 28 | #if PLUGIN_AOM_DECODER 29 | extern "C" { 30 | MAYBE_UNUSED LIBHEIF_API extern heif_plugin_info plugin_info; 31 | } 32 | #endif 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /libheif/plugins/decoder_dav1d.h: -------------------------------------------------------------------------------- 1 | /* 2 | * HEIF codec. 3 | * Copyright (c) 2017 Dirk Farin 4 | * 5 | * This file is part of libheif. 6 | * 7 | * libheif is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation, either version 3 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * libheif is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with libheif. If not, see . 19 | */ 20 | 21 | #ifndef LIBHEIF_DECODER_DAV1D_H 22 | #define LIBHEIF_DECODER_DAV1D_H 23 | 24 | #include "common_utils.h" 25 | 26 | const struct heif_decoder_plugin* get_decoder_plugin_dav1d(); 27 | 28 | #if PLUGIN_DAV1D 29 | extern "C" { 30 | MAYBE_UNUSED LIBHEIF_API extern heif_plugin_info plugin_info; 31 | } 32 | #endif 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /libheif/plugins/decoder_vvdec.h: -------------------------------------------------------------------------------- 1 | /* 2 | * HEIF codec. 3 | * Copyright (c) 2017 Dirk Farin 4 | * 5 | * This file is part of libheif. 6 | * 7 | * libheif is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation, either version 3 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * libheif is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with libheif. If not, see . 19 | */ 20 | 21 | #ifndef LIBHEIF_DECODER_VVDEC_H 22 | #define LIBHEIF_DECODER_VVDEC_H 23 | 24 | #include "common_utils.h" 25 | 26 | const struct heif_decoder_plugin* get_decoder_plugin_vvdec(); 27 | 28 | #if PLUGIN_VVDEC 29 | extern "C" { 30 | MAYBE_UNUSED LIBHEIF_API extern heif_plugin_info plugin_info; 31 | } 32 | #endif 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /libheif/plugins/encoder_aom.h: -------------------------------------------------------------------------------- 1 | /* 2 | * HEIF codec. 3 | * Copyright (c) 2017 Dirk Farin 4 | * 5 | * This file is part of libheif. 6 | * 7 | * libheif is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation, either version 3 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * libheif is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with libheif. If not, see . 19 | */ 20 | 21 | #ifndef LIBHEIF_ENCODER_AOM_H 22 | #define LIBHEIF_ENCODER_AOM_H 23 | 24 | #include "common_utils.h" 25 | 26 | const struct heif_encoder_plugin* get_encoder_plugin_aom(); 27 | 28 | #if PLUGIN_AOM_ENCODER 29 | extern "C" { 30 | MAYBE_UNUSED LIBHEIF_API extern heif_plugin_info plugin_info; 31 | } 32 | #endif 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /libheif/plugins/encoder_rav1e.h: -------------------------------------------------------------------------------- 1 | /* 2 | * HEIF codec. 3 | * Copyright (c) 2017 Dirk Farin 4 | * 5 | * This file is part of libheif. 6 | * 7 | * libheif is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation, either version 3 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * libheif is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with libheif. If not, see . 19 | */ 20 | 21 | #ifndef LIBHEIF_ENCODER_RAV1E_H 22 | #define LIBHEIF_ENCODER_RAV1E_H 23 | 24 | #include "common_utils.h" 25 | 26 | const struct heif_encoder_plugin* get_encoder_plugin_rav1e(); 27 | 28 | #if PLUGIN_RAV1E 29 | extern "C" { 30 | MAYBE_UNUSED LIBHEIF_API extern heif_plugin_info plugin_info; 31 | } 32 | #endif 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /libheif/plugins/encoder_vvenc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * HEIF codec. 3 | * Copyright (c) 2023 Dirk Farin 4 | * 5 | * This file is part of libheif. 6 | * 7 | * libheif is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation, either version 3 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * libheif is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with libheif. If not, see . 19 | */ 20 | 21 | #ifndef LIBHEIF_ENCODER_VVENC_H 22 | #define LIBHEIF_ENCODER_VVENC_H 23 | 24 | #include "common_utils.h" 25 | 26 | const struct heif_encoder_plugin* get_encoder_plugin_vvenc(); 27 | 28 | #if PLUGIN_VVENC 29 | extern "C" { 30 | MAYBE_UNUSED LIBHEIF_API extern heif_plugin_info plugin_info; 31 | } 32 | #endif 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /third-party/libde265/sherlock265/COPYING: -------------------------------------------------------------------------------- 1 | 2 | MIT License 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE. 21 | -------------------------------------------------------------------------------- /libheif/plugins/decoder_jpeg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * HEIF codec. 3 | * Copyright (c) 2023 Dirk Farin 4 | * 5 | * This file is part of libheif. 6 | * 7 | * libheif is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation, either version 3 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * libheif is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with libheif. If not, see . 19 | */ 20 | 21 | #ifndef LIBHEIF_DECODER_JPEG_H 22 | #define LIBHEIF_DECODER_JPEG_H 23 | 24 | #include "common_utils.h" 25 | 26 | const struct heif_decoder_plugin* get_decoder_plugin_jpeg(); 27 | 28 | #if PLUGIN_JPEG_DECODER 29 | extern "C" { 30 | MAYBE_UNUSED LIBHEIF_API extern heif_plugin_info plugin_info; 31 | } 32 | #endif 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /libheif/plugins/encoder_jpeg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * HEIF codec. 3 | * Copyright (c) 2023 Dirk Farin 4 | * 5 | * This file is part of libheif. 6 | * 7 | * libheif is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation, either version 3 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * libheif is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with libheif. If not, see . 19 | */ 20 | 21 | #ifndef LIBHEIF_ENCODER_JPEG_H 22 | #define LIBHEIF_ENCODER_JPEG_H 23 | 24 | #include "common_utils.h" 25 | 26 | const struct heif_encoder_plugin* get_encoder_plugin_jpeg(); 27 | 28 | #if PLUGIN_JPEG_ENCODER 29 | extern "C" { 30 | MAYBE_UNUSED LIBHEIF_API extern heif_plugin_info plugin_info; 31 | } 32 | #endif 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /libheif/plugins/decoder_libde265.h: -------------------------------------------------------------------------------- 1 | /* 2 | * HEIF codec. 3 | * Copyright (c) 2017 Dirk Farin 4 | * 5 | * This file is part of libheif. 6 | * 7 | * libheif is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation, either version 3 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * libheif is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with libheif. If not, see . 19 | */ 20 | 21 | #ifndef LIBHEIF_HEIF_DECODER_DE265_H 22 | #define LIBHEIF_HEIF_DECODER_DE265_H 23 | 24 | #include "common_utils.h" 25 | 26 | const struct heif_decoder_plugin* get_decoder_plugin_libde265(); 27 | 28 | #if PLUGIN_LIBDE265 29 | extern "C" { 30 | MAYBE_UNUSED LIBHEIF_API extern heif_plugin_info plugin_info; 31 | } 32 | #endif 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /libheif/plugins/decoder_ffmpeg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * HEIF codec. 3 | * Copyright (c) 2023 Dirk Farin 4 | * 5 | * This file is part of libheif. 6 | * 7 | * libheif is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation, either version 3 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * libheif is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with libheif. If not, see . 19 | */ 20 | 21 | #ifndef LIBHEIF_HEIF_DECODER_FFMPEG_H 22 | #define LIBHEIF_HEIF_DECODER_FFMPEG_H 23 | 24 | #include "common_utils.h" 25 | 26 | const struct heif_decoder_plugin* get_decoder_plugin_ffmpeg(); 27 | 28 | #if PLUGIN_FFMPEG_DECODER 29 | extern "C" { 30 | MAYBE_UNUSED LIBHEIF_API extern heif_plugin_info plugin_info; 31 | } 32 | #endif 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /third-party/libde265/autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -eu 3 | # 4 | # H.265 video codec. 5 | # Copyright (c) 2013 struktur AG, Joachim Bauch 6 | # 7 | # This file is part of libde265. 8 | # 9 | # libde265 is free software: you can redistribute it and/or modify 10 | # it under the terms of the GNU General Public License as published by 11 | # the Free Software Foundation, either version 3 of the License, or 12 | # (at your option) any later version. 13 | # 14 | # libde265 is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | # GNU General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU General Public License 20 | # along with libde265. If not, see . 21 | # 22 | if [ -x "`which autoreconf 2>/dev/null`" ] ; then 23 | exec autoreconf -ivf 24 | fi 25 | 26 | LIBTOOLIZE=libtoolize 27 | SYSNAME=`uname` 28 | if [ "x$SYSNAME" = "xDarwin" ] ; then 29 | LIBTOOLIZE=glibtoolize 30 | fi 31 | aclocal -I m4 && \ 32 | autoheader && \ 33 | $LIBTOOLIZE && \ 34 | autoconf && \ 35 | automake --add-missing --force-missing --copy 36 | -------------------------------------------------------------------------------- /cmake/modules/FindAOM.cmake: -------------------------------------------------------------------------------- 1 | include(LibFindMacros) 2 | include(CheckSymbolExists) 3 | 4 | libfind_pkg_check_modules(AOM_PKGCONF aom) 5 | 6 | find_path(AOM_INCLUDE_DIR 7 | NAMES aom/aom_decoder.h aom/aom_encoder.h 8 | HINTS ${AOM_PKGCONF_INCLUDE_DIRS} ${AOM_PKGCONF_INCLUDEDIR} 9 | PATH_SUFFIXES AOM 10 | ) 11 | 12 | list(APPEND CMAKE_REQUIRED_INCLUDES ${AOM_INCLUDE_DIR}) 13 | check_symbol_exists(AOM_USAGE_GOOD_QUALITY aom/aom_encoder.h aom_usage_flag_exists) 14 | unset(CMAKE_REQUIRED_INCLUDES) 15 | 16 | find_library(AOM_LIBRARY 17 | NAMES libaom aom 18 | HINTS ${AOM_PKGCONF_LIBRARY_DIRS} ${AOM_PKGCONF_LIBDIR} 19 | ) 20 | 21 | if(EXISTS "${AOM_INCLUDE_DIR}/aom/aom_decoder.h") 22 | set(AOM_DECODER_FOUND YES) 23 | else() 24 | set(AOM_DECODER_FOUND NO) 25 | endif() 26 | 27 | if((EXISTS "${AOM_INCLUDE_DIR}/aom/aom_encoder.h") AND "${aom_usage_flag_exists}") 28 | set(AOM_ENCODER_FOUND YES) 29 | else() 30 | set(AOM_ENCODER_FOUND NO) 31 | endif() 32 | 33 | set(AOM_PROCESS_LIBS AOM_LIBRARY) 34 | set(AOM_PROCESS_INCLUDES AOM_INCLUDE_DIR) 35 | libfind_process(AOM) 36 | 37 | include(FindPackageHandleStandardArgs) 38 | find_package_handle_standard_args(AOM 39 | REQUIRED_VARS 40 | AOM_INCLUDE_DIR 41 | AOM_LIBRARIES 42 | ) 43 | -------------------------------------------------------------------------------- /libheif/plugins/encoder_openjpeg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * OpenJPEG codec. 3 | * Copyright (c) 2023 Devon Sookhoo 4 | * Copyright (c) 2023 Dirk Farin 5 | * 6 | * This file is part of libheif. 7 | * 8 | * libheif is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Lesser General Public License as 10 | * published by the Free Software Foundation, either version 3 of 11 | * the License, or (at your option) any later version. 12 | * 13 | * libheif is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public License 19 | * along with libheif. If not, see . 20 | */ 21 | 22 | #ifndef LIBHEIF_ENCODER_OPENJPEG_H 23 | #define LIBHEIF_ENCODER_OPENJPEG_H 24 | 25 | #include "common_utils.h" 26 | 27 | 28 | const struct heif_encoder_plugin* get_encoder_plugin_openjpeg(); 29 | 30 | #if PLUGIN_OPENJPEG_ENCODER 31 | extern "C" { 32 | MAYBE_UNUSED LIBHEIF_API extern heif_plugin_info plugin_info; 33 | } 34 | #endif 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /cmake/modules/FindLibde265.cmake: -------------------------------------------------------------------------------- 1 | include(LibFindMacros) 2 | libfind_pkg_check_modules(LIBDE265_PKGCONF libde265) 3 | 4 | find_path(LIBDE265_INCLUDE_DIR 5 | NAMES libde265/de265.h 6 | HINTS ${LIBDE265_PKGCONF_INCLUDE_DIRS} ${LIBDE265_PKGCONF_INCLUDEDIR} 7 | PATH_SUFFIXES DE265 8 | ) 9 | 10 | find_library(LIBDE265_LIBRARY 11 | NAMES libde265 de265 12 | HINTS ${LIBDE265_PKGCONF_LIBRARY_DIRS} ${LIBDE265_PKGCONF_LIBDIR} 13 | ) 14 | 15 | set(LIBDE265_PROCESS_LIBS ${LIBDE265_LIBRARY}) 16 | set(LIBDE265_PROCESS_INCLUDES ${LIBDE265_INCLUDE_DIR}) 17 | libfind_process(LIBDE265) 18 | 19 | if(LIBDE265_INCLUDE_DIR) 20 | set(libde265_config_file "${LIBDE265_INCLUDE_DIR}/libde265/de265-version.h") 21 | if(EXISTS ${libde265_config_file}) 22 | file(STRINGS 23 | ${libde265_config_file} 24 | TMP 25 | REGEX "#define LIBDE265_VERSION .*$") 26 | string(REGEX REPLACE "#define LIBDE265_VERSION" "" TMP ${TMP}) 27 | string(REGEX MATCHALL "[0-9.]+" LIBDE265_VERSION ${TMP}) 28 | endif() 29 | endif() 30 | 31 | include(FindPackageHandleStandardArgs) 32 | find_package_handle_standard_args(LIBDE265 33 | REQUIRED_VARS 34 | LIBDE265_INCLUDE_DIRS 35 | LIBDE265_LIBRARIES 36 | VERSION_VAR 37 | LIBDE265_VERSION 38 | ) 39 | -------------------------------------------------------------------------------- /libheif/plugins/encoder_mask.h: -------------------------------------------------------------------------------- 1 | /* 2 | * HEIF codec. 3 | * Copyright (c) 2017 Dirk Farin 4 | * 5 | * This file is part of libheif. 6 | * 7 | * libheif is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation, either version 3 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * libheif is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with libheif. If not, see . 19 | */ 20 | 21 | #ifndef LIBHEIF_ENCODER_MASK_H 22 | #define LIBHEIF_ENCODER_MASK_H 23 | 24 | #include "common_utils.h" 25 | 26 | // This is a dummy module. It does not actually do anything except parameter parsing. 27 | // The actual codec is included in the library. 28 | 29 | struct encoder_struct_mask 30 | { 31 | }; 32 | 33 | 34 | const struct heif_encoder_plugin* get_encoder_plugin_mask(); 35 | 36 | #endif //LIBHEIF_ENCODER_MASK_H 37 | -------------------------------------------------------------------------------- /libheif/plugins/decoder_openjpeg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * OpenJPEG codec. 3 | * Copyright (c) 2023 Devon Sookhoo 4 | * Copyright (c) 2023 Dirk Farin 5 | * 6 | * This file is part of libheif. 7 | * 8 | * libheif is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Lesser General Public License as 10 | * published by the Free Software Foundation, either version 3 of 11 | * the License, or (at your option) any later version. 12 | * 13 | * libheif is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public License 19 | * along with libheif. If not, see . 20 | */ 21 | 22 | #ifndef LIBHEIF_DECODER_OPENJPEG_H 23 | #define LIBHEIF_DECODER_OPENJPEG_H 24 | 25 | #include "common_utils.h" 26 | 27 | const struct heif_decoder_plugin* get_decoder_plugin_openjpeg(); 28 | 29 | 30 | #if PLUGIN_OPENJPEG_DECODER 31 | extern "C" { 32 | MAYBE_UNUSED LIBHEIF_API extern heif_plugin_info plugin_info; 33 | } 34 | #endif 35 | 36 | #endif //LIBHEIF_DECODER_OPENJPEG_H 37 | -------------------------------------------------------------------------------- /libheif/plugins/encoder_openjph.h: -------------------------------------------------------------------------------- 1 | /* 2 | * OpenJPH codec. 3 | * Copyright (c) 2023 Devon Sookhoo 4 | * Copyright (c) 2023 Dirk Farin 5 | * Copyright (C) 2024 Brad Hards 6 | * 7 | * This file is part of libheif. 8 | * 9 | * libheif is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU Lesser General Public License as 11 | * published by the Free Software Foundation, either version 3 of 12 | * the License, or (at your option) any later version. 13 | * 14 | * libheif is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU Lesser General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Lesser General Public License 20 | * along with libheif. If not, see . 21 | */ 22 | 23 | #ifndef LIBHEIF_ENCODER_OPENJPH_H 24 | #define LIBHEIF_ENCODER_OPENJPH_H 25 | 26 | #include "common_utils.h" 27 | 28 | 29 | const struct heif_encoder_plugin* get_encoder_plugin_openjph(); 30 | 31 | #if PLUGIN_OPENJPH_ENCODER 32 | extern "C" { 33 | MAYBE_UNUSED LIBHEIF_API extern heif_plugin_info plugin_info; 34 | } 35 | #endif 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /third-party/libde265/libde265/de265-version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * H.265 video codec. 3 | * Copyright (c) 2013-2014 struktur AG, Dirk Farin 4 | * 5 | * This file is part of libde265. 6 | * 7 | * libde265 is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation, either version 3 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * libde265 is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with libde265. If not, see . 19 | */ 20 | 21 | /* de265-version.h 22 | * 23 | * This file was generated by autoconf when libde265 was built. 24 | * 25 | * DO NOT EDIT THIS FILE. 26 | */ 27 | #ifndef LIBDE265_VERSION_H 28 | #define LIBDE265_VERSION_H 29 | 30 | /* Numeric representation of the version */ 31 | #define LIBDE265_NUMERIC_VERSION 0x01000800 32 | 33 | /* Version string */ 34 | #define LIBDE265_VERSION "1.0.8" 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | # stats available at 2 | # https://ci.appveyor.com/project/strukturag/libheif 3 | image: Visual Studio 2022 4 | configuration: Release 5 | cache: c:\tools\vcpkg\installed\ 6 | 7 | environment: 8 | matrix: 9 | - arch: x64 10 | - arch: arm64 11 | 12 | install: 13 | - vcpkg install aom:%arch%-windows 14 | - vcpkg install dav1d:%arch%-windows 15 | - vcpkg install ffmpeg[avcodec]:%arch%-windows 16 | - vcpkg install libde265:%arch%-windows 17 | - vcpkg install libjpeg-turbo:%arch%-windows 18 | - vcpkg install libpng:%arch%-windows 19 | - vcpkg install tiff:%arch%-windows 20 | - ps: If (${env:arch} -eq "x64") { vcpkg install x265:${env:arch}-windows } 21 | - vcpkg install zlib:%arch%-windows 22 | - cd c:\tools\vcpkg 23 | - vcpkg integrate install 24 | - cd %APPVEYOR_BUILD_FOLDER% 25 | 26 | before_build: 27 | - mkdir build 28 | - cd build 29 | - cmake .. -A %arch% -DCMAKE_TOOLCHAIN_FILE=c:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake -DWITH_DAV1D=ON -DWITH_AOM_DECODER=ON -DWITH_AOM_ENCODER=ON -DWITH_JPEG_DECODER=ON -DWITH_JPEG_ENCODER=ON -DWITH_UNCOMPRESSED_CODEC=ON -DWITH_HEADER_COMPRESSION=ON -DWITH_FFMPEG_DECODER=ON 30 | 31 | build: 32 | verbosity: normal 33 | 34 | artifacts: 35 | - path: build 36 | - path: build\**\Release\*.exe 37 | - path: build\**\Release\*.dll 38 | -------------------------------------------------------------------------------- /tests/main.cc: -------------------------------------------------------------------------------- 1 | /* 2 | libheif unit tests 3 | 4 | MIT License 5 | 6 | Copyright (c) 2019 Dirk Farin 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in all 16 | copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | SOFTWARE. 25 | */ 26 | 27 | #define CATCH_CONFIG_MAIN 28 | #include "catch.hpp" 29 | -------------------------------------------------------------------------------- /third-party/aom.cmd: -------------------------------------------------------------------------------- 1 | : # This install script was originally taken from libavif but might have been modified. 2 | 3 | : # If you want to enable the AOM encoder, please check that the WITH_AOM CMake variable is set correctly. 4 | : # You will also have to set the PKG_CONFIG_PATH to "third-party/aom/dist/lib/pkgconfig" so that the local AOM library is found. 5 | 6 | : # The odd choice of comment style in this file is to try to share this script between *nix and win32. 7 | 8 | : # cmake and ninja must be in your PATH. 9 | 10 | : # If you're running this on Windows, be sure you've already run this (from your VC2019 install dir): 11 | : # "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars64.bat" 12 | 13 | git clone -b v3.9.1 --depth 1 https://aomedia.googlesource.com/aom 14 | 15 | cd aom 16 | 17 | cmake -S . -B build.libavif -G Ninja -DCMAKE_INSTALL_PREFIX="$(pwd)/dist" -DCMAKE_BUILD_TYPE=Release -DENABLE_DOCS=0 -DENABLE_EXAMPLES=0 -DENABLE_TESTDATA=0 -DENABLE_TESTS=0 -DENABLE_TOOLS=0 18 | ninja -C build.libavif 19 | ninja -C build.libavif install 20 | cd .. 21 | 22 | echo "" 23 | echo "----- NOTE ----" 24 | echo "Please add the path to the pkg-config file to your PKG_CONFIG_PATH, like this:" 25 | echo "export PKG_CONFIG_PATH=\$PKG_CONFIG_PATH:$(pwd)/aom/dist/lib/pkgconfig" 26 | -------------------------------------------------------------------------------- /third-party/libde265/acceleration-speed/dct-scalar.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * H.265 video codec. 3 | * Copyright (c) 2015 struktur AG, Dirk Farin 4 | * 5 | * This file is part of libde265. 6 | * 7 | * libde265 is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * libde265 is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with libde265. If not, see . 19 | */ 20 | 21 | #include "dct-scalar.h" 22 | 23 | 24 | DSPFunc_FDCT_Scalar_4x4 fdct_scalar_4x4; 25 | DSPFunc_FDCT_Scalar_8x8 fdct_scalar_8x8; 26 | DSPFunc_FDCT_Scalar_16x16 fdct_scalar_16x16; 27 | DSPFunc_FDCT_Scalar_32x32 fdct_scalar_32x32; 28 | 29 | 30 | DSPFunc_IDCT_Scalar_4x4 idct_scalar_4x4; 31 | DSPFunc_IDCT_Scalar_8x8 idct_scalar_8x8; 32 | DSPFunc_IDCT_Scalar_16x16 idct_scalar_16x16; 33 | DSPFunc_IDCT_Scalar_32x32 idct_scalar_32x32; 34 | -------------------------------------------------------------------------------- /third-party/libde265/libde265/de265-version.h.in: -------------------------------------------------------------------------------- 1 | /* 2 | * H.265 video codec. 3 | * Copyright (c) 2013-2014 struktur AG, Dirk Farin 4 | * 5 | * This file is part of libde265. 6 | * 7 | * libde265 is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation, either version 3 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * libde265 is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with libde265. If not, see . 19 | */ 20 | 21 | /* de265-version.h 22 | * 23 | * This file was generated by autoconf when libde265 was built. 24 | * 25 | * DO NOT EDIT THIS FILE. 26 | */ 27 | #ifndef LIBDE265_VERSION_H 28 | #define LIBDE265_VERSION_H 29 | 30 | /* Numeric representation of the version */ 31 | #define LIBDE265_NUMERIC_VERSION @NUMERIC_VERSION@ 32 | 33 | /* Version string */ 34 | #define LIBDE265_VERSION "@PACKAGE_VERSION@" 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /third-party/libde265/appveyor.yml: -------------------------------------------------------------------------------- 1 | # stats available at 2 | # https://ci.appveyor.com/project/strukturag/libde265 3 | version: 1.0.{build} 4 | 5 | os: 6 | - Windows Server 2012 R2 7 | 8 | environment: 9 | matrix: 10 | - GENERATOR: "Visual Studio 11 2012" 11 | - GENERATOR: "Visual Studio 12 2013" 12 | 13 | platform: 14 | - x86 15 | - x64 16 | 17 | configuration: 18 | - Debug 19 | 20 | build: 21 | verbosity: normal 22 | 23 | install: 24 | - git clone https://github.com/strukturag/libde265-data.git 25 | 26 | build_script: 27 | - ps: if($env:PLATFORM -eq "x64") { $env:CMAKE_GEN_SUFFIX=" Win64" } 28 | - cmake "-G%GENERATOR%%CMAKE_GEN_SUFFIX%" -H. -Bbuild 29 | - cmake --build build --config %CONFIGURATION% 30 | 31 | before_test: 32 | - copy /y build\dec265\%CONFIGURATION%\dec265.exe build 33 | - copy /y build\enc265\%CONFIGURATION%\enc265.exe build 34 | - copy /y build\libde265\%CONFIGURATION%\libde265.dll build 35 | 36 | test_script: 37 | - build\dec265.exe -q -c -f 100 libde265-data\IDR-only\paris-352x288-intra.bin 38 | - build\dec265.exe -t 4 -q -c -f 100 libde265-data\IDR-only\paris-352x288-intra.bin 39 | - build\dec265.exe -q -c -f 100 libde265-data\RandomAccess\paris-ra-wpp.bin 40 | - build\dec265.exe -t 4 -q -c -f 100 libde265-data\RandomAccess\paris-ra-wpp.bin 41 | 42 | artifacts: 43 | - path: build 44 | -------------------------------------------------------------------------------- /tests/test-config.cc.in: -------------------------------------------------------------------------------- 1 | /* 2 | libheif unit tests 3 | 4 | MIT License 5 | 6 | Copyright (c) 2023 struktur AG, Dirk Farin 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in all 16 | copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | SOFTWARE. 25 | */ 26 | 27 | #include 28 | 29 | std::string tests_data_directory = "@TESTING_DATA_DIRECTORY@"; 30 | -------------------------------------------------------------------------------- /third-party/libde265/sherlock265/README: -------------------------------------------------------------------------------- 1 | 2 | description of graphical overlays 3 | --------------------------------- 4 | 5 | CB - Show Coding Block quadtree structure. Prediction modes are 6 | signalled at this level. CBs can be further subdivided into 7 | PBs for prediction and TBs for residual transforms. 8 | 9 | PB - Show Prediction Block structure. CB blocks may be further 10 | subdivided, possibly using asymetric partitionings. This is 11 | the level on which motion-compensation and intra-prediction is 12 | performed. 13 | 14 | TB - Show Transformation Block structure. DCT/DSTs are carried out 15 | on this level. 16 | 17 | QP - Quantization Parameter shown as greyscale value. 18 | Brighter blocks for larger QP values (lower quality). 19 | 20 | IntraPred - Show intra prediction mode. 21 | * Directional prediction is depicted with a line in the prediction direction 22 | (out of 32 possible directions) 23 | * Planar prediction is depicted by a square. 24 | * DC prediction is depicted by a circle. 25 | 26 | PredMode - Show prediction mode. 27 | * red: intra 28 | * blue: inter 29 | * green: skip = inter mode with no PB subdivision and candidate from merge list 30 | 31 | MV - Show motion vectors. Vectors from list L0 are drawn in red, 32 | motion vectors from L1 are green. Vectors are magnified by a factor of 4. 33 | -------------------------------------------------------------------------------- /examples/common.h: -------------------------------------------------------------------------------- 1 | /* 2 | libheif example application "heif". 3 | 4 | MIT License 5 | 6 | Copyright (c) 2023 Dirk Farin 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in all 16 | copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | SOFTWARE. 25 | */ 26 | 27 | #ifndef LIBHEIF_COMMON_H 28 | #define LIBHEIF_COMMON_H 29 | 30 | void show_version(); 31 | 32 | #endif //LIBHEIF_COMMON_H 33 | -------------------------------------------------------------------------------- /third-party/libde265/libde265/sao.h: -------------------------------------------------------------------------------- 1 | /* 2 | * H.265 video codec. 3 | * Copyright (c) 2013-2014 struktur AG, Dirk Farin 4 | * 5 | * This file is part of libde265. 6 | * 7 | * libde265 is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation, either version 3 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * libde265 is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with libde265. If not, see . 19 | */ 20 | 21 | #ifndef DE265_SAO_H 22 | #define DE265_SAO_H 23 | 24 | #include "libde265/decctx.h" 25 | 26 | void apply_sample_adaptive_offset(de265_image* img); 27 | 28 | /* requires less memory than the function above */ 29 | void apply_sample_adaptive_offset_sequential(de265_image* img); 30 | 31 | /* saoInputProgress - the CTB progress that SAO will wait for before beginning processing. 32 | Returns 'true' if any tasks have been added. 33 | */ 34 | bool add_sao_tasks(image_unit* imgunit, int saoInputProgress); 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /third-party/libde265/sherlock265/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | bin_PROGRAMS = sherlock265 3 | 4 | AM_CPPFLAGS = -I../libde265 5 | 6 | sherlock265_DEPENDENCIES = ../libde265/libde265.la 7 | sherlock265_CXXFLAGS = $(QT_CFLAGS) -std=c++0x -fPIC 8 | sherlock265_LDFLAGS = $(QT_LIBS) 9 | sherlock265_LDADD = ../libde265/libde265.la -lstdc++ -lpthread 10 | sherlock265_SOURCES = \ 11 | sherlock265.cc \ 12 | VideoPlayer.cc \ 13 | VideoDecoder.cc \ 14 | VideoWidget.cc \ 15 | VideoPlayer.hh \ 16 | VideoDecoder.hh \ 17 | VideoWidget.hh 18 | 19 | nodist_sherlock265_SOURCES = \ 20 | moc_VideoPlayer.cpp \ 21 | moc_VideoDecoder.cpp \ 22 | moc_VideoWidget.cpp 23 | 24 | CLEANFILES = \ 25 | moc_VideoPlayer.cpp \ 26 | moc_VideoDecoder.cpp \ 27 | moc_VideoWidget.cpp 28 | 29 | if HAVE_VIDEOGFX 30 | sherlock265_CXXFLAGS += $(VIDEOGFX_CFLAGS) 31 | sherlock265_LDFLAGS += $(VIDEOGFX_LIBS) 32 | endif 33 | 34 | if HAVE_SWSCALE 35 | sherlock265_CXXFLAGS += $(SWSCALE_CFLAGS) 36 | sherlock265_LDFLAGS += $(SWSCALE_LIBS) 37 | endif 38 | 39 | moc_VideoWidget.cpp: VideoWidget.hh 40 | $(QTMOC) $(DEFINES) $(INCPATH) VideoWidget.hh -o moc_VideoWidget.cpp 41 | 42 | moc_VideoPlayer.cpp: VideoPlayer.hh 43 | $(QTMOC) $(DEFINES) $(INCPATH) VideoPlayer.hh -o moc_VideoPlayer.cpp 44 | 45 | moc_VideoDecoder.cpp: VideoDecoder.hh 46 | $(QTMOC) $(DEFINES) $(INCPATH) VideoDecoder.hh -o moc_VideoDecoder.cpp 47 | 48 | EXTRA_DIST = \ 49 | README 50 | -------------------------------------------------------------------------------- /third-party/libde265/libde265/encoder/encoder-motion.h: -------------------------------------------------------------------------------- 1 | /* 2 | * H.265 video codec. 3 | * Copyright (c) 2013-2014 struktur AG, Dirk Farin 4 | * 5 | * This file is part of libde265. 6 | * 7 | * libde265 is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation, either version 3 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * libde265 is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with libde265. If not, see . 19 | */ 20 | 21 | #ifndef DE265_ENCODER_MOTION_H 22 | #define DE265_ENCODER_MOTION_H 23 | 24 | #include "libde265/motion.h" 25 | 26 | void get_merge_candidate_list_from_tree(class encoder_context* ectx, 27 | const slice_segment_header* shdr, 28 | int xC,int yC, int xP,int yP, 29 | int nCS, int nPbW,int nPbH, int partIdx, 30 | PBMotion* mergeCandList); 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /third-party/dav1d.cmd: -------------------------------------------------------------------------------- 1 | : # This install script was originally taken from libavif but might have been modified. 2 | 3 | : # If you want to enable the DAV1D decoder, please check that the WITH_DAV1D CMake variable is set correctly. 4 | : # You will also have to set the PKG_CONFIG_PATH to "third-party/dav1d/dist/lib/x86_64-linux-gnu/pkgconfig" so that the local DAV1D library is found. 5 | 6 | : # The odd choice of comment style in this file is to try to share this script between *nix and win32. 7 | 8 | : # meson and ninja must be in your PATH. 9 | 10 | : # If you're running this on Windows, be sure you've already run this (from your VC2019 install dir): 11 | : # "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars64.bat" 12 | 13 | git clone -b 1.4.3 --depth 1 https://code.videolan.org/videolan/dav1d.git 14 | 15 | cd dav1d 16 | 17 | : # macOS might require: -Dc_args=-fno-stack-check 18 | : # Build with asan: -Db_sanitize=address 19 | : # Build with ubsan: -Db_sanitize=undefined 20 | meson build --default-library=static --buildtype release --prefix "$(pwd)/dist" $@ 21 | ninja -C build 22 | ninja -C build install 23 | cd .. 24 | 25 | echo "" 26 | echo "----- NOTE ----" 27 | echo "Please add the path to the pkg-config file to your PKG_CONFIG_PATH. For" 28 | echo "example, on Linux x86_64, run:" 29 | echo "export PKG_CONFIG_PATH=\$PKG_CONFIG_PATH:$(pwd)/dav1d/dist/lib/x86_64-linux-gnu/pkgconfig" 30 | -------------------------------------------------------------------------------- /android_jni/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | # org.gradle.parallel=true 14 | # AndroidX package structure to make it clearer which packages are bundled with the 15 | # Android operating system, and which are packaged with your app"s APK 16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 17 | android.useAndroidX=true 18 | # Kotlin code style for this project: "official" or "obsolete": 19 | kotlin.code.style=official 20 | # Enables namespacing of each library's R class so that its R class includes only the 21 | # resources declared in the library itself and none from the library's dependencies, 22 | # thereby reducing the size of the R class for that library 23 | android.nonTransitiveRClass=true -------------------------------------------------------------------------------- /scripts/configure-fuzzer.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # HEIF codec. 4 | # Copyright (c) 2018 struktur AG, Joachim Bauch 5 | # 6 | # This file is part of libheif. 7 | # 8 | # libheif is free software: you can redistribute it and/or modify 9 | # it under the terms of the GNU General Public License as published by 10 | # the Free Software Foundation, either version 3 of the License, or 11 | # (at your option) any later version. 12 | # 13 | # libheif is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | # 18 | # You should have received a copy of the GNU General Public License 19 | # along with libheif. If not, see . 20 | # 21 | 22 | FUZZER_FLAGS="-fsanitize=fuzzer-no-link,address,shift,integer -fno-sanitize-recover=shift,integer" # ,undefined 23 | export CFLAGS="$CFLAGS $FUZZER_FLAGS" 24 | export CXXFLAGS="$CXXFLAGS $FUZZER_FLAGS" 25 | export CXX=clang-7 26 | export CC=clang-7 27 | 28 | CONFIGURE_ARGS="$CONFIGURE_ARGS --disable-go" 29 | CONFIGURE_ARGS="$CONFIGURE_ARGS --enable-libfuzzer=-fsanitize=fuzzer" 30 | exec ./configure $CONFIGURE_ARGS 31 | 32 | export TSAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer-7 33 | export MSAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer-7 34 | export ASAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer-7 35 | -------------------------------------------------------------------------------- /examples/decoder_y4m.h: -------------------------------------------------------------------------------- 1 | /* 2 | libheif example application "heif". 3 | 4 | MIT License 5 | 6 | Copyright (c) 2023 Dirk Farin 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in all 16 | copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | SOFTWARE. 25 | */ 26 | 27 | #ifndef LIBHEIF_DECODER_Y4M_H 28 | #define LIBHEIF_DECODER_Y4M_H 29 | 30 | #include "decoder.h" 31 | 32 | InputImage loadY4M(const char* filename); 33 | 34 | #endif //LIBHEIF_DECODER_Y4M_H 35 | -------------------------------------------------------------------------------- /examples/decoder_jpeg.h: -------------------------------------------------------------------------------- 1 | /* 2 | libheif example application "heif". 3 | 4 | MIT License 5 | 6 | Copyright (c) 2023 Dirk Farin 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in all 16 | copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | SOFTWARE. 25 | */ 26 | 27 | #ifndef LIBHEIF_DECODER_JPEG_H 28 | #define LIBHEIF_DECODER_JPEG_H 29 | 30 | #include "decoder.h" 31 | 32 | InputImage loadJPEG(const char* filename); 33 | 34 | #endif //LIBHEIF_DECODER_JPEG_H 35 | -------------------------------------------------------------------------------- /examples/decoder_tiff.h: -------------------------------------------------------------------------------- 1 | /* 2 | libheif example application "heif". 3 | 4 | MIT License 5 | 6 | Copyright (c) 2024 Joachim Bauch 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in all 16 | copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | SOFTWARE. 25 | */ 26 | 27 | #ifndef LIBHEIF_DECODER_TIFF_H 28 | #define LIBHEIF_DECODER_TIFF_H 29 | 30 | #include "decoder.h" 31 | 32 | InputImage loadTIFF(const char* filename); 33 | 34 | #endif //LIBHEIF_DECODER_TIFF_H 35 | -------------------------------------------------------------------------------- /android_jni/demo/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 15 | 16 | 17 | 24 | 25 | 31 | 32 | 39 | -------------------------------------------------------------------------------- /examples/decoder_png.h: -------------------------------------------------------------------------------- 1 | /* 2 | libheif example application "heif". 3 | 4 | MIT License 5 | 6 | Copyright (c) 2023 Dirk Farin 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in all 16 | copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | SOFTWARE. 25 | */ 26 | 27 | #ifndef LIBHEIF_DECODER_PNG_H 28 | #define LIBHEIF_DECODER_PNG_H 29 | 30 | #include "decoder.h" 31 | 32 | InputImage loadPNG(const char* filename, int output_bit_depth); 33 | 34 | #endif //LIBHEIF_DECODER_PNG_H 35 | -------------------------------------------------------------------------------- /android_jni/app/src/main/include/libheif/heif_version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * HEIF codec. 3 | * Copyright (c) 2017 Dirk Farin 4 | * 5 | * This file is part of libheif. 6 | * 7 | * libheif is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation, either version 3 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * libheif is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with libheif. If not, see . 19 | */ 20 | 21 | /* heif_version.h 22 | * 23 | * This file was automatically generated when libheif was built. 24 | * 25 | * DO NOT EDIT THIS FILE. 26 | */ 27 | #ifndef LIBHEIF_HEIF_VERSION_H 28 | #define LIBHEIF_HEIF_VERSION_H 29 | 30 | /* Numeric representation of the version */ 31 | #define LIBHEIF_NUMERIC_VERSION ((1<<24) | (18<<16) | (0<<8) | 0) 32 | 33 | /* Version string */ 34 | #define LIBHEIF_VERSION "1.18.0b" 35 | 36 | #define LIBHEIF_PLUGIN_DIRECTORY "/Users/qianchao.cw/Documents/project/06_storage_service/002_Dec/heif_git/CrossCompAndroid/lib/libheif/lib/libheif" 37 | 38 | #endif // LIBHEIF_HEIF_VERSION_H 39 | -------------------------------------------------------------------------------- /fuzzing/box_fuzzer.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * HEIF codec. 3 | * Copyright (c) 2017 struktur AG, Joachim Bauch 4 | * 5 | * This file is part of libheif. 6 | * 7 | * libheif is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation, either version 3 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * libheif is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with libheif. If not, see . 19 | */ 20 | 21 | #include 22 | 23 | #include "box.h" 24 | #include "bitstream.h" 25 | #include "logging.h" 26 | 27 | extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) 28 | { 29 | auto reader = std::make_shared(data, size, false); 30 | 31 | BitstreamRange range(reader, size); 32 | for (;;) { 33 | std::shared_ptr box; 34 | Error error = Box::read(range, &box); 35 | if (error != Error::Ok || range.error()) { 36 | break; 37 | } 38 | 39 | box->get_type(); 40 | box->get_type_string(); 41 | Indent indent; 42 | box->dump(indent); 43 | } 44 | 45 | return 0; 46 | } 47 | -------------------------------------------------------------------------------- /libheif/api/libheif/heif_version.h.in: -------------------------------------------------------------------------------- 1 | /* 2 | * HEIF codec. 3 | * Copyright (c) 2017 Dirk Farin 4 | * 5 | * This file is part of libheif. 6 | * 7 | * libheif is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation, either version 3 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * libheif is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with libheif. If not, see . 19 | */ 20 | 21 | /* heif_version.h 22 | * 23 | * This file was automatically generated when libheif was built. 24 | * 25 | * DO NOT EDIT THIS FILE. 26 | */ 27 | #ifndef LIBHEIF_HEIF_VERSION_H 28 | #define LIBHEIF_HEIF_VERSION_H 29 | 30 | /* Numeric representation of the version */ 31 | #define LIBHEIF_NUMERIC_VERSION ((@PROJECT_VERSION_MAJOR@<<24) | (@PROJECT_VERSION_MINOR@<<16) | (@PROJECT_VERSION_PATCH@<<8) | 0) 32 | 33 | /* Version string */ 34 | #define LIBHEIF_VERSION "@PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@.@PROJECT_VERSION_PATCH@b" 35 | 36 | #define LIBHEIF_PLUGIN_DIRECTORY "@PLUGIN_DIRECTORY@" 37 | 38 | #endif // LIBHEIF_HEIF_VERSION_H 39 | -------------------------------------------------------------------------------- /tests/test-config.h: -------------------------------------------------------------------------------- 1 | /* 2 | libheif unit tests 3 | 4 | MIT License 5 | 6 | Copyright (c) 2023 Dirk Farin 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in all 16 | copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | SOFTWARE. 25 | */ 26 | 27 | #ifndef LIBHEIF_TEST_CONFIG_H 28 | #define LIBHEIF_TEST_CONFIG_H 29 | 30 | #include 31 | 32 | // Absolute path to the tests/data directory. Can be used by the tests to load input data. 33 | extern std::string tests_data_directory; 34 | 35 | #endif //LIBHEIF_TEST_CONFIG_H 36 | -------------------------------------------------------------------------------- /third-party/libde265/libde265/arm_new/neon_dct.h: -------------------------------------------------------------------------------- 1 | #ifndef LIBDE265_NEON_DCT_H 2 | #define LIBDE265_NEON_DCT_H 3 | 4 | #include 5 | #include 6 | 7 | void ff_hevc_transform_4x4_luma_add_8_neon(uint8_t *dst, /*const*/ int16_t *coeffs, ptrdiff_t stride, int bit_depth); 8 | 9 | void ff_hevc_transform_4x4_dc_add_8_neon(uint8_t *_dst, /*const*/ int16_t *coeffs, ptrdiff_t _stride, int16_t col_limit); 10 | void ff_hevc_transform_8x8_dc_add_8_neon(uint8_t *_dst, /*const*/ int16_t *coeffs, ptrdiff_t _stride, int16_t col_limit); 11 | void ff_hevc_transform_16x16_dc_add_8_neon(uint8_t *_dst, /*const*/ int16_t *coeffs, ptrdiff_t _stride, int16_t col_limit); 12 | void ff_hevc_transform_32x32_dc_add_8_neon(uint8_t *_dst, /*const*/ int16_t *coeffs, ptrdiff_t _stride, int16_t col_limit); 13 | 14 | 15 | void ff_hevc_transform_4x4_add_8_neon(uint8_t *_dst, /*const*/ int16_t *coeffs, ptrdiff_t _stride, int16_t col_limit); 16 | void ff_hevc_transform_8x8_add_8_neon(uint8_t *_dst, /*const*/ int16_t *coeffs, ptrdiff_t _stride, int16_t col_limit); 17 | void ff_hevc_transform_16x16_add_8_neon(uint8_t *_dst, /*const*/ int16_t *coeffs, ptrdiff_t _stride, int16_t col_limit); 18 | void ff_hevc_transform_32x32_add_8_neon(uint8_t *_dst, /*const*/ int16_t *coeffs, ptrdiff_t _stride, int16_t col_limit); 19 | 20 | 21 | void ff_hevc_transform_skip_residual16 (int16_t *residual, const int16_t *coeffs, int nT, int tsShift,int bdShift); 22 | void ff_hevc_residual16_add_8_neon(uint8_t* _dst, ptrdiff_t _stride, const int16_t* coeffs, int nT, int bit_depth); 23 | #endif -------------------------------------------------------------------------------- /third-party/libde265/scripts/ci-before-script.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | # 4 | # H.265 video codec. 5 | # Copyright (c) 2018 struktur AG, Joachim Bauch 6 | # 7 | # This file is part of libde265. 8 | # 9 | # libde265 is free software: you can redistribute it and/or modify 10 | # it under the terms of the GNU General Public License as published by 11 | # the Free Software Foundation, either version 3 of the License, or 12 | # (at your option) any later version. 13 | # 14 | # libde265 is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | # GNU General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU General Public License 20 | # along with libde265. If not, see . 21 | # 22 | 23 | CURRENT_OS=$TRAVIS_OS_NAME 24 | if [ -z "$CURRENT_OS" ]; then 25 | if [ "$(uname)" != "Darwin" ]; then 26 | CURRENT_OS=linux 27 | else 28 | CURRENT_OS=osx 29 | fi 30 | fi 31 | 32 | if [ ! -z "$TARGET_HOST" ]; then 33 | # Make sure the correct compiler will be used. 34 | unset CC 35 | unset CXX 36 | fi 37 | 38 | if [ "$CURRENT_OS" = "osx" ]; then 39 | export PATH="/usr/local/opt/qt@5/bin:$PATH" 40 | export PKG_CONFIG_PATH="/usr/local/opt/qt@5/lib/pkgconfig" 41 | fi 42 | 43 | if [ -z "$CMAKE" ]; then 44 | ./autogen.sh 45 | ./configure --host=$TARGET_HOST 46 | else 47 | cmake . 48 | fi 49 | -------------------------------------------------------------------------------- /android_jni/demo/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'com.android.application' 3 | id 'org.jetbrains.kotlin.android' 4 | id 'kotlin-kapt' 5 | } 6 | 7 | android { 8 | compileSdk 32 9 | 10 | defaultConfig { 11 | applicationId "com.aliyun.libheif.demo" 12 | minSdk 21 13 | targetSdk 32 14 | versionCode 1 15 | versionName "1.0" 16 | 17 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 18 | } 19 | 20 | buildTypes { 21 | release { 22 | minifyEnabled false 23 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 24 | } 25 | } 26 | compileOptions { 27 | sourceCompatibility JavaVersion.VERSION_11 28 | targetCompatibility JavaVersion.VERSION_11 29 | } 30 | kotlinOptions { 31 | jvmTarget = '1.8' 32 | } 33 | } 34 | 35 | dependencies { 36 | 37 | implementation project(path: ':app') 38 | implementation 'androidx.core:core-ktx:1.7.0' 39 | implementation 'androidx.appcompat:appcompat:1.5.1' 40 | implementation 'com.google.android.material:material:1.6.1' 41 | implementation 'androidx.constraintlayout:constraintlayout:2.1.4' 42 | testImplementation 'junit:junit:4.13.2' 43 | androidTestImplementation 'androidx.test.ext:junit:1.1.3' 44 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' 45 | implementation 'com.github.bumptech.glide:glide:4.16.0' 46 | kapt 'com.github.bumptech.glide:compiler:4.16.0' 47 | } -------------------------------------------------------------------------------- /examples/test_c_api.c: -------------------------------------------------------------------------------- 1 | /* 2 | Very simple test whether the header file compiler with a plain C compiler 3 | This file is part of libheif. It performs test calculations for CI checks. 4 | 5 | MIT License 6 | 7 | Copyright (c) 2018 Dirk Farin 8 | 9 | Permission is hereby granted, free of charge, to any person obtaining a copy 10 | of this software and associated documentation files (the "Software"), to deal 11 | in the Software without restriction, including without limitation the rights 12 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | copies of the Software, and to permit persons to whom the Software is 14 | furnished to do so, subject to the following conditions: 15 | 16 | The above copyright notice and this permission notice shall be included in all 17 | copies or substantial portions of the Software. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 25 | SOFTWARE. 26 | */ 27 | 28 | 29 | #include "libheif/heif.h" 30 | #include "libheif/heif_version.h" 31 | #include "libheif/heif_plugin.h" 32 | 33 | int main() 34 | { 35 | return 0; 36 | } 37 | -------------------------------------------------------------------------------- /libheif/codecs/jpeg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * HEIF JPEG codec. 3 | * Copyright (c) 2023 Dirk Farin 4 | * 5 | * This file is part of libheif. 6 | * 7 | * libheif is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation, either version 3 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * libheif is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with libheif. If not, see . 19 | */ 20 | 21 | #ifndef LIBHEIF_JPEG_H 22 | #define LIBHEIF_JPEG_H 23 | 24 | #include "box.h" 25 | #include 26 | #include 27 | 28 | class Box_jpgC : public Box 29 | { 30 | public: 31 | Box_jpgC() 32 | { 33 | set_short_type(fourcc("jpgC")); 34 | } 35 | 36 | const std::vector& get_data() { return m_data; } 37 | 38 | void set_data(const std::vector& data) { m_data = data; } 39 | 40 | std::string dump(Indent&) const override; 41 | 42 | Error write(StreamWriter& writer) const override; 43 | 44 | protected: 45 | Error parse(BitstreamRange& range) override; 46 | 47 | private: 48 | std::vector m_data; 49 | }; 50 | 51 | 52 | #endif // LIBHEIF_JPEG_H 53 | -------------------------------------------------------------------------------- /third-party/libde265/scripts/ci-before-install-osx.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | # 4 | # H.265 video codec. 5 | # Copyright (c) 2018 struktur AG, Joachim Bauch 6 | # 7 | # This file is part of libde265. 8 | # 9 | # libde265 is free software: you can redistribute it and/or modify 10 | # it under the terms of the GNU General Public License as published by 11 | # the Free Software Foundation, either version 3 of the License, or 12 | # (at your option) any later version. 13 | # 14 | # libde265 is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | # GNU General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU General Public License 20 | # along with libde265. If not, see . 21 | # 22 | 23 | INSTALL_PACKAGES= 24 | 25 | # Output something once per minute to avoid being killed for inactivity. 26 | while true; do echo "Still alive at $(date) ..."; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & 27 | 28 | INSTALL_PACKAGES="$INSTALL_PACKAGES \ 29 | automake \ 30 | ffmpeg \ 31 | libtool \ 32 | pkg-config \ 33 | qt5 \ 34 | sdl \ 35 | " 36 | 37 | if [ ! -z "$INSTALL_PACKAGES" ]; then 38 | echo "Remove python@2 ..." 39 | brew unlink python@2 || true 40 | 41 | echo "Installing packages $INSTALL_PACKAGES ..." 42 | for package in $INSTALL_PACKAGES; do 43 | brew list $package &>/dev/null || brew install $package 44 | done 45 | fi 46 | -------------------------------------------------------------------------------- /android_jni/app/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'com.android.library' 3 | id 'org.jetbrains.kotlin.android' 4 | } 5 | 6 | //apply from: 'publish.gradle' 7 | apply from: 'maven-publish.gradle' 8 | 9 | 10 | android { 11 | compileSdk 32 12 | 13 | defaultConfig { 14 | // applicationId "com.aliyun.imm.libheif" 15 | minSdk 21 16 | targetSdk 32 17 | versionCode 1 18 | versionName "1.0" 19 | 20 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 21 | externalNativeBuild { 22 | cmake { 23 | cppFlags "" 24 | arguments "-DANDROID_STL=c++_shared" 25 | } 26 | } 27 | } 28 | 29 | buildTypes { 30 | release { 31 | minifyEnabled false 32 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 33 | } 34 | } 35 | compileOptions { 36 | sourceCompatibility JavaVersion.VERSION_1_8 37 | targetCompatibility JavaVersion.VERSION_1_8 38 | } 39 | kotlinOptions { 40 | jvmTarget = '1.8' 41 | } 42 | 43 | externalNativeBuild { 44 | cmake { 45 | path file('src/main/cpp/CMakeLists.txt') 46 | version '3.18.1' 47 | } 48 | } 49 | } 50 | 51 | dependencies { 52 | 53 | // implementation 'androidx.core:core-ktx:1.7.0' 54 | testImplementation 'junit:junit:4.13.2' 55 | androidTestImplementation 'androidx.test.ext:junit:1.1.3' 56 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' 57 | } -------------------------------------------------------------------------------- /scripts/install-emscripten.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | VERSION=$1 5 | TARGET=$2 6 | 7 | if [ -z "$VERSION" ] || [ -z "$TARGET" ]; then 8 | echo "USAGE: $0 " 9 | exit 1 10 | fi 11 | 12 | LIBSTDC_BASE=http://de.archive.ubuntu.com/ubuntu/pool/main/g/gcc-5 13 | EMSDK_DOWNLOAD=https://github.com/emscripten-core/emsdk.git 14 | 15 | CODENAME=$(/usr/bin/lsb_release --codename --short) 16 | if [ "$CODENAME" = "trusty" ] && [ ! -e "/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21" ]; then 17 | CONTENTS=$(curl --location $LIBSTDC_BASE) 18 | LIBSTDC_VERSION=$(echo $CONTENTS | sed 's|.*libstdc++6_\([^_]*\)_amd64\.deb.*|\1|g') 19 | TMPDIR=$(mktemp --directory) 20 | echo "Installing libstdc++6 $LIBSTDC_VERSION to fix Emscripten ..." 21 | echo "Extracting in $TMPDIR ..." 22 | curl "${LIBSTDC_BASE}/libstdc++6_${LIBSTDC_VERSION}_amd64.deb" > "$TMPDIR/libstdc++6_${LIBSTDC_VERSION}_amd64.deb" 23 | dpkg -x "$TMPDIR/libstdc++6_${LIBSTDC_VERSION}_amd64.deb" "$TMPDIR" 24 | sudo mv "$TMPDIR/usr/lib/x86_64-linux-gnu/"libstdc++* /usr/lib/x86_64-linux-gnu 25 | rm -rf "$TMPDIR" 26 | fi 27 | 28 | cd "$TARGET" 29 | if [ ! -d emsdk ]; then 30 | echo "Cloning SDK base system ..." 31 | git clone --verbose --recursive "$EMSDK_DOWNLOAD" emsdk 32 | fi 33 | 34 | cd emsdk 35 | echo "Updating SDK base to ${VERSION} ..." 36 | git checkout main 37 | git pull --verbose 38 | git checkout ${VERSION} 39 | 40 | echo "Installing SDK version latest ..." 41 | ./emsdk install ${VERSION} 42 | 43 | echo "Activating SDK version latest ..." 44 | ./emsdk activate ${VERSION} 45 | -------------------------------------------------------------------------------- /third-party/libde265/libde265/md5.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This is an OpenSSL-compatible implementation of the RSA Data Security, Inc. 3 | * MD5 Message-Digest Algorithm (RFC 1321). 4 | * 5 | * Homepage: 6 | * http://openwall.info/wiki/people/solar/software/public-domain-source-code/md5 7 | * 8 | * Author: 9 | * Alexander Peslyak, better known as Solar Designer 10 | * 11 | * This software was written by Alexander Peslyak in 2001. No copyright is 12 | * claimed, and the software is hereby placed in the public domain. 13 | * In case this attempt to disclaim copyright and place the software in the 14 | * public domain is deemed null and void, then the software is 15 | * Copyright (c) 2001 Alexander Peslyak and it is hereby released to the 16 | * general public under the following terms: 17 | * 18 | * Redistribution and use in source and binary forms, with or without 19 | * modification, are permitted. 20 | * 21 | * There's ABSOLUTELY NO WARRANTY, express or implied. 22 | * 23 | * See md5.c for more information. 24 | */ 25 | 26 | #ifdef HAVE_OPENSSL 27 | #include 28 | #elif !defined(_MD5_H) 29 | #define _MD5_H 30 | 31 | /* Any 32-bit or wider unsigned integer data type will do */ 32 | typedef unsigned int MD5_u32plus; 33 | 34 | typedef struct { 35 | MD5_u32plus lo, hi; 36 | MD5_u32plus a, b, c, d; 37 | unsigned char buffer[64]; 38 | MD5_u32plus block[16]; 39 | } MD5_CTX; 40 | 41 | extern void MD5_Init(MD5_CTX *ctx); 42 | extern void MD5_Update(MD5_CTX *ctx, void *data, unsigned long size); 43 | extern void MD5_Final(unsigned char *result, MD5_CTX *ctx); 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /third-party/libde265/tools/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | bin_PROGRAMS = gen-enc-table yuv-distortion rd-curves block-rate-estim tests bjoentegaard 3 | 4 | AM_CPPFLAGS = -I$(top_srcdir)/libde265 -I$(top_srcdir) 5 | 6 | gen_enc_table_DEPENDENCIES = ../libde265/libde265.la 7 | gen_enc_table_CXXFLAGS = 8 | gen_enc_table_LDFLAGS = 9 | gen_enc_table_LDADD = ../libde265/libde265.la -lstdc++ 10 | gen_enc_table_SOURCES = gen-entropy-table.cc 11 | 12 | yuv_distortion_DEPENDENCIES = ../libde265/libde265.la 13 | yuv_distortion_CXXFLAGS = 14 | yuv_distortion_LDFLAGS = 15 | yuv_distortion_LDADD = ../libde265/libde265.la -lstdc++ 16 | yuv_distortion_SOURCES = yuv-distortion.cc 17 | 18 | if HAVE_VIDEOGFX 19 | yuv_distortion_CXXFLAGS += $(VIDEOGFX_CFLAGS) 20 | yuv_distortion_LDFLAGS += $(VIDEOGFX_LIBS) 21 | endif 22 | 23 | rd_curves_DEPENDENCIES = ../libde265/libde265.la 24 | rd_curves_CXXFLAGS = 25 | rd_curves_LDFLAGS = 26 | rd_curves_LDADD = ../libde265/libde265.la -lstdc++ 27 | rd_curves_SOURCES = rd-curves.cc 28 | 29 | block_rate_estim_DEPENDENCIES = ../libde265/libde265.la 30 | block_rate_estim_CXXFLAGS = 31 | block_rate_estim_LDFLAGS = 32 | block_rate_estim_LDADD = ../libde265/libde265.la -lstdc++ 33 | block_rate_estim_SOURCES = block-rate-estim.cc 34 | 35 | tests_DEPENDENCIES = ../libde265/libde265.la 36 | tests_CXXFLAGS = 37 | tests_LDFLAGS = 38 | tests_LDADD = ../libde265/libde265.la -lstdc++ 39 | tests_SOURCES = tests.cc 40 | 41 | bjoentegaard_DEPENDENCIES = ../libde265/libde265.la 42 | bjoentegaard_CXXFLAGS = 43 | bjoentegaard_LDFLAGS = 44 | bjoentegaard_LDADD = ../libde265/libde265.la -lstdc++ 45 | bjoentegaard_SOURCES = bjoentegaard.cc 46 | -------------------------------------------------------------------------------- /libheif/api/libheif/heif_plugin.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * HEIF codec. 3 | * Copyright (c) 2017 Dirk Farin 4 | * 5 | * This file is part of libheif. 6 | * 7 | * libheif is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation, either version 3 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * libheif is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with libheif. If not, see . 19 | */ 20 | 21 | #include "heif.h" 22 | #include "heif_plugin.h" // needed to avoid 'unresolved symbols' on Visual Studio compiler 23 | 24 | struct heif_error heif_error_ok = {heif_error_Ok, heif_suberror_Unspecified, "Success"}; 25 | 26 | struct heif_error heif_error_unsupported_parameter = {heif_error_Usage_error, 27 | heif_suberror_Unsupported_parameter, 28 | "Unsupported encoder parameter"}; 29 | 30 | struct heif_error heif_error_invalid_parameter_value = {heif_error_Usage_error, 31 | heif_suberror_Invalid_parameter_value, 32 | "Invalid parameter value"}; 33 | 34 | 35 | -------------------------------------------------------------------------------- /cmake/modules/FindLibhevc.cmake: -------------------------------------------------------------------------------- 1 | include(LibFindMacros) 2 | libfind_pkg_check_modules(LIBHEVC_PKGCONF libhevc) 3 | 4 | find_path(LIBHEVC_INCLUDE_DIR 5 | NAMES decoder/ihevcd_decode.h common/iv.h 6 | HINTS ${LIBHEVC_PKGCONF_INCLUDE_DIRS} ${LIBHEVC_PKGCONF_INCLUDEDIR} 7 | PATH_SUFFIXES hevc 8 | ) 9 | 10 | find_library(LIBHEVC_LIBRARY 11 | NAMES libhevcdec hevcdec 12 | HINTS ${LIBHEVC_PKGCONF_LIBRARY_DIRS} ${LIBHEVC_PKGCONF_LIBDIR} 13 | ) 14 | 15 | set(LIBHEVC_PROCESS_LIBS ${LIBHEVC_LIBRARY}) 16 | set(LIBHEVC_PROCESS_INCLUDES ${LIBHEVC_INCLUDE_DIR}) 17 | libfind_process(LIBHEVC) 18 | 19 | #set(LIBHEVC_PROCESS_LIBS "$LIBHEVC_PROCESS_LIBS/common:$LIBHEVC_PROCESS_LIBS/decoder") 20 | 21 | #if(LIBDE265_INCLUDE_DIR) 22 | # set(libde265_config_file "${LIBDE265_INCLUDE_DIR}/libde265/de265-version.h") 23 | # if(EXISTS ${libde265_config_file}) 24 | # file(STRINGS 25 | # ${libde265_config_file} 26 | # TMP 27 | # REGEX "#define LIBDE265_VERSION .*$") 28 | # string(REGEX REPLACE "#define LIBDE265_VERSION" "" TMP ${TMP}) 29 | # string(REGEX MATCHALL "[0-9.]+" LIBDE265_VERSION ${TMP}) 30 | # endif() 31 | #endif() 32 | 33 | include(FindPackageHandleStandardArgs) 34 | find_package_handle_standard_args(LIBHEVC 35 | REQUIRED_VARS 36 | LIBHEVC_INCLUDE_DIRS 37 | LIBHEVC_LIBRARIES 38 | ) 39 | 40 | #set(LIBHEVC_INCLUDE_DIR "${LIBHEVC_INCLUDE_DIRS}/commom" "${LIBHEVC_INCLUDE_DIRS}/decoder") 41 | message(STATUS "yyyy LIBHEVC_INCLUDE_DIR = ${LIBHEVC_INCLUDE_DIR}") 42 | message(STATUS "yyyy LIBHEVC_INCLUDE_DIRS = ${LIBHEVC_INCLUDE_DIRS}") 43 | message(STATUS "yyyy LIBHEVC_LIBRARIES = ${LIBHEVC_LIBRARIES}") 44 | -------------------------------------------------------------------------------- /examples/decoder.h: -------------------------------------------------------------------------------- 1 | /* 2 | libheif example application "heif". 3 | 4 | MIT License 5 | 6 | Copyright (c) 2023 Dirk Farin 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in all 16 | copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | SOFTWARE. 25 | */ 26 | 27 | #ifndef LIBHEIF_DECODER_H 28 | #define LIBHEIF_DECODER_H 29 | 30 | #include "libheif/heif.h" 31 | #include 32 | #include 33 | 34 | struct InputImage 35 | { 36 | std::shared_ptr image; 37 | std::vector xmp; 38 | std::vector exif; 39 | heif_orientation orientation = heif_orientation_normal; 40 | }; 41 | 42 | #endif //LIBHEIF_DECODER_H 43 | -------------------------------------------------------------------------------- /scripts/check-gofmt.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eufo pipefail 3 | # 4 | # HEIF codec. 5 | # Copyright (c) 2018 struktur AG, Leon Klingele 6 | # 7 | # This file is part of libheif. 8 | # 9 | # libheif is free software: you can redistribute it and/or modify 10 | # it under the terms of the GNU General Public License as published by 11 | # the Free Software Foundation, either version 3 of the License, or 12 | # (at your option) any later version. 13 | # 14 | # libheif is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | # GNU General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU General Public License 20 | # along with libheif. If not, see . 21 | # 22 | 23 | realpath() { python -c "import os,sys; print(os.path.realpath(sys.argv[1]))" "$1"; } 24 | 25 | DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null && pwd)" 26 | 27 | FILES=$(find "$DIR"/.. -name *.go) 28 | result=0 29 | for filename in $FILES; do 30 | filename=$(realpath "${filename}") 31 | newfile=`mktemp /tmp/fmt.XXXXXX` || exit 1 32 | gofmt "${filename}" > "${newfile}" 2>> /dev/null 33 | set +e 34 | diff -u -p "${filename}" --label "${filename}" --label "${filename} (formatted)" "${newfile}" 35 | r=$? 36 | set -e 37 | rm "${newfile}" 38 | if [ $r != 0 ] ; then 39 | result=1 40 | else 41 | echo "Done processing ${filename}" 42 | fi 43 | done 44 | 45 | if [ $result != 0 ] ; then 46 | echo 47 | echo "Please fix the formatting errors above." >& 2 48 | exit 1 49 | fi 50 | -------------------------------------------------------------------------------- /scripts/check-licenses.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eu 3 | # 4 | # HEIF codec. 5 | # Copyright (c) 2018 struktur AG, Joachim Bauch 6 | # 7 | # This file is part of libheif. 8 | # 9 | # libheif is free software: you can redistribute it and/or modify 10 | # it under the terms of the GNU General Public License as published by 11 | # the Free Software Foundation, either version 3 of the License, or 12 | # (at your option) any later version. 13 | # 14 | # libheif is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | # GNU General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU General Public License 20 | # along with libheif. If not, see . 21 | # 22 | 23 | echo "Checking licenses..." 24 | CHECK_RESULT=`/usr/bin/licensecheck --recursive --ignore 'emscripten|libde265|README\.md|post\.js|/.git/|clusterfuzz-testcase-.*|fuzzing/data/.*' .` 25 | 26 | FOUND= 27 | while read -r line; do 28 | if ( echo $line | grep -q "GENERATED FILE" ); then 29 | # We don't care about generated files 30 | echo "OK: $line" 31 | continue 32 | fi 33 | 34 | if ( echo "$line" | grep -q "UNKNOWN" ); then 35 | FILENAME=`echo "$line" | awk '{split($0,a,":");print a[1]}'` 36 | echo "ERROR: $line" >& 2 37 | FOUND=1 38 | continue 39 | fi 40 | 41 | echo "OK: $line" 42 | done <<< "${CHECK_RESULT}" 43 | 44 | if [ ! -z ${FOUND} ]; then 45 | echo "ERROR: Found files without licenses" >& 2 46 | exit 1 47 | fi 48 | -------------------------------------------------------------------------------- /android_jni/demo/src/main/java/com/aliyun/libheif/demo/glide/HeifByteBufferBitmapDecoder.kt: -------------------------------------------------------------------------------- 1 | package com.aliyun.libheif.demo.glide 2 | 3 | import android.graphics.Bitmap 4 | import android.util.Log 5 | import com.aliyun.libheif.HeifInfo 6 | import com.aliyun.libheif.HeifNative 7 | import com.bumptech.glide.load.Options 8 | import com.bumptech.glide.load.ResourceDecoder 9 | import com.bumptech.glide.load.engine.Resource 10 | import com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool 11 | import com.bumptech.glide.load.resource.bitmap.BitmapResource 12 | import com.bumptech.glide.util.ByteBufferUtil 13 | import java.nio.ByteBuffer 14 | 15 | class HeifByteBufferBitmapDecoder(private val bitmapPool: BitmapPool): ResourceDecoder { 16 | override fun handles(source: ByteBuffer, options: Options): Boolean { 17 | val buffer = ByteBufferUtil.toBytes(source) 18 | return HeifNative.isHeic(buffer.size.toLong(), buffer); 19 | } 20 | 21 | override fun decode( 22 | source: ByteBuffer, 23 | width: Int, 24 | height: Int, 25 | options: Options 26 | ): Resource? { 27 | Log.e("ByteBufferBitmapDecoder", "=======================>heic decode") 28 | val buffer = ByteBufferUtil.toBytes(source) 29 | var heifInfo = HeifInfo() 30 | HeifNative.getInfo(heifInfo, buffer.size.toLong(), buffer) 31 | val heifSize = heifInfo.frameList[0] 32 | val bitmap = Bitmap.createBitmap(heifSize.width, heifSize.height, Bitmap.Config.ARGB_8888) 33 | HeifNative.toRgba(buffer.size.toLong(), buffer, bitmap) 34 | return BitmapResource.obtain(bitmap, bitmapPool) 35 | } 36 | } -------------------------------------------------------------------------------- /libheif/plugins/encoder_x265.h: -------------------------------------------------------------------------------- 1 | /* 2 | * HEIF codec. 3 | * Copyright (c) 2017 Dirk Farin x 4 | * 5 | * This file is part of libheif. 6 | * 7 | * libheif is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation, either version 3 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * libheif is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with libheif. If not, see . 19 | */ 20 | 21 | #ifndef LIBHEIF_ENCODER_X265_H 22 | #define LIBHEIF_ENCODER_X265_H 23 | 24 | #include "common_utils.h" 25 | 26 | /* Image sizes in HEVC: since HEVC does not allow for odd image dimensions when 27 | using chroma 4:2:0, our strategy is as follows. 28 | 29 | - Images with odd dimensions are extended with an extra row/column which 30 | contains a copy of the border. 31 | - The HEVC image size generated by x265 is rounded up to the CTU size (?) 32 | and the conformance window has to be respected. 33 | - We add an additional crop transform to remove the extra row/column. 34 | */ 35 | 36 | 37 | const struct heif_encoder_plugin* get_encoder_plugin_x265(); 38 | 39 | #if PLUGIN_X265 40 | extern "C" { 41 | MAYBE_UNUSED LIBHEIF_API extern heif_plugin_info plugin_info; 42 | } 43 | #endif 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /third-party/libde265/libde265/alloc_pool.h: -------------------------------------------------------------------------------- 1 | /* 2 | * H.265 video codec. 3 | * Copyright (c) 2014 struktur AG, Dirk Farin 4 | * 5 | * Authors: Dirk Farin 6 | * 7 | * This file is part of libde265. 8 | * 9 | * libde265 is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU Lesser General Public License as 11 | * published by the Free Software Foundation, either version 3 of 12 | * the License, or (at your option) any later version. 13 | * 14 | * libde265 is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU Lesser General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Lesser General Public License 20 | * along with libde265. If not, see . 21 | */ 22 | 23 | #ifndef ALLOC_POOL_H 24 | #define ALLOC_POOL_H 25 | 26 | #ifdef HAVE_CONFIG_H 27 | #include "config.h" 28 | #endif 29 | 30 | #include 31 | #include 32 | #ifdef HAVE_STDINT_H 33 | #include 34 | #endif 35 | #ifdef HAVE_CSTDINT 36 | #include 37 | #endif 38 | 39 | 40 | class alloc_pool 41 | { 42 | public: 43 | alloc_pool(size_t objSize, int poolSize=1000, bool grow=true); 44 | ~alloc_pool(); 45 | 46 | void* new_obj(const size_t size); 47 | void delete_obj(void*); 48 | void purge(); 49 | 50 | private: 51 | size_t mObjSize; 52 | int mPoolSize; 53 | bool mGrow; 54 | 55 | std::vector m_memBlocks; 56 | std::vector m_freeList; 57 | 58 | void add_memory_block(); 59 | }; 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /third-party/libde265/libde265/x86/sse-dct.h: -------------------------------------------------------------------------------- 1 | /* 2 | * H.265 video codec. 3 | * Copyright (c) 2013 openHEVC contributors 4 | * Copyright (c) 2013-2014 struktur AG, Dirk Farin 5 | * 6 | * This file is part of libde265. 7 | * 8 | * libde265 is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Lesser General Public License as 10 | * published by the Free Software Foundation, either version 3 of 11 | * the License, or (at your option) any later version. 12 | * 13 | * libde265 is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public License 19 | * along with libde265. If not, see . 20 | */ 21 | 22 | #ifndef SSE_DCT_H 23 | #define SSE_DCT_H 24 | 25 | #include 26 | #include 27 | 28 | void ff_hevc_transform_skip_8_sse(uint8_t *_dst, const int16_t *coeffs, ptrdiff_t _stride); 29 | void ff_hevc_transform_4x4_luma_add_8_sse4(uint8_t *dst, const int16_t *coeffs, ptrdiff_t stride); 30 | void ff_hevc_transform_4x4_add_8_sse4(uint8_t *dst, const int16_t *coeffs, ptrdiff_t stride); 31 | void ff_hevc_transform_8x8_add_8_sse4(uint8_t *dst, /*const*/ int16_t *coeffs, ptrdiff_t stride, int16_t col_limit); 32 | void ff_hevc_transform_16x16_add_8_sse4(uint8_t *dst, /*const*/ int16_t *coeffs, ptrdiff_t stride, int16_t col_limit); 33 | void ff_hevc_transform_32x32_add_8_sse4(uint8_t *dst, /*const*/ int16_t *coeffs, ptrdiff_t stride, int16_t col_limit); 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /libheif/plugins_unix.h: -------------------------------------------------------------------------------- 1 | /* 2 | * HEIF codec. 3 | * Copyright (c) 2023 Dirk Farin 4 | * 5 | * This file is part of libheif. 6 | * 7 | * libheif is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation, either version 3 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * libheif is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with libheif. If not, see . 19 | */ 20 | 21 | #ifndef LIBHEIF_PLUGINS_UNIX_H 22 | #define LIBHEIF_PLUGINS_UNIX_H 23 | 24 | #include 25 | #include 26 | #include "init.h" 27 | 28 | std::vector get_plugin_directories_from_environment_variable_unix(); 29 | 30 | std::vector list_all_potential_plugins_in_directory_unix(const char*); 31 | 32 | class PluginLibrary_Unix : public PluginLibrary 33 | { 34 | public: 35 | heif_error load_from_file(const char* filename) override; 36 | 37 | void release() override; 38 | 39 | heif_plugin_info* get_plugin_info() override { return m_plugin_info; } 40 | 41 | bool operator==(const PluginLibrary_Unix& b) const 42 | { 43 | return m_library_handle == b.m_library_handle; 44 | } 45 | 46 | private: 47 | void* m_library_handle = nullptr; 48 | heif_plugin_info* m_plugin_info = nullptr; 49 | }; 50 | 51 | #endif //LIBHEIF_PLUGINS_UNIX_H 52 | --------------------------------------------------------------------------------