2 * Copyright (c) 2015 Shivraj Patil (Shivraj.Patil@imgtec.com)
4 * This file is part of FFmpeg.
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.
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.
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
21 #ifndef AVCODEC_MIPS_VP9DSP_MIPS_H
22 #define AVCODEC_MIPS_VP9DSP_MIPS_H
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, \
27 ptrdiff_t srcstride, \
28 int h, int mx, int my); \
30 void ff_put_8tap_##type##_##SIZE##v_msa(uint8_t *dst, ptrdiff_t dststride, \
32 ptrdiff_t srcstride, \
33 int h, int mx, int my); \
35 void ff_put_8tap_##type##_##SIZE##hv_msa(uint8_t *dst, ptrdiff_t dststride, \
37 ptrdiff_t srcstride, \
38 int h, int mx, int my); \
40 void ff_avg_8tap_##type##_##SIZE##h_msa(uint8_t *dst, ptrdiff_t dststride, \
42 ptrdiff_t srcstride, \
43 int h, int mx, int my); \
45 void ff_avg_8tap_##type##_##SIZE##v_msa(uint8_t *dst, ptrdiff_t dststride, \
47 ptrdiff_t srcstride, \
48 int h, int mx, int my); \
50 void ff_avg_8tap_##type##_##SIZE##hv_msa(uint8_t *dst, ptrdiff_t dststride, \
52 ptrdiff_t srcstride, \
53 int h, int mx, int my);
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); \
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);
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);
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);
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);
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);
88 #undef VP9_8TAP_MIPS_MSA_FUNC
89 #undef VP9_COPY_AVG_MIPS_MSA_FUNC
91 #endif // #ifndef AVCODEC_MIPS_VP9DSP_MIPS_H