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

Function getEquivalentOpaqueFormat

src/video_frame.ts:1297–1312  ·  view source on GitHub ↗
(format: string)

Source from the content-addressed store, hash-verified

1295};
1296
1297const getEquivalentOpaqueFormat = (format: string) => {
1298 switch (format) {
1299 case 'I420A': return 'I420';
1300 case 'I420AP10': return 'I420P10';
1301 case 'I420AP12': return 'I420P12';
1302 case 'I422A': return 'I422';
1303 case 'I422AP10': return 'I422P10';
1304 case 'I422AP12': return 'I422P12';
1305 case 'I444A': return 'I444';
1306 case 'I444AP10': return 'I444P10';
1307 case 'I444AP12': return 'I444P12';
1308 case 'RGBA': return 'RGBX';
1309 case 'BGRA': return 'BGRX';
1310 default: return format;
1311 }
1312};

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected