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"
26#include "libavutil/avassert.h"
28
29void ff_dct_unquantize_h263_intra_mmi(const MPVContext *s, int16_t *block,
30 int n, int qscale)
31{
32 int64_t level, nCoeffs;
33 double ftmp[6];
34 mips_reg addr[1];
35 union mmi_intfloat64 qmul_u, qadd_u;
37
38 qmul_u.i = qscale << 1;
39 av_assert2(s->block_last_index[n]>=0 || s->h263_aic);
40
41 if (!s->h263_aic) {
42 if (n<4)
43 level = block[0] * s->y_dc_scale;
44 else
45 level = block[0] * s->c_dc_scale;
46 qadd_u.i = (qscale-1) | 1;
47 } else {
48 qadd_u.i = 0;
49 level = block[0];
50 }
51
52 if(s->ac_pred)
53 nCoeffs = 63;
54 else
55 nCoeffs = s->intra_scantable.raster_end[s->block_last_index[n]];
56
57 __asm__ volatile (
58 "pxor %[ftmp0], %[ftmp0], %[ftmp0] \n\t"
59 "packsswh %[qmul], %[qmul], %[qmul] \n\t"
60 "packsswh %[qmul], %[qmul], %[qmul] \n\t"
61 "packsswh %[qadd], %[qadd], %[qadd] \n\t"
62 "packsswh %[qadd], %[qadd], %[qadd] \n\t"
63 "psubh %[ftmp0], %[ftmp0], %[qadd] \n\t"
64 "pxor %[ftmp5], %[ftmp5], %[ftmp5] \n\t"
65 ".p2align 4 \n\t"
66
67 "1: \n\t"
68 PTR_ADDU "%[addr0], %[block], %[nCoeffs] \n\t"
69 MMI_LDC1(%[ftmp1], %[addr0], 0x00)
70 MMI_LDC1(%[ftmp2], %[addr0], 0x08)
71 "mov.d %[ftmp3], %[ftmp1] \n\t"
72 "mov.d %[ftmp4], %[ftmp2] \n\t"
73 "pmullh %[ftmp1], %[ftmp1], %[qmul] \n\t"
74 "pmullh %[ftmp2], %[ftmp2], %[qmul] \n\t"
75 "pcmpgth %[ftmp3], %[ftmp3], %[ftmp5] \n\t"
76 "pcmpgth %[ftmp4], %[ftmp4], %[ftmp5] \n\t"
77 "pxor %[ftmp1], %[ftmp1], %[ftmp3] \n\t"
78 "pxor %[ftmp2], %[ftmp2], %[ftmp4] \n\t"
79 "paddh %[ftmp1], %[ftmp1], %[ftmp0] \n\t"
80 "paddh %[ftmp2], %[ftmp2], %[ftmp0] \n\t"
81 "pxor %[ftmp3], %[ftmp3], %[ftmp1] \n\t"
82 "pxor %[ftmp4], %[ftmp4], %[ftmp2] \n\t"
83 "pcmpeqh %[ftmp1], %[ftmp1], %[ftmp0] \n\t"
84 "pcmpeqh %[ftmp2], %[ftmp2], %[ftmp0] \n\t"
85 "pandn %[ftmp1], %[ftmp1], %[ftmp3] \n\t"
86 "pandn %[ftmp2], %[ftmp2], %[ftmp4] \n\t"
87 PTR_ADDIU "%[nCoeffs], %[nCoeffs], 0x10 \n\t"
88 MMI_SDC1(%[ftmp1], %[addr0], 0x00)
89 MMI_SDC1(%[ftmp2], %[addr0], 0x08)
90 "blez %[nCoeffs], 1b \n\t"
91 : [ftmp0]"=&f"(ftmp[0]), [ftmp1]"=&f"(ftmp[1]),
92 [ftmp2]"=&f"(ftmp[2]), [ftmp3]"=&f"(ftmp[3]),
93 [ftmp4]"=&f"(ftmp[4]), [ftmp5]"=&f"(ftmp[5]),
95 [addr0]"=&r"(addr[0])
96 : [block]"r"((mips_reg)(block+nCoeffs)),
97 [nCoeffs]"r"((mips_reg)(2*(-nCoeffs))),
98 [qmul]"f"(qmul_u.f), [qadd]"f"(qadd_u.f)
99 : "memory"
100 );
101
102 block[0] = level;
103}
104
105void ff_dct_unquantize_h263_inter_mmi(const MPVContext *s, int16_t *block,
106 int n, int qscale)
107{
108 int64_t nCoeffs;
109 double ftmp[6];
110 mips_reg addr[1];
111 union mmi_intfloat64 qmul_u, qadd_u;
113
114 qmul_u.i = qscale << 1;
115 qadd_u.i = (qscale - 1) | 1;
116 av_assert2(s->block_last_index[n]>=0 || s->h263_aic);
117 nCoeffs = s->inter_scantable.raster_end[s->block_last_index[n]];
118
119 __asm__ volatile (
120 "packsswh %[qmul], %[qmul], %[qmul] \n\t"
121 "packsswh %[qmul], %[qmul], %[qmul] \n\t"
122 "pxor %[ftmp0], %[ftmp0], %[ftmp0] \n\t"
123 "packsswh %[qadd], %[qadd], %[qadd] \n\t"
124 "packsswh %[qadd], %[qadd], %[qadd] \n\t"
125 "psubh %[ftmp0], %[ftmp0], %[qadd] \n\t"
126 "pxor %[ftmp5], %[ftmp5], %[ftmp5] \n\t"
127 ".p2align 4 \n\t"
128 "1: \n\t"
129 PTR_ADDU "%[addr0], %[block], %[nCoeffs] \n\t"
130 MMI_LDC1(%[ftmp1], %[addr0], 0x00)
131 MMI_LDC1(%[ftmp2], %[addr0], 0x08)
132 "mov.d %[ftmp3], %[ftmp1] \n\t"
133 "mov.d %[ftmp4], %[ftmp2] \n\t"
134 "pmullh %[ftmp1], %[ftmp1], %[qmul] \n\t"
135 "pmullh %[ftmp2], %[ftmp2], %[qmul] \n\t"
136 "pcmpgth %[ftmp3], %[ftmp3], %[ftmp5] \n\t"
137 "pcmpgth %[ftmp4], %[ftmp4], %[ftmp5] \n\t"
138 "pxor %[ftmp1], %[ftmp1], %[ftmp3] \n\t"
139 "pxor %[ftmp2], %[ftmp2], %[ftmp4] \n\t"
140 "paddh %[ftmp1], %[ftmp1], %[ftmp0] \n\t"
141 "paddh %[ftmp2], %[ftmp2], %[ftmp0] \n\t"
142 "pxor %[ftmp3], %[ftmp3], %[ftmp1] \n\t"
143 "pxor %[ftmp4], %[ftmp4], %[ftmp2] \n\t"
144 "pcmpeqh %[ftmp1], %[ftmp1], %[ftmp0] \n\t"
145 "pcmpeqh %[ftmp2], %[ftmp2], %[ftmp0] \n\t"
146 "pandn %[ftmp1], %[ftmp1], %[ftmp3] \n\t"
147 "pandn %[ftmp2], %[ftmp2], %[ftmp4] \n\t"
148 PTR_ADDIU "%[nCoeffs], %[nCoeffs], 0x10 \n\t"
149 MMI_SDC1(%[ftmp1], %[addr0], 0x00)
150 MMI_SDC1(%[ftmp2], %[addr0], 0x08)
151 "blez %[nCoeffs], 1b \n\t"
152 : [ftmp0]"=&f"(ftmp[0]), [ftmp1]"=&f"(ftmp[1]),
153 [ftmp2]"=&f"(ftmp[2]), [ftmp3]"=&f"(ftmp[3]),
154 [ftmp4]"=&f"(ftmp[4]), [ftmp5]"=&f"(ftmp[5]),
156 [addr0]"=&r"(addr[0])
157 : [block]"r"((mips_reg)(block+nCoeffs)),
158 [nCoeffs]"r"((mips_reg)(2*(-nCoeffs))),
159 [qmul]"f"(qmul_u.f), [qadd]"f"(qadd_u.f)
160 : "memory"
161 );
162}
163
164void ff_dct_unquantize_mpeg1_intra_mmi(const MPVContext *s, int16_t *block,
165 int n, int qscale)
166{
167 int64_t nCoeffs;
168 const uint16_t *quant_matrix;
169 int block0;
170 double ftmp[10];
171 uint64_t tmp[1];
172 mips_reg addr[1];
175
176 av_assert2(s->block_last_index[n]>=0);
177 nCoeffs = s->intra_scantable.raster_end[s->block_last_index[n]] + 1;
178
179 if (n<4)
180 block0 = block[0] * s->y_dc_scale;
181 else
182 block0 = block[0] * s->c_dc_scale;
183
184 /* XXX: only mpeg1 */
185 quant_matrix = s->intra_matrix;
186
187 __asm__ volatile (
188 "dli %[tmp0], 0x0f \n\t"
189 "pcmpeqh %[ftmp0], %[ftmp0], %[ftmp0] \n\t"
190 "dmtc1 %[tmp0], %[ftmp4] \n\t"
191 "dmtc1 %[qscale], %[ftmp1] \n\t"
192 "psrlh %[ftmp0], %[ftmp0], %[ftmp4] \n\t"
193 "packsswh %[ftmp1], %[ftmp1], %[ftmp1] \n\t"
194 "packsswh %[ftmp1], %[ftmp1], %[ftmp1] \n\t"
195 "or %[addr0], %[nCoeffs], $0 \n\t"
196 ".p2align 4 \n\t"
197
198 "1: \n\t"
199 MMI_LDXC1(%[ftmp2], %[addr0], %[block], 0x00)
200 MMI_LDXC1(%[ftmp3], %[addr0], %[block], 0x08)
201 "mov.d %[ftmp4], %[ftmp2] \n\t"
202 "mov.d %[ftmp5], %[ftmp3] \n\t"
203 MMI_LDXC1(%[ftmp6], %[addr0], %[quant], 0x00)
204 MMI_LDXC1(%[ftmp7], %[addr0], %[quant], 0x08)
205 "pmullh %[ftmp6], %[ftmp6], %[ftmp1] \n\t"
206 "pmullh %[ftmp7], %[ftmp7], %[ftmp1] \n\t"
207 "pxor %[ftmp8], %[ftmp8], %[ftmp8] \n\t"
208 "pxor %[ftmp9], %[ftmp9], %[ftmp9] \n\t"
209 "pcmpgth %[ftmp8], %[ftmp8], %[ftmp2] \n\t"
210 "pcmpgth %[ftmp9], %[ftmp9], %[ftmp3] \n\t"
211 "pxor %[ftmp2], %[ftmp2], %[ftmp8] \n\t"
212 "pxor %[ftmp3], %[ftmp3], %[ftmp9] \n\t"
213 "psubh %[ftmp2], %[ftmp2], %[ftmp8] \n\t"
214 "psubh %[ftmp3], %[ftmp3], %[ftmp9] \n\t"
215 "pmullh %[ftmp2], %[ftmp2], %[ftmp6] \n\t"
216 "pmullh %[ftmp3], %[ftmp3], %[ftmp7] \n\t"
217 "pxor %[ftmp6], %[ftmp6], %[ftmp6] \n\t"
218 "pxor %[ftmp7], %[ftmp7], %[ftmp7] \n\t"
219 "pcmpeqh %[ftmp6], %[ftmp6], %[ftmp4] \n\t"
220 "dli %[tmp0], 0x03 \n\t"
221 "pcmpeqh %[ftmp7], %[ftmp7], %[ftmp5] \n\t"
222 "dmtc1 %[tmp0], %[ftmp4] \n\t"
223 "psrah %[ftmp2], %[ftmp2], %[ftmp4] \n\t"
224 "psrah %[ftmp3], %[ftmp3], %[ftmp4] \n\t"
225 "psubh %[ftmp2], %[ftmp2], %[ftmp0] \n\t"
226 "psubh %[ftmp3], %[ftmp3], %[ftmp0] \n\t"
227 "por %[ftmp2], %[ftmp2], %[ftmp0] \n\t"
228 "por %[ftmp3], %[ftmp3], %[ftmp0] \n\t"
229 "pxor %[ftmp2], %[ftmp2], %[ftmp8] \n\t"
230 "pxor %[ftmp3], %[ftmp3], %[ftmp9] \n\t"
231 "psubh %[ftmp2], %[ftmp2], %[ftmp8] \n\t"
232 "psubh %[ftmp3], %[ftmp3], %[ftmp9] \n\t"
233 "pandn %[ftmp6], %[ftmp6], %[ftmp2] \n\t"
234 "pandn %[ftmp7], %[ftmp7], %[ftmp3] \n\t"
235 MMI_SDXC1(%[ftmp6], %[addr0], %[block], 0x00)
236 MMI_SDXC1(%[ftmp7], %[addr0], %[block], 0x08)
237 PTR_ADDIU "%[addr0], %[addr0], 0x10 \n\t"
238 "bltz %[addr0], 1b \n\t"
239 : [ftmp0]"=&f"(ftmp[0]), [ftmp1]"=&f"(ftmp[1]),
240 [ftmp2]"=&f"(ftmp[2]), [ftmp3]"=&f"(ftmp[3]),
241 [ftmp4]"=&f"(ftmp[4]), [ftmp5]"=&f"(ftmp[5]),
242 [ftmp6]"=&f"(ftmp[6]), [ftmp7]"=&f"(ftmp[7]),
243 [ftmp8]"=&f"(ftmp[8]), [ftmp9]"=&f"(ftmp[9]),
244 [tmp0]"=&r"(tmp[0]),
247 [addr0]"=&r"(addr[0])
248 : [block]"r"((mips_reg)(block+nCoeffs)),
249 [quant]"r"((mips_reg)(quant_matrix+nCoeffs)),
250 [nCoeffs]"r"((mips_reg)(2*(-nCoeffs))),
251 [qscale]"r"(qscale)
252 : "memory"
253 );
254
255 block[0] = block0;
256}
257
258void ff_dct_unquantize_mpeg1_inter_mmi(const MPVContext *s, int16_t *block,
259 int n, int qscale)
260{
261 int64_t nCoeffs;
262 const uint16_t *quant_matrix;
263 double ftmp[10];
264 uint64_t tmp[1];
265 mips_reg addr[1];
268
269 av_assert2(s->block_last_index[n] >= 0);
270 nCoeffs = s->intra_scantable.raster_end[s->block_last_index[n]] + 1;
271 quant_matrix = s->inter_matrix;
272
273 __asm__ volatile (
274 "dli %[tmp0], 0x0f \n\t"
275 "pcmpeqh %[ftmp0], %[ftmp0], %[ftmp0] \n\t"
276 "dmtc1 %[tmp0], %[ftmp4] \n\t"
277 "dmtc1 %[qscale], %[ftmp1] \n\t"
278 "psrlh %[ftmp0], %[ftmp0], %[ftmp4] \n\t"
279 "packsswh %[ftmp1], %[ftmp1], %[ftmp1] \n\t"
280 "packsswh %[ftmp1], %[ftmp1], %[ftmp1] \n\t"
281 "or %[addr0], %[nCoeffs], $0 \n\t"
282 ".p2align 4 \n\t"
283
284 "1: \n\t"
285 MMI_LDXC1(%[ftmp2], %[addr0], %[block], 0x00)
286 MMI_LDXC1(%[ftmp3], %[addr0], %[block], 0x08)
287 "mov.d %[ftmp4], %[ftmp2] \n\t"
288 "mov.d %[ftmp5], %[ftmp3] \n\t"
289 MMI_LDXC1(%[ftmp6], %[addr0], %[quant], 0x00)
290 MMI_LDXC1(%[ftmp7], %[addr0], %[quant], 0x08)
291 "pmullh %[ftmp6], %[ftmp6], %[ftmp1] \n\t"
292 "pmullh %[ftmp7], %[ftmp7], %[ftmp1] \n\t"
293 "pxor %[ftmp8], %[ftmp8], %[ftmp8] \n\t"
294 "pxor %[ftmp9], %[ftmp9], %[ftmp9] \n\t"
295 "pcmpgth %[ftmp8], %[ftmp8], %[ftmp2] \n\t"
296 "pcmpgth %[ftmp9], %[ftmp9], %[ftmp3] \n\t"
297 "pxor %[ftmp2], %[ftmp2], %[ftmp8] \n\t"
298 "pxor %[ftmp3], %[ftmp3], %[ftmp9] \n\t"
299 "psubh %[ftmp2], %[ftmp2], %[ftmp8] \n\t"
300 "psubh %[ftmp3], %[ftmp3], %[ftmp9] \n\t"
301 "paddh %[ftmp2], %[ftmp2], %[ftmp2] \n\t"
302 "paddh %[ftmp3], %[ftmp3], %[ftmp3] \n\t"
303 "paddh %[ftmp2], %[ftmp2], %[ftmp0] \n\t"
304 "paddh %[ftmp3], %[ftmp3], %[ftmp0] \n\t"
305 "pmullh %[ftmp2], %[ftmp2], %[ftmp6] \n\t"
306 "pmullh %[ftmp3], %[ftmp3], %[ftmp7] \n\t"
307 "pxor %[ftmp6], %[ftmp6], %[ftmp6] \n\t"
308 "pxor %[ftmp7], %[ftmp7], %[ftmp7] \n\t"
309 "pcmpeqh %[ftmp6], %[ftmp6], %[ftmp4] \n\t"
310 "dli %[tmp0], 0x04 \n\t"
311 "pcmpeqh %[ftmp7], %[ftmp7], %[ftmp5] \n\t"
312 "dmtc1 %[tmp0], %[ftmp4] \n\t"
313 "psrah %[ftmp2], %[ftmp2], %[ftmp4] \n\t"
314 "psrah %[ftmp3], %[ftmp3], %[ftmp4] \n\t"
315 "psubh %[ftmp2], %[ftmp2], %[ftmp0] \n\t"
316 "psubh %[ftmp3], %[ftmp3], %[ftmp0] \n\t"
317 "por %[ftmp2], %[ftmp2], %[ftmp0] \n\t"
318 "por %[ftmp3], %[ftmp3], %[ftmp0] \n\t"
319 "pxor %[ftmp2], %[ftmp2], %[ftmp8] \n\t"
320 "pxor %[ftmp3], %[ftmp3], %[ftmp9] \n\t"
321 "psubh %[ftmp2], %[ftmp2], %[ftmp8] \n\t"
322 "psubh %[ftmp3], %[ftmp3], %[ftmp9] \n\t"
323 "pandn %[ftmp6], %[ftmp6], %[ftmp2] \n\t"
324 "pandn %[ftmp7], %[ftmp7], %[ftmp3] \n\t"
325 MMI_SDXC1(%[ftmp6], %[addr0], %[block], 0x00)
326 MMI_SDXC1(%[ftmp7], %[addr0], %[block], 0x08)
327 PTR_ADDIU "%[addr0], %[addr0], 0x10 \n\t"
328 "bltz %[addr0], 1b \n\t"
329 : [ftmp0]"=&f"(ftmp[0]), [ftmp1]"=&f"(ftmp[1]),
330 [ftmp2]"=&f"(ftmp[2]), [ftmp3]"=&f"(ftmp[3]),
331 [ftmp4]"=&f"(ftmp[4]), [ftmp5]"=&f"(ftmp[5]),
332 [ftmp6]"=&f"(ftmp[6]), [ftmp7]"=&f"(ftmp[7]),
333 [ftmp8]"=&f"(ftmp[8]), [ftmp9]"=&f"(ftmp[9]),
334 [tmp0]"=&r"(tmp[0]),
337 [addr0]"=&r"(addr[0])
338 : [block]"r"((mips_reg)(block+nCoeffs)),
339 [quant]"r"((mips_reg)(quant_matrix+nCoeffs)),
340 [nCoeffs]"r"((mips_reg)(2*(-nCoeffs))),
341 [qscale]"r"(qscale)
342 : "memory"
343 );
344}
345
346void ff_dct_unquantize_mpeg2_intra_mmi(const MPVContext *s, int16_t *block,
347 int n, int qscale)
348{
349 uint64_t nCoeffs;
350 const uint16_t *quant_matrix;
351 int block0;
352 double ftmp[10];
353 uint64_t tmp[1];
354 mips_reg addr[1];
357
358 av_assert2(s->block_last_index[n]>=0);
359
360 nCoeffs = s->intra_scantable.raster_end[s->block_last_index[n]];
361
362 if (n < 4)
363 block0 = block[0] * s->y_dc_scale;
364 else
365 block0 = block[0] * s->c_dc_scale;
366
367 quant_matrix = s->intra_matrix;
368
369 __asm__ volatile (
370 "dli %[tmp0], 0x0f \n\t"
371 "pcmpeqh %[ftmp0], %[ftmp0], %[ftmp0] \n\t"
372 "mtc1 %[tmp0], %[ftmp3] \n\t"
373 "mtc1 %[qscale], %[ftmp9] \n\t"
374 "psrlh %[ftmp0], %[ftmp0], %[ftmp3] \n\t"
375 "packsswh %[ftmp9], %[ftmp9], %[ftmp9] \n\t"
376 "packsswh %[ftmp9], %[ftmp9], %[ftmp9] \n\t"
377 "or %[addr0], %[nCoeffs], $0 \n\t"
378 ".p2align 4 \n\t"
379
380 "1: \n\t"
381 MMI_LDXC1(%[ftmp1], %[addr0], %[block], 0x00)
382 MMI_LDXC1(%[ftmp2], %[addr0], %[block], 0x08)
383 "mov.d %[ftmp3], %[ftmp1] \n\t"
384 "mov.d %[ftmp4], %[ftmp2] \n\t"
385 MMI_LDXC1(%[ftmp5], %[addr0], %[quant], 0x00)
386 MMI_LDXC1(%[ftmp6], %[addr0], %[quant], 0x08)
387 "pmullh %[ftmp5], %[ftmp5], %[ftmp9] \n\t"
388 "pmullh %[ftmp6], %[ftmp6], %[ftmp9] \n\t"
389 "pxor %[ftmp7], %[ftmp7], %[ftmp7] \n\t"
390 "pxor %[ftmp8], %[ftmp8], %[ftmp8] \n\t"
391 "pcmpgth %[ftmp7], %[ftmp7], %[ftmp1] \n\t"
392 "pcmpgth %[ftmp8], %[ftmp8], %[ftmp2] \n\t"
393 "pxor %[ftmp1], %[ftmp1], %[ftmp7] \n\t"
394 "pxor %[ftmp2], %[ftmp2], %[ftmp8] \n\t"
395 "psubh %[ftmp1], %[ftmp1], %[ftmp7] \n\t"
396 "psubh %[ftmp2], %[ftmp2], %[ftmp8] \n\t"
397 "pmullh %[ftmp1], %[ftmp1], %[ftmp5] \n\t"
398 "pmullh %[ftmp2], %[ftmp2], %[ftmp6] \n\t"
399 "pxor %[ftmp5], %[ftmp5], %[ftmp5] \n\t"
400 "pxor %[ftmp6], %[ftmp6], %[ftmp6] \n\t"
401 "pcmpeqh %[ftmp5], %[ftmp5], %[ftmp3] \n\t"
402 "dli %[tmp0], 0x03 \n\t"
403 "pcmpeqh %[ftmp6] , %[ftmp6], %[ftmp4] \n\t"
404 "mtc1 %[tmp0], %[ftmp3] \n\t"
405 "psrah %[ftmp1], %[ftmp1], %[ftmp3] \n\t"
406 "psrah %[ftmp2], %[ftmp2], %[ftmp3] \n\t"
407 "pxor %[ftmp1], %[ftmp1], %[ftmp7] \n\t"
408 "pxor %[ftmp2], %[ftmp2], %[ftmp8] \n\t"
409 "psubh %[ftmp1], %[ftmp1], %[ftmp7] \n\t"
410 "psubh %[ftmp2], %[ftmp2], %[ftmp8] \n\t"
411 "pandn %[ftmp5], %[ftmp5], %[ftmp1] \n\t"
412 "pandn %[ftmp6], %[ftmp6], %[ftmp2] \n\t"
413 MMI_SDXC1(%[ftmp5], %[addr0], %[block], 0x00)
414 MMI_SDXC1(%[ftmp6], %[addr0], %[block], 0x08)
415 PTR_ADDIU "%[addr0], %[addr0], 0x10 \n\t"
416 "blez %[addr0], 1b \n\t"
417 : [ftmp0]"=&f"(ftmp[0]), [ftmp1]"=&f"(ftmp[1]),
418 [ftmp2]"=&f"(ftmp[2]), [ftmp3]"=&f"(ftmp[3]),
419 [ftmp4]"=&f"(ftmp[4]), [ftmp5]"=&f"(ftmp[5]),
420 [ftmp6]"=&f"(ftmp[6]), [ftmp7]"=&f"(ftmp[7]),
421 [ftmp8]"=&f"(ftmp[8]), [ftmp9]"=&f"(ftmp[9]),
422 [tmp0]"=&r"(tmp[0]),
425 [addr0]"=&r"(addr[0])
426 : [block]"r"((mips_reg)(block+nCoeffs)),
427 [quant]"r"((mips_reg)(quant_matrix+nCoeffs)),
428 [nCoeffs]"r"((mips_reg)(2*(-nCoeffs))),
429 [qscale]"r"(qscale)
430 : "memory"
431 );
432
433 block[0]= block0;
434}
#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")
simple assert() macros that are a bit more flexible than ISO C assert().
#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:50
#define DECLARE_VAR_ADDRT
Definition mmiutils.h:51
#define DECLARE_VAR_ALL64
Definition mmiutils.h:49
#define RESTRICT_ASM_ADDRT
Definition mmiutils.h:52
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