Skip to content

Commit

Permalink
Bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sadko4u committed Nov 24, 2024
1 parent 88b3837 commit 95d5373
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions include/private/dsp/arch/aarch64/asimd/pcomplex.h
Original file line number Diff line number Diff line change
Expand Up @@ -1657,8 +1657,8 @@ namespace lsp
IF_ARCH_AARCH64(
static float pcomplex_corr_const[] __lsp_aligned16 =
{
LSP_DSP_VEC4(1e-20f),
LSP_DSP_VEC4(1e-20f)
LSP_DSP_VEC4(1e-36f),
LSP_DSP_VEC4(1e-36f)
};
);

Expand Down
4 changes: 2 additions & 2 deletions include/private/dsp/arch/arm/neon-d32/pcomplex.h
Original file line number Diff line number Diff line change
Expand Up @@ -1495,8 +1495,8 @@ namespace lsp
IF_ARCH_ARM(
static float pcomplex_corr_const[] __lsp_aligned16 =
{
LSP_DSP_VEC4(1e-20f),
LSP_DSP_VEC4(1e-20f)
LSP_DSP_VEC4(1e-36f),
LSP_DSP_VEC4(1e-36f)
};
);

Expand Down
4 changes: 2 additions & 2 deletions include/private/dsp/arch/generic/pan.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ namespace lsp
const float sl = fabsf(l[i]);
const float sr = fabsf(r[i]);
const float den = sl + sr;
dst[i] = (den > 1e-5f) ? sr / den : dfl;
dst[i] = (den > 1e-18f) ? sr / den : dfl;
}
}

Expand All @@ -51,7 +51,7 @@ namespace lsp
const float sl = l[i] * l[i];
const float sr = r[i] * r[i];
const float den = sl + sr;
dst[i] = (den > 1e-10f) ? sr / den : dfl;
dst[i] = (den > 1e-36f) ? sr / den : dfl;
}
}

Expand Down
2 changes: 1 addition & 1 deletion include/private/dsp/arch/generic/pcomplex.h
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ namespace lsp
const float den = (a*a + b*b)*(c*c + d*d);
const float nom = a*c + b*d;

*dst_corr = (den > 1e-20f) ? nom / sqrtf(den) : 0.0f;
*dst_corr = (den >= 1e-36f) ? nom / sqrtf(den) : 0.0f;

src1 += 2;
src2 += 2;
Expand Down
6 changes: 3 additions & 3 deletions include/private/dsp/arch/x86/avx/pcomplex.h
Original file line number Diff line number Diff line change
Expand Up @@ -1290,7 +1290,7 @@ namespace lsp
IF_ARCH_X86(
static const float pcomplex_corr_const[] __lsp_aligned32 =
{
LSP_DSP_VEC8(1e-20f),
LSP_DSP_VEC8(1e-36f),
};
);

Expand All @@ -1308,7 +1308,7 @@ namespace lsp
__ASM_EMIT("xor %[off], %[off]")
/* x8 blocks */
__ASM_EMIT("sub $8, %[count]") /* count -= 8 */
__ASM_EMIT("movaps %[CC], %%xmm7") /* xmm7 = threshold */
__ASM_EMIT("vmovaps %[CC], %%ymm7") /* ymm7 = threshold */
__ASM_EMIT("jb 2f")
__ASM_EMIT("1:")
__ASM_EMIT("vmovups 0x00(%[src1], %[off], 2), %%xmm0") /* xmm0 = a0 b0 a1 b1 */
Expand Down Expand Up @@ -1431,7 +1431,7 @@ namespace lsp
__ASM_EMIT("xor %[off], %[off]")
/* x8 blocks */
__ASM_EMIT("sub $8, %[count]") /* count -= 8 */
__ASM_EMIT("movaps %[CC], %%xmm7") /* xmm7 = threshold */
__ASM_EMIT("vmovaps %[CC], %%ymm7") /* ymm7 = threshold */
__ASM_EMIT("jb 2f")
__ASM_EMIT("1:")
__ASM_EMIT("vmovups 0x00(%[src1], %[off], 2), %%xmm0") /* xmm0 = a0 b0 a1 b1 */
Expand Down
2 changes: 1 addition & 1 deletion include/private/dsp/arch/x86/avx512/pcomplex.h
Original file line number Diff line number Diff line change
Expand Up @@ -1329,7 +1329,7 @@ namespace lsp
IF_ARCH_X86(
static const float pcomplex_corr_const[] __lsp_aligned64 =
{
LSP_DSP_VEC16(1e-20f),
LSP_DSP_VEC16(1e-36f),
};
);

Expand Down
2 changes: 1 addition & 1 deletion include/private/dsp/arch/x86/sse/pcomplex.h
Original file line number Diff line number Diff line change
Expand Up @@ -1254,7 +1254,7 @@ namespace lsp
IF_ARCH_X86(
static const float pcomplex_corr_const[] __lsp_aligned16 =
{
LSP_DSP_VEC4(1e-20f),
LSP_DSP_VEC4(1e-36f),
};
);

Expand Down
2 changes: 1 addition & 1 deletion include/private/dsp/arch/x86/sse3/pcomplex.h
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,7 @@ namespace lsp
IF_ARCH_X86_64(
static const float pcomplex_corr_const[] __lsp_aligned16 =
{
LSP_DSP_VEC4(1e-20f),
LSP_DSP_VEC4(1e-36f),
};
);

Expand Down
4 changes: 2 additions & 2 deletions src/main/x86/avx.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2023 Linux Studio Plugins Project <https://lsp-plug.in/>
* (C) 2023 Vladimir Sadovnikov <sadko4u@gmail.com>
* Copyright (C) 2024 Linux Studio Plugins Project <https://lsp-plug.in/>
* (C) 2024 Vladimir Sadovnikov <sadko4u@gmail.com>
*
* This file is part of lsp-dsp-lib
* Created on: 31 мар. 2020 г.
Expand Down
4 changes: 2 additions & 2 deletions src/main/x86/sse.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2020 Linux Studio Plugins Project <https://lsp-plug.in/>
* (C) 2020 Vladimir Sadovnikov <sadko4u@gmail.com>
* Copyright (C) 2024 Linux Studio Plugins Project <https://lsp-plug.in/>
* (C) 2024 Vladimir Sadovnikov <sadko4u@gmail.com>
*
* This file is part of lsp-dsp-lib
* Created on: 31 мар. 2020 г.
Expand Down
4 changes: 2 additions & 2 deletions src/main/x86/sse3.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2020 Linux Studio Plugins Project <https://lsp-plug.in/>
* (C) 2020 Vladimir Sadovnikov <sadko4u@gmail.com>
* Copyright (C) 2024 Linux Studio Plugins Project <https://lsp-plug.in/>
* (C) 2024 Vladimir Sadovnikov <sadko4u@gmail.com>
*
* This file is part of lsp-dsp-lib
* Created on: 31 мар. 2020 г.
Expand Down

0 comments on commit 95d5373

Please sign in to comment.