Skip to content

Commit 6d87335

Browse files
committed
Release 1.0.12
* Added series of functions for processing 1-bit, 2-bit, 4-bit and 8-bit grayscale bitmaps which can be useful for quick text rendering using glyph images. * Removed Makefile.d. Dependencies are now automatically generated at the build stage. * Updated build scripts. * Updated module versions in dependencies.
2 parents 29fbe77 + f2bc9c1 commit 6d87335

File tree

35 files changed

+5892
-35372
lines changed

35 files changed

+5892
-35372
lines changed

CHANGELOG

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

5+
=== 1.0.12 ===
6+
* Added series of functions for processing 1-bit, 2-bit, 4-bit and 8-bit grayscale
7+
bitmaps which can be useful for quick text rendering using glyph images.
8+
* Removed Makefile.d. Dependencies are now automatically generated at the build stage.
9+
* Updated build scripts.
10+
* Updated module versions in dependencies.
11+
512
=== 1.0.11 ===
613
* Small math optimizations for dsp::smooth_cubic_linear and dsp::smooth_cubic_log
714
functions.

Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ DISTSRC_PATH = $(BUILDDIR)/distsrc
4646
DISTSRC = $(DISTSRC_PATH)/$(ARTIFACT_NAME)
4747

4848
.DEFAULT_GOAL := all
49-
.PHONY: all compile install uninstall depend clean
49+
.PHONY: all compile install uninstall clean
5050

51-
compile all install uninstall depend:
51+
compile all install uninstall:
5252
$(CHK_CONFIG)
5353
$(MAKE) -C "$(BASEDIR)/src" $(@) VERBOSE="$(VERBOSE)" CONFIG="$(CONFIG)" DESTDIR="$(DESTDIR)"
5454

@@ -107,7 +107,6 @@ help:
107107
echo " all Build all binaries"
108108
echo " clean Clean all build files and configuration file"
109109
echo " config Configure build"
110-
echo " depend Update build dependencies for current project"
111110
echo " distsrc Make tarball with source code for packagers"
112111
echo " fetch Fetch all desired source code dependencies from git"
113112
echo " help Print this help message"
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
/*
2+
* Copyright (C) 2023 Linux Studio Plugins Project <https://lsp-plug.in/>
3+
* (C) 2023 Vladimir Sadovnikov <[email protected]>
4+
*
5+
* This file is part of lsp-dsp-lib
6+
* Created on: 8 апр. 2023 г.
7+
*
8+
* lsp-dsp-lib is free software: you can redistribute it and/or modify
9+
* it under the terms of the GNU Lesser General Public License as published by
10+
* the Free Software Foundation, either version 3 of the License, or
11+
* any later version.
12+
*
13+
* lsp-dsp-lib is distributed in the hope that it will be useful,
14+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16+
* GNU Lesser General Public License for more details.
17+
*
18+
* You should have received a copy of the GNU Lesser General Public License
19+
* along with lsp-dsp-lib. If not, see <https://www.gnu.org/licenses/>.
20+
*/
21+
22+
#ifndef LSP_PLUG_IN_DSP_COMMON_BITMAP_H_
23+
#define LSP_PLUG_IN_DSP_COMMON_BITMAP_H_
24+
25+
#include <lsp-plug.in/dsp/common/types.h>
26+
27+
#ifdef __cplusplus
28+
namespace lsp
29+
{
30+
namespace dsp
31+
{
32+
#endif /* __cplusplus */
33+
34+
typedef struct LSP_DSP_LIB_TYPE(bitmap_t)
35+
{
36+
int32_t width;
37+
int32_t height;
38+
int32_t stride;
39+
uint8_t *data;
40+
} LSP_DSP_LIB_TYPE(bitmap_t);
41+
42+
43+
typedef void (* LSP_DSP_LIB_TYPE(bitmap_render_func_t))(
44+
LSP_DSP_LIB_TYPE(bitmap_t) *dst,
45+
const LSP_DSP_LIB_TYPE(bitmap_t) *src,
46+
ssize_t x,
47+
ssize_t y);
48+
#ifdef __cplusplus
49+
} /* namespace dsp */
50+
} /* namespace lsp */
51+
#endif /* __cplusplus */
52+
53+
#include <lsp-plug.in/dsp/common/bitmap/b1b8.h>
54+
#include <lsp-plug.in/dsp/common/bitmap/b2b8.h>
55+
#include <lsp-plug.in/dsp/common/bitmap/b4b8.h>
56+
#include <lsp-plug.in/dsp/common/bitmap/b8b8.h>
57+
58+
#endif /* LSP_PLUG_IN_DSP_COMMON_BITMAP_H_ */
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
/*
2+
* Copyright (C) 2023 Linux Studio Plugins Project <https://lsp-plug.in/>
3+
* (C) 2023 Vladimir Sadovnikov <[email protected]>
4+
*
5+
* This file is part of lsp-dsp-lib
6+
* Created on: 8 апр. 2023 г.
7+
*
8+
* lsp-dsp-lib is free software: you can redistribute it and/or modify
9+
* it under the terms of the GNU Lesser General Public License as published by
10+
* the Free Software Foundation, either version 3 of the License, or
11+
* any later version.
12+
*
13+
* lsp-dsp-lib is distributed in the hope that it will be useful,
14+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16+
* GNU Lesser General Public License for more details.
17+
*
18+
* You should have received a copy of the GNU Lesser General Public License
19+
* along with lsp-dsp-lib. If not, see <https://www.gnu.org/licenses/>.
20+
*/
21+
22+
#ifndef LSP_PLUG_IN_DSP_COMMON_BITMAP_B1B8_H_
23+
#define LSP_PLUG_IN_DSP_COMMON_BITMAP_B1B8_H_
24+
25+
#include <lsp-plug.in/dsp/common/bitmap.h>
26+
27+
/**
28+
* Put the source 1-bit bitmap to destination 8-bit bitmap,
29+
* the result pixel value will be computed as: result[i] = src[i]
30+
*/
31+
LSP_DSP_LIB_SYMBOL(void, bitmap_put_b1b8, LSP_DSP_LIB_TYPE(LSP_DSP_LIB_TYPE(bitmap_t)) *dst, const LSP_DSP_LIB_TYPE(bitmap_t) *src, ssize_t x, ssize_t y);
32+
33+
/**
34+
* Put the source 1-bit bitmap to destination 8-bit bitmap,
35+
* the result pixel value will be computed as: result[i] = saturate(dst[i] + src[i])
36+
*/
37+
LSP_DSP_LIB_SYMBOL(void, bitmap_add_b1b8, LSP_DSP_LIB_TYPE(bitmap_t) *dst, const LSP_DSP_LIB_TYPE(bitmap_t) *src, ssize_t x, ssize_t y);
38+
39+
/**
40+
* Put the source 1-bit bitmap to destination 8-bit bitmap,
41+
* the result pixel value will be computed as: result[i] = saturate(dst[i] - src[i])
42+
*/
43+
LSP_DSP_LIB_SYMBOL(void, bitmap_sub_b1b8, LSP_DSP_LIB_TYPE(bitmap_t) *dst, const LSP_DSP_LIB_TYPE(bitmap_t) *src, ssize_t x, ssize_t y);
44+
45+
/**
46+
* Put the source 1-bit bitmap to destination 8-bit bitmap,
47+
* the result pixel value will be computed as: result[i] = max(dst[i], src[i])
48+
*/
49+
LSP_DSP_LIB_SYMBOL(void, bitmap_max_b1b8, LSP_DSP_LIB_TYPE(bitmap_t) *dst, const LSP_DSP_LIB_TYPE(bitmap_t) *src, ssize_t x, ssize_t y);
50+
51+
/**
52+
* Put the source 1-bit bitmap to destination 8-bit bitmap,
53+
* the result pixel value will be computed as: result[i] = min(dst[i], src[i])
54+
*/
55+
LSP_DSP_LIB_SYMBOL(void, bitmap_min_b1b8, LSP_DSP_LIB_TYPE(bitmap_t) *dst, const LSP_DSP_LIB_TYPE(bitmap_t) *src, ssize_t x, ssize_t y);
56+
57+
#endif /* LSP_PLUG_IN_DSP_COMMON_BITMAP_B1B8_H_ */
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
/*
2+
* Copyright (C) 2023 Linux Studio Plugins Project <https://lsp-plug.in/>
3+
* (C) 2023 Vladimir Sadovnikov <[email protected]>
4+
*
5+
* This file is part of lsp-dsp-lib
6+
* Created on: 8 апр. 2023 г.
7+
*
8+
* lsp-dsp-lib is free software: you can redistribute it and/or modify
9+
* it under the terms of the GNU Lesser General Public License as published by
10+
* the Free Software Foundation, either version 3 of the License, or
11+
* any later version.
12+
*
13+
* lsp-dsp-lib is distributed in the hope that it will be useful,
14+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16+
* GNU Lesser General Public License for more details.
17+
*
18+
* You should have received a copy of the GNU Lesser General Public License
19+
* along with lsp-dsp-lib. If not, see <https://www.gnu.org/licenses/>.
20+
*/
21+
22+
#ifndef LSP_PLUG_IN_DSP_COMMON_BITMAP_B2B8_H_
23+
#define LSP_PLUG_IN_DSP_COMMON_BITMAP_B2B8_H_
24+
25+
#include <lsp-plug.in/dsp/common/bitmap.h>
26+
27+
/**
28+
* Put the source 2-bit bitmap to destination 8-bit bitmap,
29+
* the result pixel value will be computed as: result[i] = src[i]
30+
*/
31+
LSP_DSP_LIB_SYMBOL(void, bitmap_put_b2b8, LSP_DSP_LIB_TYPE(bitmap_t) *dst, const LSP_DSP_LIB_TYPE(bitmap_t) *src, ssize_t x, ssize_t y);
32+
33+
/**
34+
* Put the source 2-bit bitmap to destination 8-bit bitmap,
35+
* the result pixel value will be computed as: result[i] = saturate(dst[i] + src[i])
36+
*/
37+
LSP_DSP_LIB_SYMBOL(void, bitmap_add_b2b8, LSP_DSP_LIB_TYPE(bitmap_t) *dst, const LSP_DSP_LIB_TYPE(bitmap_t) *src, ssize_t x, ssize_t y);
38+
39+
/**
40+
* Put the source 2-bit bitmap to destination 8-bit bitmap,
41+
* the result pixel value will be computed as: result[i] = saturate(dst[i] - src[i])
42+
*/
43+
LSP_DSP_LIB_SYMBOL(void, bitmap_sub_b2b8, LSP_DSP_LIB_TYPE(bitmap_t) *dst, const LSP_DSP_LIB_TYPE(bitmap_t) *src, ssize_t x, ssize_t y);
44+
45+
/**
46+
* Put the source 2-bit bitmap to destination 8-bit bitmap,
47+
* the result pixel value will be computed as: result[i] = max(dst[i], src[i])
48+
*/
49+
LSP_DSP_LIB_SYMBOL(void, bitmap_max_b2b8, LSP_DSP_LIB_TYPE(bitmap_t) *dst, const LSP_DSP_LIB_TYPE(bitmap_t) *src, ssize_t x, ssize_t y);
50+
51+
/**
52+
* Put the source 2-bit bitmap to destination 8-bit bitmap,
53+
* the result pixel value will be computed as: result[i] = min(dst[i], src[i])
54+
*/
55+
LSP_DSP_LIB_SYMBOL(void, bitmap_min_b2b8, LSP_DSP_LIB_TYPE(bitmap_t) *dst, const LSP_DSP_LIB_TYPE(bitmap_t) *src, ssize_t x, ssize_t y);
56+
57+
58+
#endif /* LSP_PLUG_IN_DSP_COMMON_BITMAP_B2B8_H_ */
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
/*
2+
* Copyright (C) 2023 Linux Studio Plugins Project <https://lsp-plug.in/>
3+
* (C) 2023 Vladimir Sadovnikov <[email protected]>
4+
*
5+
* This file is part of lsp-dsp-lib
6+
* Created on: 8 апр. 2023 г.
7+
*
8+
* lsp-dsp-lib is free software: you can redistribute it and/or modify
9+
* it under the terms of the GNU Lesser General Public License as published by
10+
* the Free Software Foundation, either version 3 of the License, or
11+
* any later version.
12+
*
13+
* lsp-dsp-lib is distributed in the hope that it will be useful,
14+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16+
* GNU Lesser General Public License for more details.
17+
*
18+
* You should have received a copy of the GNU Lesser General Public License
19+
* along with lsp-dsp-lib. If not, see <https://www.gnu.org/licenses/>.
20+
*/
21+
22+
#ifndef LSP_PLUG_IN_DSP_COMMON_BITMAP_B4B8_H_
23+
#define LSP_PLUG_IN_DSP_COMMON_BITMAP_B4B8_H_
24+
25+
#include <lsp-plug.in/dsp/common/bitmap.h>
26+
27+
/**
28+
* Put the source 4-bit bitmap to destination 8-bit bitmap,
29+
* the result pixel value will be computed as: result[i] = src[i]
30+
*/
31+
LSP_DSP_LIB_SYMBOL(void, bitmap_put_b4b8, LSP_DSP_LIB_TYPE(bitmap_t) *dst, const LSP_DSP_LIB_TYPE(bitmap_t) *src, ssize_t x, ssize_t y);
32+
33+
/**
34+
* Put the source 4-bit bitmap to destination 8-bit bitmap,
35+
* the result pixel value will be computed as: result[i] = saturate(dst[i] + src[i])
36+
*/
37+
LSP_DSP_LIB_SYMBOL(void, bitmap_add_b4b8, LSP_DSP_LIB_TYPE(bitmap_t) *dst, const LSP_DSP_LIB_TYPE(bitmap_t) *src, ssize_t x, ssize_t y);
38+
39+
/**
40+
* Put the source 4-bit bitmap to destination 8-bit bitmap,
41+
* the result pixel value will be computed as: result[i] = saturate(dst[i] - src[i])
42+
*/
43+
LSP_DSP_LIB_SYMBOL(void, bitmap_sub_b4b8, LSP_DSP_LIB_TYPE(bitmap_t) *dst, const LSP_DSP_LIB_TYPE(bitmap_t) *src, ssize_t x, ssize_t y);
44+
45+
/**
46+
* Put the source 4-bit bitmap to destination 8-bit bitmap,
47+
* the result pixel value will be computed as: result[i] = max(dst[i], src[i])
48+
*/
49+
LSP_DSP_LIB_SYMBOL(void, bitmap_max_b4b8, LSP_DSP_LIB_TYPE(bitmap_t) *dst, const LSP_DSP_LIB_TYPE(bitmap_t) *src, ssize_t x, ssize_t y);
50+
51+
/**
52+
* Put the source 4-bit bitmap to destination 8-bit bitmap,
53+
* the result pixel value will be computed as: result[i] = min(dst[i], src[i])
54+
*/
55+
LSP_DSP_LIB_SYMBOL(void, bitmap_min_b4b8, LSP_DSP_LIB_TYPE(bitmap_t) *dst, const LSP_DSP_LIB_TYPE(bitmap_t) *src, ssize_t x, ssize_t y);
56+
57+
58+
59+
#endif /* LSP_PLUG_IN_DSP_COMMON_BITMAP_B4B8_H_ */
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
/*
2+
* Copyright (C) 2023 Linux Studio Plugins Project <https://lsp-plug.in/>
3+
* (C) 2023 Vladimir Sadovnikov <[email protected]>
4+
*
5+
* This file is part of lsp-dsp-lib
6+
* Created on: 8 апр. 2023 г.
7+
*
8+
* lsp-dsp-lib is free software: you can redistribute it and/or modify
9+
* it under the terms of the GNU Lesser General Public License as published by
10+
* the Free Software Foundation, either version 3 of the License, or
11+
* any later version.
12+
*
13+
* lsp-dsp-lib is distributed in the hope that it will be useful,
14+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16+
* GNU Lesser General Public License for more details.
17+
*
18+
* You should have received a copy of the GNU Lesser General Public License
19+
* along with lsp-dsp-lib. If not, see <https://www.gnu.org/licenses/>.
20+
*/
21+
22+
#ifndef LSP_PLUG_IN_DSP_COMMON_BITMAP_B8B8_H_
23+
#define LSP_PLUG_IN_DSP_COMMON_BITMAP_B8B8_H_
24+
25+
#include <lsp-plug.in/dsp/common/bitmap.h>
26+
27+
/**
28+
* Put the source 8-bit bitmap to destination 8-bit bitmap,
29+
* the result pixel value will be computed as: result[i] = src[i]
30+
*/
31+
LSP_DSP_LIB_SYMBOL(void, bitmap_put_b8b8, LSP_DSP_LIB_TYPE(bitmap_t) *dst, const LSP_DSP_LIB_TYPE(bitmap_t) *src, ssize_t x, ssize_t y);
32+
33+
/**
34+
* Put the source 8-bit bitmap to destination 8-bit bitmap,
35+
* the result pixel value will be computed as: result[i] = saturate(dst[i] + src[i])
36+
*/
37+
LSP_DSP_LIB_SYMBOL(void, bitmap_add_b8b8, LSP_DSP_LIB_TYPE(bitmap_t) *dst, const LSP_DSP_LIB_TYPE(bitmap_t) *src, ssize_t x, ssize_t y);
38+
39+
/**
40+
* Put the source 8-bit bitmap to destination 8-bit bitmap,
41+
* the result pixel value will be computed as: result[i] = saturate(dst[i] - src[i])
42+
*/
43+
LSP_DSP_LIB_SYMBOL(void, bitmap_sub_b8b8, LSP_DSP_LIB_TYPE(bitmap_t) *dst, const LSP_DSP_LIB_TYPE(bitmap_t) *src, ssize_t x, ssize_t y);
44+
45+
/**
46+
* Put the source 8-bit bitmap to destination 8-bit bitmap,
47+
* the result pixel value will be computed as: result[i] = max(dst[i], src[i])
48+
*/
49+
LSP_DSP_LIB_SYMBOL(void, bitmap_max_b8b8, LSP_DSP_LIB_TYPE(bitmap_t) *dst, const LSP_DSP_LIB_TYPE(bitmap_t) *src, ssize_t x, ssize_t y);
50+
51+
/**
52+
* Put the source 8-bit bitmap to destination 8-bit bitmap,
53+
* the result pixel value will be computed as: result[i] = min(dst[i], src[i])
54+
*/
55+
LSP_DSP_LIB_SYMBOL(void, bitmap_min_b8b8, LSP_DSP_LIB_TYPE(bitmap_t) *dst, const LSP_DSP_LIB_TYPE(bitmap_t) *src, ssize_t x, ssize_t y);
56+
57+
#endif /* LSP_PLUG_IN_DSP_COMMON_BITMAP_B8B8_H_ */

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
// Include all partial definitions
4444
#include <lsp-plug.in/dsp/common/types.h>
4545
#include <lsp-plug.in/dsp/common/3dmath.h>
46+
#include <lsp-plug.in/dsp/common/bitmap.h>
4647
#include <lsp-plug.in/dsp/common/coding.h>
4748
#include <lsp-plug.in/dsp/common/complex.h>
4849
#include <lsp-plug.in/dsp/common/context.h>

include/lsp-plug.in/dsp/version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
// Define version of headers
2626
#define LSP_DSP_LIB_MAJOR 1
2727
#define LSP_DSP_LIB_MINOR 0
28-
#define LSP_DSP_LIB_MICRO 11
28+
#define LSP_DSP_LIB_MICRO 12
2929

3030
#if defined(__WINDOWS__) || defined(__WIN32__) || defined(__WIN64__) || defined(_WIN64) || defined(_WIN32) || defined(__WINNT) || defined(__WINNT__)
3131
#define LSP_DSP_LIB_EXPORT_MODIFIER __declspec(dllexport)
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/*
2+
* Copyright (C) 2023 Linux Studio Plugins Project <https://lsp-plug.in/>
3+
* (C) 2023 Vladimir Sadovnikov <[email protected]>
4+
*
5+
* This file is part of lsp-dsp-lib
6+
* Created on: 8 апр. 2023 г.
7+
*
8+
* lsp-dsp-lib is free software: you can redistribute it and/or modify
9+
* it under the terms of the GNU Lesser General Public License as published by
10+
* the Free Software Foundation, either version 3 of the License, or
11+
* any later version.
12+
*
13+
* lsp-dsp-lib is distributed in the hope that it will be useful,
14+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16+
* GNU Lesser General Public License for more details.
17+
*
18+
* You should have received a copy of the GNU Lesser General Public License
19+
* along with lsp-dsp-lib. If not, see <https://www.gnu.org/licenses/>.
20+
*/
21+
22+
#ifndef PRIVATE_DSP_ARCH_GENERIC_BITMAP_H_
23+
#define PRIVATE_DSP_ARCH_GENERIC_BITMAP_H_
24+
25+
#ifndef PRIVATE_DSP_ARCH_GENERIC_IMPL
26+
#error "This header should not be included directly"
27+
#endif /* PRIVATE_DSP_ARCH_GENERIC_IMPL */
28+
29+
#include <private/dsp/arch/generic/bitmap/helpers.h>
30+
#include <private/dsp/arch/generic/bitmap/b1b8.h>
31+
#include <private/dsp/arch/generic/bitmap/b2b8.h>
32+
#include <private/dsp/arch/generic/bitmap/b4b8.h>
33+
#include <private/dsp/arch/generic/bitmap/b8b8.h>
34+
35+
#endif /* PRIVATE_DSP_ARCH_GENERIC_BITMAP_H_ */

0 commit comments

Comments
 (0)