Files
squoosh/codecs/avif/enc
Jamie 5f72c2ed74 Fix single threaded avif encoding (#1409)
* Fix single threaded encoding by compiling a separate copy of libsharpyuv
- This version will have threads turned off

* Add the fixed compilations of avif_enc.js and the wasm file

* ensure that ST and MT builds run sequentially

* update OUT_ENC_JS to be an order-only dependency

* use WEBP_BUILD_WEBP_JS=ON flag instead

* update compiled ST files

* refactor to use -DWEBP_USE_THREAD=OFF
2024-08-13 11:11:17 +01:00
..
2024-01-24 08:04:33 +00:00
2024-01-24 08:04:33 +00:00
2024-01-24 08:04:33 +00:00
2024-01-24 08:04:33 +00:00
2024-01-24 08:04:33 +00:00
2024-01-24 08:04:33 +00:00
2024-01-24 08:04:33 +00:00
2024-01-24 08:04:33 +00:00
2024-01-24 08:04:33 +00:00
2020-08-05 14:40:15 +01:00

AVIF encoder

Example

Run example.js

API

Uint8Array encode(std::string image_in, int image_width, int image_height, AvifOptions opts)

Encodes the given image with given dimension to AVIF. Options looks like this:

struct AvifOptions {
  // 0 = lossless
  // 63 = worst quality
  int minQuantizer;
  int maxQuantizer;

  // [0 - 6]
  // Creates 2^n tiles in that dimension
  int tileRowsLog2;
  int tileColsLog2;

  // 0 = slowest
  // 10 = fastest
  int speed;

  // 0 = 4:2:0
  // 1 = 4:2:2
  // 2 = 4:4:4
  int subsample;
};