|
|
há 2 anos atrás | |
|---|---|---|
| .. | ||
| .gitignore | há 5 anos atrás | |
| CMakeLists.avx_wasm.txt | há 2 anos atrás | |
| CMakeLists.txt | há 2 anos atrás | |
| README.md | há 2 anos atrás | |
| av1-clang.patch | há 5 anos atrás | |
| build.sh | há 2 anos atrás | |
| wasm-av1.patch | há 5 anos atrás | |
This sample demonstrates how to build wasm-av1 into WebAssembly with simd support and run it with iwasm.
please refer to installation instructions.
$ mkdir build && cd build
$ cmake ..
$ make
# to verify
$ ls testavx.wasm
just run the convenience script:
./build.sh
the script builds wasm-av1 and runs it with iwasm, which basically contains the following steps:
Firstly please build iwasm with simd support:
$ cd <wamr dir>/product-mini/platforms/linux/
$ mkdir build && cd build
$ cmake .. -DWAMR_BUILD_LIBC_EMCC=1
$ make
Then compile wasm file to aot file and run:
$ cd <dir of testavx.wasm>
$ <wamr dir>/wamr-compiler/build/wamrc -o testavx.aot testavx.wasm
# copy sample data like <wamr dir>/samples/workload/wasm-av1/av1/third_party/samples/elephants_dream_480p24.ivf
# make sure you declare the access priority of the directory in which the sample data is
$ <wamr dir>/product-mini/platforms/linux/build/iwasm --dir=. testavx.aot elephants_dream_480p24.ivf