mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-16 02:29:50 +00:00
Merge branch 'rollup-build' into dev
# Conflicts: # _headers.ejs # codecs/oxipng/pkg/squoosh_oxipng_bg.js # src/codecs/avif/encoder.ts # src/codecs/oxipng/encoder.ts # src/codecs/processor.ts # src/codecs/util.ts # src/components/intro/imgs/logo.svg # src/missing-types.d.ts # webpack.config.js
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include <emscripten/bind.h>
|
||||
#include <emscripten/threading.h>
|
||||
#include <emscripten/val.h>
|
||||
#include <emscripten/threading.h>
|
||||
#include "avif/avif.h"
|
||||
@@ -51,13 +52,10 @@ val encode(std::string buffer, int width, int height, AvifOptions options) {
|
||||
|
||||
avifImage* image = avifImageCreate(width, height, depth, format);
|
||||
|
||||
if (
|
||||
options.maxQuantizer == AVIF_QUANTIZER_LOSSLESS &&
|
||||
options.minQuantizer == AVIF_QUANTIZER_LOSSLESS &&
|
||||
options.minQuantizerAlpha == AVIF_QUANTIZER_LOSSLESS &&
|
||||
options.maxQuantizerAlpha == AVIF_QUANTIZER_LOSSLESS &&
|
||||
format == AVIF_PIXEL_FORMAT_YUV444
|
||||
) {
|
||||
if (options.maxQuantizer == AVIF_QUANTIZER_LOSSLESS &&
|
||||
options.minQuantizer == AVIF_QUANTIZER_LOSSLESS &&
|
||||
options.minQuantizerAlpha == AVIF_QUANTIZER_LOSSLESS &&
|
||||
options.maxQuantizerAlpha == AVIF_QUANTIZER_LOSSLESS && format == AVIF_PIXEL_FORMAT_YUV444) {
|
||||
image->matrixCoefficients = AVIF_MATRIX_COEFFICIENTS_IDENTITY;
|
||||
} else {
|
||||
image->matrixCoefficients = AVIF_MATRIX_COEFFICIENTS_BT709;
|
||||
|
||||
Reference in New Issue
Block a user