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

Function normalizeVp9CpuUsed

packages/engine/src/services/vp9Options.ts:5–9  ·  view source on GitHub ↗
(value: number | undefined)

Source from the content-addressed store, hash-verified

3export const MAX_VP9_CPU_USED = 8;
4
5export function normalizeVp9CpuUsed(value: number | undefined): number {
6 if (value === undefined || !Number.isFinite(value)) return DEFAULT_VP9_CPU_USED;
7 const integer = Math.trunc(value);
8 return Math.max(MIN_VP9_CPU_USED, Math.min(MAX_VP9_CPU_USED, integer));
9}
10
11export function appendVp9CpuUsedArg(args: string[], value: number | undefined): void {
12 args.push("-cpu-used", String(normalizeVp9CpuUsed(value)));

Callers 4

buildLockedRenderConfigFunction · 0.90
envVp9CpuUsedFunction · 0.85
resolveConfigFunction · 0.85
appendVp9CpuUsedArgFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected