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