]> git.sesse.net Git - x264/blob - common/arm/pixel.h
acd517b94242656e87bdefd4b734d99ed3312a5b
[x264] / common / arm / pixel.h
1 /*****************************************************************************
2  * pixel.h: arm pixel metrics
3  *****************************************************************************
4  * Copyright (C) 2009-2014 x264 project
5  *
6  * Authors: David Conrad <lessen42@gmail.com>
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111, USA.
21  *
22  * This program is also available under a commercial proprietary license.
23  * For more information, contact us at licensing@x264.com.
24  *****************************************************************************/
25
26 #ifndef X264_ARM_PIXEL_H
27 #define X264_ARM_PIXEL_H
28
29 #define DECL_PIXELS( ret, name, suffix, args ) \
30     ret x264_pixel_##name##_16x16_##suffix args;\
31     ret x264_pixel_##name##_16x8_##suffix args;\
32     ret x264_pixel_##name##_8x16_##suffix args;\
33     ret x264_pixel_##name##_8x8_##suffix args;\
34     ret x264_pixel_##name##_8x4_##suffix args;\
35     ret x264_pixel_##name##_4x8_##suffix args;\
36     ret x264_pixel_##name##_4x4_##suffix args;\
37
38 #define DECL_X1( name, suffix ) \
39     DECL_PIXELS( int, name, suffix, ( uint8_t *, int, uint8_t *, int ) )
40
41 #define DECL_X4( name, suffix ) \
42     DECL_PIXELS( void, name##_x3, suffix, ( uint8_t *, uint8_t *, uint8_t *, uint8_t *, intptr_t, int * ) )\
43     DECL_PIXELS( void, name##_x4, suffix, ( uint8_t *, uint8_t *, uint8_t *, uint8_t *, uint8_t *, intptr_t, int * ) )
44
45 int x264_pixel_sad_4x4_armv6( uint8_t *, intptr_t, uint8_t *, intptr_t );
46 int x264_pixel_sad_4x8_armv6( uint8_t *, intptr_t, uint8_t *, intptr_t );
47
48 DECL_X1( sad, neon )
49 DECL_X1( sad_aligned, neon )
50 DECL_X1( sad_aligned, neon_dual )
51 DECL_X4( sad, neon )
52 DECL_X1( satd, neon )
53 DECL_X1( ssd, neon )
54
55 int x264_pixel_sa8d_8x8_neon  ( uint8_t *, intptr_t, uint8_t *, intptr_t );
56 int x264_pixel_sa8d_16x16_neon( uint8_t *, intptr_t, uint8_t *, intptr_t );
57
58 uint64_t x264_pixel_var_8x8_neon  ( uint8_t *, intptr_t );
59 uint64_t x264_pixel_var_8x16_neon ( uint8_t *, intptr_t );
60 uint64_t x264_pixel_var_16x16_neon( uint8_t *, intptr_t );
61 int x264_pixel_var2_8x8_neon( uint8_t *, intptr_t, uint8_t *, intptr_t, int * );
62
63 uint64_t x264_pixel_hadamard_ac_8x8_neon  ( uint8_t *, intptr_t );
64 uint64_t x264_pixel_hadamard_ac_8x16_neon ( uint8_t *, intptr_t );
65 uint64_t x264_pixel_hadamard_ac_16x8_neon ( uint8_t *, intptr_t );
66 uint64_t x264_pixel_hadamard_ac_16x16_neon( uint8_t *, intptr_t );
67
68 void x264_pixel_ssim_4x4x2_core_neon( const uint8_t *, intptr_t,
69                                       const uint8_t *, intptr_t,
70                                       int sums[2][4] );
71 float x264_pixel_ssim_end4_neon( int sum0[5][4], int sum1[5][4], int width );
72
73 #endif