-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Implemented SIMD-optimized 2-knee compressor curve and gain calculation functions. * Implemented several AVX-512 optimized packed complex functions. * Removed pcomplex_add_r function. Use pcomplex_r2c_add2 function instead. * Fixed improper formula for complex_div and pcomplex_div functions. * Implemented sqr1, sqr2, ssqr1 and ssqr2 functions. * Implemented axis_apply_lin1 function. * Updated module versions in dependencies.
- Loading branch information
Showing
135 changed files
with
14,471 additions
and
3,705 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* Copyright (C) 2023 Linux Studio Plugins Project <https://lsp-plug.in/> | ||
* (C) 2023 Vladimir Sadovnikov <sadko4u@gmail.com> | ||
* | ||
* This file is part of lsp-dsp-lib | ||
* Created on: 5 окт. 2023 г. | ||
* | ||
* lsp-dsp-lib is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* any later version. | ||
* | ||
* lsp-dsp-lib is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with lsp-dsp-lib. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#ifndef LSP_PLUG_IN_DSP_COMMON_DYNAMICS_H_ | ||
#define LSP_PLUG_IN_DSP_COMMON_DYNAMICS_H_ | ||
|
||
#include <lsp-plug.in/dsp/common/types.h> | ||
|
||
#include <lsp-plug.in/dsp/common/dynamics/types.h> | ||
#include <lsp-plug.in/dsp/common/dynamics/compressor.h> | ||
|
||
|
||
#endif /* LSP_PLUG_IN_DSP_COMMON_DYNAMICS_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* Copyright (C) 2023 Linux Studio Plugins Project <https://lsp-plug.in/> | ||
* (C) 2023 Vladimir Sadovnikov <sadko4u@gmail.com> | ||
* | ||
* This file is part of lsp-dsp-lib | ||
* Created on: 5 окт. 2023 г. | ||
* | ||
* lsp-dsp-lib is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* any later version. | ||
* | ||
* lsp-dsp-lib is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with lsp-dsp-lib. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#ifndef LSP_PLUG_IN_DSP_COMMON_DYNAMICS_COMPRESSOR_H_ | ||
#define LSP_PLUG_IN_DSP_COMMON_DYNAMICS_COMPRESSOR_H_ | ||
|
||
#include <lsp-plug.in/dsp/common/types.h> | ||
#include <lsp-plug.in/dsp/common/dynamics/types.h> | ||
|
||
LSP_DSP_LIB_SYMBOL(void, compressor_x2_gain, float *dst, const float *src, const LSP_DSP_LIB_TYPE(compressor_x2_t) *c, size_t count); | ||
|
||
LSP_DSP_LIB_SYMBOL(void, compressor_x2_curve, float *dst, const float *src, const LSP_DSP_LIB_TYPE(compressor_x2_t) *c, size_t count); | ||
|
||
#endif /* LSP_PLUG_IN_DSP_COMMON_DYNAMICS_COMPRESSOR_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/* | ||
* Copyright (C) 2023 Linux Studio Plugins Project <https://lsp-plug.in/> | ||
* (C) 2023 Vladimir Sadovnikov <sadko4u@gmail.com> | ||
* | ||
* This file is part of lsp-dsp-lib | ||
* Created on: 5 окт. 2023 г. | ||
* | ||
* lsp-dsp-lib is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* any later version. | ||
* | ||
* lsp-dsp-lib is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with lsp-dsp-lib. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#ifndef LSP_PLUG_IN_DSP_COMMON_DYNAMICS_TYPES_H_ | ||
#define LSP_PLUG_IN_DSP_COMMON_DYNAMICS_TYPES_H_ | ||
|
||
#include <lsp-plug.in/dsp/common/types.h> | ||
|
||
LSP_DSP_LIB_BEGIN_NAMESPACE | ||
|
||
#pragma pack(push, 1) | ||
|
||
/** | ||
* Compressor knee is a curve that constists of three parts: | ||
* 1. Part with constant gain amplification in the range [-inf .. start] dB | ||
* 2. Soft compression knee in the range (start .. end) dB present by the quadratic function (2nd-order polynom) | ||
* 3. Gain reduction part in the range [end .. +inf] dB present by the linear function (1st-order polynom) | ||
* | ||
* The typical algorithm of computing the compressor's curve: | ||
* 1. Take absolute value of the sample: x = fabfs(in) | ||
* 2. If x <= start then return gain*x | ||
* 3. Compute the natural logarithm of the x: lx = logf(x). | ||
* 4. If x < end then compute the gain using the 2nd-order polynom: gain = (herm[0]*lx + herm[1])*lx + herm[2] | ||
* 5. Otherwise compute the gain using the 1st-order polynom: gain = tilt[0]*lx + tilt[1] | ||
* 6. return expf(gain) | ||
*/ | ||
typedef struct LSP_DSP_LIB_TYPE(compressor_knee_t) | ||
{ | ||
float start; // The start of the knee, in gain units | ||
float end; // The end of the knee, in gain units | ||
float gain; // Pre-amplification gain | ||
float herm[3]; // Hermite interpolation of the knee with the 2nd-order polynom | ||
float tilt[2]; // Tilt line parameters after the knee | ||
} LSP_DSP_LIB_TYPE(compressor_knee_t); | ||
|
||
|
||
/** | ||
* Two-knee compressor. | ||
* The result gain/curve is a result of multiplication of gain/curve between both knees. | ||
*/ | ||
typedef struct LSP_DSP_LIB_TYPE(compressor_x2_t) | ||
{ | ||
LSP_DSP_LIB_TYPE(compressor_knee_t) k[2]; | ||
} LSP_DSP_LIB_TYPE(compressor_x2_t); | ||
|
||
#pragma pack(pop) | ||
|
||
LSP_DSP_LIB_END_NAMESPACE | ||
|
||
#endif /* LSP_PLUG_IN_DSP_COMMON_DYNAMICS_TYPES_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
* Copyright (C) 2023 Linux Studio Plugins Project <https://lsp-plug.in/> | ||
* (C) 2023 Vladimir Sadovnikov <sadko4u@gmail.com> | ||
* | ||
* This file is part of lsp-dsp-lib | ||
* Created on: 20 сент. 2023 г. | ||
* | ||
* lsp-dsp-lib is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* any later version. | ||
* | ||
* lsp-dsp-lib is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with lsp-dsp-lib. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#ifndef LSP_PLUG_IN_DSP_COMMON_PMATH_SQR_H_ | ||
#define LSP_PLUG_IN_DSP_COMMON_PMATH_SQR_H_ | ||
|
||
#include <lsp-plug.in/dsp/common/types.h> | ||
|
||
/** | ||
* Compute squares: dst[i] = dst[i]*dst[i] | ||
* @param dst destination | ||
* @param count number of elements to process | ||
*/ | ||
LSP_DSP_LIB_SYMBOL(void, sqr1, float *dst, size_t count); | ||
|
||
/** | ||
* Compute squares: dst[i] = src[i]*src[i] | ||
* @param dst destination | ||
* @param src source | ||
* @param count number of elements in source | ||
*/ | ||
LSP_DSP_LIB_SYMBOL(void, sqr2, float *dst, const float *src, size_t count); | ||
|
||
|
||
|
||
#endif /* LSP_PLUG_IN_DSP_COMMON_PMATH_SQR_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
* Copyright (C) 2023 Linux Studio Plugins Project <https://lsp-plug.in/> | ||
* (C) 2023 Vladimir Sadovnikov <sadko4u@gmail.com> | ||
* | ||
* This file is part of lsp-dsp-lib | ||
* Created on: 20 сент. 2023 г. | ||
* | ||
* lsp-dsp-lib is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* any later version. | ||
* | ||
* lsp-dsp-lib is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with lsp-dsp-lib. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#ifndef LSP_PLUG_IN_DSP_COMMON_PMATH_SQRT_H_ | ||
#define LSP_PLUG_IN_DSP_COMMON_PMATH_SQRT_H_ | ||
|
||
#include <lsp-plug.in/dsp/common/types.h> | ||
|
||
/** | ||
* Compute saturated square roots: dst[i] = sqrt(max(dst[i], 0)) | ||
* @param dst destination | ||
* @param count number of elements to process | ||
*/ | ||
LSP_DSP_LIB_SYMBOL(void, ssqrt1, float *dst, size_t count); | ||
|
||
/** | ||
* Compute saturated square roots: dst[i] = sqrt(max(src[i], 0)) | ||
* @param dst destination | ||
* @param src source | ||
* @param count number of elements in source | ||
*/ | ||
LSP_DSP_LIB_SYMBOL(void, ssqrt2, float *dst, const float *src, size_t count); | ||
|
||
|
||
|
||
#endif /* LSP_PLUG_IN_DSP_COMMON_PMATH_SQRT_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.