Add video frame preprocessing to VideoEncodingConfig & VideoEncoderWrapper

This commit is contained in:
Vanilagy
2026-04-01 13:30:34 +02:00
parent 3400b3ac12
commit 024660773b
8 changed files with 1021 additions and 201 deletions
+6
View File
@@ -443,6 +443,10 @@ export const floorToMultiple = (value: number, multiple: number) => {
return Math.floor(value / multiple) * multiple;
};
export const floorToDivisor = (value: number, multiple: number) => {
return Math.floor(value * multiple) / multiple;
};
export const ilog = (x: number) => {
let ret = 0;
while (x) {
@@ -1198,3 +1202,5 @@ export class EventEmitter<TEvents extends Record<string, unknown>> {
}
}
}
export const ceilToMultipleOfTwo = (value: number) => Math.ceil(value / 2) * 2;