Remove stray files

This commit is contained in:
Surma
2020-08-03 12:25:17 +01:00
committed by Ingvar Stepanyan
parent 53298a23ad
commit 15dac42a7f
8 changed files with 0 additions and 2508 deletions

View File

@@ -1,81 +0,0 @@
#!/bin/bash
set -e
export export OPTIMIZE="-Os -flto --llvm-lto 1"
export LDFLAGS="${OPTIMIZE}"
export CFLAGS="${OPTIMIZE}"
export CPPFLAGS="${OPTIMIZE}"
echo "============================================="
echo "Compiling libaom"
echo "============================================="
test -n "$SKIP_LIBAOM" || (
cd node_modules/libavif/ext/aom
mkdir -p build.libavif
cd build.libavif
emcmake cmake \
-DCMAKE_BUILD_TYPE=Release \
-DENABLE_CCACHE=0 \
-DAOM_TARGET_CPU=generic \
-DENABLE_DOCS=0 \
-DENABLE_TESTS=0 \
-DCONFIG_ACCOUNTING=1 \
-DCONFIG_INSPECTION=0 \
-DCONFIG_MULTITHREAD=0 \
-DCONFIG_RUNTIME_CPU_DETECT=0 \
-DCONFIG_WEBM_IO=0 \
../
emmake make -j`nproc`
)
echo "============================================="
echo "Compiling libaom done"
echo "============================================="
echo "============================================="
echo "Compiling libavif"
echo "============================================="
test -n "$SKIP_LIBAVIF" || (
cd node_modules/libavif
mkdir -p build
cd build
emcmake cmake \
DCMAKE_BUILD_TYPE=Release \
-DAVIF_CODEC_AOM=1 \
-DAVIF_LOCAL_AOM=1 \
../
emmake make -j`nproc`
)
echo "============================================="
echo "Compiling libavif done"
echo "============================================="
echo "============================================="
echo "Compiling wasm bindings"
echo "============================================="
(
emcc \
${OPTIMIZE} \
--bind \
-s ALLOW_MEMORY_GROWTH=1 \
-s MODULARIZE=1 \
-s 'EXPORT_NAME="avif_dec"' \
--std=c++11 \
-I ./node_modules/libavif/include \
-o ./avif_dec.js \
-x c++ \
avif_dec.cpp \
./node_modules/libavif/build/libavif.a \
./node_modules/libavif/ext/aom/build.libavif/libaom.a
)
echo "============================================="
echo "Compiling wasm bindings done"
echo "============================================="
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo "Did you update your docker image?"
echo "Run \`docker pull trzeci/emscripten-upstream\`"
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

View File

@@ -1,24 +0,0 @@
<!doctype html>
<script src='avif_dec.js'></script>
<script>
const Module = avif_dec();
async function loadFile(src) {
const resp = await fetch(src);
return await resp.arrayBuffer();
}
Module.onRuntimeInitialized = async _ => {
const image = await loadFile('../example.avif');
const result = Module.decode(image);
console.log(result.width, result.height, result.buffer);
const imageData = new ImageData(new Uint8ClampedArray(result.buffer), result.width, result.height);
Module.free_result();
const canvas = document.createElement('canvas');
canvas.width = result.width;
canvas.height = result.height;
document.body.appendChild(canvas);
const ctx = canvas.getContext('2d');
ctx.putImageData(imageData, 0, 0);
};
</script>

File diff suppressed because it is too large Load Diff

View File

@@ -1,14 +0,0 @@
{
"name": "avif_dec",
"scripts": {
"install": "napa",
"build": "docker run --rm -v $(pwd):/src trzeci/emscripten-upstream ./build.sh"
},
"napa": {
"libavif": "AOMediaCodec/libavif#v0.7.3",
"libavif/ext/aom": "git+https://aomedia.googlesource.com/aom#v1.0.0-errata1-avif"
},
"devDependencies": {
"napa": "3.0.0"
}
}

View File

@@ -1,84 +0,0 @@
#!/bin/bash
set -e
export export OPTIMIZE="-Os -flto --llvm-lto 1"
export LDFLAGS="${OPTIMIZE}"
export CFLAGS="${OPTIMIZE}"
export CPPFLAGS="${OPTIMIZE}"
echo "============================================="
echo "Compiling libaom"
echo "============================================="
test -n "$SKIP_LIBAOM" || (
cd node_modules/libavif/ext
test -d aom || git clone -b v1.0.0-errata1-avif --depth 1 https://aomedia.googlesource.com/aom aom
cd aom
mkdir -p build.libavif
cd build.libavif
emcmake cmake \
-DCMAKE_BUILD_TYPE=Release \
-DENABLE_CCACHE=0 \
-DAOM_TARGET_CPU=generic \
-DENABLE_DOCS=0 \
-DENABLE_TESTS=0 \
-DCONFIG_ACCOUNTING=1 \
-DCONFIG_INSPECTION=0 \
-DCONFIG_MULTITHREAD=0 \
-DCONFIG_RUNTIME_CPU_DETECT=0 \
-DCONFIG_WEBM_IO=0 \
../
emmake make -j`nproc`
)
echo "============================================="
echo "Compiling libaom done"
echo "============================================="
echo "============================================="
echo "Compiling libavif"
echo "============================================="
test -n "$SKIP_LIBAVIF" || (
cd node_modules/libavif
mkdir -p build
cd build
emcmake cmake \
DCMAKE_BUILD_TYPE=Release \
-DAVIF_CODEC_AOM=1 \
-DAVIF_LOCAL_AOM=1 \
../
emmake make -j`nproc`
)
echo "============================================="
echo "Compiling libavif done"
echo "============================================="
echo "============================================="
echo "Compiling wasm bindings"
echo "============================================="
(
emcc \
${OPTIMIZE} \
--bind \
-s ALLOW_MEMORY_GROWTH=1 \
-s MODULARIZE=1 \
-s 'EXPORT_NAME="avif_enc"' \
--std=c++11 \
-I ./node_modules/libavif/include \
-o ./avif_enc.js \
-x c++ \
avif_enc.cpp \
./node_modules/libavif/build/libavif.a \
./node_modules/libavif/ext/aom/build.libavif/libaom.a
)
echo "============================================="
echo "Compiling wasm bindings done"
echo "============================================="
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo "Did you update your docker image?"
echo "Run \`docker pull trzeci/emscripten-upstream\`"
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"

View File

@@ -1,11 +0,0 @@
const fs = require("fs");
const avifEnc = require("./avif_enc.js")(fs.readFileSync("./avif_enc.wasm"));
avifEnc.onRuntimeInitialized = () => {
const avif = avifEnc.encode(
new Uint8Array([255, 0, 0, 255, 0, 255, 0, 255, 0, 0, 255, 255]),
3,
1
);
fs.writeFileSync("lol.avif", avif);
};

File diff suppressed because it is too large Load Diff