cvmts: replace jpeg-turbo native module with new rust module
This module also does threadpooling internally, so we don't need Piscina anymore (which I'm pretty sure was actually bottlenecking.)
This commit is contained in:
15
jpegturbo-rs/index.d.ts
vendored
Normal file
15
jpegturbo-rs/index.d.ts
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
interface JpegInputArgs {
|
||||
width: number,
|
||||
height: number,
|
||||
stride: number, // The width of your input framebuffer OR your image width (if encoding a full image)
|
||||
buffer: Buffer
|
||||
|
||||
// TODO: Allow different formats, or export a boxed ffi object which can store a format
|
||||
// (i.e: new JpegEncoder(FORMAT_xxx)).
|
||||
}
|
||||
|
||||
/// Performs JPEG encoding.
|
||||
export function jpegEncode(input: JpegInputArgs) : Promise<Buffer>;
|
||||
|
||||
// TODO: Version that can downscale?
|
||||
Reference in New Issue
Block a user