Internal change
PiperOrigin-RevId: 523351901
This commit is contained in:
committed by
Copybara-Service
parent
9793654364
commit
a448790300
@@ -969,6 +969,15 @@ cc_library(
|
||||
}) + select({
|
||||
"//conditions:default": [],
|
||||
"//mediapipe/framework/port:disable_opencv": ["MEDIAPIPE_DISABLE_OPENCV=1"],
|
||||
}) + select({
|
||||
"//conditions:default": [],
|
||||
# TODO: Improve this. This only sets MEDIAPIPE_DISABLE_OPENCV as a "defines" Make
|
||||
# value, not as a bazel "--define" variable, which has effects in C++ code but not in
|
||||
# select() statements.
|
||||
"//mediapipe/framework/port:enable_halide": [
|
||||
"MEDIAPIPE_ENABLE_HALIDE=1",
|
||||
"MEDIAPIPE_DISABLE_OPENCV=1",
|
||||
],
|
||||
}) + select({
|
||||
"//conditions:default": [],
|
||||
"//mediapipe/framework:disable_rtti_and_exceptions": [
|
||||
|
||||
@@ -111,12 +111,15 @@ class Image {
|
||||
return gpu_buffer_.internal_storage<mediapipe::GlTextureBuffer>();
|
||||
}
|
||||
#endif // MEDIAPIPE_GPU_BUFFER_USE_CV_PIXEL_BUFFER
|
||||
#endif // !MEDIAPIPE_DISABLE_GPU
|
||||
|
||||
// Get a GPU view. Automatically uploads from CPU if needed.
|
||||
const mediapipe::GpuBuffer GetGpuBuffer() const {
|
||||
#if !MEDIAPIPE_DISABLE_GPU
|
||||
if (use_gpu_ == false) ConvertToGpu();
|
||||
#endif // !MEDIAPIPE_DISABLE_GPU
|
||||
return gpu_buffer_;
|
||||
}
|
||||
#endif // !MEDIAPIPE_DISABLE_GPU
|
||||
|
||||
// Returns image properties.
|
||||
int width() const;
|
||||
|
||||
@@ -222,6 +222,18 @@ config_setting(
|
||||
},
|
||||
)
|
||||
|
||||
# Enable Halide when defining MEDIAPIPE_ENABLE_HALIDE to 1 in bazel command.
|
||||
# This will automatically disable opencv, i.e. will set MEDIAPIPE_DISABLE_OPENCV to 1.
|
||||
# Note that this only applies to a select few calculators/framework components currently.
|
||||
# TODO: Improve this. This only sets MEDIAPIPE_DISABLE_OPENCV as a "defines" Make value,
|
||||
# not as a bazel "--define" variable, which has effects in C++ code but not in select() statements.
|
||||
config_setting(
|
||||
name = "enable_halide",
|
||||
define_values = {
|
||||
"MEDIAPIPE_ENABLE_HALIDE": "1",
|
||||
},
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "opencv_core",
|
||||
hdrs = ["opencv_core_inc.h"],
|
||||
|
||||
Reference in New Issue
Block a user