Skip to content

Commit 97538d8

Browse files
committed
Release 1.0.5
* Implemented dsp::prgba32_set_alpha and dsp::pbgra32_set_alpha functions. * Better assembly code form 32-bit ARM, now compatible with Clang. * Better assembly code form 64-bit ARM, now compatible with Clang. * Updated build scripts.
2 parents b1b7932 + 7bc6054 commit 97538d8

File tree

127 files changed

+7428
-9550
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

127 files changed

+7428
-9550
lines changed

.cproject

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
33
<storageModule moduleId="org.eclipse.cdt.core.settings">
44
<cconfiguration id="cdt.managedbuild.config.gnu.exe.debug.1330341797">
5-
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.debug.1330341797" moduleId="org.eclipse.cdt.core.settings" name="Debug Linux">
5+
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.debug.1330341797" moduleId="org.eclipse.cdt.core.settings" name="DebugLinux">
66
<externalSettings/>
77
<extensions>
88
<extension id="org.eclipse.cdt.core.GNU_ELF" point="org.eclipse.cdt.core.BinaryParser"/>
@@ -14,7 +14,7 @@
1414
</extensions>
1515
</storageModule>
1616
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
17-
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.debug.1330341797" name="Debug Linux" optionalBuildProperties="org.eclipse.cdt.docker.launcher.containerbuild.property.selectedvolumes=,org.eclipse.cdt.docker.launcher.containerbuild.property.volumes=" parent="cdt.managedbuild.config.gnu.exe.debug">
17+
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.debug.1330341797" name="DebugLinux" optionalBuildProperties="org.eclipse.cdt.docker.launcher.containerbuild.property.selectedvolumes=,org.eclipse.cdt.docker.launcher.containerbuild.property.volumes=" parent="cdt.managedbuild.config.gnu.exe.debug">
1818
<folderInfo id="cdt.managedbuild.config.gnu.exe.debug.1330341797." name="/" resourcePath="">
1919
<toolChain id="cdt.managedbuild.toolchain.gnu.exe.debug.876325531" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.debug">
2020
<targetPlatform id="cdt.managedbuild.target.gnu.platform.exe.debug.1314541284" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.debug"/>
@@ -192,7 +192,7 @@
192192
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
193193
</cconfiguration>
194194
<cconfiguration id="cdt.managedbuild.config.gnu.exe.debug.1330341797.668167337">
195-
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.debug.1330341797.668167337" moduleId="org.eclipse.cdt.core.settings" name="Debug Win">
195+
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.debug.1330341797.668167337" moduleId="org.eclipse.cdt.core.settings" name="DebugWin">
196196
<externalSettings/>
197197
<extensions>
198198
<extension id="org.eclipse.cdt.core.GNU_ELF" point="org.eclipse.cdt.core.BinaryParser"/>
@@ -204,7 +204,7 @@
204204
</extensions>
205205
</storageModule>
206206
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
207-
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.debug.1330341797.668167337" name="Debug Win" optionalBuildProperties="org.eclipse.cdt.docker.launcher.containerbuild.property.selectedvolumes=,org.eclipse.cdt.docker.launcher.containerbuild.property.volumes=" parent="cdt.managedbuild.config.gnu.exe.debug">
207+
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.debug.1330341797.668167337" name="DebugWin" optionalBuildProperties="org.eclipse.cdt.docker.launcher.containerbuild.property.selectedvolumes=,org.eclipse.cdt.docker.launcher.containerbuild.property.volumes=" parent="cdt.managedbuild.config.gnu.exe.debug">
208208
<folderInfo id="cdt.managedbuild.config.gnu.exe.debug.1330341797.668167337." name="/" resourcePath="">
209209
<toolChain id="cdt.managedbuild.toolchain.gnu.exe.debug.90755955" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.debug">
210210
<targetPlatform id="cdt.managedbuild.target.gnu.platform.exe.debug.177003520" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.debug"/>
@@ -239,7 +239,7 @@
239239
</tool>
240240
<tool commandLinePattern="${COMMAND} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS} ${FLAGS}" id="cdt.managedbuild.tool.gnu.c.linker.exe.debug.1264018558" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.exe.debug"/>
241241
<tool commandLinePattern="${COMMAND} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS} ${FLAGS}" id="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug.2029656165" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug">
242-
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.cpp.link.option.libs.237978915" superClass="gnu.cpp.link.option.libs" useByScannerDiscovery="false" valueType="libs">
242+
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.cpp.link.option.libs.237978915" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" useByScannerDiscovery="false" valueType="libs">
243243
<listOptionValue builtIn="false" value="shlwapi"/>
244244
</option>
245245
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.985116764" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
@@ -364,4 +364,4 @@
364364
</storageModule>
365365
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
366366
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
367-
</cproject>
367+
</cproject>

.github/FUNDING.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
liberapay: sadko4u
2+
patreon: sadko4u
3+
custom:
4+
- https://www.blockchain.com/btc/address/15X3AfDRF3EshSLBoK8UfHAsFr2TQsH8pk
5+
- https://etherscan.io/address/0x079b24da78d78302cd3cfbb80c728cd554606cc6
6+
- https://www.bountysource.com/teams/lsp-plugins
7+
- https://paypal.me/sadko4u

.github/workflows/build.yml

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
---
2+
3+
name: Build on various Operating Systems
4+
5+
on:
6+
push:
7+
branches: [devel, master]
8+
pull_request:
9+
branches: [devel, master]
10+
11+
env:
12+
ARTIFACT: lsp-dsp-lib
13+
VALGRIND_ARGS: --error-exitcode=255 --leak-check=full --track-origins=yes --keep-debuginfo=yes --suppressions=.github/workflows/valgrind.supp
14+
15+
jobs:
16+
arch_linux:
17+
runs-on: ubuntu-latest
18+
container:
19+
image: archlinux:latest
20+
steps:
21+
- name: Add debug repositories
22+
run: |
23+
printf "[core-debug]\nInclude = /etc/pacman.d/mirrorlist\n[extra-debug]\nInclude = /etc/pacman.d/mirrorlist\n[community-debug]\nInclude = /etc/pacman.d/mirrorlist" >> /etc/pacman.conf
24+
printf 'Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch\n%s\n' "$(cat /etc/pacman.d/mirrorlist)" > /etc/pacman.d/mirrorlist
25+
- name: Install dependencies
26+
run: pacman --noconfirm -Syu base-devel glibc-debug git valgrind
27+
- uses: actions/checkout@v2
28+
- name: Configure project
29+
run: make config TEST=1
30+
- name: Fetch project dependencies
31+
run: make fetch
32+
- name: Build project
33+
run: make VERBOSE=1
34+
- name: Run unit tests
35+
run: .build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --verbose --jobs 1
36+
- name: Run unit tests with memcheck
37+
run: |
38+
for test in $(.build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --list --suppress); do \
39+
echo "***** MEMCHECK $test *****"; \
40+
valgrind ${{env.VALGRIND_ARGS}} .build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --verbose --jobs 1 --nofork --debug $test; \
41+
done
42+
arch_linux_debug:
43+
runs-on: ubuntu-latest
44+
container:
45+
image: archlinux:latest
46+
steps:
47+
- name: Add debug repositories
48+
run: |
49+
printf "[core-debug]\nInclude = /etc/pacman.d/mirrorlist\n[extra-debug]\nInclude = /etc/pacman.d/mirrorlist\n[community-debug]\nInclude = /etc/pacman.d/mirrorlist" >> /etc/pacman.conf
50+
printf 'Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch\n%s\n' "$(cat /etc/pacman.d/mirrorlist)" > /etc/pacman.d/mirrorlist
51+
- name: Install dependencies
52+
run: pacman --noconfirm -Syu base-devel glibc-debug git valgrind
53+
- uses: actions/checkout@v2
54+
- name: Configure project
55+
run: make config TEST=1 DEBUG=1
56+
- name: Fetch project dependencies
57+
run: make fetch
58+
- name: Build project
59+
run: make VERBOSE=1
60+
- name: Run unit tests
61+
run: .build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --verbose --jobs 1
62+
- name: Run unit tests with memcheck
63+
run: |
64+
for test in $(.build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --list --suppress); do \
65+
echo "***** MEMCHECK $test *****"; \
66+
valgrind ${{env.VALGRIND_ARGS}} .build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --verbose --jobs 1 --nofork --debug $test; \
67+
done
68+
opensuse_leap:
69+
runs-on: ubuntu-latest
70+
container:
71+
image: opensuse/leap:latest
72+
steps:
73+
- name: Install dependencies
74+
run: zypper --non-interactive --no-gpg-checks in tar gzip git make valgrind gcc gcc-c++
75+
- uses: actions/checkout@v2
76+
- name: Configure project
77+
run: make config TEST=1
78+
- name: Fetch project dependencies
79+
run: make fetch
80+
- name: Build project
81+
run: make VERBOSE=1
82+
- name: Run unit tests
83+
run: .build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --verbose --jobs 1
84+
- name: Run unit tests with memcheck
85+
run: |
86+
for test in $(.build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --list --suppress); do \
87+
echo "***** MEMCHECK $test *****"; \
88+
valgrind ${{env.VALGRIND_ARGS}} .build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --verbose --jobs 1 --nofork --debug $test; \
89+
done
90+
debian_stable:
91+
runs-on: ubuntu-latest
92+
container:
93+
image: debian:stable
94+
steps:
95+
- name: Update repositories
96+
run: apt-get update
97+
- name: Install dependencies
98+
run: apt-get -y install git make pkg-config valgrind gcc g++
99+
- uses: actions/checkout@v2
100+
- name: Configure project
101+
run: make config TEST=1
102+
- name: Fetch project dependencies
103+
run: make fetch
104+
- name: Build project
105+
run: make VERBOSE=1
106+
- name: Run unit tests
107+
run: .build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --verbose --jobs 1
108+
- name: Run unit tests with memcheck
109+
run: |
110+
for test in $(.build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --list --suppress); do \
111+
echo "***** MEMCHECK $test *****"; \
112+
valgrind ${{env.VALGRIND_ARGS}} .build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --verbose --jobs 1 --nofork --debug $test; \
113+
done

.github/workflows/valgrind.supp

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
libdl is full of leaks
3+
Memcheck:Leak
4+
...
5+
fun:_dl_open
6+
...
7+
}
8+
{
9+
libdl is full of leaks
10+
Memcheck:Leak
11+
...
12+
fun:_dl_close
13+
...
14+
}
15+
{
16+
libdl is full of leaks
17+
Memcheck:Leak
18+
...
19+
fun:_dl_init
20+
}
21+
{
22+
libdl is full of leaks
23+
Memcheck:Leak
24+
...
25+
fun:_dl_allocate_tls
26+
...
27+
}
28+
{
29+
libdl is full of leaks
30+
Memcheck:Leak
31+
...
32+
fun:call_init.part.0
33+
}
34+
{
35+
ignore XInitThreads
36+
Memcheck:Leak
37+
...
38+
fun:XInitThreads
39+
...
40+
}

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@
88
**/*.gmon
99
*.core
1010
/.config.mk
11-
/Debug Linux/
12-
/Debug Win/
11+
/modules/
12+
/DebugLinux/
13+
/DebugWin/

CHANGELOG

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
* RECENT CHANGES
33
*******************************************************************************
44

5+
=== 1.0.5 ===
6+
* Implemented dsp::prgba32_set_alpha and dsp::pbgra32_set_alpha functions.
7+
* Better assembly code form 32-bit ARM, now compatible with Clang.
8+
* Better assembly code form 64-bit ARM, now compatible with Clang.
9+
* Updated build scripts.
10+
511
=== 1.0.4 ===
612
* Updated build scripts.
713

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,10 @@ Here's the code snippet of how the library can be initialized and used in C++:
125125
int main(int argc, const char **argv)
126126
{
127127
// Initialize DSP
128-
dsp::init();
128+
lsp::dsp::init();
129129

130130
// Optionally: output information about the system
131-
dsp::info_t *info = dsp::info();
131+
lsp::dsp::info_t *info = lsp::dsp::info();
132132
if (info != NULL)
133133
{
134134
printf("Architecture: %s\n", info->arch);
@@ -143,15 +143,15 @@ int main(int argc, const char **argv)
143143
// This will enable Flush-to-Zero and Denormals-are-Zero flags on
144144
// CPUs that support them. This is thread-local change and should
145145
// be called in each individual processing thread
146-
dsp::context_t ctx;
147-
dsp::start(&ctx);
146+
lsp::dsp::context_t ctx;
147+
lsp::dsp::start(&ctx);
148148

149149
// Here we call some dsp functions, for example dsp::fill_zero
150150
float v[0x1000];
151-
dsp::fill_zero(v, sizeof(v)/sizeof(float));
151+
lsp::dsp::fill_zero(v, sizeof(v)/sizeof(float));
152152

153153
// At the end, we need to restore the context and reset CPU settings to defaults
154-
dsp::finish(&ctx);
154+
lsp::dsp::finish(&ctx);
155155

156156
return 0;
157157
}

dependencies.mk

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,48 @@ DEPENDENCIES = \
2626
TEST_DEPENDENCIES = \
2727
LSP_TEST_FW
2828

29-
# Platform-dependent
29+
#------------------------------------------------------------------------------
30+
# Linux dependencies
31+
LINUX_DEPENDENCIES =
32+
33+
LINUX_TEST_DEPENDENCIES =
34+
35+
ifeq ($(PLATFORM),Linux)
36+
DEPENDENCIES += $(LINUX_DEPENDENCIES)
37+
TEST_DEPENDENCIES += $(LINUX_TEST_DEPENDENCIES)
38+
endif
39+
40+
#------------------------------------------------------------------------------
41+
# BSD dependencies
42+
BSD_DEPENDENCIES =
43+
44+
BSD_TEST_DEPENDENCIES =
45+
46+
ifeq ($(PLATFORM),BSD)
47+
DEPENDENCIES += $(BSD_DEPENDENCIES)
48+
TEST_DEPENDENCIES += $(BSD_TEST_DEPENDENCIES)
49+
endif
50+
51+
#------------------------------------------------------------------------------
52+
# Windows dependencies
53+
WINDOWS_DEPENDENCIES =
54+
55+
WINDOWS_TEST_DEPENDENCIES = \
56+
LIBSHLWAPI
57+
3058
ifeq ($(PLATFORM),Windows)
31-
TEST_DEPENDENCIES += \
32-
LIBSHLWAPI
59+
DEPENDENCIES += $(WINDOWS_DEPENDENCIES)
60+
TEST_DEPENDENCIES += $(WINDOWS_TEST_DEPENDENCIES)
3361
endif
3462

63+
#------------------------------------------------------------------------------
3564
# Overall system dependencies
3665
ALL_DEPENDENCIES = \
3766
$(DEPENDENCIES) \
67+
$(LINUX_DEPENDENCIES) \
68+
$(BSD_DEPENDENCIES) \
69+
$(WINDOWS_DEPENDENCIES) \
3870
$(TEST_DEPENDENCIES) \
39-
LIBSHLWAPI
71+
$(LINUX_TEST_DEPENDENCIES) \
72+
$(BSD_TEST_DEPENDENCIES) \
73+
$(WINDOWS_TEST_DEPENDENCIES)

include/lsp-plug.in/dsp/common/context.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,15 @@ namespace lsp
6767
/** Initialize DSP
6868
*
6969
*/
70-
LSP_DSP_LIB_CPPIMPORT
70+
LSP_DSP_LIB_PUBLIC
7171
void init();
7272
}
7373
}
7474
#else
7575
/** Initialize DSP
7676
*
7777
*/
78-
LSP_DSP_LIB_CIMPORT
78+
LSP_DSP_LIB_PUBLIC
7979
void LSP_DSP_LIB_MANGLE(init());
8080
#endif /* __cplusplus */
8181

include/lsp-plug.in/dsp/common/graphics.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,22 @@ LSP_DSP_LIB_SYMBOL(void, rgba32_to_bgra32, void *dst, const void *src, size_t co
100100
*/
101101
LSP_DSP_LIB_SYMBOL(void, abgr32_to_bgra32, void *dst, const void *src, size_t count);
102102

103+
/** Set the specific alpha value for the Premultiplied BGRA format
104+
* @param dst target buffer
105+
* @param src source buffer
106+
* @param alpha the alpha value to set
107+
* @param count number of color values to process
108+
*/
109+
LSP_DSP_LIB_SYMBOL(void, pbgra32_set_alpha, void *dst, const void *src, uint8_t alpha, size_t count);
110+
111+
/** Set the specific alpha value for the Premultiplied RGBA format
112+
* @param dst target buffer
113+
* @param src source buffer
114+
* @param alpha the alpha value to set
115+
* @param count number of color values to process
116+
*/
117+
LSP_DSP_LIB_SYMBOL(void, prgba32_set_alpha, void *dst, const void *src, uint8_t alpha, size_t count);
118+
103119
/** Convert ABGR32 -> BGR32 color with Alpha=0xff
104120
*
105121
* @param dst target buffer

0 commit comments

Comments
 (0)