Skip to content

Commit

Permalink
No public description
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 602190516
  • Loading branch information
gribozavr authored and copybara-github committed Jan 28, 2024
1 parent fd5f31c commit ecf4d4f
Show file tree
Hide file tree
Showing 18 changed files with 26 additions and 28 deletions.
1 change: 0 additions & 1 deletion mediapipe/framework/calculator_graph_event_loop_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include "mediapipe/framework/port/core_proto_inc.h"
#include "mediapipe/framework/port/gmock.h"
#include "mediapipe/framework/port/gtest.h"
#include "mediapipe/framework/port/integral_types.h"
#include "mediapipe/framework/port/logging.h"
#include "mediapipe/framework/port/status_matchers.h"
#include "mediapipe/framework/tool/sink.h"
Expand Down
2 changes: 1 addition & 1 deletion mediapipe/framework/calculator_graph_stopping_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include <cstdint>
#include <map>
#include <string>
#include <vector>
Expand All @@ -25,7 +26,6 @@
#include "mediapipe/framework/port/core_proto_inc.h"
#include "mediapipe/framework/port/gmock.h"
#include "mediapipe/framework/port/gtest.h"
#include "mediapipe/framework/port/integral_types.h"
#include "mediapipe/framework/port/logging.h"
#include "mediapipe/framework/port/status_matchers.h"
#include "mediapipe/framework/tool/sink.h"
Expand Down
1 change: 0 additions & 1 deletion mediapipe/framework/calculator_node.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
#include "mediapipe/framework/packet_set.h"
#include "mediapipe/framework/packet_type.h"
#include "mediapipe/framework/port.h"
#include "mediapipe/framework/port/integral_types.h"
#include "mediapipe/framework/port/status.h"
#include "mediapipe/framework/stream_handler.pb.h"
#include "mediapipe/framework/timestamp.h"
Expand Down
1 change: 0 additions & 1 deletion mediapipe/framework/calculator_parallel_execution_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include "mediapipe/framework/calculator_framework.h"
#include "mediapipe/framework/port/gmock.h"
#include "mediapipe/framework/port/gtest.h"
#include "mediapipe/framework/port/integral_types.h"
#include "mediapipe/framework/port/parse_text_proto.h"
#include "mediapipe/framework/port/status.h"
#include "mediapipe/framework/port/status_matchers.h"
Expand Down
1 change: 0 additions & 1 deletion mediapipe/framework/packet.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "absl/strings/str_cat.h"
#include "mediapipe/framework/port.h"
#include "mediapipe/framework/port/canonical_errors.h"
#include "mediapipe/framework/port/integral_types.h"
#include "mediapipe/framework/port/ret_check.h"
#include "mediapipe/framework/port/status.h"
#include "mediapipe/framework/port/status_builder.h"
Expand Down
1 change: 0 additions & 1 deletion mediapipe/framework/scheduler.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include "absl/base/macros.h"
#include "absl/synchronization/mutex.h"
#include "mediapipe/framework/calculator_node.h"
#include "mediapipe/framework/port/integral_types.h"
#include "mediapipe/framework/port/status.h"
#include "mediapipe/framework/scheduler_queue.h"
#include "mediapipe/framework/scheduler_shared.h"
Expand Down
1 change: 0 additions & 1 deletion mediapipe/framework/scheduler_queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include "absl/synchronization/mutex.h"
#include "mediapipe/framework/calculator_context.h"
#include "mediapipe/framework/executor.h"
#include "mediapipe/framework/port/integral_types.h"
#include "mediapipe/framework/scheduler_shared.h"

namespace mediapipe {
Expand Down
2 changes: 1 addition & 1 deletion mediapipe/framework/test_calculators.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
//
// Simple calculators that are useful for test cases.

#include <cstdint>
#include <memory>
#include <random>
#include <string>
Expand All @@ -26,7 +27,6 @@
#include "mediapipe/framework/calculator_framework.h"
#include "mediapipe/framework/deps/mathutil.h"
#include "mediapipe/framework/formats/matrix.h"
#include "mediapipe/framework/port/integral_types.h"
#include "mediapipe/framework/port/logging.h"
#include "mediapipe/framework/port/ret_check.h"
#include "mediapipe/framework/port/status.h"
Expand Down
20 changes: 11 additions & 9 deletions mediapipe/framework/timestamp.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@

#include "absl/log/absl_check.h"
#include "mediapipe/framework/deps/safe_int.h"
#include "mediapipe/framework/port/integral_types.h"
#include "mediapipe/framework/port/logging.h"

namespace mediapipe {
Expand Down Expand Up @@ -269,7 +268,8 @@ std::ostream& operator<<(std::ostream& os, TimestampDiff arg);

// Implementation details.

inline Timestamp::Timestamp() : timestamp_(kint64min) {}
inline Timestamp::Timestamp()
: timestamp_(std::numeric_limits<int64_t>::min()) {}

inline Timestamp::Timestamp(int64_t timestamp) : timestamp_(timestamp) {
ABSL_CHECK(!IsSpecialValue())
Expand All @@ -293,30 +293,32 @@ inline Timestamp Timestamp::CreateNoErrorChecking(int64_t timestamp) {
inline Timestamp Timestamp::Unset() { return Timestamp(); }

inline Timestamp Timestamp::Unstarted() {
return CreateNoErrorChecking(kint64min + 1);
return CreateNoErrorChecking(std::numeric_limits<int64_t>::min() + 1);
}

inline Timestamp Timestamp::PreStream() {
return CreateNoErrorChecking(kint64min + 2);
return CreateNoErrorChecking(std::numeric_limits<int64_t>::min() + 2);
}

inline Timestamp Timestamp::Min() {
return CreateNoErrorChecking(kint64min + 3);
return CreateNoErrorChecking(std::numeric_limits<int64_t>::min() + 3);
}

inline Timestamp Timestamp::Max() {
return CreateNoErrorChecking(kint64max - 3);
return CreateNoErrorChecking(std::numeric_limits<int64_t>::max() - 3);
}

inline Timestamp Timestamp::PostStream() {
return CreateNoErrorChecking(kint64max - 2);
return CreateNoErrorChecking(std::numeric_limits<int64_t>::max() - 2);
}

inline Timestamp Timestamp::OneOverPostStream() {
return CreateNoErrorChecking(kint64max - 1);
return CreateNoErrorChecking(std::numeric_limits<int64_t>::max() - 1);
}

inline Timestamp Timestamp::Done() { return CreateNoErrorChecking(kint64max); }
inline Timestamp Timestamp::Done() {
return CreateNoErrorChecking(std::numeric_limits<int64_t>::max());
}

} // namespace mediapipe

Expand Down
9 changes: 6 additions & 3 deletions mediapipe/framework/timestamp_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

#include "mediapipe/framework/timestamp.h"

#include <cstdint>
#include <limits>
#include <memory>
#include <vector>

Expand All @@ -34,9 +36,10 @@ TEST(TimestampDeathTest, ConstructorDieOnSpecialValue) {
}

TEST(TimestampDeathTest, Overflow) {
Timestamp large = Timestamp(kint64max / 2 + 100);
TimestampDiff large_diff = TimestampDiff(kint64max / 2 + 100);
Timestamp small = Timestamp(kint64min / 2 - 100);
Timestamp large = Timestamp(std::numeric_limits<int64_t>::max() / 2 + 100);
TimestampDiff large_diff =
TimestampDiff(std::numeric_limits<int64_t>::max() / 2 + 100);
Timestamp small = Timestamp(std::numeric_limits<int64_t>::min() / 2 - 100);
EXPECT_FALSE(large.IsSpecialValue());
EXPECT_FALSE(small.IsSpecialValue());
EXPECT_DEATH(large_diff + large_diff, "");
Expand Down
1 change: 0 additions & 1 deletion mediapipe/framework/validated_graph_config.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#include "mediapipe/framework/packet_type.h"
#include "mediapipe/framework/port.h"
#include "mediapipe/framework/port/core_proto_inc.h"
#include "mediapipe/framework/port/integral_types.h"
#include "mediapipe/framework/port/logging.h"
#include "mediapipe/framework/port/proto_ns.h"
#include "mediapipe/framework/port/ret_check.h"
Expand Down
1 change: 0 additions & 1 deletion mediapipe/util/audio_decoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include "absl/time/time.h"
#include "mediapipe/framework/formats/time_series_header.pb.h"
#include "mediapipe/framework/packet.h"
#include "mediapipe/framework/port/integral_types.h"
#include "mediapipe/framework/port/status.h"
#include "mediapipe/framework/timestamp.h"
#include "mediapipe/util/audio_decoder.pb.h"
Expand Down
2 changes: 1 addition & 1 deletion mediapipe/util/cpu_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "mediapipe/util/cpu_util.h"

#include <cmath>
#include <cstdint>

#ifdef __ANDROID__
#include "ndk/sources/android/cpufeatures/cpu-features.h"
Expand All @@ -31,7 +32,6 @@
#include "absl/strings/str_cat.h"
#include "absl/strings/substitute.h"
#include "mediapipe/framework/port/canonical_errors.h"
#include "mediapipe/framework/port/integral_types.h"
#include "mediapipe/framework/port/statusor.h"

namespace mediapipe {
Expand Down
2 changes: 1 addition & 1 deletion mediapipe/util/image_frame_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

#include <algorithm>
#include <cmath>
#include <cstdint>
#include <functional>
#include <string>
#include <vector>
Expand All @@ -35,7 +36,6 @@
#include "mediapipe/framework/formats/image_frame_opencv.h"
#include "mediapipe/framework/formats/yuv_image.h"
#include "mediapipe/framework/port/aligned_malloc_and_free.h"
#include "mediapipe/framework/port/integral_types.h"
#include "mediapipe/framework/port/port.h"
#include "mediapipe/framework/port/status_macros.h"

Expand Down
2 changes: 1 addition & 1 deletion mediapipe/util/image_frame_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
#ifndef MEDIAPIPE_UTIL_IMAGE_FRAME_UTIL_H_
#define MEDIAPIPE_UTIL_IMAGE_FRAME_UTIL_H_

#include <cstdint>
#include <string>

#include "absl/strings/string_view.h"
#include "mediapipe/framework/formats/image_format.pb.h"
#include "mediapipe/framework/port/integral_types.h"
#include "mediapipe/framework/port/opencv_imgproc_inc.h"
#include "mediapipe/framework/tool/status_util.h"

Expand Down
3 changes: 2 additions & 1 deletion mediapipe/util/label_map_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
#ifndef MEDIAPIPE_UTIL_LABEL_MAP_UTIL_H_
#define MEDIAPIPE_UTIL_LABEL_MAP_UTIL_H_

#include <cstdint>

#include "absl/strings/string_view.h"
#include "mediapipe/framework/port/integral_types.h"
#include "mediapipe/framework/port/proto_ns.h"
#include "mediapipe/framework/port/statusor.h"
#include "mediapipe/util/label_map.pb.h"
Expand Down
2 changes: 1 addition & 1 deletion mediapipe/util/time_series_test_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#ifndef MEDIAPIPE_UTIL_TIME_SERIES_TEST_UTIL_H_
#define MEDIAPIPE_UTIL_TIME_SERIES_TEST_UTIL_H_

#include <cstdint>
#include <memory>
#include <string>
#include <vector>
Expand All @@ -31,7 +32,6 @@
#include "mediapipe/framework/formats/time_series_header.pb.h"
#include "mediapipe/framework/port/gmock.h"
#include "mediapipe/framework/port/gtest.h"
#include "mediapipe/framework/port/integral_types.h"
#include "mediapipe/framework/port/parse_text_proto.h"
#include "mediapipe/framework/port/status.h"
#include "mediapipe/framework/port/status_matchers.h"
Expand Down
2 changes: 1 addition & 1 deletion mediapipe/util/time_series_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
#ifndef MEDIAPIPE_UTIL_TIME_SERIES_UTIL_H_
#define MEDIAPIPE_UTIL_TIME_SERIES_UTIL_H_

#include <cstdint>
#include <string>
#include <typeinfo>

#include "absl/strings/str_cat.h"
#include "mediapipe/framework/calculator_framework.h"
#include "mediapipe/framework/formats/matrix.h"
#include "mediapipe/framework/formats/time_series_header.pb.h"
#include "mediapipe/framework/port/integral_types.h"
#include "mediapipe/framework/port/status.h"

namespace mediapipe {
Expand Down

0 comments on commit ecf4d4f

Please sign in to comment.