Upgrade crabbyavif to 963898a53d056da5ab97193fb3087e208c88dc34
This project was upgraded with external_updater.
Usage: tools/external_updater/updater.sh update external/rust/crabbyavif
For more info, check https://cs.android.com/android/platform/superproject/main/+/main:tools/external_updater/README.md
Test: TreeHugger
Change-Id: I9c08ceb6216151c874236455753bb3bff230ad7c
diff --git a/Android.bp b/Android.bp
new file mode 100644
index 0000000..4db5ebb
--- /dev/null
+++ b/Android.bp
@@ -0,0 +1,126 @@
+package {
+ default_applicable_licenses: ["external_rust_crabbyavif_license"],
+}
+
+license {
+ name: "external_rust_crabbyavif_license",
+ visibility: [":__subpackages__"],
+ license_kinds: [
+ "SPDX-license-identifier-Apache-2.0",
+ ],
+}
+
+rust_bindgen {
+ name: "libcrabbyavif_mediaimage2_bindgen",
+ crate_name: "crabbyavif_mediaimage2_bindgen",
+ wrapper_src: "sys/ndk-sys/mediaimage2_wrapper.hpp",
+ source_stem: "mediaimage2_bindgen",
+ header_libs: [
+ "media_plugin_headers",
+ ],
+ bindgen_flags: [
+ "--allowlist-item=android::MediaImage2?",
+ "--no-doc-comments",
+ "--no-layout-tests",
+ "--no-recursive-allowlist",
+ ],
+}
+
+rust_bindgen {
+ name: "libcrabbyavif_ndk_bindgen",
+ crate_name: "crabbyavif_ndk_bindgen",
+ wrapper_src: "sys/ndk-sys/wrapper.h",
+ source_stem: "ndk_media_bindgen",
+ header_libs: [
+ "libmediandk",
+ ],
+ bindgen_flags: [
+ "--with-derive-default",
+ ],
+}
+
+rust_library {
+ name: "libndk_sys",
+ crate_name: "ndk_sys",
+ cargo_env_compat: true,
+ cargo_pkg_version: "0.1.0",
+ cfgs: ["android_soong"],
+ srcs: [
+ "sys/ndk-sys/src/lib.rs",
+ // This comment prevents bpfmt -s from sorting this list as lib.rs
+ // always has to be the first in the source list.
+ ":libcrabbyavif_ndk_bindgen",
+ ],
+ shared_libs: [
+ "libmediandk",
+ ],
+}
+
+rust_bindgen {
+ name: "libcrabbyavif_yuv_bindgen",
+ crate_name: "crabbyavif_yuv_bindgen",
+ wrapper_src: "sys/libyuv-sys/wrapper.h",
+ source_stem: "libyuv_bindgen",
+ product_available: true,
+ vendor_available: true,
+ header_libs: [
+ "libyuv",
+ ],
+}
+
+rust_library {
+ name: "liblibyuv_sys",
+ crate_name: "libyuv_sys",
+ cargo_env_compat: true,
+ cargo_pkg_version: "0.1.0",
+ cfgs: ["android_soong"],
+ srcs: [
+ "sys/libyuv-sys/src/lib.rs",
+ // This comment prevents bpfmt -s from sorting this list as lib.rs
+ // always has to be the first in the source list.
+ ":libcrabbyavif_yuv_bindgen",
+ ],
+ whole_static_libs: [
+ "libyuv",
+ ],
+ shared_libs: [
+ "libc++",
+ "libjpeg",
+ ],
+}
+
+rust_ffi_static {
+ name: "libcrabbyavif_ffi",
+ crate_name: "crabbyavif",
+ cargo_env_compat: true,
+ cargo_pkg_version: "0.1.0",
+ srcs: [
+ "src/lib.rs",
+ // This comment prevents bpfmt -s from sorting this list as lib.rs
+ // always has to be the first in the source list.
+ ":libcrabbyavif_mediaimage2_bindgen",
+ ],
+ cfgs: ["android_soong"],
+ edition: "2021",
+ features: [
+ "android_mediacodec",
+ "capi",
+ "heic",
+ "libyuv",
+ ],
+ rustlibs: [
+ "liblibyuv_sys",
+ "liblog_rust",
+ "liblogger",
+ "libndk_sys",
+ "librustutils",
+ ],
+ shared_libs: [
+ "libmediandk",
+ ],
+ include_dirs: ["include"],
+ apex_available: [
+ "//apex_available:anyapex",
+ "//apex_available:platform",
+ ],
+}
diff --git a/METADATA b/METADATA
new file mode 100644
index 0000000..469cc6a
--- /dev/null
+++ b/METADATA
@@ -0,0 +1,21 @@
+# This project was upgraded with external_updater.
+# Usage: tools/external_updater/updater.sh update external/rust/crabbyavif
+# For more info, check https://cs.android.com/android/platform/superproject/main/+/main:tools/external_updater/README.md
+
+name: "crabbyavif"
+description: "CrabbyAvif is a rust library that is used for AVIF Image Decoding"
+third_party {
+ license_type: NOTICE
+ last_upgrade_date {
+ year: 2025
+ month: 3
+ day: 18
+ }
+ homepage: "https://github.com/webmproject/CrabbyAvif"
+ identifier {
+ type: "Git"
+ value: "https://github.com/webmproject/CrabbyAvif.git"
+ version: "963898a53d056da5ab97193fb3087e208c88dc34"
+ primary_source: true
+ }
+}
diff --git a/MODULE_LICENSE_APACHE2 b/MODULE_LICENSE_APACHE2
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/MODULE_LICENSE_APACHE2
diff --git a/OWNERS b/OWNERS
new file mode 100644
index 0000000..a501a12
--- /dev/null
+++ b/OWNERS
@@ -0,0 +1,2 @@
+include platform/system/core:main:/janitors/OWNERS
[email protected]
diff --git a/TEST_MAPPING b/TEST_MAPPING
new file mode 100644
index 0000000..cb50868
--- /dev/null
+++ b/TEST_MAPPING
@@ -0,0 +1,40 @@
+{
+ "presubmit": [
+ {
+ "name": "CtsGraphicsTestCases",
+ "options": [
+ {
+ "include-filter": "android.graphics.cts.AImageDecoderTest"
+ },
+ {
+ "include-filter": "android.graphics.cts.BitmapFactoryTest"
+ },
+ {
+ "include-filter": "android.graphics.cts.BitmapRegionDecoderTest"
+ },
+ {
+ "include-filter": "android.graphics.cts.ImageDecoderTest"
+ }
+ ]
+ }
+ ],
+ "presubmit-large": [
+ {
+ "name": "CtsMediaMiscTestCases",
+ "options": [
+ {
+ "include-filter": "android.media.misc.cts.ExifInterfaceTest"
+ },
+ {
+ "include-filter": "android.media.misc.cts.HeifWriterTest"
+ },
+ {
+ "include-filter": "android.media.misc.cts.MediaMetadataRetrieverTest"
+ },
+ {
+ "include-filter": "android.media.misc.cts.ThumbnailUtilsTest"
+ }
+ ]
+ }
+ ]
+}