Skip to content

Commit

Permalink
Release 1.0.12
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
sadko4u committed May 21, 2023
2 parents 29fbe77 + f2bc9c1 commit 6d87335
Show file tree
Hide file tree
Showing 35 changed files with 5,892 additions and 35,372 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
* RECENT CHANGES
*******************************************************************************

=== 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.

=== 1.0.11 ===
* Small math optimizations for dsp::smooth_cubic_linear and dsp::smooth_cubic_log
functions.
Expand Down
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ DISTSRC_PATH = $(BUILDDIR)/distsrc
DISTSRC = $(DISTSRC_PATH)/$(ARTIFACT_NAME)

.DEFAULT_GOAL := all
.PHONY: all compile install uninstall depend clean
.PHONY: all compile install uninstall clean

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

Expand Down Expand Up @@ -107,7 +107,6 @@ help:
echo " all Build all binaries"
echo " clean Clean all build files and configuration file"
echo " config Configure build"
echo " depend Update build dependencies for current project"
echo " distsrc Make tarball with source code for packagers"
echo " fetch Fetch all desired source code dependencies from git"
echo " help Print this help message"
Expand Down
58 changes: 58 additions & 0 deletions include/lsp-plug.in/dsp/common/bitmap.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/*
* 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: 8 апр. 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_BITMAP_H_
#define LSP_PLUG_IN_DSP_COMMON_BITMAP_H_

#include <lsp-plug.in/dsp/common/types.h>

#ifdef __cplusplus
namespace lsp
{
namespace dsp
{
#endif /* __cplusplus */

typedef struct LSP_DSP_LIB_TYPE(bitmap_t)
{
int32_t width;
int32_t height;
int32_t stride;
uint8_t *data;
} LSP_DSP_LIB_TYPE(bitmap_t);


typedef void (* LSP_DSP_LIB_TYPE(bitmap_render_func_t))(
LSP_DSP_LIB_TYPE(bitmap_t) *dst,
const LSP_DSP_LIB_TYPE(bitmap_t) *src,
ssize_t x,
ssize_t y);
#ifdef __cplusplus
} /* namespace dsp */
} /* namespace lsp */
#endif /* __cplusplus */

#include <lsp-plug.in/dsp/common/bitmap/b1b8.h>
#include <lsp-plug.in/dsp/common/bitmap/b2b8.h>
#include <lsp-plug.in/dsp/common/bitmap/b4b8.h>
#include <lsp-plug.in/dsp/common/bitmap/b8b8.h>

#endif /* LSP_PLUG_IN_DSP_COMMON_BITMAP_H_ */
57 changes: 57 additions & 0 deletions include/lsp-plug.in/dsp/common/bitmap/b1b8.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/*
* 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: 8 апр. 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_BITMAP_B1B8_H_
#define LSP_PLUG_IN_DSP_COMMON_BITMAP_B1B8_H_

#include <lsp-plug.in/dsp/common/bitmap.h>

/**
* Put the source 1-bit bitmap to destination 8-bit bitmap,
* the result pixel value will be computed as: result[i] = src[i]
*/
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);

/**
* Put the source 1-bit bitmap to destination 8-bit bitmap,
* the result pixel value will be computed as: result[i] = saturate(dst[i] + src[i])
*/
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);

/**
* Put the source 1-bit bitmap to destination 8-bit bitmap,
* the result pixel value will be computed as: result[i] = saturate(dst[i] - src[i])
*/
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);

/**
* Put the source 1-bit bitmap to destination 8-bit bitmap,
* the result pixel value will be computed as: result[i] = max(dst[i], src[i])
*/
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);

/**
* Put the source 1-bit bitmap to destination 8-bit bitmap,
* the result pixel value will be computed as: result[i] = min(dst[i], src[i])
*/
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);

#endif /* LSP_PLUG_IN_DSP_COMMON_BITMAP_B1B8_H_ */
58 changes: 58 additions & 0 deletions include/lsp-plug.in/dsp/common/bitmap/b2b8.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/*
* 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: 8 апр. 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_BITMAP_B2B8_H_
#define LSP_PLUG_IN_DSP_COMMON_BITMAP_B2B8_H_

#include <lsp-plug.in/dsp/common/bitmap.h>

/**
* Put the source 2-bit bitmap to destination 8-bit bitmap,
* the result pixel value will be computed as: result[i] = src[i]
*/
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);

/**
* Put the source 2-bit bitmap to destination 8-bit bitmap,
* the result pixel value will be computed as: result[i] = saturate(dst[i] + src[i])
*/
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);

/**
* Put the source 2-bit bitmap to destination 8-bit bitmap,
* the result pixel value will be computed as: result[i] = saturate(dst[i] - src[i])
*/
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);

/**
* Put the source 2-bit bitmap to destination 8-bit bitmap,
* the result pixel value will be computed as: result[i] = max(dst[i], src[i])
*/
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);

/**
* Put the source 2-bit bitmap to destination 8-bit bitmap,
* the result pixel value will be computed as: result[i] = min(dst[i], src[i])
*/
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);


#endif /* LSP_PLUG_IN_DSP_COMMON_BITMAP_B2B8_H_ */
59 changes: 59 additions & 0 deletions include/lsp-plug.in/dsp/common/bitmap/b4b8.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/*
* 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: 8 апр. 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_BITMAP_B4B8_H_
#define LSP_PLUG_IN_DSP_COMMON_BITMAP_B4B8_H_

#include <lsp-plug.in/dsp/common/bitmap.h>

/**
* Put the source 4-bit bitmap to destination 8-bit bitmap,
* the result pixel value will be computed as: result[i] = src[i]
*/
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);

/**
* Put the source 4-bit bitmap to destination 8-bit bitmap,
* the result pixel value will be computed as: result[i] = saturate(dst[i] + src[i])
*/
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);

/**
* Put the source 4-bit bitmap to destination 8-bit bitmap,
* the result pixel value will be computed as: result[i] = saturate(dst[i] - src[i])
*/
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);

/**
* Put the source 4-bit bitmap to destination 8-bit bitmap,
* the result pixel value will be computed as: result[i] = max(dst[i], src[i])
*/
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);

/**
* Put the source 4-bit bitmap to destination 8-bit bitmap,
* the result pixel value will be computed as: result[i] = min(dst[i], src[i])
*/
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);



#endif /* LSP_PLUG_IN_DSP_COMMON_BITMAP_B4B8_H_ */
57 changes: 57 additions & 0 deletions include/lsp-plug.in/dsp/common/bitmap/b8b8.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/*
* 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: 8 апр. 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_BITMAP_B8B8_H_
#define LSP_PLUG_IN_DSP_COMMON_BITMAP_B8B8_H_

#include <lsp-plug.in/dsp/common/bitmap.h>

/**
* Put the source 8-bit bitmap to destination 8-bit bitmap,
* the result pixel value will be computed as: result[i] = src[i]
*/
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);

/**
* Put the source 8-bit bitmap to destination 8-bit bitmap,
* the result pixel value will be computed as: result[i] = saturate(dst[i] + src[i])
*/
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);

/**
* Put the source 8-bit bitmap to destination 8-bit bitmap,
* the result pixel value will be computed as: result[i] = saturate(dst[i] - src[i])
*/
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);

/**
* Put the source 8-bit bitmap to destination 8-bit bitmap,
* the result pixel value will be computed as: result[i] = max(dst[i], src[i])
*/
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);

/**
* Put the source 8-bit bitmap to destination 8-bit bitmap,
* the result pixel value will be computed as: result[i] = min(dst[i], src[i])
*/
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);

#endif /* LSP_PLUG_IN_DSP_COMMON_BITMAP_B8B8_H_ */
1 change: 1 addition & 0 deletions include/lsp-plug.in/dsp/dsp.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
// Include all partial definitions
#include <lsp-plug.in/dsp/common/types.h>
#include <lsp-plug.in/dsp/common/3dmath.h>
#include <lsp-plug.in/dsp/common/bitmap.h>
#include <lsp-plug.in/dsp/common/coding.h>
#include <lsp-plug.in/dsp/common/complex.h>
#include <lsp-plug.in/dsp/common/context.h>
Expand Down
2 changes: 1 addition & 1 deletion include/lsp-plug.in/dsp/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
// Define version of headers
#define LSP_DSP_LIB_MAJOR 1
#define LSP_DSP_LIB_MINOR 0
#define LSP_DSP_LIB_MICRO 11
#define LSP_DSP_LIB_MICRO 12

#if defined(__WINDOWS__) || defined(__WIN32__) || defined(__WIN64__) || defined(_WIN64) || defined(_WIN32) || defined(__WINNT) || defined(__WINNT__)
#define LSP_DSP_LIB_EXPORT_MODIFIER __declspec(dllexport)
Expand Down
35 changes: 35 additions & 0 deletions include/private/dsp/arch/generic/bitmap.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* 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: 8 апр. 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 PRIVATE_DSP_ARCH_GENERIC_BITMAP_H_
#define PRIVATE_DSP_ARCH_GENERIC_BITMAP_H_

#ifndef PRIVATE_DSP_ARCH_GENERIC_IMPL
#error "This header should not be included directly"
#endif /* PRIVATE_DSP_ARCH_GENERIC_IMPL */

#include <private/dsp/arch/generic/bitmap/helpers.h>
#include <private/dsp/arch/generic/bitmap/b1b8.h>
#include <private/dsp/arch/generic/bitmap/b2b8.h>
#include <private/dsp/arch/generic/bitmap/b4b8.h>
#include <private/dsp/arch/generic/bitmap/b8b8.h>

#endif /* PRIVATE_DSP_ARCH_GENERIC_BITMAP_H_ */
Loading

0 comments on commit 6d87335

Please sign in to comment.