Files
squoosh/codecs/avif/enc
Jake Archibald 33c0c3b034 Additional AVIF options (#987)
* Separate colour & alpha options for AVIF

* Adding broken noise synthesis

* Build files

* Updating build

* Changing speed default

* Remove old comment

* Better speed default
2021-04-29 11:19:24 +01:00
..
2021-04-29 11:19:24 +01:00
2021-01-18 12:29:38 +00:00
2021-04-29 11:19:24 +01:00
2021-04-29 11:19:24 +01:00
2021-04-29 11:19:24 +01:00
2021-04-29 11:19:24 +01: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;
};