2 * Copyright (c) 2015 Parag Salasakar (Parag.Salasakar@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 #include "qpeldsp_mips.h"
24 static av_cold void qpeldsp_init_msa(QpelDSPContext *c)
26 c->put_qpel_pixels_tab[0][0] = ff_copy_16x16_msa;
27 c->put_qpel_pixels_tab[0][1] = ff_horiz_mc_qpel_aver_src0_16width_msa;
28 c->put_qpel_pixels_tab[0][2] = ff_horiz_mc_qpel_16width_msa;
29 c->put_qpel_pixels_tab[0][3] = ff_horiz_mc_qpel_aver_src1_16width_msa;
30 c->put_qpel_pixels_tab[0][4] = ff_vert_mc_qpel_aver_src0_16x16_msa;
31 c->put_qpel_pixels_tab[0][5] = ff_hv_mc_qpel_aver_hv_src00_16x16_msa;
32 c->put_qpel_pixels_tab[0][6] = ff_hv_mc_qpel_aver_v_src0_16x16_msa;
33 c->put_qpel_pixels_tab[0][7] = ff_hv_mc_qpel_aver_hv_src10_16x16_msa;
34 c->put_qpel_pixels_tab[0][8] = ff_vert_mc_qpel_16x16_msa;
35 c->put_qpel_pixels_tab[0][9] = ff_hv_mc_qpel_aver_h_src0_16x16_msa;
36 c->put_qpel_pixels_tab[0][10] = ff_hv_mc_qpel_16x16_msa;
37 c->put_qpel_pixels_tab[0][11] = ff_hv_mc_qpel_aver_h_src1_16x16_msa;
38 c->put_qpel_pixels_tab[0][12] = ff_vert_mc_qpel_aver_src1_16x16_msa;
39 c->put_qpel_pixels_tab[0][13] = ff_hv_mc_qpel_aver_hv_src01_16x16_msa;
40 c->put_qpel_pixels_tab[0][14] = ff_hv_mc_qpel_aver_v_src1_16x16_msa;
41 c->put_qpel_pixels_tab[0][15] = ff_hv_mc_qpel_aver_hv_src11_16x16_msa;
43 c->put_qpel_pixels_tab[1][0] = ff_copy_8x8_msa;
44 c->put_qpel_pixels_tab[1][1] = ff_horiz_mc_qpel_aver_src0_8width_msa;
45 c->put_qpel_pixels_tab[1][2] = ff_horiz_mc_qpel_8width_msa;
46 c->put_qpel_pixels_tab[1][3] = ff_horiz_mc_qpel_aver_src1_8width_msa;
47 c->put_qpel_pixels_tab[1][4] = ff_vert_mc_qpel_aver_src0_8x8_msa;
48 c->put_qpel_pixels_tab[1][5] = ff_hv_mc_qpel_aver_hv_src00_8x8_msa;
49 c->put_qpel_pixels_tab[1][6] = ff_hv_mc_qpel_aver_v_src0_8x8_msa;
50 c->put_qpel_pixels_tab[1][7] = ff_hv_mc_qpel_aver_hv_src10_8x8_msa;
51 c->put_qpel_pixels_tab[1][8] = ff_vert_mc_qpel_8x8_msa;
52 c->put_qpel_pixels_tab[1][9] = ff_hv_mc_qpel_aver_h_src0_8x8_msa;
53 c->put_qpel_pixels_tab[1][10] = ff_hv_mc_qpel_8x8_msa;
54 c->put_qpel_pixels_tab[1][11] = ff_hv_mc_qpel_aver_h_src1_8x8_msa;
55 c->put_qpel_pixels_tab[1][12] = ff_vert_mc_qpel_aver_src1_8x8_msa;
56 c->put_qpel_pixels_tab[1][13] = ff_hv_mc_qpel_aver_hv_src01_8x8_msa;
57 c->put_qpel_pixels_tab[1][14] = ff_hv_mc_qpel_aver_v_src1_8x8_msa;
58 c->put_qpel_pixels_tab[1][15] = ff_hv_mc_qpel_aver_hv_src11_8x8_msa;
60 c->put_no_rnd_qpel_pixels_tab[0][0] = ff_copy_16x16_msa;
61 c->put_no_rnd_qpel_pixels_tab[0][1] =
62 ff_horiz_mc_qpel_no_rnd_aver_src0_16width_msa;
63 c->put_no_rnd_qpel_pixels_tab[0][2] = ff_horiz_mc_qpel_no_rnd_16width_msa;
64 c->put_no_rnd_qpel_pixels_tab[0][3] =
65 ff_horiz_mc_qpel_no_rnd_aver_src1_16width_msa;
66 c->put_no_rnd_qpel_pixels_tab[0][4] =
67 ff_vert_mc_qpel_no_rnd_aver_src0_16x16_msa;
68 c->put_no_rnd_qpel_pixels_tab[0][5] =
69 ff_hv_mc_qpel_no_rnd_aver_hv_src00_16x16_msa;
70 c->put_no_rnd_qpel_pixels_tab[0][6] =
71 ff_hv_mc_qpel_no_rnd_aver_v_src0_16x16_msa;
72 c->put_no_rnd_qpel_pixels_tab[0][7] =
73 ff_hv_mc_qpel_no_rnd_aver_hv_src10_16x16_msa;
74 c->put_no_rnd_qpel_pixels_tab[0][8] = ff_vert_mc_qpel_no_rnd_16x16_msa;
75 c->put_no_rnd_qpel_pixels_tab[0][9] =
76 ff_hv_mc_qpel_no_rnd_aver_h_src0_16x16_msa;
77 c->put_no_rnd_qpel_pixels_tab[0][10] = ff_hv_mc_qpel_no_rnd_16x16_msa;
78 c->put_no_rnd_qpel_pixels_tab[0][11] =
79 ff_hv_mc_qpel_no_rnd_aver_h_src1_16x16_msa;
80 c->put_no_rnd_qpel_pixels_tab[0][12] =
81 ff_vert_mc_qpel_no_rnd_aver_src1_16x16_msa;
82 c->put_no_rnd_qpel_pixels_tab[0][13] =
83 ff_hv_mc_qpel_no_rnd_aver_hv_src01_16x16_msa;
84 c->put_no_rnd_qpel_pixels_tab[0][14] =
85 ff_hv_mc_qpel_no_rnd_aver_v_src1_16x16_msa;
86 c->put_no_rnd_qpel_pixels_tab[0][15] =
87 ff_hv_mc_qpel_no_rnd_aver_hv_src11_16x16_msa;
89 c->put_no_rnd_qpel_pixels_tab[1][0] = ff_copy_8x8_msa;
90 c->put_no_rnd_qpel_pixels_tab[1][1] =
91 ff_horiz_mc_qpel_no_rnd_aver_src0_8width_msa;
92 c->put_no_rnd_qpel_pixels_tab[1][2] = ff_horiz_mc_qpel_no_rnd_8width_msa;
93 c->put_no_rnd_qpel_pixels_tab[1][3] =
94 ff_horiz_mc_qpel_no_rnd_aver_src1_8width_msa;
95 c->put_no_rnd_qpel_pixels_tab[1][4] =
96 ff_vert_mc_qpel_no_rnd_aver_src0_8x8_msa;
97 c->put_no_rnd_qpel_pixels_tab[1][5] =
98 ff_hv_mc_qpel_no_rnd_aver_hv_src00_8x8_msa;
99 c->put_no_rnd_qpel_pixels_tab[1][6] =
100 ff_hv_mc_qpel_no_rnd_aver_v_src0_8x8_msa;
101 c->put_no_rnd_qpel_pixels_tab[1][7] =
102 ff_hv_mc_qpel_no_rnd_aver_hv_src10_8x8_msa;
103 c->put_no_rnd_qpel_pixels_tab[1][8] = ff_vert_mc_qpel_no_rnd_8x8_msa;
104 c->put_no_rnd_qpel_pixels_tab[1][9] =
105 ff_hv_mc_qpel_no_rnd_aver_h_src0_8x8_msa;
106 c->put_no_rnd_qpel_pixels_tab[1][10] = ff_hv_mc_qpel_no_rnd_8x8_msa;
107 c->put_no_rnd_qpel_pixels_tab[1][11] =
108 ff_hv_mc_qpel_no_rnd_aver_h_src1_8x8_msa;
109 c->put_no_rnd_qpel_pixels_tab[1][12] =
110 ff_vert_mc_qpel_no_rnd_aver_src1_8x8_msa;
111 c->put_no_rnd_qpel_pixels_tab[1][13] =
112 ff_hv_mc_qpel_no_rnd_aver_hv_src01_8x8_msa;
113 c->put_no_rnd_qpel_pixels_tab[1][14] =
114 ff_hv_mc_qpel_no_rnd_aver_v_src1_8x8_msa;
115 c->put_no_rnd_qpel_pixels_tab[1][15] =
116 ff_hv_mc_qpel_no_rnd_aver_hv_src11_8x8_msa;
118 c->avg_qpel_pixels_tab[0][0] = ff_avg_width16_msa;
119 c->avg_qpel_pixels_tab[0][1] =
120 ff_horiz_mc_qpel_avg_dst_aver_src0_16width_msa;
121 c->avg_qpel_pixels_tab[0][2] = ff_horiz_mc_qpel_avg_dst_16width_msa;
122 c->avg_qpel_pixels_tab[0][3] =
123 ff_horiz_mc_qpel_avg_dst_aver_src1_16width_msa;
124 c->avg_qpel_pixels_tab[0][4] = ff_vert_mc_qpel_avg_dst_aver_src0_16x16_msa;
125 c->avg_qpel_pixels_tab[0][5] =
126 ff_hv_mc_qpel_avg_dst_aver_hv_src00_16x16_msa;
127 c->avg_qpel_pixels_tab[0][6] = ff_hv_mc_qpel_avg_dst_aver_v_src0_16x16_msa;
128 c->avg_qpel_pixels_tab[0][7] =
129 ff_hv_mc_qpel_avg_dst_aver_hv_src10_16x16_msa;
130 c->avg_qpel_pixels_tab[0][8] = ff_vert_mc_qpel_avg_dst_16x16_msa;
131 c->avg_qpel_pixels_tab[0][9] = ff_hv_mc_qpel_avg_dst_aver_h_src0_16x16_msa;
132 c->avg_qpel_pixels_tab[0][10] = ff_hv_mc_qpel_avg_dst_16x16_msa;
133 c->avg_qpel_pixels_tab[0][11] = ff_hv_mc_qpel_avg_dst_aver_h_src1_16x16_msa;
134 c->avg_qpel_pixels_tab[0][12] = ff_vert_mc_qpel_avg_dst_aver_src1_16x16_msa;
135 c->avg_qpel_pixels_tab[0][13] =
136 ff_hv_mc_qpel_avg_dst_aver_hv_src01_16x16_msa;
137 c->avg_qpel_pixels_tab[0][14] = ff_hv_mc_qpel_avg_dst_aver_v_src1_16x16_msa;
138 c->avg_qpel_pixels_tab[0][15] =
139 ff_hv_mc_qpel_avg_dst_aver_hv_src11_16x16_msa;
141 c->avg_qpel_pixels_tab[1][0] = ff_avg_width8_msa;
142 c->avg_qpel_pixels_tab[1][1] =
143 ff_horiz_mc_qpel_avg_dst_aver_src0_8width_msa;
144 c->avg_qpel_pixels_tab[1][2] = ff_horiz_mc_qpel_avg_dst_8width_msa;
145 c->avg_qpel_pixels_tab[1][3] =
146 ff_horiz_mc_qpel_avg_dst_aver_src1_8width_msa;
147 c->avg_qpel_pixels_tab[1][4] = ff_vert_mc_qpel_avg_dst_aver_src0_8x8_msa;
148 c->avg_qpel_pixels_tab[1][5] = ff_hv_mc_qpel_avg_dst_aver_hv_src00_8x8_msa;
149 c->avg_qpel_pixels_tab[1][6] = ff_hv_mc_qpel_avg_dst_aver_v_src0_8x8_msa;
150 c->avg_qpel_pixels_tab[1][7] = ff_hv_mc_qpel_avg_dst_aver_hv_src10_8x8_msa;
151 c->avg_qpel_pixels_tab[1][8] = ff_vert_mc_qpel_avg_dst_8x8_msa;
152 c->avg_qpel_pixels_tab[1][9] = ff_hv_mc_qpel_avg_dst_aver_h_src0_8x8_msa;
153 c->avg_qpel_pixels_tab[1][10] = ff_hv_mc_qpel_avg_dst_8x8_msa;
154 c->avg_qpel_pixels_tab[1][11] = ff_hv_mc_qpel_avg_dst_aver_h_src1_8x8_msa;
155 c->avg_qpel_pixels_tab[1][12] = ff_vert_mc_qpel_avg_dst_aver_src1_8x8_msa;
156 c->avg_qpel_pixels_tab[1][13] = ff_hv_mc_qpel_avg_dst_aver_hv_src01_8x8_msa;
157 c->avg_qpel_pixels_tab[1][14] = ff_hv_mc_qpel_avg_dst_aver_v_src1_8x8_msa;
158 c->avg_qpel_pixels_tab[1][15] = ff_hv_mc_qpel_avg_dst_aver_hv_src11_8x8_msa;
160 #endif // #if HAVE_MSA
162 void ff_qpeldsp_init_mips(QpelDSPContext *c)
166 #endif // #if HAVE_MSA