calculateHDRStats(for:)
Given a CVPixelBuffer, use the receiving Core Image context to calculate its HDR statistics (content headroom and content average light level) and then update the buffers’s attachments to store the values.
Declaration
func calculateHDRStats(for buffer: CVPixelBuffer)Parameters
- buffer:
A mutable
CVPixelBufferfor which to calculate and attach statistics.
Discussion
If the CVPixelBuffer has a Clean Aperture rectangle then only pixels within that rectangle are considered.