Skip to content

Commit

Permalink
internal fix
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 564404269
  • Loading branch information
cmcclanahan authored and copybara-github committed Sep 11, 2023
1 parent 7f245bc commit e51b923
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions mediapipe/calculators/util/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ cc_library(
"//mediapipe/gpu:gl_calculator_helper",
"//mediapipe/gpu:gl_simple_shaders",
"//mediapipe/gpu:gpu_buffer",
"//mediapipe/gpu:gpu_buffer_format",
"//mediapipe/gpu:shader_util",
],
}),
Expand Down
6 changes: 4 additions & 2 deletions mediapipe/calculators/util/annotation_overlay_calculator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#include "mediapipe/gpu/gl_calculator_helper.h"
#include "mediapipe/gpu/gl_simple_shaders.h"
#include "mediapipe/gpu/gpu_buffer.h"
#include "mediapipe/gpu/gpu_buffer_format.h"
#include "mediapipe/gpu/shader_util.h"
#endif // !MEDIAPIPE_DISABLE_GPU

Expand Down Expand Up @@ -449,7 +450,8 @@ absl::Status AnnotationOverlayCalculator::RenderToGpu(CalculatorContext* cc,
auto input_texture = gpu_helper_.CreateSourceTexture(input_frame);

auto output_texture = gpu_helper_.CreateDestinationTexture(
width_, height_, mediapipe::GpuBufferFormat::kBGRA32);
input_texture.width(), input_texture.height(),
mediapipe::GpuBufferFormat::kBGRA32);

// Upload render target to GPU.
{
Expand Down Expand Up @@ -478,7 +480,7 @@ absl::Status AnnotationOverlayCalculator::RenderToGpu(CalculatorContext* cc,
}

// Send out blended image as GPU packet.
auto output_frame = output_texture.GetFrame<Type>();
auto output_frame = output_texture.template GetFrame<Type>();
cc->Outputs().Tag(Tag).Add(output_frame.release(), cc->InputTimestamp());

// Cleanup
Expand Down

0 comments on commit e51b923

Please sign in to comment.