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: 5. April 2024
25
* $Revision: V.1.0.0
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
#endif
51
52
/*!
53
* \addtogroup gFilter 7 Filter Operations
54
* @{
55
*/
56
57
/*============================ MACROS ========================================*/
58
/*============================ MACROFIED FUNCTIONS ===========================*/
59
/*============================ TYPES =========================================*/
60
61
typedef
struct
__arm_2d_iir_blur_acc_cccn888_t
{
62
uint16_t hwB;
63
uint16_t hwG;
64
uint16_t hwR;
65
}
__arm_2d_iir_blur_acc_cccn888_t
;
66
67
typedef
__arm_2d_iir_blur_acc_cccn888_t
__arm_2d_iir_blur_acc_rgb565_t
;
68
69
typedef
struct
__arm_2d_iir_blur_acc_gray8_t
{
70
uint16_t hwC;
71
}
__arm_2d_iir_blur_acc_gray8_t
;
72
73
typedef
struct
arm_2d_filter_iir_blur_descriptor_t
{
74
ARM_PRIVATE(
75
implement
(
arm_2d_op_t
);
/* inherit from base class arm_2d_op_cp_t*/
76
77
uint8_t chBlurDegree;
78
)
79
80
arm_2d_scratch_mem_t
tScratchMemory;
81
82
}
arm_2d_filter_iir_blur_descriptor_t
;
83
84
/*============================ GLOBAL VARIABLES ==============================*/
85
/*============================ PROTOTYPES ====================================*/
86
87
extern
88
ARM_NONNULL(2)
89
/*!
90
* \brief Apply IIR blur to a specified region on the target tile
91
* \param[in] ptOP the control block, NULL means using the default control block
92
* \param[in] ptTarget the target tile
93
* \param[in] ptRegion the target region
94
* \param[in] chBlurDegree the blur degree,
95
* \note - 0~127 works as generic anti-alias, and
96
* - 128~239 works as blur
97
* \return arm_fsm_rt_t the operations result
98
*/
99
arm_fsm_rt_t
arm_2dp_gray8_filter_iir_blur
(
100
arm_2d_filter_iir_blur_descriptor_t
*ptOP,
101
const
arm_2d_tile_t
*ptTarget,
102
const
arm_2d_region_t
*ptRegion,
103
uint8_t chBlurDegree);
104
105
extern
106
ARM_NONNULL(2)
107
/*!
108
* \brief Apply IIR blur to a specified region on the target tile
109
* \param[in] ptOP the control block, NULL means using the default control block
110
* \param[in] ptTarget the target tile
111
* \param[in] ptRegion the target region
112
* \param[in] chBlurDegree the blur degree,
113
* \note - 0~127 works as generic anti-alias, and
114
* - 128~239 works as blur
115
* \return arm_fsm_rt_t the operations result
116
*/
117
arm_fsm_rt_t
arm_2dp_rgb565_filter_iir_blur
(
118
arm_2d_filter_iir_blur_descriptor_t
*ptOP,
119
const
arm_2d_tile_t
*ptTarget,
120
const
arm_2d_region_t
*ptRegion,
121
uint8_t chBlurDegree);
122
123
extern
124
ARM_NONNULL(2)
125
/*!
126
* \brief Apply IIR blur to a specified region on the target tile
127
* \param[in] ptOP the control block, NULL means using the default control block
128
* \param[in] ptTarget the target tile
129
* \param[in] ptRegion the target region
130
* \param[in] chBlurDegree the blur degree,
131
* \note - 0~127 works as generic anti-alias, and
132
* - 128~239 works as blur
133
* \return arm_fsm_rt_t the operations result
134
*/
135
arm_fsm_rt_t
arm_2dp_cccn888_filter_iir_blur
(
136
arm_2d_filter_iir_blur_descriptor_t
*ptOP,
137
const
arm_2d_tile_t
*ptTarget,
138
const
arm_2d_region_t
*ptRegion,
139
uint8_t chBlurDegree);
140
141
/*! @} */
142
143
#if defined(__clang__)
144
# pragma clang diagnostic pop
145
#endif
146
147
#ifdef __cplusplus
148
}
149
#endif
150
151
152
#endif
/* __ARM_2D_FILTER_IIR_BLUR_H__ */
Library
Include
__arm_2d_filter_iir_blur.h