Skip to content

Commit bb88e33

Browse files
committed
Merge branch 'jaschiu-master' into devel
* Fixed Clang warnings on floating-point cast
2 parents 92e1022 + e6a7467 commit bb88e33

File tree

6 files changed

+36
-35
lines changed

6 files changed

+36
-35
lines changed

include/private/dsp/arch/aarch64/asimd/pmath/log.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (C) 2023 Linux Studio Plugins Project <https://lsp-plug.in/>
3-
* (C) 2023 Vladimir Sadovnikov <sadko4u@gmail.com>
2+
* Copyright (C) 2025 Linux Studio Plugins Project <https://lsp-plug.in/>
3+
* (C) 2025 Vladimir Sadovnikov <sadko4u@gmail.com>
44
*
55
* This file is part of lsp-dsp-lib
66
* Created on: 31 мар. 2020 г.
@@ -45,19 +45,19 @@ namespace lsp
4545

4646
static const float LOGB_C[] __lsp_aligned16 =
4747
{
48-
LSP_DSP_VEC4(2.0f * M_LOG2E),
49-
LSP_DSP_VEC4(2.0f * M_LOG2E)
48+
LSP_DSP_VEC4(2.0f * float(M_LOG2E)),
49+
LSP_DSP_VEC4(2.0f * float(M_LOG2E))
5050
};
5151

5252
static const float LOGE_C[] __lsp_aligned16 =
5353
{
54-
LSP_DSP_VEC4(1.0f / M_LOG2E),
55-
LSP_DSP_VEC4(1.0f / M_LOG2E)
54+
LSP_DSP_VEC4(1.0f / float(M_LOG2E)),
55+
LSP_DSP_VEC4(1.0f / float(M_LOG2E))
5656
};
5757

5858
static const float LOGD_C[] __lsp_aligned16 =
5959
{
60-
LSP_DSP_VEC4(2.0f * M_LOG10E),
60+
LSP_DSP_VEC4(2.0f * float(M_LOG10E)),
6161
LSP_DSP_VEC4(0.301029995663981f) // 1/log2(10)
6262
};
6363
)

include/private/dsp/arch/arm/neon-d32/pmath/log.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (C) 2023 Linux Studio Plugins Project <https://lsp-plug.in/>
3-
* (C) 2023 Vladimir Sadovnikov <sadko4u@gmail.com>
2+
* Copyright (C) 2025 Linux Studio Plugins Project <https://lsp-plug.in/>
3+
* (C) 2025 Vladimir Sadovnikov <sadko4u@gmail.com>
44
*
55
* This file is part of lsp-dsp-lib
66
* Created on: 31 мар. 2020 г.
@@ -45,19 +45,19 @@ namespace lsp
4545

4646
static const float LOGB_C[] __lsp_aligned16 =
4747
{
48-
LSP_DSP_VEC4(2.0f * M_LOG2E),
49-
LSP_DSP_VEC4(2.0f * M_LOG2E)
48+
LSP_DSP_VEC4(2.0f * float(M_LOG2E)),
49+
LSP_DSP_VEC4(2.0f * float(M_LOG2E))
5050
};
5151

5252
static const float LOGE_C[] __lsp_aligned16 =
5353
{
54-
LSP_DSP_VEC4(1.0f / M_LOG2E),
55-
LSP_DSP_VEC4(1.0f / M_LOG2E)
54+
LSP_DSP_VEC4(1.0f / float(M_LOG2E)),
55+
LSP_DSP_VEC4(1.0f / float(M_LOG2E))
5656
};
5757

5858
static const float LOGD_C[] __lsp_aligned16 =
5959
{
60-
LSP_DSP_VEC4(2.0f * M_LOG10E),
60+
LSP_DSP_VEC4(2.0f * float(M_LOG10E)),
6161
LSP_DSP_VEC4(0.301029995663981f) // 1/log2(10)
6262
};
6363
)

include/private/dsp/arch/generic/pmath/log.h

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (C) 2020 Linux Studio Plugins Project <https://lsp-plug.in/>
3-
* (C) 2020 Vladimir Sadovnikov <sadko4u@gmail.com>
2+
* Copyright (C) 2025 Linux Studio Plugins Project <https://lsp-plug.in/>
3+
* (C) 2025 Vladimir Sadovnikov <sadko4u@gmail.com>
44
*
55
* This file is part of lsp-dsp-lib
66
* Created on: 31 мар. 2020 г.
@@ -33,13 +33,13 @@ namespace lsp
3333
void logb1(float *dst, size_t count)
3434
{
3535
for (size_t i=0; i<count; ++i)
36-
dst[i] = ::logf(dst[i]) * M_LOG2E;
36+
dst[i] = ::logf(dst[i]) * float(M_LOG2E);
3737
}
3838

3939
void logb2(float *dst, const float *src, size_t count)
4040
{
4141
for (size_t i=0; i<count; ++i)
42-
dst[i] = ::logf(src[i]) * M_LOG2E;
42+
dst[i] = ::logf(src[i]) * float(M_LOG2E);
4343
}
4444

4545
void loge1(float *dst, size_t count)
@@ -65,7 +65,8 @@ namespace lsp
6565
for (size_t i=0; i<count; ++i)
6666
dst[i] = ::log10f(src[i]);
6767
}
68-
}
69-
}
68+
69+
} /* namespace generic */
70+
} /* namespace lsp */
7071

7172
#endif /* PRIVATE_DSP_ARCH_GENERIC_PMATH_LOG_H_ */

include/private/dsp/arch/x86/avx2/pmath/log.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (C) 2023 Linux Studio Plugins Project <https://lsp-plug.in/>
3-
* (C) 2023 Vladimir Sadovnikov <sadko4u@gmail.com>
2+
* Copyright (C) 2025 Linux Studio Plugins Project <https://lsp-plug.in/>
3+
* (C) 2025 Vladimir Sadovnikov <sadko4u@gmail.com>
44
*
55
* This file is part of lsp-dsp-lib
66
* Created on: 31 мар. 2020 г.
@@ -46,17 +46,17 @@ namespace lsp
4646

4747
static const float LOGB_C[] __lsp_aligned32 =
4848
{
49-
LSP_DSP_VEC8(2.0f * M_LOG2E)
49+
LSP_DSP_VEC8(2.0f * float(M_LOG2E))
5050
};
5151

5252
static const float LOGE_C[] __lsp_aligned32 =
5353
{
54-
LSP_DSP_VEC8(1.0f / M_LOG2E)
54+
LSP_DSP_VEC8(1.0f / float(M_LOG2E))
5555
};
5656

5757
static const float LOGD_C[] __lsp_aligned32 =
5858
{
59-
LSP_DSP_VEC8(2.0f * M_LOG10E),
59+
LSP_DSP_VEC8(2.0f * float(M_LOG10E)),
6060
LSP_DSP_VEC8(0.301029995663981f) // 1/log2(10)
6161
};
6262
)

include/private/dsp/arch/x86/avx512/pmath/log.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (C) 2023 Linux Studio Plugins Project <https://lsp-plug.in/>
3-
* (C) 2023 Vladimir Sadovnikov <sadko4u@gmail.com>
2+
* Copyright (C) 2025 Linux Studio Plugins Project <https://lsp-plug.in/>
3+
* (C) 2025 Vladimir Sadovnikov <sadko4u@gmail.com>
44
*
55
* This file is part of lsp-dsp-lib
66
* Created on: 27 окт. 2023 г.
@@ -46,17 +46,17 @@ namespace lsp
4646

4747
static const float LOGB_C[] __lsp_aligned64 =
4848
{
49-
LSP_DSP_VEC16(2.0f * M_LOG2E)
49+
LSP_DSP_VEC16(2.0f * float(M_LOG2E))
5050
};
5151

5252
static const float LOGE_C[] __lsp_aligned64 =
5353
{
54-
LSP_DSP_VEC16(1.0f / M_LOG2E)
54+
LSP_DSP_VEC16(1.0f / float(M_LOG2E))
5555
};
5656

5757
static const float LOGD_C[] __lsp_aligned64 =
5858
{
59-
LSP_DSP_VEC16(2.0f * M_LOG10E),
59+
LSP_DSP_VEC16(2.0f * float(M_LOG10E)),
6060
LSP_DSP_VEC16(0.301029995663981f) // 1/log2(10)
6161
};
6262
)

include/private/dsp/arch/x86/sse2/pmath/log.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (C) 2023 Linux Studio Plugins Project <https://lsp-plug.in/>
3-
* (C) 2023 Vladimir Sadovnikov <sadko4u@gmail.com>
2+
* Copyright (C) 2025 Linux Studio Plugins Project <https://lsp-plug.in/>
3+
* (C) 2025 Vladimir Sadovnikov <sadko4u@gmail.com>
44
*
55
* This file is part of lsp-dsp-lib
66
* Created on: 31 мар. 2020 г.
@@ -46,17 +46,17 @@ namespace lsp
4646

4747
static const float LOGB_C[] __lsp_aligned16 =
4848
{
49-
LSP_DSP_VEC4(2.0f * M_LOG2E)
49+
LSP_DSP_VEC4(2.0f * float(M_LOG2E))
5050
};
5151

5252
static const float LOGE_C[] __lsp_aligned16 =
5353
{
54-
LSP_DSP_VEC4(1.0f / M_LOG2E)
54+
LSP_DSP_VEC4(1.0f / float(M_LOG2E))
5555
};
5656

5757
static const float LOGD_C[] __lsp_aligned16 =
5858
{
59-
LSP_DSP_VEC4(2.0f * M_LOG10E),
59+
LSP_DSP_VEC4(2.0f * float(M_LOG10E)),
6060
LSP_DSP_VEC4(0.301029995663981f) // 1/log2(10)
6161
};
6262
)

0 commit comments

Comments
 (0)