Project import generated by Copybara.

GitOrigin-RevId: 612e50bb8db2ec3dc1c30049372d87a80c3848db
This commit is contained in:
MediaPipe Team
2020-08-30 19:52:55 -04:00
committed by chuoling
parent a7225b938a
commit c0124fb83c
248 changed files with 5225 additions and 1914 deletions
+1 -1
View File
@@ -16,7 +16,7 @@
load("//mediapipe/framework/port:build_config.bzl", "mediapipe_proto_library")
licenses(["notice"]) # Apache 2.0
licenses(["notice"])
package(default_visibility = ["//visibility:private"])
@@ -92,11 +92,11 @@ class IntAdderCalculator : public CalculatorBase {
cc->Inputs().Index(i).Set<int>();
}
cc->Outputs().Index(0).Set<int>();
cc->SetTimestampOffset(TimestampDiff(0));
return ::mediapipe::OkStatus();
}
::mediapipe::Status Open(CalculatorContext* cc) final {
cc->SetOffset(TimestampDiff(0));
return ::mediapipe::OkStatus();
}
@@ -269,11 +269,11 @@ class Delay20Calculator : public CalculatorBase {
static ::mediapipe::Status GetContract(CalculatorContract* cc) {
cc->Inputs().Index(0).Set<int>();
cc->Outputs().Index(0).Set<int>();
cc->SetTimestampOffset(TimestampDiff(20));
return ::mediapipe::OkStatus();
}
::mediapipe::Status Open(CalculatorContext* cc) final {
cc->SetOffset(TimestampDiff(20));
cc->Outputs().Index(0).AddPacket(MakePacket<int>(0).At(Timestamp(0)));
return ::mediapipe::OkStatus();
}
@@ -641,11 +641,11 @@ class OffsetBoundCalculator : public CalculatorBase {
static ::mediapipe::Status GetContract(CalculatorContract* cc) {
cc->Inputs().Index(0).Set<int>();
cc->Outputs().Index(0).Set<int>();
cc->SetTimestampOffset(TimestampDiff(0));
return ::mediapipe::OkStatus();
}
::mediapipe::Status Open(CalculatorContext* cc) final {
cc->SetOffset(0);
return ::mediapipe::OkStatus();
}
@@ -1446,10 +1446,10 @@ class OffsetAndBoundCalculator : public CalculatorBase {
static ::mediapipe::Status GetContract(CalculatorContract* cc) {
cc->Inputs().Index(0).Set<int>();
cc->Outputs().Index(0).SetSameAs(&cc->Inputs().Index(0));
cc->SetTimestampOffset(TimestampDiff(0));
return ::mediapipe::OkStatus();
}
::mediapipe::Status Open(CalculatorContext* cc) final {
cc->SetOffset(0);
return ::mediapipe::OkStatus();
}
::mediapipe::Status Process(CalculatorContext* cc) final {
+9 -9
View File
@@ -100,11 +100,11 @@ class SquareIntCalculator : public CalculatorBase {
static ::mediapipe::Status GetContract(CalculatorContract* cc) {
cc->Inputs().Index(0).Set<int>();
cc->Outputs().Index(0).SetSameAs(&cc->Inputs().Index(0));
cc->SetTimestampOffset(TimestampDiff(0));
return ::mediapipe::OkStatus();
}
::mediapipe::Status Open(CalculatorContext* cc) final {
cc->SetOffset(TimestampDiff(0));
return ::mediapipe::OkStatus();
}
@@ -134,6 +134,7 @@ class DemuxTimedCalculator : public CalculatorBase {
id < cc->Outputs().EndId("OUTPUT"); ++id) {
cc->Outputs().Get(id).SetSameAs(data_input);
}
cc->SetTimestampOffset(TimestampDiff(0));
return ::mediapipe::OkStatus();
}
@@ -142,7 +143,6 @@ class DemuxTimedCalculator : public CalculatorBase {
data_input_ = cc->Inputs().GetId("INPUT", 0);
output_base_ = cc->Outputs().GetId("OUTPUT", 0);
num_outputs_ = cc->Outputs().NumEntries("OUTPUT");
cc->SetOffset(TimestampDiff(0));
return ::mediapipe::OkStatus();
}
@@ -194,6 +194,7 @@ class MuxTimedCalculator : public CalculatorBase {
}
RET_CHECK_EQ(cc->Outputs().NumEntries(), 1);
cc->Outputs().Tag("OUTPUT").SetSameAs(data_input0);
cc->SetTimestampOffset(TimestampDiff(0));
return ::mediapipe::OkStatus();
}
@@ -202,7 +203,6 @@ class MuxTimedCalculator : public CalculatorBase {
data_input_base_ = cc->Inputs().GetId("INPUT", 0);
num_data_inputs_ = cc->Inputs().NumEntries("INPUT");
output_ = cc->Outputs().GetId("OUTPUT", 0);
cc->SetOffset(TimestampDiff(0));
return ::mediapipe::OkStatus();
}
@@ -232,11 +232,11 @@ class IntAdderCalculator : public CalculatorBase {
cc->Inputs().Index(i).Set<int>();
}
cc->Outputs().Index(0).Set<int>();
cc->SetTimestampOffset(TimestampDiff(0));
return ::mediapipe::OkStatus();
}
::mediapipe::Status Open(CalculatorContext* cc) final {
cc->SetOffset(TimestampDiff(0));
return ::mediapipe::OkStatus();
}
@@ -260,11 +260,11 @@ class FloatAdderCalculator : public CalculatorBase {
cc->Inputs().Index(i).Set<float>();
}
cc->Outputs().Index(0).Set<float>();
cc->SetTimestampOffset(TimestampDiff(0));
return ::mediapipe::OkStatus();
}
::mediapipe::Status Open(CalculatorContext* cc) final {
cc->SetOffset(TimestampDiff(0));
return ::mediapipe::OkStatus();
}
@@ -288,11 +288,11 @@ class IntMultiplierCalculator : public CalculatorBase {
cc->Inputs().Index(i).Set<int>();
}
cc->Outputs().Index(0).Set<int>();
cc->SetTimestampOffset(TimestampDiff(0));
return ::mediapipe::OkStatus();
}
::mediapipe::Status Open(CalculatorContext* cc) final {
cc->SetOffset(TimestampDiff(0));
return ::mediapipe::OkStatus();
}
@@ -316,12 +316,12 @@ class FloatScalarMultiplierCalculator : public CalculatorBase {
cc->Inputs().Index(0).Set<float>();
cc->Outputs().Index(0).Set<float>();
cc->InputSidePackets().Index(0).Set<float>();
cc->SetTimestampOffset(TimestampDiff(0));
return ::mediapipe::OkStatus();
}
::mediapipe::Status Open(CalculatorContext* cc) final {
scalar_ = cc->InputSidePackets().Index(0).Get<float>();
cc->SetOffset(TimestampDiff(0));
return ::mediapipe::OkStatus();
}
@@ -343,11 +343,11 @@ class IntToFloatCalculator : public CalculatorBase {
static ::mediapipe::Status GetContract(CalculatorContract* cc) {
cc->Inputs().Index(0).Set<int>();
cc->Outputs().Index(0).Set<float>();
cc->SetTimestampOffset(TimestampDiff(0));
return ::mediapipe::OkStatus();
}
::mediapipe::Status Open(CalculatorContext* cc) final {
cc->SetOffset(TimestampDiff(0));
return ::mediapipe::OkStatus();
}
@@ -937,11 +937,11 @@ class SemaphoreCalculator : public CalculatorBase {
cc->Outputs().Index(0).SetSameAs(&cc->Inputs().Index(0));
cc->InputSidePackets().Tag("POST_SEM").Set<Semaphore*>();
cc->InputSidePackets().Tag("WAIT_SEM").Set<Semaphore*>();
cc->SetTimestampOffset(TimestampDiff(0));
return ::mediapipe::OkStatus();
}
::mediapipe::Status Open(CalculatorContext* cc) override {
cc->SetOffset(TimestampDiff(0));
return ::mediapipe::OkStatus();
}
+1 -1
View File
@@ -17,7 +17,7 @@
load("//mediapipe/framework/port:build_config.bzl", "mediapipe_cc_proto_library")
licenses(["notice"]) # Apache 2.0
licenses(["notice"])
package(default_visibility = ["//visibility:private"])
+1 -1
View File
@@ -20,7 +20,7 @@ package(
features = ["-layering_check"],
)
licenses(["notice"]) # Apache 2.0
licenses(["notice"])
exports_files(["LICENSE"])
+1 -1
View File
@@ -18,7 +18,7 @@ load("//mediapipe/framework/port:build_config.bzl", "mediapipe_proto_library")
package(default_visibility = ["//visibility:private"])
licenses(["notice"]) # Apache 2.0
licenses(["notice"])
exports_files(["LICENSE"])
@@ -21,6 +21,9 @@ syntax = "proto2";
package mediapipe;
option java_package = "com.google.mediapipe.formats.proto";
option java_outer_classname = "MatrixDataProto";
// Proto for serializing Matrix data.
// Data are stored in column-major order by default.
message MatrixData {
+1 -1
View File
@@ -16,7 +16,7 @@
# Description:
# Working with dense optical flow in mediapipe.
licenses(["notice"]) # Apache 2.0
licenses(["notice"])
exports_files(["LICENSE"])
@@ -17,7 +17,7 @@
load("//mediapipe/framework/port:build_config.bzl", "mediapipe_cc_proto_library")
licenses(["notice"]) # Apache 2.0
licenses(["notice"])
package(default_visibility = ["//visibility:private"])
+1 -1
View File
@@ -24,6 +24,7 @@ namespace mediapipe {
const std::string& name, const PacketType* packet_type) {
output_stream_spec_.name = name;
output_stream_spec_.packet_type = packet_type;
output_stream_spec_.offset_enabled = false;
PrepareForRun(nullptr);
return ::mediapipe::OkStatus();
}
@@ -33,7 +34,6 @@ void OutputStreamManager::PrepareForRun(
output_stream_spec_.error_callback = std::move(error_callback);
output_stream_spec_.locked_intro_data = false;
output_stream_spec_.offset_enabled = false;
output_stream_spec_.header = Packet();
{
absl::MutexLock lock(&stream_mutex_);
+5 -2
View File
@@ -15,7 +15,7 @@
# Description:
# Port of various libraries and utilities.
licenses(["notice"]) # Apache 2.0
licenses(["notice"])
package(
default_visibility = ["//visibility:private"],
@@ -44,7 +44,10 @@ cc_library(
name = "aligned_malloc_and_free",
hdrs = ["aligned_malloc_and_free.h"],
visibility = ["//visibility:public"],
deps = ["//mediapipe/framework/deps:aligned_malloc_and_free"],
deps = [
"//mediapipe/framework/deps:aligned_malloc_and_free",
"@com_google_absl//absl/base:core_headers",
],
)
# This proto lib is used by any code that needs to do proto I/O and proto template parsing.
@@ -23,6 +23,9 @@
#include <opencv2/imgproc/imgproc.hpp>
#else
#include <opencv2/imgproc.hpp>
#if CV_VERSION_MAJOR == 4
#include <opencv2/imgproc/types_c.h>
#endif
#endif
#endif // MEDIAPIPE_PORT_OPENCV_IMGPROC_INC_H_
+1 -1
View File
@@ -13,7 +13,7 @@
# limitations under the License.
#
licenses(["notice"]) # Apache 2.0
licenses(["notice"])
package(default_visibility = ["//mediapipe/framework:__subpackages__"])
+1 -1
View File
@@ -13,7 +13,7 @@
# limitations under the License.
#
licenses(["notice"]) # Apache 2.0
licenses(["notice"])
cc_library(
name = "reporter_lib",
+1 -1
View File
@@ -13,7 +13,7 @@
# limitations under the License.
#
licenses(["notice"]) # Apache 2.0
licenses(["notice"])
package(
default_visibility = ["//mediapipe/framework:__subpackages__"],
+1 -1
View File
@@ -13,7 +13,7 @@
# limitations under the License.
#
licenses(["notice"]) # Apache 2.0
licenses(["notice"])
package(
default_visibility = ["//visibility:private"],
+1 -1
View File
@@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
licenses(["notice"]) # Apache 2.0
licenses(["notice"])
package(default_visibility = ["//visibility:private"])
+1 -1
View File
@@ -23,7 +23,7 @@ load(
"mediapipe_binary_graph",
)
licenses(["notice"]) # Apache 2.0
licenses(["notice"])
package(default_visibility = ["//visibility:private"])
+1 -1
View File
@@ -18,7 +18,7 @@ load(
"mediapipe_simple_subgraph",
)
licenses(["notice"]) # Apache 2.0
licenses(["notice"])
package(default_visibility = ["//mediapipe:__subpackages__"])