Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ if(EMSCRIPTEN)
endif()
else()
if (NOT OJPH_DISABLE_SIMD)
if (("${OJPH_TARGET_ARCH}" MATCHES "OJPH_ARCH_X86_64")
if (("${OJPH_TARGET_ARCH}" MATCHES "OJPH_ARCH_X86_64")
OR ("${OJPH_TARGET_ARCH}" MATCHES "OJPH_ARCH_I386")
OR MULTI_GEN_X86_64)

Expand Down Expand Up @@ -95,7 +95,7 @@ else()
set_source_files_properties(coding/ojph_block_decoder_ssse3.cpp PROPERTIES COMPILE_FLAGS -mssse3)
set_source_files_properties(coding/ojph_block_decoder_avx2.cpp PROPERTIES COMPILE_FLAGS -mavx2)
set_source_files_properties(coding/ojph_block_encoder_avx2.cpp PROPERTIES COMPILE_FLAGS -mavx2)
set_source_files_properties(coding/ojph_block_encoder_avx512.cpp PROPERTIES COMPILE_FLAGS -mavx512cd)
set_source_files_properties(coding/ojph_block_encoder_avx512.cpp PROPERTIES COMPILE_FLAGS "-mavx512f -mavx512cd")
set_source_files_properties(transform/ojph_colour_sse.cpp PROPERTIES COMPILE_FLAGS -msse)
set_source_files_properties(transform/ojph_colour_sse2.cpp PROPERTIES COMPILE_FLAGS -msse2)
set_source_files_properties(transform/ojph_colour_avx.cpp PROPERTIES COMPILE_FLAGS -mavx)
Expand All @@ -104,7 +104,7 @@ else()
set_source_files_properties(transform/ojph_transform_sse2.cpp PROPERTIES COMPILE_FLAGS -msse2)
set_source_files_properties(transform/ojph_transform_avx.cpp PROPERTIES COMPILE_FLAGS -mavx)
set_source_files_properties(transform/ojph_transform_avx2.cpp PROPERTIES COMPILE_FLAGS -mavx2)
set_source_files_properties(transform/ojph_transform_avx512.cpp PROPERTIES COMPILE_FLAGS -mavx512f)
set_source_files_properties(transform/ojph_transform_avx512.cpp PROPERTIES COMPILE_FLAGS "-mavx512f -mavx512cd")
endif()
endif()

Expand Down
3 changes: 2 additions & 1 deletion src/core/codestream/ojph_precinct.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,8 @@ namespace ojph {
Lblock += bit;
}

int bits = Lblock + 31 - count_leading_zeros(num_phld_passes + 1);
int bits = Lblock + 31 -
(int)count_leading_zeros(num_phld_passes + 1);
if (bb_read_bits(&bb, bits, bit) == false)
{ data_left = 0; throw "error reading from file p9"; }
if (bit < 2)
Expand Down
8 changes: 4 additions & 4 deletions src/core/coding/ojph_block_encoder_avx512.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -695,11 +695,11 @@ static void proc_ms_encode(ms_struct *msp,
/* cwd = s[i * 4 + 0] & ((1U << m) - 1)
* cwd_len = m
*/
_mm512_storeu_epi32(cwd_len, m_vec[i]);
_mm512_storeu_si512(cwd_len, m_vec[i]);
tmp = _mm512_sllv_epi32(ONE, m_vec[i]);
tmp = _mm512_sub_epi32(tmp, ONE);
tmp = _mm512_and_epi32(tmp, s_vec[i]);
_mm512_storeu_epi32(cwd, tmp);
_mm512_storeu_si512(cwd, tmp);

for (ui32 j = 0; j < 8; ++j) {
ui32 idx = j * 2;
Expand Down Expand Up @@ -1177,8 +1177,8 @@ void ojph_encode_codeblock_avx512(ui32* buf, ui32 missing_msbs,
* So in the vlc_encode, the tuple will only be scaled by 2.
*/
tuple_vec = _mm512_srli_epi32(tuple_vec, 4);
_mm512_storeu_epi32(tuple, tuple_vec);
_mm512_storeu_epi32(u_q, u_q_vec);
_mm512_storeu_si512(tuple, tuple_vec);
_mm512_storeu_si512(u_q, u_q_vec);
proc_vlc_encode(&vlc, tuple, u_q, _ignore);
}

Expand Down
2 changes: 1 addition & 1 deletion src/core/common/ojph_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@

#define OPENJPH_VERSION_MAJOR 0
#define OPENJPH_VERSION_MINOR 21
#define OPENJPH_VERSION_PATCH 4
#define OPENJPH_VERSION_PATCH 5
Loading