From 1c3a061038382f0e3d0c73dd370e3c42807cc8c5 Mon Sep 17 00:00:00 2001 From: MediaPipe Team Date: Sat, 15 Apr 2023 00:22:57 -0700 Subject: [PATCH] Internal change PiperOrigin-RevId: 524481964 --- mediapipe/gpu/gpu_buffer_storage_yuv_image.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mediapipe/gpu/gpu_buffer_storage_yuv_image.cc b/mediapipe/gpu/gpu_buffer_storage_yuv_image.cc index c7acd1340..4b0913b96 100644 --- a/mediapipe/gpu/gpu_buffer_storage_yuv_image.cc +++ b/mediapipe/gpu/gpu_buffer_storage_yuv_image.cc @@ -167,7 +167,7 @@ GpuBufferStorageYuvImage::GpuBufferStorageYuvImage(int width, int height, GpuBufferFormat format) { libyuv::FourCC fourcc = FourCCForGpuBufferFormat(format); int y_stride = std::ceil(1.0f * width / kDefaultDataAligment); - auto y_data = std::make_unique(y_stride * height); + auto y_data = std::make_unique(y_stride * height); switch (fourcc) { case libyuv::FOURCC_NV12: case libyuv::FOURCC_NV21: { @@ -175,7 +175,7 @@ GpuBufferStorageYuvImage::GpuBufferStorageYuvImage(int width, int height, int uv_width = 2 * std::ceil(0.5f * width); int uv_height = std::ceil(0.5f * height); int uv_stride = std::ceil(1.0f * uv_width / kDefaultDataAligment); - auto uv_data = std::make_unique(uv_stride * uv_height); + auto uv_data = std::make_unique(uv_stride * uv_height); yuv_image_ = std::make_shared( fourcc, std::move(y_data), y_stride, std::move(uv_data), uv_stride, nullptr, 0, width, height); @@ -187,8 +187,8 @@ GpuBufferStorageYuvImage::GpuBufferStorageYuvImage(int width, int height, int uv_width = std::ceil(0.5f * width); int uv_height = std::ceil(0.5f * height); int uv_stride = std::ceil(1.0f * uv_width / kDefaultDataAligment); - auto u_data = std::make_unique(uv_stride * uv_height); - auto v_data = std::make_unique(uv_stride * uv_height); + auto u_data = std::make_unique(uv_stride * uv_height); + auto v_data = std::make_unique(uv_stride * uv_height); yuv_image_ = std::make_shared( fourcc, std::move(y_data), y_stride, std::move(u_data), uv_stride, std::move(v_data), uv_stride, width, height);