Project Ne10
An Open Optimized Software Library Project for the ARM Architecture
Loading...
Searching...
No Matches
NE10_imgproc.h
1/*
2 * Copyright 2013-15 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
39extern "C" {
40#endif
41
42 ne10_result_t ne10_init_imgproc (ne10_int32_t is_NEON_available);
43
45// function prototypes:
47
48 /* image resize functions*/
49 /* function pointers*/
50 extern void (*ne10_img_resize_bilinear_rgba) (ne10_uint8_t* dst,
51 ne10_uint32_t dst_width,
52 ne10_uint32_t dst_height,
53 ne10_uint8_t* src,
54 ne10_uint32_t src_width,
55 ne10_uint32_t src_height,
56 ne10_uint32_t src_stride);
57 /* C version*/
58 extern void ne10_img_resize_bilinear_rgba_c (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);
65 /* NEON version*/
66 extern void ne10_img_resize_bilinear_rgba_neon (ne10_uint8_t* dst,
67 ne10_uint32_t dst_width,
68 ne10_uint32_t dst_height,
69 ne10_uint8_t* src,
70 ne10_uint32_t src_width,
71 ne10_uint32_t src_height,
72 ne10_uint32_t src_stride)
73 asm ("ne10_img_resize_bilinear_rgba_neon");
74
75 /* image rotate functions*/
76 /* function pointers*/
77 extern void (*ne10_img_rotate_rgba) (ne10_uint8_t* dst,
78 ne10_uint32_t* dst_width,
79 ne10_uint32_t* dst_height,
80 ne10_uint8_t* src,
81 ne10_uint32_t src_width,
82 ne10_uint32_t src_height,
83 ne10_int32_t angle);
84 /* C version*/
85 extern void ne10_img_rotate_rgba_c (ne10_uint8_t* dst,
86 ne10_uint32_t* dst_width,
87 ne10_uint32_t* dst_height,
88 ne10_uint8_t* src,
89 ne10_uint32_t src_width,
90 ne10_uint32_t src_height,
91 ne10_int32_t angle);
92#ifdef ENABLE_NE10_IMG_ROTATE_RGBA_NEON
93 /* NEON version*/
94 extern void ne10_img_rotate_rgba_neon (ne10_uint8_t* dst,
95 ne10_uint32_t* dst_width,
96 ne10_uint32_t* dst_height,
97 ne10_uint8_t* src,
98 ne10_uint32_t src_width,
99 ne10_uint32_t src_height,
100 ne10_int32_t angle)
101 asm ("ne10_img_rotate_rgba_neon");
102#endif // ENABLE_NE10_IMG_ROTATE_RGBA_NEON
103
104 /* image boxfilter functions */
105 /* function pointers */
106 extern void (*ne10_img_boxfilter_rgba8888) (const ne10_uint8_t *src,
107 ne10_uint8_t *dst,
108 ne10_size_t src_size,
109 ne10_int32_t src_stride,
110 ne10_int32_t dst_stride,
111 ne10_size_t kernel_size);
112 /* C version*/
113 extern void ne10_img_boxfilter_rgba8888_c (const ne10_uint8_t *src,
114 ne10_uint8_t *dst,
115 ne10_size_t src_size,
116 ne10_int32_t src_stride,
117 ne10_int32_t dst_stride,
118 ne10_size_t kernel_size);
119 /* NEON version*/
120 extern void ne10_img_boxfilter_rgba8888_neon (const ne10_uint8_t *src,
121 ne10_uint8_t *dst,
122 ne10_size_t src_size,
123 ne10_int32_t src_stride,
124 ne10_int32_t dst_stride,
125 ne10_size_t kernel_size);
126
127#ifdef __cplusplus
128}
129#endif
130
131#endif
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)
neon optimized box filter
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)
box filter
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")
image resize of 8-bit data.
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)
image resize of 8-bit data.
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)
image resize of 8-bit data.