From 26a67f4424d1952cfb758c7917a511c7552eddee Mon Sep 17 00:00:00 2001 From: MediaPipe Team Date: Tue, 12 Sep 2023 02:12:50 -0700 Subject: [PATCH] No public description PiperOrigin-RevId: 564651554 --- mediapipe/calculators/image/BUILD | 1 + .../calculators/image/affine_transformation_runner_gl.cc | 5 +++++ mediapipe/calculators/tensor/tensor_converter_calculator.cc | 6 +++--- mediapipe/gpu/gpu_origin.proto | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/mediapipe/calculators/image/BUILD b/mediapipe/calculators/image/BUILD index 18d4e2feb..54ad80206 100644 --- a/mediapipe/calculators/image/BUILD +++ b/mediapipe/calculators/image/BUILD @@ -695,6 +695,7 @@ cc_library( "//mediapipe/gpu:gpu_buffer", "//mediapipe/gpu:gpu_origin_cc_proto", "//mediapipe/gpu:shader_util", + "@com_google_absl//absl/log:absl_log", "@com_google_absl//absl/memory", "@com_google_absl//absl/status", "@com_google_absl//absl/status:statusor", diff --git a/mediapipe/calculators/image/affine_transformation_runner_gl.cc b/mediapipe/calculators/image/affine_transformation_runner_gl.cc index ee40de668..0fe2d2744 100644 --- a/mediapipe/calculators/image/affine_transformation_runner_gl.cc +++ b/mediapipe/calculators/image/affine_transformation_runner_gl.cc @@ -20,6 +20,7 @@ #include "Eigen/Core" #include "Eigen/Geometry" #include "Eigen/LU" +#include "absl/log/absl_log.h" #include "absl/memory/memory.h" #include "absl/status/status.h" #include "absl/status/statusor.h" @@ -53,6 +54,10 @@ bool IsMatrixVerticalFlipNeeded(GpuOrigin::Mode gpu_origin) { #endif // __APPLE__ case GpuOrigin::TOP_LEFT: return false; + default: + ABSL_LOG(ERROR) << "Incorrect GpuOrigin: " + << static_cast(gpu_origin); + return true; } } diff --git a/mediapipe/calculators/tensor/tensor_converter_calculator.cc b/mediapipe/calculators/tensor/tensor_converter_calculator.cc index f624ed566..af5b71d3a 100644 --- a/mediapipe/calculators/tensor/tensor_converter_calculator.cc +++ b/mediapipe/calculators/tensor/tensor_converter_calculator.cc @@ -73,10 +73,10 @@ absl::StatusOr ShouldFlipVertically( #else return true; #endif + default: + return absl::InvalidArgumentError( + absl::StrFormat("Unhandled GPU origin %i", options.gpu_origin())); } - - return absl::InvalidArgumentError( - absl::StrFormat("Unhandled GPU origin %i", options.gpu_origin())); } typedef Eigen::Matrix diff --git a/mediapipe/gpu/gpu_origin.proto b/mediapipe/gpu/gpu_origin.proto index f4db83537..9d4ae2aa1 100644 --- a/mediapipe/gpu/gpu_origin.proto +++ b/mediapipe/gpu/gpu_origin.proto @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -syntax = "proto2"; +syntax = "proto3"; package mediapipe;