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
38
extern
"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
63
typedef
struct
__arm_2d_iir_blur_acc_cccn888_t
{
64
uint16_t hwB;
65
uint16_t hwG;
66
uint16_t hwR;
67
}
__arm_2d_iir_blur_acc_cccn888_t
;
68
69
typedef
__arm_2d_iir_blur_acc_cccn888_t
__arm_2d_iir_blur_acc_rgb565_t
;
70
71
typedef
struct
__arm_2d_iir_blur_acc_gray8_t
{
72
uint16_t hwC;
73
}
__arm_2d_iir_blur_acc_gray8_t
;
74
75
typedef
struct
arm_2d_filter_iir_blur_descriptor_t
{
76
ARM_PRIVATE(
77
implement
(
arm_2d_op_t
);
/* inherit from base class arm_2d_op_cp_t*/
78
79
uint8_t chBlurDegree;
80
)
81
82
arm_2d_scratch_mem_t
tScratchMemory;
83
84
}
arm_2d_filter_iir_blur_descriptor_t
;
85
86
/*============================ GLOBAL VARIABLES ==============================*/
87
/*============================ PROTOTYPES ====================================*/
88
89
extern
90
ARM_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
*/
101
arm_fsm_rt_t
arm_2dp_gray8_filter_iir_blur
(
102
arm_2d_filter_iir_blur_descriptor_t
*ptOP,
103
const
arm_2d_tile_t
*ptTarget,
104
const
arm_2d_region_t
*ptRegion,
105
uint8_t chBlurDegree);
106
107
108
extern
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
*/
114
arm_fsm_rt_t
arm_2dp_gray8_filter_iir_blur_depose
(
115
arm_2d_filter_iir_blur_descriptor_t
*ptOP);
116
117
extern
118
ARM_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
*/
129
arm_fsm_rt_t
arm_2dp_rgb565_filter_iir_blur
(
130
arm_2d_filter_iir_blur_descriptor_t
*ptOP,
131
const
arm_2d_tile_t
*ptTarget,
132
const
arm_2d_region_t
*ptRegion,
133
uint8_t chBlurDegree);
134
135
136
extern
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
*/
142
arm_fsm_rt_t
arm_2dp_rgb565_filter_iir_blur_depose
(
143
arm_2d_filter_iir_blur_descriptor_t
*ptOP);
144
145
extern
146
ARM_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
*/
157
arm_fsm_rt_t
arm_2dp_cccn888_filter_iir_blur
(
158
arm_2d_filter_iir_blur_descriptor_t
*ptOP,
159
const
arm_2d_tile_t
*ptTarget,
160
const
arm_2d_region_t
*ptRegion,
161
uint8_t chBlurDegree);
162
163
164
extern
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
*/
170
arm_fsm_rt_t
arm_2dp_cccn888_filter_iir_blur_depose
(
171
arm_2d_filter_iir_blur_descriptor_t
*ptOP);
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__ */
Library
Include
__arm_2d_filter_iir_blur.h