MCPcopy Create free account
hub / github.com/Vanilagy/webcodecs-polyfill / mapColorPrimaries

Function mapColorPrimaries

src/misc.ts:157–167  ·  view source on GitHub ↗
(primaries: string)

Source from the content-addressed store, hash-verified

155};
156
157export const mapColorPrimaries = (primaries: string) => {
158 switch (primaries) {
159 case 'bt709': return AVCOL_PRI_BT709;
160 case 'bt470bg': return AVCOL_PRI_BT470BG;
161 case 'smpte170m': return AVCOL_PRI_SMPTE170M;
162 case 'bt2020': return AVCOL_PRI_BT2020;
163 case 'smpte432': return AVCOL_PRI_SMPTE432;
164 }
165
166 return null;
167};
168
169export const unmapColorPrimaries = (primaries: number) => {
170 switch (primaries) {

Callers 3

ConvertToRGBFrameFunction · 0.85
encodeInternalMethod · 0.85
createCodecContextMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected