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

Function isHdrColorSpace

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

Source from the content-addressed store, hash-verified

14 * Re-exported from videoFrameExtractor for backward compatibility.
15 */
16export function isHdrColorSpace(cs: VideoColorSpace | null): boolean {
17 if (!cs) return false;
18 return (
19 cs.colorPrimaries.includes("bt2020") ||
20 cs.colorSpace.includes("bt2020") ||
21 cs.colorTransfer === "smpte2084" ||
22 cs.colorTransfer === "arib-std-b67"
23 );
24}
25
26/**
27 * Determine the HDR transfer function from a video's color space metadata.

Callers 3

runExtractVideosStageFunction · 0.90
hdr.test.tsFile · 0.85
analyzeCompositionHdrFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected