Skip to content

Commit

Permalink
Wasm completed -- not tested yet.
Browse files Browse the repository at this point in the history
  • Loading branch information
aous72 committed Apr 13, 2024
1 parent 30b32cc commit f28a90f
Show file tree
Hide file tree
Showing 7 changed files with 596 additions and 411 deletions.
2 changes: 1 addition & 1 deletion src/apps/ojph_compress/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ source_group("others" FILES ${OJPH_IMG_IO})
source_group("common" FILES ${OJPH_IMG_IO_H})

if(EMSCRIPTEN)
add_compile_options(-std=c++11 -O3 -fexceptions -DOJPH_DISABLE_INTEL_SIMD)
add_compile_options(-std=c++11 -O3 -fexceptions)
add_executable(ojph_compress ${SOURCES})
add_executable(ojph_compress_simd ${SOURCES} ${OJPH_IMG_IO_SSE4})
target_compile_options(ojph_compress_simd PRIVATE -DOJPH_ENABLE_WASM_SIMD -msimd128 -msse4.1)
Expand Down
2 changes: 1 addition & 1 deletion src/apps/ojph_expand/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ source_group("others" FILES ${OJPH_IMG_IO})
source_group("common" FILES ${OJPH_IMG_IO_H})

if(EMSCRIPTEN)
add_compile_options(-std=c++11 -O3 -fexceptions -DOJPH_DISABLE_INTEL_SIMD)
add_compile_options(-std=c++11 -O3 -fexceptions)
add_executable(ojph_expand ${SOURCES})
add_executable(ojph_expand_simd ${SOURCES} ${OJPH_IMG_IO_SSE4})
target_compile_options(ojph_expand_simd PRIVATE -DOJPH_ENABLE_WASM_SIMD -msimd128 -msse4.1)
Expand Down
2 changes: 1 addition & 1 deletion src/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ source_group("others" FILES ${OTHERS})
source_group("transform" FILES ${TRANSFORM})

if(EMSCRIPTEN)
add_compile_options(-std=c++11 -O3 -fexceptions -DOJPH_DISABLE_INTEL_SIMD)
add_compile_options(-std=c++11 -O3 -fexceptions)
add_library(openjph ${SOURCES})
add_library(openjphsimd ${SOURCES} ${CODESTREAM_WASM} ${CODING_WASM} ${TRANSFORM_WASM})
target_include_directories(openjph PUBLIC common)
Expand Down
18 changes: 8 additions & 10 deletions src/core/transform/ojph_transform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,16 +162,14 @@ namespace ojph {
#endif // !OJPH_DISABLE_INTEL_SIMD

#else // OJPH_ENABLE_WASM_SIMD
rev_vert_ana_step = wasm_rev_vert_ana_step;
rev_horz_ana = wasm_rev_horz_ana;
rev_vert_syn_step = wasm_rev_vert_syn_step;
rev_horz_syn = wasm_rev_horz_syn;

irv_vert_ana_step = wasm_irv_vert_ana_step;
irv_horz_ana = wasm_irv_horz_ana;
irv_vert_syn_step = wasm_irv_vert_syn_step;
irv_horz_syn = wasm_irv_horz_syn;
irv_vert_times_K = wasm_irv_vert_times_K;
rev_vert_step = wasm_rev_vert_step;
rev_horz_ana = wasm_rev_horz_ana;
rev_horz_syn = wasm_rev_horz_syn;

irv_vert_step = wasm_irv_vert_step;
irv_vert_times_K = wasm_irv_vert_times_K;
irv_horz_ana = wasm_irv_horz_ana;
irv_horz_syn = wasm_irv_horz_syn;
#endif // !OJPH_ENABLE_WASM_SIMD

wavelet_transform_functions_initialized = true;
Expand Down
10 changes: 5 additions & 5 deletions src/core/transform/ojph_transform_avx512.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
// This software is released under the 2-Clause BSD license, included
// below.
//
// Copyright (c) 2019, Aous Naman
// Copyright (c) 2019, Kakadu Software Pty Ltd, Australia
// Copyright (c) 2019, The University of New South Wales, Australia
// Copyright (c) 2019-2024, Aous Naman
// Copyright (c) 2019-2024, Kakadu Software Pty Ltd, Australia
// Copyright (c) 2019-2024, The University of New South Wales, Australia
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
Expand All @@ -30,9 +30,9 @@
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//***************************************************************************/
// This file is part of the OpenJPH software implementation.
// File: ojph_transform_avx2.cpp
// File: ojph_transform_avx512.cpp
// Author: Aous Naman
// Date: 28 August 2019
// Date: 13 April 2024
//***************************************************************************/

#include <cstdio>
Expand Down
Loading

0 comments on commit f28a90f

Please sign in to comment.