]> git.sesse.net Git - ffmpeg/blob - libavcodec/mips/vp9dsp_mips.h
Merge commit '93f16f338f9e8aba0c006752eb3afc3fe6e137fd'
[ffmpeg] / libavcodec / mips / vp9dsp_mips.h
1 /*
2  * Copyright (c) 2015 Shivraj Patil (Shivraj.Patil@imgtec.com)
3  *
4  * This file is part of FFmpeg.
5  *
6  * FFmpeg is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * FFmpeg is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with FFmpeg; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20
21 #ifndef AVCODEC_MIPS_VP9DSP_MIPS_H
22 #define AVCODEC_MIPS_VP9DSP_MIPS_H
23
24 #define VP9_8TAP_MIPS_MSA_FUNC(SIZE, type, type_idx)                         \
25 void ff_put_8tap_##type##_##SIZE##h_msa(uint8_t *dst, ptrdiff_t dststride,   \
26                                         const uint8_t *src,                  \
27                                         ptrdiff_t srcstride,                 \
28                                         int h, int mx, int my);              \
29                                                                              \
30 void ff_put_8tap_##type##_##SIZE##v_msa(uint8_t *dst, ptrdiff_t dststride,   \
31                                         const uint8_t *src,                  \
32                                         ptrdiff_t srcstride,                 \
33                                         int h, int mx, int my);              \
34                                                                              \
35 void ff_put_8tap_##type##_##SIZE##hv_msa(uint8_t *dst, ptrdiff_t dststride,  \
36                                          const uint8_t *src,                 \
37                                          ptrdiff_t srcstride,                \
38                                          int h, int mx, int my);             \
39                                                                              \
40 void ff_avg_8tap_##type##_##SIZE##h_msa(uint8_t *dst, ptrdiff_t dststride,   \
41                                         const uint8_t *src,                  \
42                                         ptrdiff_t srcstride,                 \
43                                         int h, int mx, int my);              \
44                                                                              \
45 void ff_avg_8tap_##type##_##SIZE##v_msa(uint8_t *dst, ptrdiff_t dststride,   \
46                                         const uint8_t *src,                  \
47                                         ptrdiff_t srcstride,                 \
48                                         int h, int mx, int my);              \
49                                                                              \
50 void ff_avg_8tap_##type##_##SIZE##hv_msa(uint8_t *dst, ptrdiff_t dststride,  \
51                                          const uint8_t *src,                 \
52                                          ptrdiff_t srcstride,                \
53                                          int h, int mx, int my);
54
55 #define VP9_COPY_AVG_MIPS_MSA_FUNC(SIZE)                           \
56 void ff_copy##SIZE##_msa(uint8_t *dst, ptrdiff_t dststride,        \
57                          const uint8_t *src, ptrdiff_t srcstride,  \
58                          int h, int mx, int my);                   \
59                                                                    \
60 void ff_avg##SIZE##_msa(uint8_t *dst, ptrdiff_t dststride,         \
61                         const uint8_t *src, ptrdiff_t srcstride,   \
62                         int h, int mx, int my);
63
64 VP9_8TAP_MIPS_MSA_FUNC(64, regular, FILTER_8TAP_REGULAR);
65 VP9_8TAP_MIPS_MSA_FUNC(32, regular, FILTER_8TAP_REGULAR);
66 VP9_8TAP_MIPS_MSA_FUNC(16, regular, FILTER_8TAP_REGULAR);
67 VP9_8TAP_MIPS_MSA_FUNC(8, regular, FILTER_8TAP_REGULAR);
68 VP9_8TAP_MIPS_MSA_FUNC(4, regular, FILTER_8TAP_REGULAR);
69
70 VP9_8TAP_MIPS_MSA_FUNC(64, sharp, FILTER_8TAP_SHARP);
71 VP9_8TAP_MIPS_MSA_FUNC(32, sharp, FILTER_8TAP_SHARP);
72 VP9_8TAP_MIPS_MSA_FUNC(16, sharp, FILTER_8TAP_SHARP);
73 VP9_8TAP_MIPS_MSA_FUNC(8, sharp, FILTER_8TAP_SHARP);
74 VP9_8TAP_MIPS_MSA_FUNC(4, sharp, FILTER_8TAP_SHARP);
75
76 VP9_8TAP_MIPS_MSA_FUNC(64, smooth, FILTER_8TAP_SMOOTH);
77 VP9_8TAP_MIPS_MSA_FUNC(32, smooth, FILTER_8TAP_SMOOTH);
78 VP9_8TAP_MIPS_MSA_FUNC(16, smooth, FILTER_8TAP_SMOOTH);
79 VP9_8TAP_MIPS_MSA_FUNC(8, smooth, FILTER_8TAP_SMOOTH);
80 VP9_8TAP_MIPS_MSA_FUNC(4, smooth, FILTER_8TAP_SMOOTH);
81
82 VP9_COPY_AVG_MIPS_MSA_FUNC(64);
83 VP9_COPY_AVG_MIPS_MSA_FUNC(32);
84 VP9_COPY_AVG_MIPS_MSA_FUNC(16);
85 VP9_COPY_AVG_MIPS_MSA_FUNC(8);
86 VP9_COPY_AVG_MIPS_MSA_FUNC(4);
87
88 #undef VP9_8TAP_MIPS_MSA_FUNC
89 #undef VP9_COPY_AVG_MIPS_MSA_FUNC
90
91 #endif  // #ifndef AVCODEC_MIPS_VP9DSP_MIPS_H