Commit Graph

208 Commits

Author SHA1 Message Date
Ingvar Stepanyan
bb6893e025 Update to newer memory management model 2020-11-03 12:52:13 +00:00
Ingvar Stepanyan
90706159fc Bind to WP2::EncoderConfig directly 2020-11-03 12:52:13 +00:00
Ingvar Stepanyan
c78f0c3747 Rebuild with new flags 2020-11-03 12:52:13 +00:00
Surma
18b2bd1135 Add WebP2 support 2020-11-03 12:52:13 +00:00
Ingvar Stepanyan
e60ffddfd7 Delete .gitignore 2020-11-02 17:52:21 +00:00
Ingvar Stepanyan
d808c72798 Remove freeing todo 2020-11-02 17:52:17 +00:00
Ingvar Stepanyan
fcde9633ab Switch to -O3 for C++ codecs 2020-11-02 17:52:13 +00:00
Ingvar Stepanyan
e581075f64 Fix types after rebase onto latest dev 2020-11-02 17:52:10 +00:00
Ingvar Stepanyan
eb08d0049a Few more simplifications to JXL decoder 2020-11-02 17:52:08 +00:00
Ingvar Stepanyan
eed44dff97 Use make_unique; remove unnecessary cast 2020-11-02 17:52:06 +00:00
Ingvar Stepanyan
93474b025e Simplify JxlDecoder freeing
Use unique_ptr with custom deleter to enforce consistent deallocation, no matter how we leave the function.
2020-11-02 17:52:04 +00:00
Ingvar Stepanyan
5df81ad062 Remove unused free_result 2020-11-02 17:52:01 +00:00
Luca Versari
e00814ebe2 Update JXL to latest and do proper color management.
The JXL decoder now does colorspace conversion to sRGB correctly,
independently of the color space that the JPEG XL file was in.
2020-11-02 17:51:59 +00:00
Ingvar Stepanyan
4dab94686a XYB version 2020-11-02 17:51:56 +00:00
Ingvar Stepanyan
d9f65701e1 Switch decoder to C API 2020-11-02 17:51:53 +00:00
Ingvar Stepanyan
0e76dffaad Fix encoder colors 2020-11-02 17:51:47 +00:00
Ingvar Stepanyan
246d3ed6b3 Update jpeg-xl to latest upstream 2020-11-02 17:51:44 +00:00
Surma
7e97b36249 Add alpha support 2020-11-02 17:51:37 +00:00
Surma
045cb14c54 Expose butteraugli distance 2020-11-02 17:51:29 +00:00
Surma
18f7591c6a Update for encoder API changes 2020-11-02 17:51:22 +00:00
Surma
b8d0d5202d Update JXL library and build system 2020-11-02 17:51:17 +00:00
Surma
e26d8895a4 Exposed speed slider, but it's weird 2020-11-02 17:51:08 +00:00
Surma
b5ad52cfcf Fix JXL encoder 2020-11-02 17:51:04 +00:00
Surma
98bc151907 Compile JXL encoder 2020-11-02 17:50:58 +00:00
Surma
36d23644aa Integrate JXL decoder 2020-11-02 17:50:55 +00:00
Surma
3697635bae Add test to JXL decoder 2020-11-02 17:50:50 +00:00
Surma
de1eb76226 Compile JXL decoder 2020-11-02 17:50:46 +00:00
Ingvar Stepanyan
fd87ae7d2a Force-rebuild codecs with -O3
Follow-up to https://github.com/GoogleChromeLabs/squoosh/pull/838.

I have no idea what the JS+Wasm diffs in the original PR even represented if they weren't proper rebuilds, but this time I just removed node_modules in all codecs to enforce a proper, clean rebuild for each C++ codec.

(Still think the speed-ups are worth it.)
2020-11-02 17:37:35 +00:00
Ingvar Stepanyan
5df7dd7590 Update helper.Makefile 2020-11-02 13:54:41 +00:00
Ingvar Stepanyan
013946b137 Pass CODEC_DIR and LIBAOM_DIR via export
Slightly simpler than passing them in HELPER_MAKEFLAGS.
2020-11-02 13:54:41 +00:00
Ingvar Stepanyan
81c183b0d6 Restructure the AVIF directories
Change the way AVIF finds AOM from default ([avif source]/ext/aom) to custom paths. This allows us to avoid unpacking same archives into duplicate folders, and instead make multiple builds from the same source.
2020-11-02 13:54:41 +00:00
Ingvar Stepanyan
f523db6403 Try out new flags for building only AVIF encoder/decoder
See the discussion in https://github.com/AOMediaCodec/libavif/issues/254 where this was implemented.

This allows us to avoid using ERROR_ON_UNDEFINED_SYMBOLS and build a truly separate encoder/decoder libs.
2020-11-02 13:54:41 +00:00
Ingvar Stepanyan
cc6ea9e11c Switch to -O3 for C++ codecs 2020-11-02 12:46:12 +00:00
Ingvar Stepanyan
a9d3bd71b5 Bump oxipng
Integrating some upstream fixes from my branch.
2020-10-07 20:42:48 +01:00
Ingvar Stepanyan
f583770696 Explicitly disable HDR only for encoder 2020-10-07 20:42:48 +01:00
Ingvar Stepanyan
bae243ccdb Add feature detection to OxiPNG 2020-10-07 20:42:48 +01:00
Ingvar Stepanyan
02c113a68f Point oxipng to a patched version
Some upstream changes required for parallel build to work.
2020-10-07 20:42:48 +01:00
Ingvar Stepanyan
600eead007 Disable parallel feature for non-parallel OxiPNG 2020-10-07 20:42:48 +01:00
Ingvar Stepanyan
05416768d5 Update oxipng build system 2020-10-07 20:42:48 +01:00
Ingvar Stepanyan
35d31f2324 Add some comments to explain Rust thread glue 2020-10-07 20:42:48 +01:00
Ingvar Stepanyan
82fadac70e Fixup import.meta in OxiPNG 2020-10-07 20:42:48 +01:00
Ingvar Stepanyan
47f9d22dd8 Switch to crossbeam-channel
Still not perfect due to usage of a static global, but this is much cleaner and more efficient thanks to proper blocking of Workers that wait for new messages instead of a manual spin-loop.
2020-10-07 20:42:48 +01:00
Ingvar Stepanyan
9420dba3bc Parallel OxiPNG improvements
- Refactor to work around Chromium's issue with postMessage queuing. https://bugs.chromium.org/p/chromium/issues/detail?id=1075645
 - Convert codec code to TypeScript.
 - Make separate parallel and non-parallel builds.
 - Switch to nightly Rust for OxiPNG to allow parallel builds (but also reuse it for regular builds to avoid installing two toolchains).
2020-10-07 20:42:48 +01:00
Ingvar Stepanyan
0747d2c419 Rework fallback for postMessage issue
Now initialise all workers with module+memory separately, and then instead of using postMessage to send thread pointers, push them into a crossbeam-deque on the Rust side.

Rayon already depends on crossbeam-dequeue, so we're not even adding another dependency, and this model allows us to push "tasks" (thread pointers) on the main thread and pop them on worker threads in arbitrary order without sacrificing correctness.
2020-10-07 20:42:48 +01:00
Ingvar Stepanyan
4c658b79ef OxiPNG + threads PoC 2020-10-07 20:42:48 +01:00
Ingvar Stepanyan
685558847f Multithread AVIF PoC 2020-10-07 20:42:48 +01:00
Trevor Manz
63ac34a662 Promisify emscripten modules & fix webp examples (#817) 2020-09-30 00:05:59 +01:00
Jake Archibald
e14790f0b9 Ensure node_modules is created 2020-09-16 10:24:20 +01:00
Velu S Gautam
dfee848a39 Update example.html (#827)
rawImage is a Uint8ClampedArray and doesn't have width and height property.
2020-09-16 07:42:32 +01:00
Jake Archibald
a437afdf2b Update AVIF build to produce shipped wasm (#823)
* argh

* It works!

* Silly me

* Changes following feedback
2020-09-15 11:08:20 +01:00