mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-12 16:57:26 +00:00
Cleanup
This commit is contained in:
@@ -7,8 +7,7 @@ ENVIRONMENT = worker
|
|||||||
OUT_JS := enc/basis_enc.js dec/basis_dec.js
|
OUT_JS := enc/basis_enc.js dec/basis_dec.js
|
||||||
OUT_WASM := $(OUT_JS:.js=.wasm)
|
OUT_WASM := $(OUT_JS:.js=.wasm)
|
||||||
|
|
||||||
# TODO: Go back to -O3
|
COMMON_FLAGS := -O3 -fno-strict-aliasing
|
||||||
COMMON_FLAGS := -O0 -g -fno-strict-aliasing
|
|
||||||
|
|
||||||
override CXXFLAGS += $(COMMON_FLAGS)
|
override CXXFLAGS += $(COMMON_FLAGS)
|
||||||
override CFLAGS += $(COMMAN_FLAGS)
|
override CFLAGS += $(COMMAN_FLAGS)
|
||||||
@@ -37,9 +36,6 @@ CODEC_C_SOURCE_FILES := \
|
|||||||
encoder/apg_bmp.c \
|
encoder/apg_bmp.c \
|
||||||
zstd/zstd.c
|
zstd/zstd.c
|
||||||
|
|
||||||
# TODO: Remove me
|
|
||||||
override CXXFLAGS += -DBASISU_FORCE_DEVEL_MESSAGES=1
|
|
||||||
|
|
||||||
.PHONY: all clean
|
.PHONY: all clean
|
||||||
|
|
||||||
all: $(CODEC_DIR) $(OUT_JS)
|
all: $(CODEC_DIR) $(OUT_JS)
|
||||||
|
|||||||
2780
codecs/basis/dec/basis_dec.js
generated
2780
codecs/basis/dec/basis_dec.js
generated
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -58,17 +58,14 @@ val encode(std::string image_in, int image_width, int image_height, BasisOptions
|
|||||||
params.m_compression_level = opts.compression;
|
params.m_compression_level = opts.compression;
|
||||||
params.m_source_images.push_back(img);
|
params.m_source_images.push_back(img);
|
||||||
|
|
||||||
printf("%d\n", __LINE__);
|
|
||||||
if (!compressor.init(params)) {
|
if (!compressor.init(params)) {
|
||||||
return val(std::string("Well something went wrong during init"));
|
return val(std::string("Well something went wrong during init"));
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("%d\n", __LINE__);
|
|
||||||
if (compressor.process() != 0) {
|
if (compressor.process() != 0) {
|
||||||
return val(std::string("Well something went wrong during processing"));
|
return val(std::string("Well something went wrong during processing"));
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("%d\n", __LINE__);
|
|
||||||
auto comp_data = compressor.get_output_ktx2_file();
|
auto comp_data = compressor.get_output_ktx2_file();
|
||||||
auto js_result = Uint8Array.new_(typed_memory_view(comp_data.size(), &comp_data[0]));
|
auto js_result = Uint8Array.new_(typed_memory_view(comp_data.size(), &comp_data[0]));
|
||||||
// Not sure if there is anything to free here
|
// Not sure if there is anything to free here
|
||||||
|
|||||||
3236
codecs/basis/enc/basis_enc.js
generated
3236
codecs/basis/enc/basis_enc.js
generated
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Reference in New Issue
Block a user