Add VEC32F4 support to ImageFrame

PiperOrigin-RevId: 522153305
This commit is contained in:
MediaPipe Team
2023-04-05 14:25:17 -07:00
committed by Copybara-Service
parent 6605f551e7
commit 065d750781
10 changed files with 40 additions and 7 deletions
+8
View File
@@ -365,6 +365,10 @@ absl::StatusOr<CFHolder<CVPixelBufferRef>> CreateCVPixelBufferForImageFrame(
pixel_format = kCVPixelFormatType_TwoComponent32Float;
break;
case mediapipe::ImageFormat::VEC32F4:
pixel_format = kCVPixelFormatType_128RGBAFloat;
break;
default:
return ::mediapipe::UnknownErrorBuilder(MEDIAPIPE_LOC)
<< "unsupported ImageFrame format: " << image_format;
@@ -440,6 +444,10 @@ absl::StatusOr<CFHolder<CVPixelBufferRef>> CreateCVPixelBufferCopyingImageFrame(
pixel_format = kCVPixelFormatType_TwoComponent32Float;
break;
case mediapipe::ImageFormat::VEC32F4:
pixel_format = kCVPixelFormatType_128RGBAFloat;
break;
default:
return ::mediapipe::UnknownErrorBuilder(MEDIAPIPE_LOC)
<< "unsupported ImageFrame format: " << image_format;