Skip to content

Commit

Permalink
Workaround for clang
Browse files Browse the repository at this point in the history
  • Loading branch information
sadko4u committed Oct 10, 2023
1 parent b5c5ef0 commit 99f9893
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions include/private/dsp/arch/x86/sse2/dynamics/compressor.h
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ namespace lsp
IF_ARCH_X86(
comp_knee_t knee[2] __lsp_aligned16;
float mem[24] __lsp_aligned16;
float stub[4] __lsp_aligned16;
size_t mask;
);

Expand Down Expand Up @@ -259,6 +260,7 @@ namespace lsp
: [comp] "r" (c),
[knee] "o" (knee),
[mem] "o" (mem),
[stub] "o" (stub),
[C2C] "o" (compressor_const),
[L2C] "o" (LOG2_CONST),
[LOGC] "o" (LOGE_C),
Expand All @@ -275,22 +277,10 @@ namespace lsp
IF_ARCH_X86(
comp_knee_t knee[2] __lsp_aligned16;
float mem[24] __lsp_aligned16;
float stub[4] __lsp_aligned16;
size_t mask;
);
// for (size_t i=0; i<count; ++i)
// {
// float x = fabsf(src[i]);
// float lx = logf(x);
//
// float g1 = (x <= c->k[0].start) ? c->k[0].gain :
// (x >= c->k[0].end) ? expf(lx * c->k[0].tilt[0] + c->k[0].tilt[1]) :
// expf((c->k[0].herm[0]*lx + c->k[0].herm[1])*lx + c->k[0].herm[2]);
// float g2 = (x <= c->k[1].start) ? c->k[1].gain :
// (x >= c->k[1].end) ? expf(lx * c->k[1].tilt[0] + c->k[1].tilt[1]) :
// expf((c->k[1].herm[0]*lx + c->k[1].herm[1])*lx + c->k[1].herm[2]);
//
// dst[i] = g1 * g2 * x;
// }

ARCH_X86_ASM
(
// Prepare stuff
Expand Down Expand Up @@ -358,6 +348,7 @@ namespace lsp
: [comp] "r" (c),
[knee] "o" (knee),
[mem] "o" (mem),
[stub] "o" (stub),
[C2C] "o" (compressor_const),
[L2C] "o" (LOG2_CONST),
[LOGC] "o" (LOGE_C),
Expand Down

0 comments on commit 99f9893

Please sign in to comment.