1/* Copyright (c) 2011,  NVIDIA CORPORATION. All rights reserved.
2 *
3 * Redistribution and use in source and binary forms, with or without
4 * modification, are permitted provided that the following conditions
5 * are met:
6 *
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 the NVIDIA CORPORATION nor the names of its
13 *    contributors may be used to endorse or promote products derived
14 *    from this software without specific prior written permission.
15 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
19 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
25 * THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28#ifndef __JSIMD_NEON_H__
29#define __JSIMD_NEON_H__
30#include "jinclude.h"
31#include "jpeglib.h"
32#include <machine/cpu-features.h>
33
34#if defined(NV_ARM_NEON) && defined(__ARM_HAVE_NEON)
35
36#if defined(ANDROID_ARMV6_IDCT)
37#error "ANDROID_ARMV6_IDCT and NV_ARM_NEON are muturaly exclusive modes, both have been defined"
38#endif
39
40GLOBAL(void)
41jsimd_idct_2x2 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
42                JCOEFPTR coef_block, JSAMPARRAY output_buf,
43                JDIMENSION output_col);
44
45GLOBAL(void)
46jsimd_idct_ifast (j_decompress_ptr cinfo, jpeg_component_info * compptr,
47                JCOEFPTR coef_block, JSAMPARRAY output_buf,
48                JDIMENSION output_col);
49
50GLOBAL(void)
51jsimd_idct_4x4 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
52                JCOEFPTR coef_block, JSAMPARRAY output_buf,
53                JDIMENSION output_col);
54
55GLOBAL(int)
56cap_neon_idct_2x2 (void);
57
58GLOBAL(int)
59cap_neon_idct_4x4 (void);
60
61GLOBAL(int)
62cap_neon_idct_ifast (void);
63
64GLOBAL(int)
65cap_neon_ycc_rgb (void);
66
67GLOBAL(void)
68jsimd_ycc_rgb565_convert (j_decompress_ptr cinfo,
69                       JSAMPIMAGE input_buf, JDIMENSION input_row,
70                       JSAMPARRAY output_buf, int num_rows);
71
72GLOBAL(void)
73jsimd_ycc_rgba8888_convert (j_decompress_ptr cinfo,
74                       JSAMPIMAGE input_buf, JDIMENSION input_row,
75                       JSAMPARRAY output_buf, int num_rows);
76#endif
77
78#endif
79