Provides a function to handle pixelBuffer, in yuv format. This function adds a filter to pixelBuffer.

/ / this function is used to provide sdk, to the camera yuv input data that needs to be processed, such as adding a filter.
/ / pixelBuffer:yuv data format, how to add filters to pixelBuffer? (using GPUImage)
/ / which god has a look? This is my actual development requirement

  • (void) processWithCVPixelBuffer: (CVPixelBufferRef) pixelBuffer;
Ios
Sep.27,2021

1. Write a separate class An inheriting GPUImageOutput, to realize the conversion from yuv data to bgra data. Similar to GPUImageVideoCamera, you can also refer to YUGPUImageCVPixelBufferInput
2. Add filter A
3 for class An instances Pass the pixelbufferS
4 of the original yuv through the class An instance Get the pixelbufferA of bgra
5 through filter A. Convert pixelbufferA to pixelbufferB
6 of yuv through libyuv Copy pixelbufferB data to pixelbufferS

Menu