From 55e5377c08413aca775d67cad55591b1eb3896f4 Mon Sep 17 00:00:00 2001 From: Prianka Liz Kariat Date: Tue, 14 Feb 2023 20:51:51 +0530 Subject: [PATCH] Updated formatting --- .../ios/vision/core/utils/sources/MPPImage+Utils.h | 6 +++--- .../ios/vision/core/utils/sources/MPPImage+Utils.m | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/mediapipe/tasks/ios/vision/core/utils/sources/MPPImage+Utils.h b/mediapipe/tasks/ios/vision/core/utils/sources/MPPImage+Utils.h index 69788e05e..65771cb4d 100644 --- a/mediapipe/tasks/ios/vision/core/utils/sources/MPPImage+Utils.h +++ b/mediapipe/tasks/ios/vision/core/utils/sources/MPPImage+Utils.h @@ -18,12 +18,12 @@ NS_ASSUME_NONNULL_BEGIN -/** Helper utility for performing operations on MPPImage specific to the - * MediaPipe Vision library. +/** + * Helper utility for performing operations on MPPImage specific to the MediaPipe Vision library. */ @interface MPPImage (Utils) -// /** Bitmap size of the image. */ +/** Bitmap size of the image. */ @property(nonatomic, readonly) CGSize bitmapSize; /** diff --git a/mediapipe/tasks/ios/vision/core/utils/sources/MPPImage+Utils.m b/mediapipe/tasks/ios/vision/core/utils/sources/MPPImage+Utils.m index 8cd2147c4..ba71c63c8 100644 --- a/mediapipe/tasks/ios/vision/core/utils/sources/MPPImage+Utils.m +++ b/mediapipe/tasks/ios/vision/core/utils/sources/MPPImage+Utils.m @@ -24,7 +24,7 @@ @interface MPPPixelDataUtils : NSObject -+ (uint8_t *)rgbPixelDatafromPixelData:(uint8_t *)pixelData ++ (uint8_t *)rgbPixelDataFromPixelData:(uint8_t *)pixelData withWidth:(size_t)width height:(size_t)height stride:(size_t)stride @@ -55,7 +55,7 @@ @implementation MPPPixelDataUtils : NSObject -+ (uint8_t *)rgbPixelDatafromPixelData:(uint8_t *)pixelData ++ (uint8_t *)rgbPixelDataFromPixelData:(uint8_t *)pixelData withWidth:(size_t)width height:(size_t)height stride:(size_t)stride @@ -120,11 +120,11 @@ @implementation MPPCVPixelBufferUtils -+ (uint8_t *)rgbPixelDatafromCVPixelBuffer:(CVPixelBufferRef)pixelBuffer error:(NSError **)error { ++ (uint8_t *)rgbPixelDataFromCVPixelBuffer:(CVPixelBufferRef)pixelBuffer error:(NSError **)error { CVPixelBufferLockBaseAddress(pixelBuffer, 0); uint8_t *rgbPixelData = [MPPPixelDataUtils - rgbPixelDatafromPixelData:(uint8_t *)CVPixelBufferGetBaseAddress(pixelBuffer) + rgbPixelDataFromPixelData:(uint8_t *)CVPixelBufferGetBaseAddress(pixelBuffer) withWidth:CVPixelBufferGetWidth(pixelBuffer) height:CVPixelBufferGetHeight(pixelBuffer) stride:CVPixelBufferGetBytesPerRow(pixelBuffer) @@ -144,7 +144,7 @@ switch (pixelBufferFormat) { case kCVPixelFormatType_32BGRA: { - pixelData = [MPPCVPixelBufferUtils rgbPixelDatafromCVPixelBuffer:pixelBuffer error:error]; + pixelData = [MPPCVPixelBufferUtils rgbPixelDataFromCVPixelBuffer:pixelBuffer error:error]; break; } default: { @@ -191,7 +191,7 @@ if (srcData) { // We have drawn the image as an RGBA image with 8 bitsPerComponent and hence can safely input // a pixel format of type kCVPixelFormatType_32RGBA for conversion by vImage. - pixel_data_to_return = [MPPPixelDataUtils rgbPixelDatafromPixelData:srcData + pixel_data_to_return = [MPPPixelDataUtils rgbPixelDataFromPixelData:srcData withWidth:width height:height stride:bytesPerRow