Project Ne10
An open, optimized software library for the ARM architecture.
NE10_imgproc.h
Go to the documentation of this file.
1 /*
2  * Copyright 2013-16 ARM Limited and Contributors.
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  * * Redistributions of source code must retain the above copyright
8  * notice, this list of conditions and the following disclaimer.
9  * * Redistributions in binary form must reproduce the above copyright
10  * notice, this list of conditions and the following disclaimer in the
11  * documentation and/or other materials provided with the distribution.
12  * * Neither the name of ARM Limited nor the
13  * names of its contributors may be used to endorse or promote products
14  * derived from this software without specific prior written permission.
15  *
16  * THIS SOFTWARE IS PROVIDED BY ARM LIMITED AND CONTRIBUTORS "AS IS" AND
17  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19  * DISCLAIMED. IN NO EVENT SHALL ARM LIMITED AND CONTRIBUTORS BE LIABLE FOR ANY
20  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26  */
27 
28 /*
29  * NE10 Library : inc/NE10_imgproc.h
30  */
31 
32 
33 #include "NE10_types.h"
34 
35 #ifndef NE10_IMGPROC_H
36 #define NE10_IMGPROC_H
37 
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
42 
58  extern void (*ne10_img_resize_bilinear_rgba) (ne10_uint8_t* dst,
59  ne10_uint32_t dst_width,
60  ne10_uint32_t dst_height,
61  ne10_uint8_t* src,
62  ne10_uint32_t src_width,
63  ne10_uint32_t src_height,
64  ne10_uint32_t src_stride);
66  ne10_uint32_t dst_width,
67  ne10_uint32_t dst_height,
68  ne10_uint8_t* src,
69  ne10_uint32_t src_width,
70  ne10_uint32_t src_height,
71  ne10_uint32_t src_stride);
73  ne10_uint32_t dst_width,
74  ne10_uint32_t dst_height,
75  ne10_uint8_t* src,
76  ne10_uint32_t src_width,
77  ne10_uint32_t src_height,
78  ne10_uint32_t src_stride)
79  asm ("ne10_img_resize_bilinear_rgba_neon");
80 
96  extern void (*ne10_img_rotate_rgba) (ne10_uint8_t* dst,
97  ne10_uint32_t* dst_width,
98  ne10_uint32_t* dst_height,
99  ne10_uint8_t* src,
100  ne10_uint32_t src_width,
101  ne10_uint32_t src_height,
102  ne10_int32_t angle);
103  extern void ne10_img_rotate_rgba_c (ne10_uint8_t* dst,
104  ne10_uint32_t* dst_width,
105  ne10_uint32_t* dst_height,
106  ne10_uint8_t* src,
107  ne10_uint32_t src_width,
108  ne10_uint32_t src_height,
109  ne10_int32_t angle);
110 #ifdef ENABLE_NE10_IMG_ROTATE_RGBA_NEON
111  extern void ne10_img_rotate_rgba_neon (ne10_uint8_t* dst,
112  ne10_uint32_t* dst_width,
113  ne10_uint32_t* dst_height,
114  ne10_uint8_t* src,
115  ne10_uint32_t src_width,
116  ne10_uint32_t src_height,
117  ne10_int32_t angle)
118  asm ("ne10_img_rotate_rgba_neon");
119 #endif // ENABLE_NE10_IMG_ROTATE_RGBA_NEON
120 
141  extern void (*ne10_img_boxfilter_rgba8888) (const ne10_uint8_t *src,
142  ne10_uint8_t *dst,
143  ne10_size_t src_size,
144  ne10_int32_t src_stride,
145  ne10_int32_t dst_stride,
146  ne10_size_t kernel_size);
147  extern void ne10_img_boxfilter_rgba8888_c (const ne10_uint8_t *src,
148  ne10_uint8_t *dst,
149  ne10_size_t src_size,
150  ne10_int32_t src_stride,
151  ne10_int32_t dst_stride,
152  ne10_size_t kernel_size);
153  extern void ne10_img_boxfilter_rgba8888_neon (const ne10_uint8_t *src,
154  ne10_uint8_t *dst,
155  ne10_size_t src_size,
156  ne10_int32_t src_stride,
157  ne10_int32_t dst_stride,
158  ne10_size_t kernel_size);
159 
160 #ifdef __cplusplus
161 }
162 #endif
163 
164 #endif
void ne10_img_resize_bilinear_rgba_c(ne10_uint8_t *dst, ne10_uint32_t dst_width, ne10_uint32_t dst_height, ne10_uint8_t *src, ne10_uint32_t src_width, ne10_uint32_t src_height, ne10_uint32_t src_stride)
Specific implementation of ne10_img_resize_bilinear_rgba using plain C.
Definition: NE10_resize.c:446
uint8_t ne10_uint8_t
Definition: NE10_types.h:73
int32_t ne10_int32_t
Definition: NE10_types.h:76
void ne10_img_resize_bilinear_rgba_neon(ne10_uint8_t *dst, ne10_uint32_t dst_width, ne10_uint32_t dst_height, ne10_uint8_t *src, ne10_uint32_t src_width, ne10_uint32_t src_height, ne10_uint32_t src_stride) asm("ne10_img_resize_bilinear_rgba_neon")
Specific implementation of ne10_img_resize_bilinear_rgba using NEON SIMD capabilities.
Definition: NE10_resize.c:487
void ne10_img_boxfilter_rgba8888_neon(const ne10_uint8_t *src, ne10_uint8_t *dst, ne10_size_t src_size, ne10_int32_t src_stride, ne10_int32_t dst_stride, ne10_size_t kernel_size)
Specific implementation of ne10_img_boxfilter_rgba8888 using NEON SIMD capabilities.
ne10_result_t is_NEON_available
Definition: NE10_init.c:37
void(* ne10_img_resize_bilinear_rgba)(ne10_uint8_t *dst, ne10_uint32_t dst_width, ne10_uint32_t dst_height, ne10_uint8_t *src, ne10_uint32_t src_width, ne10_uint32_t src_height, ne10_uint32_t src_stride)
Image resize of 8-bit data.
uint32_t ne10_uint32_t
Definition: NE10_types.h:77
void ne10_img_boxfilter_rgba8888_c(const ne10_uint8_t *src, ne10_uint8_t *dst, ne10_size_t src_size, ne10_int32_t src_stride, ne10_int32_t dst_stride, ne10_size_t kernel_size)
Specific implementation of ne10_img_boxfilter_rgba8888 using plain C.
void ne10_img_rotate_rgba_neon(ne10_uint8_t *dst, ne10_uint32_t *dst_width, ne10_uint32_t *dst_height, ne10_uint8_t *src, ne10_uint32_t src_width, ne10_uint32_t src_height, ne10_int32_t angle) asm("ne10_img_rotate_rgba_neon")
Specific implementation of ne10_img_rotate_rgba using NEON SIMD capabilities.
Definition: NE10_rotate.c:256
void ne10_img_rotate_rgba_c(ne10_uint8_t *dst, ne10_uint32_t *dst_width, ne10_uint32_t *dst_height, ne10_uint8_t *src, ne10_uint32_t src_width, ne10_uint32_t src_height, ne10_int32_t angle)
Specific implementation of ne10_img_rotate_rgba using plain C.
Definition: NE10_rotate.c:212
ne10_result_t ne10_init_imgproc(ne10_int32_t is_NEON_available)
void(* ne10_img_rotate_rgba)(ne10_uint8_t *dst, ne10_uint32_t *dst_width, ne10_uint32_t *dst_height, ne10_uint8_t *src, ne10_uint32_t src_width, ne10_uint32_t src_height, ne10_int32_t angle)
Image rotate of 8-bit data.
int ne10_result_t
Definition: NE10_types.h:82
void(* ne10_img_boxfilter_rgba8888)(const ne10_uint8_t *src, ne10_uint8_t *dst, ne10_size_t src_size, ne10_int32_t src_stride, ne10_int32_t dst_stride, ne10_size_t kernel_size)
Box blur of RGBA8888 image data.