Official API for Apple Log / Apple Log 2 to SDR Rec.709 and HDR HLG Conversion?

Hello,

I'm developing a video application for Apple platforms and would like to implement accurate Apple Log and Apple Log 2 color conversion using official Apple APIs.

Final Cut Pro and Final Cut Camera support SDR Rec.709 and HDR Rec.2020 HLG monitoring.

I have found Apple's official Apple Log white papers and Rec.709 LUTs, but I could not find an official HDR HLG LUT or a public API that provides equivalent color conversion.

I have three questions:

  1. Does Apple provide a public API through AVFoundation, Core Image, ColorSync, or another framework to convert Apple Log / Apple Log 2 to SDR Rec.709 and HDR Rec.2020 HLG?

  2. Are the color transformations used by Final Cut Pro and Final Cut Camera available to third-party developers, either through public APIs or official LUT resources?

  3. If no such API exists, is implementing the transfer functions and gamut conversions from Apple's white papers, followed by standard SDR/HDR rendering, the recommended approach?

My goal is to preserve the original Apple Log footage while allowing independent SDR/HDR monitoring without modifying the recorded data.

Any guidance, documentation, or sample code from Apple engineers would be greatly appreciated.

Thank you!

Answered by DTS Engineer in 912506022

Thanks for the clear set of questions.

The media frameworks identify Apple Log footage, but I didn't find a public API that converts it. kCVImageBufferLogTransferFunctionKey marks buffers as Apple Log or Apple Log 2. Core Media, VideoToolbox, and AVFoundation have matching keys for format descriptions, compression, and writing. None of them, and nothing in Core Image or ColorSync, documents a conversion to Rec. 709 or HLG.

In a quick test with macOS 27.0.1, I tagged a 10-bit buffer as Apple Log. CIImage(cvPixelBuffer:) and VTPixelTransferSession produced the same output with and without the Apple Log attachment, so neither applied the Apple Log curve in that test. AVAssetWriter behaved similarly: with HLG values for AVVideoColorPropertiesKey, it tagged the file as HLG but left the Apple Log pixel values unchanged.

I can't speak to how Final Cut Pro or Final Cut Camera implement their conversions.

The Apple Log Profile white papers you found are the published definition of the transfer functions and color primaries. Without a framework conversion, building the transform from those papers and then rendering through the standard SDR and HDR paths is consistent with everything I found. For the rendering side, these sessions cover producing SDR and HDR output with AVFoundation, Core Image, and Metal:

If you'd like a framework API for converting Apple Log, or an official HLG LUT, please file an enhancement request using Feedback Assistant and describe your monitoring workflow. Please note that filing an enhancement request does not guarantee Apple will add any requested functionality to Apple products in the future. However, with that said, filing an enhancement request is a good way to get your ideas in front of the folks who make decisions about that sort of thing. Bug Reporting: How and Why? has tips on creating your report.

Thanks for the clear set of questions.

The media frameworks identify Apple Log footage, but I didn't find a public API that converts it. kCVImageBufferLogTransferFunctionKey marks buffers as Apple Log or Apple Log 2. Core Media, VideoToolbox, and AVFoundation have matching keys for format descriptions, compression, and writing. None of them, and nothing in Core Image or ColorSync, documents a conversion to Rec. 709 or HLG.

In a quick test with macOS 27.0.1, I tagged a 10-bit buffer as Apple Log. CIImage(cvPixelBuffer:) and VTPixelTransferSession produced the same output with and without the Apple Log attachment, so neither applied the Apple Log curve in that test. AVAssetWriter behaved similarly: with HLG values for AVVideoColorPropertiesKey, it tagged the file as HLG but left the Apple Log pixel values unchanged.

I can't speak to how Final Cut Pro or Final Cut Camera implement their conversions.

The Apple Log Profile white papers you found are the published definition of the transfer functions and color primaries. Without a framework conversion, building the transform from those papers and then rendering through the standard SDR and HDR paths is consistent with everything I found. For the rendering side, these sessions cover producing SDR and HDR output with AVFoundation, Core Image, and Metal:

If you'd like a framework API for converting Apple Log, or an official HLG LUT, please file an enhancement request using Feedback Assistant and describe your monitoring workflow. Please note that filing an enhancement request does not guarantee Apple will add any requested functionality to Apple products in the future. However, with that said, filing an enhancement request is a good way to get your ideas in front of the folks who make decisions about that sort of thing. Bug Reporting: How and Why? has tips on creating your report.