From 032d7a5d22988b0f6b15f45dc587f15a9c387e3a Mon Sep 17 00:00:00 2001 From: Prianka Liz Kariat Date: Thu, 19 Oct 2023 19:56:44 +0530 Subject: [PATCH] Removed support for CVPixelBuffer of type 32RGBA --- .../tasks/ios/vision/core/utils/sources/MPPImage+Utils.mm | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/mediapipe/tasks/ios/vision/core/utils/sources/MPPImage+Utils.mm b/mediapipe/tasks/ios/vision/core/utils/sources/MPPImage+Utils.mm index 440b321b9..df61d4c32 100644 --- a/mediapipe/tasks/ios/vision/core/utils/sources/MPPImage+Utils.mm +++ b/mediapipe/tasks/ios/vision/core/utils/sources/MPPImage+Utils.mm @@ -120,8 +120,7 @@ static void FreeDataProviderReleaseCallback(void *buffer, const void *data, size default: { [MPPCommonUtils createCustomError:error withCode:MPPTasksErrorCodeInvalidArgumentError - description:@"Invalid source pixel buffer format. Expecting one of " - @"kCVPixelFormatType_32RGBA, kCVPixelFormatType_32BGRA"]; + description:@"Some internal error occured."]; return nullptr; } } @@ -149,7 +148,6 @@ static void FreeDataProviderReleaseCallback(void *buffer, const void *data, size std::unique_ptr imageFrame = nullptr; switch (pixelBufferFormat) { - case kCVPixelFormatType_32RGBA: case kCVPixelFormatType_32BGRA: { CVPixelBufferLockBaseAddress(pixelBuffer, 0); imageFrame = [MPPPixelDataUtils @@ -165,9 +163,7 @@ static void FreeDataProviderReleaseCallback(void *buffer, const void *data, size default: { [MPPCommonUtils createCustomError:error withCode:MPPTasksErrorCodeInvalidArgumentError - description:@"Unsupported pixel format for CVPixelBuffer. Supported " - @"pixel format types are kCVPixelFormatType_32BGRA and " - @"kCVPixelFormatType_32RGBA"]; + description:@"Unsupported pixel format for CVPixelBuffer. Supported pixel format is kCVPixelFormatType_32BGRA"]; } }