|
| 1 | +/* |
| 2 | + * Copyright (C) 2023 Linux Studio Plugins Project <https://lsp-plug.in/> |
| 3 | + * (C) 2023 Vladimir Sadovnikov <sadko4u@gmail.com> |
| 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_ */ |
0 commit comments