chore: import upstream snapshot with attribution
cffconvert / validate (push) Has been skipped
License Check / license-check (push) Failing after 2s

This commit is contained in:
wehub-resource-sync
2026-07-13 12:14:16 +08:00
commit 8a852e4b4e
36502 changed files with 9277225 additions and 0 deletions
+3
View File
@@ -0,0 +1,3 @@
# This empty BUILD file is required to make Bazel treat this directory as a package.
# copybara:uncomment package(default_applicable_licenses = ["//tensorflow:license"])
+94
View File
@@ -0,0 +1,94 @@
licenses(["notice"])
package(default_visibility = ["//visibility:public"])
C89_FLAGS = select({
"@platforms//cpu:x86_32": [
"-msse4.1",
"-DWEBP_HAVE_SSE41",
],
"@platforms//cpu:x86_64": [
"-msse4.1",
"-DWEBP_HAVE_SSE41",
],
"@platforms//cpu:armv7": [
"-marm",
"-mfpu=neon",
],
"//conditions:default": [],
})
cc_library(
name = "webp",
srcs = glob(
[
"src/enc/*.c",
"src/enc/*.h",
"src/dec/*.c",
"src/dec/*.h",
"src/mux/*.c",
"src/mux/*.h",
"src/demux/*.c",
"src/demux/*.h",
"src/dsp/*.c",
"src/dsp/*.h",
],
),
hdrs = [
"src/webp/decode.h",
"src/webp/demux.h",
"src/webp/encode.h",
"src/webp/format_constants.h",
"src/webp/mux.h",
"src/webp/mux_types.h",
"src/webp/types.h",
],
copts = C89_FLAGS,
include_prefix = "third_party/libwebp",
visibility = ["//visibility:public"],
deps = [
":sharpyuv",
":webp_utils",
],
)
cc_library(
name = "webp_utils",
srcs = glob(["src/utils/*.c"]) + [
"src/dsp/cpu.h",
"src/dsp/dsp.h",
"src/dsp/lossless_common.h",
"src/webp/decode.h",
"src/webp/encode.h",
"src/webp/format_constants.h",
"src/webp/types.h",
],
hdrs = glob(["src/utils/*.h"]),
copts = C89_FLAGS,
)
cc_library(
name = "sharpyuv",
srcs = [
"sharpyuv/sharpyuv.c",
"sharpyuv/sharpyuv_cpu.c",
"sharpyuv/sharpyuv_csp.c",
"sharpyuv/sharpyuv_dsp.c",
"sharpyuv/sharpyuv_dsp.h",
"sharpyuv/sharpyuv_gamma.c",
"sharpyuv/sharpyuv_neon.c",
"sharpyuv/sharpyuv_sse2.c",
"src/dsp/cpu.h",
"src/webp/types.h",
],
hdrs = [
"sharpyuv/sharpyuv.h",
"sharpyuv/sharpyuv_cpu.h",
"sharpyuv/sharpyuv_csp.h",
"sharpyuv/sharpyuv_gamma.h",
],
copts = C89_FLAGS,
textual_hdrs = [
"src/dsp/cpu.c",
],
)
+13
View File
@@ -0,0 +1,13 @@
"""Point to the libwebp repo on GitHub."""
load("//third_party:repo.bzl", "tf_http_archive", "tf_mirror_urls")
def repo():
# Use the same libwebp release as tensorstore
tf_http_archive(
name = "libwebp",
strip_prefix = "libwebp-1.4.0",
sha256 = "12af50c45530f0a292d39a88d952637e43fb2d4ab1883c44ae729840f7273381",
urls = tf_mirror_urls("https://github.com/webmproject/libwebp/archive/v1.4.0.tar.gz"),
build_file = "//third_party/libwebp:libwebp.BUILD.bazel",
)