Skip to content

Commit caa3d3d

Browse files
authored
Merge pull request #192 from aous72/fix4gcc931
This fixes a build failure on GCC 9.3.1, and a warning.
2 parents cd8e6a4 + bfc2436 commit caa3d3d

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

src/core/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ if(EMSCRIPTEN)
4040
endif()
4141
else()
4242
if (NOT OJPH_DISABLE_SIMD)
43-
if (("${OJPH_TARGET_ARCH}" MATCHES "OJPH_ARCH_X86_64")
43+
if (("${OJPH_TARGET_ARCH}" MATCHES "OJPH_ARCH_X86_64")
4444
OR ("${OJPH_TARGET_ARCH}" MATCHES "OJPH_ARCH_I386")
4545
OR MULTI_GEN_X86_64)
4646

@@ -95,7 +95,7 @@ else()
9595
set_source_files_properties(coding/ojph_block_decoder_ssse3.cpp PROPERTIES COMPILE_FLAGS -mssse3)
9696
set_source_files_properties(coding/ojph_block_decoder_avx2.cpp PROPERTIES COMPILE_FLAGS -mavx2)
9797
set_source_files_properties(coding/ojph_block_encoder_avx2.cpp PROPERTIES COMPILE_FLAGS -mavx2)
98-
set_source_files_properties(coding/ojph_block_encoder_avx512.cpp PROPERTIES COMPILE_FLAGS -mavx512cd)
98+
set_source_files_properties(coding/ojph_block_encoder_avx512.cpp PROPERTIES COMPILE_FLAGS "-mavx512f -mavx512cd")
9999
set_source_files_properties(transform/ojph_colour_sse.cpp PROPERTIES COMPILE_FLAGS -msse)
100100
set_source_files_properties(transform/ojph_colour_sse2.cpp PROPERTIES COMPILE_FLAGS -msse2)
101101
set_source_files_properties(transform/ojph_colour_avx.cpp PROPERTIES COMPILE_FLAGS -mavx)
@@ -104,7 +104,7 @@ else()
104104
set_source_files_properties(transform/ojph_transform_sse2.cpp PROPERTIES COMPILE_FLAGS -msse2)
105105
set_source_files_properties(transform/ojph_transform_avx.cpp PROPERTIES COMPILE_FLAGS -mavx)
106106
set_source_files_properties(transform/ojph_transform_avx2.cpp PROPERTIES COMPILE_FLAGS -mavx2)
107-
set_source_files_properties(transform/ojph_transform_avx512.cpp PROPERTIES COMPILE_FLAGS -mavx512f)
107+
set_source_files_properties(transform/ojph_transform_avx512.cpp PROPERTIES COMPILE_FLAGS "-mavx512f -mavx512cd")
108108
endif()
109109
endif()
110110

src/core/codestream/ojph_precinct.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,8 @@ namespace ojph {
489489
Lblock += bit;
490490
}
491491

492-
int bits = Lblock + 31 - count_leading_zeros(num_phld_passes + 1);
492+
int bits = Lblock + 31 -
493+
(int)count_leading_zeros(num_phld_passes + 1);
493494
if (bb_read_bits(&bb, bits, bit) == false)
494495
{ data_left = 0; throw "error reading from file p9"; }
495496
if (bit < 2)

src/core/coding/ojph_block_encoder_avx512.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -695,11 +695,11 @@ static void proc_ms_encode(ms_struct *msp,
695695
/* cwd = s[i * 4 + 0] & ((1U << m) - 1)
696696
* cwd_len = m
697697
*/
698-
_mm512_storeu_epi32(cwd_len, m_vec[i]);
698+
_mm512_storeu_si512(cwd_len, m_vec[i]);
699699
tmp = _mm512_sllv_epi32(ONE, m_vec[i]);
700700
tmp = _mm512_sub_epi32(tmp, ONE);
701701
tmp = _mm512_and_epi32(tmp, s_vec[i]);
702-
_mm512_storeu_epi32(cwd, tmp);
702+
_mm512_storeu_si512(cwd, tmp);
703703

704704
for (ui32 j = 0; j < 8; ++j) {
705705
ui32 idx = j * 2;
@@ -1177,8 +1177,8 @@ void ojph_encode_codeblock_avx512(ui32* buf, ui32 missing_msbs,
11771177
* So in the vlc_encode, the tuple will only be scaled by 2.
11781178
*/
11791179
tuple_vec = _mm512_srli_epi32(tuple_vec, 4);
1180-
_mm512_storeu_epi32(tuple, tuple_vec);
1181-
_mm512_storeu_epi32(u_q, u_q_vec);
1180+
_mm512_storeu_si512(tuple, tuple_vec);
1181+
_mm512_storeu_si512(u_q, u_q_vec);
11821182
proc_vlc_encode(&vlc, tuple, u_q, _ignore);
11831183
}
11841184

src/core/common/ojph_version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@
3535

3636
#define OPENJPH_VERSION_MAJOR 0
3737
#define OPENJPH_VERSION_MINOR 21
38-
#define OPENJPH_VERSION_PATCH 4
38+
#define OPENJPH_VERSION_PATCH 5

0 commit comments

Comments
 (0)