FFmpeg
Loading...
Searching...
No Matches
mpegvideo_mmi.c
Go to the documentation of this file.
1/*
2 * Loongson SIMD optimized mpegvideo
3 *
4 * Copyright (c) 2015 Loongson Technology Corporation Limited
5 * Copyright (c) 2015 Zhou Xiaoyong <zhouxiaoyong@loongson.cn>
6 * Zhang Shuangshuang <zhangshuangshuang@ict.ac.cn>
7 *
8 * This file is part of FFmpeg.
9 *
10 * FFmpeg is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either
13 * version 2.1 of the License, or (at your option) any later version.
14 *
15 * FFmpeg is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
19 *
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with FFmpeg; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23 */
24
25#include "mpegvideo_mips.h"
27
28void ff_dct_unquantize_h263_intra_mmi(const MPVContext *s, int16_t *block,
29 int n, int qscale)
30{
31 int64_t level, nCoeffs;
32 double ftmp[6];
33 mips_reg addr[1];
34 union mmi_intfloat64 qmul_u, qadd_u;
36
37 qmul_u.i = qscale << 1;
38 av_assert2(s->block_last_index[n]>=0 || s->h263_aic);
39
40 if (!s->h263_aic) {
41 if (n<4)
42 level = block[0] * s->y_dc_scale;
43 else
44 level = block[0] * s->c_dc_scale;
45 qadd_u.i = (qscale-1) | 1;
46 } else {
47 qadd_u.i = 0;
48 level = block[0];
49 }
50
51 if(s->ac_pred)
52 nCoeffs = 63;
53 else
54 nCoeffs = s->intra_scantable.raster_end[s->block_last_index[n]];
55
56 __asm__ volatile (
57 "pxor %[ftmp0], %[ftmp0], %[ftmp0] \n\t"
58 "packsswh %[qmul], %[qmul], %[qmul] \n\t"
59 "packsswh %[qmul], %[qmul], %[qmul] \n\t"
60 "packsswh %[qadd], %[qadd], %[qadd] \n\t"
61 "packsswh %[qadd], %[qadd], %[qadd] \n\t"
62 "psubh %[ftmp0], %[ftmp0], %[qadd] \n\t"
63 "pxor %[ftmp5], %[ftmp5], %[ftmp5] \n\t"
64 ".p2align 4 \n\t"
65
66 "1: \n\t"
67 PTR_ADDU "%[addr0], %[block], %[nCoeffs] \n\t"
68 MMI_LDC1(%[ftmp1], %[addr0], 0x00)
69 MMI_LDC1(%[ftmp2], %[addr0], 0x08)
70 "mov.d %[ftmp3], %[ftmp1] \n\t"
71 "mov.d %[ftmp4], %[ftmp2] \n\t"
72 "pmullh %[ftmp1], %[ftmp1], %[qmul] \n\t"
73 "pmullh %[ftmp2], %[ftmp2], %[qmul] \n\t"
74 "pcmpgth %[ftmp3], %[ftmp3], %[ftmp5] \n\t"
75 "pcmpgth %[ftmp4], %[ftmp4], %[ftmp5] \n\t"
76 "pxor %[ftmp1], %[ftmp1], %[ftmp3] \n\t"
77 "pxor %[ftmp2], %[ftmp2], %[ftmp4] \n\t"
78 "paddh %[ftmp1], %[ftmp1], %[ftmp0] \n\t"
79 "paddh %[ftmp2], %[ftmp2], %[ftmp0] \n\t"
80 "pxor %[ftmp3], %[ftmp3], %[ftmp1] \n\t"
81 "pxor %[ftmp4], %[ftmp4], %[ftmp2] \n\t"
82 "pcmpeqh %[ftmp1], %[ftmp1], %[ftmp0] \n\t"
83 "pcmpeqh %[ftmp2], %[ftmp2], %[ftmp0] \n\t"
84 "pandn %[ftmp1], %[ftmp1], %[ftmp3] \n\t"
85 "pandn %[ftmp2], %[ftmp2], %[ftmp4] \n\t"
86 PTR_ADDIU "%[nCoeffs], %[nCoeffs], 0x10 \n\t"
87 MMI_SDC1(%[ftmp1], %[addr0], 0x00)
88 MMI_SDC1(%[ftmp2], %[addr0], 0x08)
89 "blez %[nCoeffs], 1b \n\t"
90 : [ftmp0]"=&f"(ftmp[0]), [ftmp1]"=&f"(ftmp[1]),
91 [ftmp2]"=&f"(ftmp[2]), [ftmp3]"=&f"(ftmp[3]),
92 [ftmp4]"=&f"(ftmp[4]), [ftmp5]"=&f"(ftmp[5]),
94 [addr0]"=&r"(addr[0])
95 : [block]"r"((mips_reg)(block+nCoeffs)),
96 [nCoeffs]"r"((mips_reg)(2*(-nCoeffs))),
97 [qmul]"f"(qmul_u.f), [qadd]"f"(qadd_u.f)
98 : "memory"
99 );
100
101 block[0] = level;
102}
103
104void ff_dct_unquantize_h263_inter_mmi(const MPVContext *s, int16_t *block,
105 int n, int qscale)
106{
107 int64_t nCoeffs;
108 double ftmp[6];
109 mips_reg addr[1];
110 union mmi_intfloat64 qmul_u, qadd_u;
112
113 qmul_u.i = qscale << 1;
114 qadd_u.i = (qscale - 1) | 1;
115 av_assert2(s->block_last_index[n]>=0 || s->h263_aic);
116 nCoeffs = s->inter_scantable.raster_end[s->block_last_index[n]];
117
118 __asm__ volatile (
119 "packsswh %[qmul], %[qmul], %[qmul] \n\t"
120 "packsswh %[qmul], %[qmul], %[qmul] \n\t"
121 "pxor %[ftmp0], %[ftmp0], %[ftmp0] \n\t"
122 "packsswh %[qadd], %[qadd], %[qadd] \n\t"
123 "packsswh %[qadd], %[qadd], %[qadd] \n\t"
124 "psubh %[ftmp0], %[ftmp0], %[qadd] \n\t"
125 "pxor %[ftmp5], %[ftmp5], %[ftmp5] \n\t"
126 ".p2align 4 \n\t"
127 "1: \n\t"
128 PTR_ADDU "%[addr0], %[block], %[nCoeffs] \n\t"
129 MMI_LDC1(%[ftmp1], %[addr0], 0x00)
130 MMI_LDC1(%[ftmp2], %[addr0], 0x08)
131 "mov.d %[ftmp3], %[ftmp1] \n\t"
132 "mov.d %[ftmp4], %[ftmp2] \n\t"
133 "pmullh %[ftmp1], %[ftmp1], %[qmul] \n\t"
134 "pmullh %[ftmp2], %[ftmp2], %[qmul] \n\t"
135 "pcmpgth %[ftmp3], %[ftmp3], %[ftmp5] \n\t"
136 "pcmpgth %[ftmp4], %[ftmp4], %[ftmp5] \n\t"
137 "pxor %[ftmp1], %[ftmp1], %[ftmp3] \n\t"
138 "pxor %[ftmp2], %[ftmp2], %[ftmp4] \n\t"
139 "paddh %[ftmp1], %[ftmp1], %[ftmp0] \n\t"
140 "paddh %[ftmp2], %[ftmp2], %[ftmp0] \n\t"
141 "pxor %[ftmp3], %[ftmp3], %[ftmp1] \n\t"
142 "pxor %[ftmp4], %[ftmp4], %[ftmp2] \n\t"
143 "pcmpeqh %[ftmp1], %[ftmp1], %[ftmp0] \n\t"
144 "pcmpeqh %[ftmp2], %[ftmp2], %[ftmp0] \n\t"
145 "pandn %[ftmp1], %[ftmp1], %[ftmp3] \n\t"
146 "pandn %[ftmp2], %[ftmp2], %[ftmp4] \n\t"
147 PTR_ADDIU "%[nCoeffs], %[nCoeffs], 0x10 \n\t"
148 MMI_SDC1(%[ftmp1], %[addr0], 0x00)
149 MMI_SDC1(%[ftmp2], %[addr0], 0x08)
150 "blez %[nCoeffs], 1b \n\t"
151 : [ftmp0]"=&f"(ftmp[0]), [ftmp1]"=&f"(ftmp[1]),
152 [ftmp2]"=&f"(ftmp[2]), [ftmp3]"=&f"(ftmp[3]),
153 [ftmp4]"=&f"(ftmp[4]), [ftmp5]"=&f"(ftmp[5]),
155 [addr0]"=&r"(addr[0])
156 : [block]"r"((mips_reg)(block+nCoeffs)),
157 [nCoeffs]"r"((mips_reg)(2*(-nCoeffs))),
158 [qmul]"f"(qmul_u.f), [qadd]"f"(qadd_u.f)
159 : "memory"
160 );
161}
162
163void ff_dct_unquantize_mpeg1_intra_mmi(const MPVContext *s, int16_t *block,
164 int n, int qscale)
165{
166 int64_t nCoeffs;
167 const uint16_t *quant_matrix;
168 int block0;
169 double ftmp[10];
170 uint64_t tmp[1];
171 mips_reg addr[1];
174
175 av_assert2(s->block_last_index[n]>=0);
176 nCoeffs = s->intra_scantable.raster_end[s->block_last_index[n]] + 1;
177
178 if (n<4)
179 block0 = block[0] * s->y_dc_scale;
180 else
181 block0 = block[0] * s->c_dc_scale;
182
183 /* XXX: only mpeg1 */
184 quant_matrix = s->intra_matrix;
185
186 __asm__ volatile (
187 "dli %[tmp0], 0x0f \n\t"
188 "pcmpeqh %[ftmp0], %[ftmp0], %[ftmp0] \n\t"
189 "dmtc1 %[tmp0], %[ftmp4] \n\t"
190 "dmtc1 %[qscale], %[ftmp1] \n\t"
191 "psrlh %[ftmp0], %[ftmp0], %[ftmp4] \n\t"
192 "packsswh %[ftmp1], %[ftmp1], %[ftmp1] \n\t"
193 "packsswh %[ftmp1], %[ftmp1], %[ftmp1] \n\t"
194 "or %[addr0], %[nCoeffs], $0 \n\t"
195 ".p2align 4 \n\t"
196
197 "1: \n\t"
198 MMI_LDXC1(%[ftmp2], %[addr0], %[block], 0x00)
199 MMI_LDXC1(%[ftmp3], %[addr0], %[block], 0x08)
200 "mov.d %[ftmp4], %[ftmp2] \n\t"
201 "mov.d %[ftmp5], %[ftmp3] \n\t"
202 MMI_LDXC1(%[ftmp6], %[addr0], %[quant], 0x00)
203 MMI_LDXC1(%[ftmp7], %[addr0], %[quant], 0x08)
204 "pmullh %[ftmp6], %[ftmp6], %[ftmp1] \n\t"
205 "pmullh %[ftmp7], %[ftmp7], %[ftmp1] \n\t"
206 "pxor %[ftmp8], %[ftmp8], %[ftmp8] \n\t"
207 "pxor %[ftmp9], %[ftmp9], %[ftmp9] \n\t"
208 "pcmpgth %[ftmp8], %[ftmp8], %[ftmp2] \n\t"
209 "pcmpgth %[ftmp9], %[ftmp9], %[ftmp3] \n\t"
210 "pxor %[ftmp2], %[ftmp2], %[ftmp8] \n\t"
211 "pxor %[ftmp3], %[ftmp3], %[ftmp9] \n\t"
212 "psubh %[ftmp2], %[ftmp2], %[ftmp8] \n\t"
213 "psubh %[ftmp3], %[ftmp3], %[ftmp9] \n\t"
214 "pmullh %[ftmp2], %[ftmp2], %[ftmp6] \n\t"
215 "pmullh %[ftmp3], %[ftmp3], %[ftmp7] \n\t"
216 "pxor %[ftmp6], %[ftmp6], %[ftmp6] \n\t"
217 "pxor %[ftmp7], %[ftmp7], %[ftmp7] \n\t"
218 "pcmpeqh %[ftmp6], %[ftmp6], %[ftmp4] \n\t"
219 "dli %[tmp0], 0x03 \n\t"
220 "pcmpeqh %[ftmp7], %[ftmp7], %[ftmp5] \n\t"
221 "dmtc1 %[tmp0], %[ftmp4] \n\t"
222 "psrah %[ftmp2], %[ftmp2], %[ftmp4] \n\t"
223 "psrah %[ftmp3], %[ftmp3], %[ftmp4] \n\t"
224 "psubh %[ftmp2], %[ftmp2], %[ftmp0] \n\t"
225 "psubh %[ftmp3], %[ftmp3], %[ftmp0] \n\t"
226 "por %[ftmp2], %[ftmp2], %[ftmp0] \n\t"
227 "por %[ftmp3], %[ftmp3], %[ftmp0] \n\t"
228 "pxor %[ftmp2], %[ftmp2], %[ftmp8] \n\t"
229 "pxor %[ftmp3], %[ftmp3], %[ftmp9] \n\t"
230 "psubh %[ftmp2], %[ftmp2], %[ftmp8] \n\t"
231 "psubh %[ftmp3], %[ftmp3], %[ftmp9] \n\t"
232 "pandn %[ftmp6], %[ftmp6], %[ftmp2] \n\t"
233 "pandn %[ftmp7], %[ftmp7], %[ftmp3] \n\t"
234 MMI_SDXC1(%[ftmp6], %[addr0], %[block], 0x00)
235 MMI_SDXC1(%[ftmp7], %[addr0], %[block], 0x08)
236 PTR_ADDIU "%[addr0], %[addr0], 0x10 \n\t"
237 "bltz %[addr0], 1b \n\t"
238 : [ftmp0]"=&f"(ftmp[0]), [ftmp1]"=&f"(ftmp[1]),
239 [ftmp2]"=&f"(ftmp[2]), [ftmp3]"=&f"(ftmp[3]),
240 [ftmp4]"=&f"(ftmp[4]), [ftmp5]"=&f"(ftmp[5]),
241 [ftmp6]"=&f"(ftmp[6]), [ftmp7]"=&f"(ftmp[7]),
242 [ftmp8]"=&f"(ftmp[8]), [ftmp9]"=&f"(ftmp[9]),
243 [tmp0]"=&r"(tmp[0]),
246 [addr0]"=&r"(addr[0])
247 : [block]"r"((mips_reg)(block+nCoeffs)),
248 [quant]"r"((mips_reg)(quant_matrix+nCoeffs)),
249 [nCoeffs]"r"((mips_reg)(2*(-nCoeffs))),
250 [qscale]"r"(qscale)
251 : "memory"
252 );
253
254 block[0] = block0;
255}
256
257void ff_dct_unquantize_mpeg1_inter_mmi(const MPVContext *s, int16_t *block,
258 int n, int qscale)
259{
260 int64_t nCoeffs;
261 const uint16_t *quant_matrix;
262 double ftmp[10];
263 uint64_t tmp[1];
264 mips_reg addr[1];
267
268 av_assert2(s->block_last_index[n] >= 0);
269 nCoeffs = s->intra_scantable.raster_end[s->block_last_index[n]] + 1;
270 quant_matrix = s->inter_matrix;
271
272 __asm__ volatile (
273 "dli %[tmp0], 0x0f \n\t"
274 "pcmpeqh %[ftmp0], %[ftmp0], %[ftmp0] \n\t"
275 "dmtc1 %[tmp0], %[ftmp4] \n\t"
276 "dmtc1 %[qscale], %[ftmp1] \n\t"
277 "psrlh %[ftmp0], %[ftmp0], %[ftmp4] \n\t"
278 "packsswh %[ftmp1], %[ftmp1], %[ftmp1] \n\t"
279 "packsswh %[ftmp1], %[ftmp1], %[ftmp1] \n\t"
280 "or %[addr0], %[nCoeffs], $0 \n\t"
281 ".p2align 4 \n\t"
282
283 "1: \n\t"
284 MMI_LDXC1(%[ftmp2], %[addr0], %[block], 0x00)
285 MMI_LDXC1(%[ftmp3], %[addr0], %[block], 0x08)
286 "mov.d %[ftmp4], %[ftmp2] \n\t"
287 "mov.d %[ftmp5], %[ftmp3] \n\t"
288 MMI_LDXC1(%[ftmp6], %[addr0], %[quant], 0x00)
289 MMI_LDXC1(%[ftmp7], %[addr0], %[quant], 0x08)
290 "pmullh %[ftmp6], %[ftmp6], %[ftmp1] \n\t"
291 "pmullh %[ftmp7], %[ftmp7], %[ftmp1] \n\t"
292 "pxor %[ftmp8], %[ftmp8], %[ftmp8] \n\t"
293 "pxor %[ftmp9], %[ftmp9], %[ftmp9] \n\t"
294 "pcmpgth %[ftmp8], %[ftmp8], %[ftmp2] \n\t"
295 "pcmpgth %[ftmp9], %[ftmp9], %[ftmp3] \n\t"
296 "pxor %[ftmp2], %[ftmp2], %[ftmp8] \n\t"
297 "pxor %[ftmp3], %[ftmp3], %[ftmp9] \n\t"
298 "psubh %[ftmp2], %[ftmp2], %[ftmp8] \n\t"
299 "psubh %[ftmp3], %[ftmp3], %[ftmp9] \n\t"
300 "paddh %[ftmp2], %[ftmp2], %[ftmp2] \n\t"
301 "paddh %[ftmp3], %[ftmp3], %[ftmp3] \n\t"
302 "paddh %[ftmp2], %[ftmp2], %[ftmp0] \n\t"
303 "paddh %[ftmp3], %[ftmp3], %[ftmp0] \n\t"
304 "pmullh %[ftmp2], %[ftmp2], %[ftmp6] \n\t"
305 "pmullh %[ftmp3], %[ftmp3], %[ftmp7] \n\t"
306 "pxor %[ftmp6], %[ftmp6], %[ftmp6] \n\t"
307 "pxor %[ftmp7], %[ftmp7], %[ftmp7] \n\t"
308 "pcmpeqh %[ftmp6], %[ftmp6], %[ftmp4] \n\t"
309 "dli %[tmp0], 0x04 \n\t"
310 "pcmpeqh %[ftmp7], %[ftmp7], %[ftmp5] \n\t"
311 "dmtc1 %[tmp0], %[ftmp4] \n\t"
312 "psrah %[ftmp2], %[ftmp2], %[ftmp4] \n\t"
313 "psrah %[ftmp3], %[ftmp3], %[ftmp4] \n\t"
314 "psubh %[ftmp2], %[ftmp2], %[ftmp0] \n\t"
315 "psubh %[ftmp3], %[ftmp3], %[ftmp0] \n\t"
316 "por %[ftmp2], %[ftmp2], %[ftmp0] \n\t"
317 "por %[ftmp3], %[ftmp3], %[ftmp0] \n\t"
318 "pxor %[ftmp2], %[ftmp2], %[ftmp8] \n\t"
319 "pxor %[ftmp3], %[ftmp3], %[ftmp9] \n\t"
320 "psubh %[ftmp2], %[ftmp2], %[ftmp8] \n\t"
321 "psubh %[ftmp3], %[ftmp3], %[ftmp9] \n\t"
322 "pandn %[ftmp6], %[ftmp6], %[ftmp2] \n\t"
323 "pandn %[ftmp7], %[ftmp7], %[ftmp3] \n\t"
324 MMI_SDXC1(%[ftmp6], %[addr0], %[block], 0x00)
325 MMI_SDXC1(%[ftmp7], %[addr0], %[block], 0x08)
326 PTR_ADDIU "%[addr0], %[addr0], 0x10 \n\t"
327 "bltz %[addr0], 1b \n\t"
328 : [ftmp0]"=&f"(ftmp[0]), [ftmp1]"=&f"(ftmp[1]),
329 [ftmp2]"=&f"(ftmp[2]), [ftmp3]"=&f"(ftmp[3]),
330 [ftmp4]"=&f"(ftmp[4]), [ftmp5]"=&f"(ftmp[5]),
331 [ftmp6]"=&f"(ftmp[6]), [ftmp7]"=&f"(ftmp[7]),
332 [ftmp8]"=&f"(ftmp[8]), [ftmp9]"=&f"(ftmp[9]),
333 [tmp0]"=&r"(tmp[0]),
336 [addr0]"=&r"(addr[0])
337 : [block]"r"((mips_reg)(block+nCoeffs)),
338 [quant]"r"((mips_reg)(quant_matrix+nCoeffs)),
339 [nCoeffs]"r"((mips_reg)(2*(-nCoeffs))),
340 [qscale]"r"(qscale)
341 : "memory"
342 );
343}
344
345void ff_dct_unquantize_mpeg2_intra_mmi(const MPVContext *s, int16_t *block,
346 int n, int qscale)
347{
348 uint64_t nCoeffs;
349 const uint16_t *quant_matrix;
350 int block0;
351 double ftmp[10];
352 uint64_t tmp[1];
353 mips_reg addr[1];
356
357 assert(s->block_last_index[n]>=0);
358
359 nCoeffs = s->intra_scantable.raster_end[s->block_last_index[n]];
360
361 if (n < 4)
362 block0 = block[0] * s->y_dc_scale;
363 else
364 block0 = block[0] * s->c_dc_scale;
365
366 quant_matrix = s->intra_matrix;
367
368 __asm__ volatile (
369 "dli %[tmp0], 0x0f \n\t"
370 "pcmpeqh %[ftmp0], %[ftmp0], %[ftmp0] \n\t"
371 "mtc1 %[tmp0], %[ftmp3] \n\t"
372 "mtc1 %[qscale], %[ftmp9] \n\t"
373 "psrlh %[ftmp0], %[ftmp0], %[ftmp3] \n\t"
374 "packsswh %[ftmp9], %[ftmp9], %[ftmp9] \n\t"
375 "packsswh %[ftmp9], %[ftmp9], %[ftmp9] \n\t"
376 "or %[addr0], %[nCoeffs], $0 \n\t"
377 ".p2align 4 \n\t"
378
379 "1: \n\t"
380 MMI_LDXC1(%[ftmp1], %[addr0], %[block], 0x00)
381 MMI_LDXC1(%[ftmp2], %[addr0], %[block], 0x08)
382 "mov.d %[ftmp3], %[ftmp1] \n\t"
383 "mov.d %[ftmp4], %[ftmp2] \n\t"
384 MMI_LDXC1(%[ftmp5], %[addr0], %[quant], 0x00)
385 MMI_LDXC1(%[ftmp6], %[addr0], %[quant], 0x08)
386 "pmullh %[ftmp5], %[ftmp5], %[ftmp9] \n\t"
387 "pmullh %[ftmp6], %[ftmp6], %[ftmp9] \n\t"
388 "pxor %[ftmp7], %[ftmp7], %[ftmp7] \n\t"
389 "pxor %[ftmp8], %[ftmp8], %[ftmp8] \n\t"
390 "pcmpgth %[ftmp7], %[ftmp7], %[ftmp1] \n\t"
391 "pcmpgth %[ftmp8], %[ftmp8], %[ftmp2] \n\t"
392 "pxor %[ftmp1], %[ftmp1], %[ftmp7] \n\t"
393 "pxor %[ftmp2], %[ftmp2], %[ftmp8] \n\t"
394 "psubh %[ftmp1], %[ftmp1], %[ftmp7] \n\t"
395 "psubh %[ftmp2], %[ftmp2], %[ftmp8] \n\t"
396 "pmullh %[ftmp1], %[ftmp1], %[ftmp5] \n\t"
397 "pmullh %[ftmp2], %[ftmp2], %[ftmp6] \n\t"
398 "pxor %[ftmp5], %[ftmp5], %[ftmp5] \n\t"
399 "pxor %[ftmp6], %[ftmp6], %[ftmp6] \n\t"
400 "pcmpeqh %[ftmp5], %[ftmp5], %[ftmp3] \n\t"
401 "dli %[tmp0], 0x03 \n\t"
402 "pcmpeqh %[ftmp6] , %[ftmp6], %[ftmp4] \n\t"
403 "mtc1 %[tmp0], %[ftmp3] \n\t"
404 "psrah %[ftmp1], %[ftmp1], %[ftmp3] \n\t"
405 "psrah %[ftmp2], %[ftmp2], %[ftmp3] \n\t"
406 "pxor %[ftmp1], %[ftmp1], %[ftmp7] \n\t"
407 "pxor %[ftmp2], %[ftmp2], %[ftmp8] \n\t"
408 "psubh %[ftmp1], %[ftmp1], %[ftmp7] \n\t"
409 "psubh %[ftmp2], %[ftmp2], %[ftmp8] \n\t"
410 "pandn %[ftmp5], %[ftmp5], %[ftmp1] \n\t"
411 "pandn %[ftmp6], %[ftmp6], %[ftmp2] \n\t"
412 MMI_SDXC1(%[ftmp5], %[addr0], %[block], 0x00)
413 MMI_SDXC1(%[ftmp6], %[addr0], %[block], 0x08)
414 PTR_ADDIU "%[addr0], %[addr0], 0x10 \n\t"
415 "blez %[addr0], 1b \n\t"
416 : [ftmp0]"=&f"(ftmp[0]), [ftmp1]"=&f"(ftmp[1]),
417 [ftmp2]"=&f"(ftmp[2]), [ftmp3]"=&f"(ftmp[3]),
418 [ftmp4]"=&f"(ftmp[4]), [ftmp5]"=&f"(ftmp[5]),
419 [ftmp6]"=&f"(ftmp[6]), [ftmp7]"=&f"(ftmp[7]),
420 [ftmp8]"=&f"(ftmp[8]), [ftmp9]"=&f"(ftmp[9]),
421 [tmp0]"=&r"(tmp[0]),
424 [addr0]"=&r"(addr[0])
425 : [block]"r"((mips_reg)(block+nCoeffs)),
426 [quant]"r"((mips_reg)(quant_matrix+nCoeffs)),
427 [nCoeffs]"r"((mips_reg)(2*(-nCoeffs))),
428 [qscale]"r"(qscale)
429 : "memory"
430 );
431
432 block[0]= block0;
433}
#define PTR_ADDIU
Definition asmdefs.h:50
#define mips_reg
Definition asmdefs.h:46
#define PTR_ADDU
Definition asmdefs.h:49
__asm__(".macro parse_r var r\n\t" "\\var = -1\n\t" _IFC_REG(0) _IFC_REG(1) _IFC_REG(2) _IFC_REG(3) _IFC_REG(4) _IFC_REG(5) _IFC_REG(6) _IFC_REG(7) _IFC_REG(8) _IFC_REG(9) _IFC_REG(10) _IFC_REG(11) _IFC_REG(12) _IFC_REG(13) _IFC_REG(14) _IFC_REG(15) _IFC_REG(16) _IFC_REG(17) _IFC_REG(18) _IFC_REG(19) _IFC_REG(20) _IFC_REG(21) _IFC_REG(22) _IFC_REG(23) _IFC_REG(24) _IFC_REG(25) _IFC_REG(26) _IFC_REG(27) _IFC_REG(28) _IFC_REG(29) _IFC_REG(30) _IFC_REG(31) ".iflt \\var\n\t" ".error \"Unable to parse register name \\r\"\n\t" ".endif\n\t" ".endm")
#define av_assert2(cond)
assert() equivalent, that does lie in speed critical code.
Definition avassert.h:68
#define s(width, name)
Definition cbs_vp9.c:198
long long int64_t
Definition coverity.c:34
static int16_t block[64]
Definition dct.c:125
#define RESTRICT_ASM_ALL64
Definition mmiutils.h:40
#define DECLARE_VAR_ADDRT
Definition mmiutils.h:41
#define DECLARE_VAR_ALL64
Definition mmiutils.h:39
#define RESTRICT_ASM_ADDRT
Definition mmiutils.h:42
void ff_dct_unquantize_mpeg1_inter_mmi(const MPVContext *s, int16_t *block, int n, int qscale)
void ff_dct_unquantize_h263_inter_mmi(const MPVContext *s, int16_t *block, int n, int qscale)
void ff_dct_unquantize_h263_intra_mmi(const MPVContext *s, int16_t *block, int n, int qscale)
void ff_dct_unquantize_mpeg2_intra_mmi(const MPVContext *s, int16_t *block, int n, int qscale)
void ff_dct_unquantize_mpeg1_intra_mmi(const MPVContext *s, int16_t *block, int n, int qscale)
uint8_t level
Definition svq3.c:208
static uint8_t tmp[40]
Definition aes_ctr.c:52
int64_t i
Definition asmdefs.h:104
static const uint8_t quant[64]
Definition vmixdec.c:71