init(referencing:planeIndex:overrideSize:pixelFormat:)
Initializes a pixel buffer by refencing the data from a single plane of a multiplane Core Video pixel buffer.
Declaration
init(referencing lockedCVPixelBuffer: CVPixelBuffer, planeIndex: Int, overrideSize: vImage.Size? = nil, pixelFormat: Format.Type = Format.self)Parameters
- lockedCVPixelBuffer:
The locked Core Video pixel buffer. Use Cvpixelbufferlockbaseaddress(_:_:) and Cvpixelbufferunlockbaseaddress(_:_:) to lock and unlock the pixel buffer.
- planeIndex:
The index of the plane that the function references.
- overrideSize:
An optional size that overrides the size returned by Cvpixelbuffergetheightofplane(_:_:) and Cvpixelbuffergetwidthofplane(_:_:). Use this parameter if you intend to pass the buffer to the any-to-any converter that requires all buffers to be the same size.
- pixelFormat:
The pixel format of the initialized buffer.