1 /*****************************************************************************
2  * intrapred.h: Intra Prediction metrics
3  *****************************************************************************
4  * Copyright (C) 2003-2013 x264 project
5  *
6  * Authors: Min Chen <chenm003@163.com> <min.chen@multicorewareinc.com>
7  *          Praveen Kumar Tiwari <praveen@multicorewareinc.com>
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 license @ x265.com.
24  *****************************************************************************/
25 
26 #ifndef X265_INTRAPRED_H
27 #define X265_INTRAPRED_H
28 
29 #define DECL_ANG(bsize, mode, cpu) \
30     void PFX(intra_pred_ang ## bsize ## _ ## mode ## _ ## cpu)(pixel* dst, intptr_t dstStride, const pixel* srcPix, int dirMode, int bFilter);
31 
32 #define DECL_ANGS(bsize, cpu) \
33     DECL_ANG(bsize, 2, cpu); \
34     DECL_ANG(bsize, 3, cpu); \
35     DECL_ANG(bsize, 4, cpu); \
36     DECL_ANG(bsize, 5, cpu); \
37     DECL_ANG(bsize, 6, cpu); \
38     DECL_ANG(bsize, 7, cpu); \
39     DECL_ANG(bsize, 8, cpu); \
40     DECL_ANG(bsize, 9, cpu); \
41     DECL_ANG(bsize, 10, cpu); \
42     DECL_ANG(bsize, 11, cpu); \
43     DECL_ANG(bsize, 12, cpu); \
44     DECL_ANG(bsize, 13, cpu); \
45     DECL_ANG(bsize, 14, cpu); \
46     DECL_ANG(bsize, 15, cpu); \
47     DECL_ANG(bsize, 16, cpu); \
48     DECL_ANG(bsize, 17, cpu); \
49     DECL_ANG(bsize, 18, cpu); \
50     DECL_ANG(bsize, 19, cpu); \
51     DECL_ANG(bsize, 20, cpu); \
52     DECL_ANG(bsize, 21, cpu); \
53     DECL_ANG(bsize, 22, cpu); \
54     DECL_ANG(bsize, 23, cpu); \
55     DECL_ANG(bsize, 24, cpu); \
56     DECL_ANG(bsize, 25, cpu); \
57     DECL_ANG(bsize, 26, cpu); \
58     DECL_ANG(bsize, 27, cpu); \
59     DECL_ANG(bsize, 28, cpu); \
60     DECL_ANG(bsize, 29, cpu); \
61     DECL_ANG(bsize, 30, cpu); \
62     DECL_ANG(bsize, 31, cpu); \
63     DECL_ANG(bsize, 32, cpu); \
64     DECL_ANG(bsize, 33, cpu); \
65     DECL_ANG(bsize, 34, cpu)
66 
67 #define DECL_ALL(cpu) \
68     FUNCDEF_TU(void, all_angs_pred, cpu, pixel *dest, pixel *refPix, pixel *filtPix, int bLuma); \
69     FUNCDEF_TU(void, intra_filter, cpu, const pixel *samples, pixel *filtered); \
70     DECL_ANGS(4, cpu); \
71     DECL_ANGS(8, cpu); \
72     DECL_ANGS(16, cpu); \
73     DECL_ANGS(32, cpu)
74 
75 FUNCDEF_TU_S2(void, intra_pred_dc, sse2, pixel* dst, intptr_t dstStride, const pixel*srcPix, int, int filter);
76 FUNCDEF_TU_S2(void, intra_pred_dc, sse4, pixel* dst, intptr_t dstStride, const pixel*srcPix, int, int filter);
77 FUNCDEF_TU_S2(void, intra_pred_dc, avx2, pixel* dst, intptr_t dstStride, const pixel*srcPix, int, int filter);
78 
79 FUNCDEF_TU_S2(void, intra_pred_planar, sse2, pixel* dst, intptr_t dstStride, const pixel*srcPix, int, int filter);
80 FUNCDEF_TU_S2(void, intra_pred_planar, sse4, pixel* dst, intptr_t dstStride, const pixel*srcPix, int, int filter);
81 FUNCDEF_TU_S2(void, intra_pred_planar, avx2, pixel* dst, intptr_t dstStride, const pixel*srcPix, int, int filter);
82 
83 DECL_ALL(sse2);
84 DECL_ALL(ssse3);
85 DECL_ALL(sse4);
86 DECL_ALL(avx2);
87 
88 #undef DECL_ALL
89 #undef DECL_ANGS
90 #undef DECL_ANG
91 
92 
93 #endif // ifndef X265_INTRAPRED_H
94