2019-06-17 01:03:25 +02:00
|
|
|
# Copyright 2019 The MediaPipe Authors.
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
#
|
2020-09-28 06:50:43 +02:00
|
|
|
load("//mediapipe/framework/port:build_config.bzl", "mediapipe_proto_library")
|
2021-03-25 23:01:44 +01:00
|
|
|
load("//mediapipe/framework:mediapipe_cc_test.bzl", "mediapipe_cc_test")
|
2019-06-17 01:03:25 +02:00
|
|
|
|
2020-08-30 05:41:10 +02:00
|
|
|
licenses(["notice"])
|
2019-06-17 01:03:25 +02:00
|
|
|
|
|
|
|
package(default_visibility = ["//visibility:private"])
|
|
|
|
|
2020-09-28 06:50:43 +02:00
|
|
|
mediapipe_proto_library(
|
2019-08-17 03:49:25 +02:00
|
|
|
name = "audio_decoder_proto",
|
|
|
|
srcs = ["audio_decoder.proto"],
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
deps = [
|
2020-09-28 06:50:43 +02:00
|
|
|
"//mediapipe/framework:calculator_options_proto",
|
2019-08-17 03:49:25 +02:00
|
|
|
"//mediapipe/framework:calculator_proto",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2020-09-28 06:50:43 +02:00
|
|
|
mediapipe_proto_library(
|
2019-06-17 01:03:25 +02:00
|
|
|
name = "color_proto",
|
|
|
|
srcs = ["color.proto"],
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
)
|
|
|
|
|
2022-05-04 00:29:57 +02:00
|
|
|
mediapipe_proto_library(
|
|
|
|
name = "label_map_proto",
|
|
|
|
srcs = ["label_map.proto"],
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
)
|
|
|
|
|
2020-09-28 06:50:43 +02:00
|
|
|
mediapipe_proto_library(
|
2019-06-17 01:03:25 +02:00
|
|
|
name = "render_data_proto",
|
|
|
|
srcs = ["render_data.proto"],
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
deps = ["//mediapipe/util:color_proto"],
|
|
|
|
)
|
|
|
|
|
2019-08-17 03:49:25 +02:00
|
|
|
cc_library(
|
|
|
|
name = "audio_decoder",
|
|
|
|
srcs = ["audio_decoder.cc"],
|
|
|
|
hdrs = ["audio_decoder.h"],
|
2021-03-25 23:01:44 +01:00
|
|
|
visibility = ["//visibility:public"],
|
2019-08-17 03:49:25 +02:00
|
|
|
deps = [
|
|
|
|
":audio_decoder_cc_proto",
|
|
|
|
"//mediapipe/framework:packet",
|
|
|
|
"//mediapipe/framework:timestamp",
|
|
|
|
"//mediapipe/framework/deps:cleanup",
|
|
|
|
"//mediapipe/framework/formats:matrix",
|
|
|
|
"//mediapipe/framework/formats:time_series_header_cc_proto",
|
|
|
|
"//mediapipe/framework/port:integral_types",
|
|
|
|
"//mediapipe/framework/port:map_util",
|
|
|
|
"//mediapipe/framework/port:ret_check",
|
|
|
|
"//mediapipe/framework/port:status",
|
|
|
|
"//mediapipe/framework/tool:status_util",
|
|
|
|
"//third_party:libffmpeg",
|
|
|
|
"@com_google_absl//absl/base:endian",
|
2021-03-25 23:01:44 +01:00
|
|
|
"@com_google_absl//absl/flags:flag",
|
2019-08-17 03:49:25 +02:00
|
|
|
"@com_google_absl//absl/strings",
|
|
|
|
"@com_google_absl//absl/time",
|
2021-03-25 23:01:44 +01:00
|
|
|
"@eigen_archive//:eigen3",
|
2019-08-17 03:49:25 +02:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2019-06-17 01:03:25 +02:00
|
|
|
cc_library(
|
|
|
|
name = "cpu_util",
|
|
|
|
srcs = ["cpu_util.cc"],
|
|
|
|
hdrs = ["cpu_util.h"],
|
2021-03-25 23:01:44 +01:00
|
|
|
visibility = ["//visibility:public"],
|
2019-06-17 01:03:25 +02:00
|
|
|
deps = [
|
|
|
|
"@com_google_absl//absl/algorithm:container",
|
2021-03-25 23:01:44 +01:00
|
|
|
"@com_google_absl//absl/flags:flag",
|
2019-06-17 01:03:25 +02:00
|
|
|
"@com_google_absl//absl/strings",
|
|
|
|
"//mediapipe/framework/port:integral_types",
|
|
|
|
"//mediapipe/framework/port:status",
|
|
|
|
"//mediapipe/framework/port:statusor",
|
|
|
|
] + select({
|
|
|
|
"//conditions:default": [],
|
|
|
|
"//mediapipe:android": [
|
|
|
|
"@androidndk//:cpufeatures",
|
|
|
|
],
|
|
|
|
}),
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "header_util",
|
|
|
|
srcs = ["header_util.cc"],
|
|
|
|
hdrs = ["header_util.h"],
|
2021-03-25 23:01:44 +01:00
|
|
|
visibility = ["//visibility:public"],
|
2019-06-17 01:03:25 +02:00
|
|
|
deps = [
|
|
|
|
"//mediapipe/framework:calculator_framework",
|
|
|
|
"//mediapipe/framework:packet_set",
|
|
|
|
"//mediapipe/framework/port:status",
|
|
|
|
"//mediapipe/framework/tool:status_util",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "image_frame_util",
|
|
|
|
srcs = ["image_frame_util.cc"],
|
|
|
|
hdrs = ["image_frame_util.h"],
|
2021-03-25 23:01:44 +01:00
|
|
|
visibility = ["//visibility:public"],
|
2019-06-17 01:03:25 +02:00
|
|
|
deps = [
|
|
|
|
"//mediapipe/framework/deps:mathutil",
|
|
|
|
"//mediapipe/framework/formats:image_format_cc_proto",
|
|
|
|
"//mediapipe/framework/formats:image_frame",
|
|
|
|
"//mediapipe/framework/formats:image_frame_opencv",
|
|
|
|
"//mediapipe/framework/formats:yuv_image",
|
|
|
|
"//mediapipe/framework/port",
|
2020-05-21 18:46:31 +02:00
|
|
|
"//mediapipe/framework/port:aligned_malloc_and_free",
|
2019-06-17 01:03:25 +02:00
|
|
|
"//mediapipe/framework/port:integral_types",
|
|
|
|
"//mediapipe/framework/port:logging",
|
|
|
|
"//mediapipe/framework/port:opencv_imgproc",
|
|
|
|
"//mediapipe/framework/port:status",
|
|
|
|
"//mediapipe/framework/tool:status_util",
|
|
|
|
"@com_google_absl//absl/strings",
|
|
|
|
"@libyuv",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-05-04 00:29:57 +02:00
|
|
|
cc_library(
|
|
|
|
name = "label_map_util",
|
|
|
|
srcs = ["label_map_util.cc"],
|
|
|
|
hdrs = ["label_map_util.h"],
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
deps = [
|
|
|
|
":label_map_cc_proto",
|
2022-06-23 21:35:07 +02:00
|
|
|
"//mediapipe/framework/port:core_proto",
|
|
|
|
"//mediapipe/framework/port:integral_types",
|
2022-05-04 00:29:57 +02:00
|
|
|
"//mediapipe/framework/port:statusor",
|
|
|
|
"@com_google_absl//absl/strings",
|
|
|
|
"@com_google_absl//absl/strings:str_format",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2019-06-17 01:03:25 +02:00
|
|
|
cc_library(
|
|
|
|
name = "annotation_renderer",
|
|
|
|
srcs = ["annotation_renderer.cc"],
|
|
|
|
hdrs = ["annotation_renderer.h"],
|
2021-03-25 23:01:44 +01:00
|
|
|
visibility = ["//visibility:public"],
|
2019-06-17 01:03:25 +02:00
|
|
|
deps = [
|
|
|
|
":render_data_cc_proto",
|
|
|
|
"//mediapipe/framework/port:logging",
|
|
|
|
"//mediapipe/framework/port:opencv_core",
|
|
|
|
"//mediapipe/framework/port:opencv_imgproc",
|
|
|
|
"//mediapipe/framework/port:vector",
|
|
|
|
"//mediapipe/util:color_cc_proto",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-03-25 23:01:44 +01:00
|
|
|
# Prefer to use ":resource_util", Customization of the resource util is being restricted
|
|
|
|
# while we explore how it should best be implemented.
|
|
|
|
cc_library(
|
|
|
|
name = "resource_util_custom",
|
|
|
|
hdrs = ["resource_util_custom.h"],
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
deps = [
|
|
|
|
"//mediapipe/framework/port:status",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2019-06-17 01:03:25 +02:00
|
|
|
cc_library(
|
|
|
|
name = "resource_util",
|
2021-03-25 23:01:44 +01:00
|
|
|
srcs = [
|
|
|
|
"resource_util.cc",
|
|
|
|
"resource_util_internal.h",
|
|
|
|
] + select({
|
|
|
|
"//conditions:default": ["resource_util_default.cc"],
|
2019-06-17 01:03:25 +02:00
|
|
|
"//mediapipe:android": ["resource_util_android.cc"],
|
2022-03-21 20:07:37 +01:00
|
|
|
"//mediapipe/framework:android_no_jni": ["resource_util_loonix.cc"],
|
2020-04-07 04:10:12 +02:00
|
|
|
"//mediapipe:ios": ["resource_util_apple.cc"],
|
2021-03-25 23:01:44 +01:00
|
|
|
"//mediapipe:macos": ["resource_util_default.cc"],
|
2019-06-17 01:03:25 +02:00
|
|
|
}),
|
2021-03-25 23:01:44 +01:00
|
|
|
hdrs = [
|
|
|
|
"resource_util.h",
|
|
|
|
],
|
2019-06-17 01:03:25 +02:00
|
|
|
# We use Objective-C++ on iOS.
|
2019-08-17 03:49:25 +02:00
|
|
|
copts = select({
|
|
|
|
"//conditions:default": [],
|
2020-04-07 04:10:12 +02:00
|
|
|
"//mediapipe:ios": [
|
2019-08-17 03:49:25 +02:00
|
|
|
"-ObjC++",
|
|
|
|
],
|
|
|
|
"//mediapipe:macos": [],
|
|
|
|
}),
|
2021-03-25 23:01:44 +01:00
|
|
|
visibility = ["//visibility:public"],
|
2019-06-17 01:03:25 +02:00
|
|
|
deps = [
|
2021-03-25 23:01:44 +01:00
|
|
|
":resource_util_custom",
|
2021-09-01 22:49:12 +02:00
|
|
|
"@com_google_absl//absl/strings:str_format",
|
2021-06-24 23:10:25 +02:00
|
|
|
"//mediapipe/framework/deps:file_path",
|
2021-09-01 22:49:12 +02:00
|
|
|
"//mediapipe/framework/port:logging",
|
2019-06-17 01:03:25 +02:00
|
|
|
"//mediapipe/framework/port:ret_check",
|
2021-02-27 09:21:16 +01:00
|
|
|
"//mediapipe/framework/port:singleton",
|
2019-06-17 01:03:25 +02:00
|
|
|
"//mediapipe/framework/port:status",
|
|
|
|
"//mediapipe/framework/port:statusor",
|
2021-02-27 09:21:16 +01:00
|
|
|
"//mediapipe/framework/port:file_helpers",
|
2019-06-17 01:03:25 +02:00
|
|
|
"@com_google_absl//absl/strings",
|
|
|
|
] + select({
|
|
|
|
"//conditions:default": [
|
2020-07-30 02:33:39 +02:00
|
|
|
"@com_google_absl//absl/flags:flag",
|
2019-06-17 01:03:25 +02:00
|
|
|
],
|
|
|
|
"//mediapipe:android": [
|
|
|
|
"//mediapipe/util/android:asset_manager_util",
|
|
|
|
"//mediapipe/util/android/file/base",
|
|
|
|
],
|
2022-03-21 20:07:37 +01:00
|
|
|
"//mediapipe/framework:android_no_jni": [],
|
2020-04-07 04:10:12 +02:00
|
|
|
"//mediapipe:ios": [],
|
2019-08-17 03:49:25 +02:00
|
|
|
"//mediapipe:macos": [
|
2020-07-30 02:33:39 +02:00
|
|
|
"@com_google_absl//absl/flags:flag",
|
2019-08-17 03:49:25 +02:00
|
|
|
],
|
2019-06-17 01:03:25 +02:00
|
|
|
}),
|
|
|
|
)
|
|
|
|
|
2021-05-05 03:30:15 +02:00
|
|
|
cc_library(
|
|
|
|
name = "resource_cache",
|
|
|
|
hdrs = ["resource_cache.h"],
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
deps = [
|
|
|
|
"//mediapipe/framework/port:logging",
|
2022-11-16 00:16:11 +01:00
|
|
|
"@com_google_absl//absl/container:flat_hash_map",
|
2021-05-05 03:30:15 +02:00
|
|
|
"@com_google_absl//absl/functional:function_ref",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_test(
|
|
|
|
name = "resource_cache_test",
|
|
|
|
srcs = ["resource_cache_test.cc"],
|
|
|
|
deps = [
|
|
|
|
":resource_cache",
|
|
|
|
"//mediapipe/framework/port:gtest_main",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2019-06-17 01:03:25 +02:00
|
|
|
cc_library(
|
|
|
|
name = "tensor_to_detection",
|
|
|
|
srcs = ["tensor_to_detection.cc"],
|
|
|
|
hdrs = ["tensor_to_detection.h"],
|
|
|
|
features = [
|
|
|
|
# Layering check doesn't play nicely with portable proto wrappers.
|
|
|
|
"no_layering_check",
|
|
|
|
],
|
2021-03-25 23:01:44 +01:00
|
|
|
visibility = ["//visibility:public"],
|
2019-06-17 01:03:25 +02:00
|
|
|
deps = [
|
|
|
|
"//mediapipe/framework/formats:detection_cc_proto",
|
|
|
|
"//mediapipe/framework/formats:location",
|
2022-09-06 23:29:51 +02:00
|
|
|
"//mediapipe/framework/formats:location_opencv",
|
2019-06-17 01:03:25 +02:00
|
|
|
"@com_google_absl//absl/strings:str_format",
|
|
|
|
"@com_google_absl//absl/types:variant",
|
|
|
|
"//mediapipe/framework/port:status",
|
|
|
|
"//mediapipe/framework/port:map_util",
|
|
|
|
] + select({
|
|
|
|
"//conditions:default": [
|
|
|
|
"@org_tensorflow//tensorflow/core:framework",
|
|
|
|
],
|
|
|
|
"//mediapipe:android": [
|
2020-05-21 18:46:31 +02:00
|
|
|
"@org_tensorflow//tensorflow/core:portable_tensorflow_lib_lite",
|
2019-06-17 01:03:25 +02:00
|
|
|
],
|
|
|
|
}),
|
|
|
|
)
|
2019-08-17 03:49:25 +02:00
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "time_series_util",
|
|
|
|
srcs = ["time_series_util.cc"],
|
|
|
|
hdrs = ["time_series_util.h"],
|
2021-03-25 23:01:44 +01:00
|
|
|
visibility = ["//visibility:public"],
|
2019-08-17 03:49:25 +02:00
|
|
|
deps = [
|
|
|
|
"//mediapipe/framework:calculator_framework",
|
|
|
|
"//mediapipe/framework/formats:matrix",
|
|
|
|
"//mediapipe/framework/formats:time_series_header_cc_proto",
|
|
|
|
"//mediapipe/framework/port:integral_types",
|
|
|
|
"//mediapipe/framework/port:logging",
|
|
|
|
"//mediapipe/framework/port:status",
|
|
|
|
"@com_google_absl//absl/strings",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "time_series_test_util",
|
|
|
|
testonly = 1,
|
|
|
|
hdrs = ["time_series_test_util.h"],
|
2021-03-25 23:01:44 +01:00
|
|
|
visibility = ["//visibility:public"],
|
2019-08-17 03:49:25 +02:00
|
|
|
deps = [
|
|
|
|
":time_series_util",
|
|
|
|
"//mediapipe/framework:calculator_framework",
|
|
|
|
"//mediapipe/framework:calculator_runner",
|
|
|
|
"//mediapipe/framework/formats:matrix",
|
|
|
|
"//mediapipe/framework/formats:time_series_header_cc_proto",
|
|
|
|
"//mediapipe/framework/port:gtest_main",
|
|
|
|
"//mediapipe/framework/port:integral_types",
|
|
|
|
"//mediapipe/framework/port:logging",
|
|
|
|
"//mediapipe/framework/port:parse_text_proto",
|
|
|
|
"//mediapipe/framework/port:status",
|
|
|
|
"@com_google_absl//absl/strings",
|
2021-03-25 23:01:44 +01:00
|
|
|
"@eigen_archive//:eigen3",
|
2019-08-17 03:49:25 +02:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_test(
|
|
|
|
name = "time_series_util_test",
|
|
|
|
size = "small",
|
|
|
|
srcs = ["time_series_util_test.cc"],
|
|
|
|
deps = [
|
|
|
|
":time_series_util",
|
|
|
|
"//mediapipe/framework:calculator_framework",
|
|
|
|
"//mediapipe/framework/formats:time_series_header_cc_proto",
|
|
|
|
"//mediapipe/framework/port:gtest_main",
|
2021-03-25 23:01:44 +01:00
|
|
|
"@eigen_archive//:eigen3",
|
2019-08-17 03:49:25 +02:00
|
|
|
],
|
|
|
|
)
|
2021-06-24 23:10:25 +02:00
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "packet_test_util",
|
|
|
|
testonly = 1,
|
|
|
|
hdrs = ["packet_test_util.h"],
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
deps = [
|
|
|
|
"//mediapipe/framework:demangle",
|
|
|
|
"//mediapipe/framework:packet",
|
|
|
|
"//mediapipe/framework:timestamp",
|
|
|
|
"//mediapipe/framework/port:gtest_main",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_test(
|
|
|
|
name = "packet_test_util_test",
|
|
|
|
size = "small",
|
|
|
|
srcs = ["packet_test_util_test.cc"],
|
|
|
|
deps = [
|
|
|
|
":packet_test_util",
|
|
|
|
"//mediapipe/framework:packet",
|
|
|
|
"//mediapipe/framework:port",
|
|
|
|
"//mediapipe/framework:timestamp",
|
|
|
|
"//mediapipe/framework/port:gtest_main",
|
|
|
|
],
|
|
|
|
)
|
2021-11-13 05:10:43 +01:00
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "rectangle_util",
|
|
|
|
srcs = ["rectangle_util.cc"],
|
|
|
|
hdrs = ["rectangle_util.h"],
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
deps = [
|
|
|
|
"//mediapipe/framework/formats:rect_cc_proto",
|
|
|
|
"//mediapipe/framework/port:rectangle",
|
|
|
|
"//mediapipe/framework/port:ret_check",
|
|
|
|
"//mediapipe/framework/port:statusor",
|
|
|
|
"@com_google_absl//absl/status:statusor",
|
|
|
|
"@com_google_absl//absl/types:span",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_test(
|
|
|
|
name = "rectangle_util_test",
|
|
|
|
srcs = ["rectangle_util_test.cc"],
|
|
|
|
deps = [
|
|
|
|
":rectangle_util",
|
|
|
|
"//mediapipe/framework/port:gtest_main",
|
|
|
|
],
|
|
|
|
)
|