MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / detectTransfer

Function detectTransfer

packages/engine/src/utils/hdr.ts:36–39  ·  view source on GitHub ↗
(cs: VideoColorSpace | null)

Source from the content-addressed store, hash-verified

34 * Returns "pq" for SMPTE 2084, "hlg" for ARIB STD-B67, defaults to "hlg".
35 */
36export function detectTransfer(cs: VideoColorSpace | null): HdrTransfer {
37 if (cs?.colorTransfer === "smpte2084") return "pq";
38 return "hlg";
39}
40
41/**
42 * HDR static metadata for the encoded stream.

Callers 2

runExtractVideosStageFunction · 0.90
hdr.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected