Attach EDR metadata to Metal layer

This improves the accuracy of HDR streaming and enables HDR->SDR tonemapping.
This commit is contained in:
Cameron Gutman
2025-10-20 22:28:27 -05:00
parent c52a57f0ec
commit 200cab9d17
4 changed files with 98 additions and 74 deletions
+8 -1
View File
@@ -6,8 +6,15 @@
#import <Metal/Metal.h>
class VTBaseRenderer : public IFFmpegRenderer {
public:
VTBaseRenderer(IFFmpegRenderer::RendererType type) : IFFmpegRenderer(type) {}
VTBaseRenderer(IFFmpegRenderer::RendererType type);
virtual ~VTBaseRenderer();
bool checkDecoderCapabilities(id<MTLDevice> device, PDECODER_PARAMETERS params);
void setHdrMode(bool enabled) override;
protected:
bool m_HdrMetadataChanged; // Manual reset
CFDataRef m_MasteringDisplayColorVolume;
CFDataRef m_ContentLightLevelInfo;
};
#endif