Arm-2D  
2D Image Processing Library for Cortex-M Processors
__arm_2d_filter_iir_blur.h
1/*
2 * Copyright (C) 2024 Arm Limited or its affiliates. All rights reserved.
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 *
6 * Licensed under the Apache License, Version 2.0 (the License); you may
7 * not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an AS IS BASIS, WITHOUT
14 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 */
18
19/* ----------------------------------------------------------------------
20 * Project: Arm-2D Library
21 * Title: __arm_2d_filter_iir_blur.h
22 * Description: APIs for IIR Blur
23 *
24 * $Date: 4. Dec 2024
25 * $Revision: V.1.2.3
26 *
27 * Target Processor: Cortex-M cores
28 *
29 * -------------------------------------------------------------------- */
30
31#ifndef __ARM_2D_FILTER_IIR_BLUR_H__
32#define __ARM_2D_FILTER_IIR_BLUR_H__
33
34/*============================ INCLUDES ======================================*/
35#include "arm_2d_types.h"
36
37#ifdef __cplusplus
38extern "C" {
39#endif
40
41#if defined(__clang__)
42# pragma clang diagnostic push
43# pragma clang diagnostic ignored "-Wunknown-warning-option"
44# pragma clang diagnostic ignored "-Wreserved-identifier"
45# pragma clang diagnostic ignored "-Wdeclaration-after-statement"
46# pragma clang diagnostic ignored "-Wsign-conversion"
47# pragma clang diagnostic ignored "-Wpadded"
48# pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
49# pragma clang diagnostic ignored "-Wmissing-declarations"
50#elif defined(__IS_COMPILER_ARM_COMPILER_5__)
51# pragma diag_suppress 174,177,188,68,513,144,64,1
52#endif
53
54/*!
55 * \addtogroup gFilter 7 Filter Operations
56 * @{
57 */
58
59/*============================ MACROS ========================================*/
60/*============================ MACROFIED FUNCTIONS ===========================*/
61/*============================ TYPES =========================================*/
62
64 uint16_t hwB;
65 uint16_t hwG;
66 uint16_t hwR;
68
70
72 uint16_t hwC;
74
76ARM_PRIVATE(
77 implement(arm_2d_op_t); /* inherit from base class arm_2d_op_cp_t*/
78
79 uint8_t chBlurDegree;
81
82 arm_2d_scratch_mem_t tScratchMemory;
83
85
86/*============================ GLOBAL VARIABLES ==============================*/
87/*============================ PROTOTYPES ====================================*/
88
89extern
90ARM_NONNULL(2)
91/*!
92 * \brief Apply IIR blur to a specified region on the target tile
93 * \param[in] ptOP the control block, NULL means using the default control block
94 * \param[in] ptTarget the target tile
95 * \param[in] ptRegion the target region
96 * \param[in] chBlurDegree the blur degree,
97 * \note - 0~127 works as generic anti-alias, and
98 * - 128~239 works as blur
99 * \return arm_fsm_rt_t the operations result
100 */
103 const arm_2d_tile_t *ptTarget,
104 const arm_2d_region_t *ptRegion,
105 uint8_t chBlurDegree);
106
107
108extern
109/*!
110 * \brief Release the resource used by the given IIR blur
111 * \param[in] ptOP the control block, NULL means using the default control block
112 * \return arm_fsm_rt_t the operations result
113 */
116
117extern
118ARM_NONNULL(2)
119/*!
120 * \brief Apply IIR blur to a specified region on the target tile
121 * \param[in] ptOP the control block, NULL means using the default control block
122 * \param[in] ptTarget the target tile
123 * \param[in] ptRegion the target region
124 * \param[in] chBlurDegree the blur degree,
125 * \note - 0~127 works as generic anti-alias, and
126 * - 128~239 works as blur
127 * \return arm_fsm_rt_t the operations result
128 */
131 const arm_2d_tile_t *ptTarget,
132 const arm_2d_region_t *ptRegion,
133 uint8_t chBlurDegree);
134
135
136extern
137/*!
138 * \brief Release the resource used by the given IIR blur
139 * \param[in] ptOP the control block, NULL means using the default control block
140 * \return arm_fsm_rt_t the operations result
141 */
144
145extern
146ARM_NONNULL(2)
147/*!
148 * \brief Apply IIR blur to a specified region on the target tile
149 * \param[in] ptOP the control block, NULL means using the default control block
150 * \param[in] ptTarget the target tile
151 * \param[in] ptRegion the target region
152 * \param[in] chBlurDegree the blur degree,
153 * \note - 0~127 works as generic anti-alias, and
154 * - 128~239 works as blur
155 * \return arm_fsm_rt_t the operations result
156 */
159 const arm_2d_tile_t *ptTarget,
160 const arm_2d_region_t *ptRegion,
161 uint8_t chBlurDegree);
162
163
164extern
165/*!
166 * \brief Release the resource used by the given IIR blur
167 * \param[in] ptOP the control block, NULL means using the default control block
168 * \return arm_fsm_rt_t the operations result
169 */
172
173/*! @} */
174
175#if defined(__clang__)
176# pragma clang diagnostic pop
177#endif
178
179#ifdef __cplusplus
180}
181#endif
182
183
184#endif /* __ARM_2D_FILTER_IIR_BLUR_H__ */