Add VEC32F4 support to ImageFrame
PiperOrigin-RevId: 522153305
This commit is contained in:
committed by
Copybara-Service
parent
6605f551e7
commit
065d750781
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user