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

Function mapTransferCharacteristics

src/misc.ts:181–192  ·  view source on GitHub ↗
(transfer: string)

Source from the content-addressed store, hash-verified

179};
180
181export const mapTransferCharacteristics = (transfer: string) => {
182 switch (transfer) {
183 case 'bt709': return AVCOL_TRC_BT709;
184 case 'smpte170m': return AVCOL_TRC_SMPTE170M;
185 case 'iec61966-2-1': return AVCOL_TRC_IEC61966_2_1;
186 case 'linear': return AVCOL_TRC_LINEAR;
187 case 'pq': return AVCOL_TRC_SMPTE2084;
188 case 'hlg': return AVCOL_TRC_ARIB_STD_B67;
189 }
190
191 return null;
192};
193
194export const unmapTransferCharacteristics = (transfer: number) => {
195 switch (transfer) {

Callers 3

ConvertToRGBFrameFunction · 0.85
encodeInternalMethod · 0.85
createCodecContextMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected