Project Ne10
An open, optimized software library for the ARM architecture.
NE10_init_imgproc.c
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 #include <stdio.h>
29 
30 #include "NE10_imgproc.h"
31 
33 {
34  if (NE10_OK == is_NEON_available)
35  {
37 
38 #ifdef ENABLE_NE10_IMG_ROTATE_RGBA_NEON
40 #else
42 #endif
44  }
45  else
46  {
50  }
51  return NE10_OK;
52 }
53 
54 // These are actual definitions of our function pointers that are declared in inc/NE10_imgproc.h
56  ne10_uint32_t dst_width,
57  ne10_uint32_t dst_height,
58  ne10_uint8_t* src,
59  ne10_uint32_t src_width,
60  ne10_uint32_t src_height,
61  ne10_uint32_t src_stride);
63  ne10_uint32_t* dst_width,
64  ne10_uint32_t* dst_height,
65  ne10_uint8_t* src,
66  ne10_uint32_t src_width,
67  ne10_uint32_t src_height,
68  ne10_int32_t angle);
70  ne10_uint8_t *dst,
71  ne10_size_t src_size,
72  ne10_int32_t src_stride,
73  ne10_int32_t dst_stride,
74  ne10_size_t kernel_size);
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
ne10_result_t ne10_init_imgproc(ne10_int32_t is_NEON_available)
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
#define NE10_OK
Definition: NE10_types.h:65
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.