mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-28 03:13:51 +02:00
Add custom quality factors and quantizer bitrate mode (#448)
* Add custom quality factors and quantizer bitrate mode (closes #327) * Fix quantizer mode fallback and per-frame quantizer edge cases * Clean up quantizer mode tests * Quantizer implementation * Add quality tests * Improve conversion codec error message, make test more lenient * Add quantizer support blog post --------- Co-authored-by: Vanilagy <[email protected]>
This commit is contained in:
@@ -431,6 +431,10 @@ export const clamp = (value: number, min: number, max: number) => {
|
||||
return Math.max(min, Math.min(max, value));
|
||||
};
|
||||
|
||||
export const lerp = (from: number, to: number, t: number) => {
|
||||
return from + (to - from) * t;
|
||||
};
|
||||
|
||||
export const UNDETERMINED_LANGUAGE = 'und';
|
||||
|
||||
export const roundIfAlmostInteger = (value: number) => {
|
||||
|
||||
Reference in New Issue
Block a user