annotate libmpeg2/idct_altivec.c @ 9857:89b48bc6c441

Importing libmpeg2 from mpeg2dec-0.3.1
author arpi
date Sun, 06 Apr 2003 16:41:49 +0000
parents
children aeea70a0e72c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9857
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
1 /*
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
2 * idct_altivec.c
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
3 * Copyright (C) 2000-2002 Michel Lespinasse <walken@zoy.org>
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
4 * Copyright (C) 1999-2000 Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
5 *
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
6 * This file is part of mpeg2dec, a free MPEG-2 video stream decoder.
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
7 * See http://libmpeg2.sourceforge.net/ for updates.
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
8 *
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
9 * mpeg2dec is free software; you can redistribute it and/or modify
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
10 * it under the terms of the GNU General Public License as published by
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
11 * the Free Software Foundation; either version 2 of the License, or
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
12 * (at your option) any later version.
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
13 *
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
14 * mpeg2dec is distributed in the hope that it will be useful,
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
17 * GNU General Public License for more details.
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
18 *
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
19 * You should have received a copy of the GNU General Public License
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
20 * along with this program; if not, write to the Free Software
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
22 */
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
23
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
24 #ifndef __ALTIVEC__
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
25
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
26 #include "config.h"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
27
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
28 #ifdef ARCH_PPC
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
29
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
30 #include <inttypes.h>
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
31
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
32 #include "mpeg2.h"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
33 #include "mpeg2_internal.h"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
34 #include "attributes.h"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
35
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
36 static const int16_t constants[5][8] ATTR_ALIGN(16) = {
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
37 {23170, 13573, 6518, 21895, -23170, -21895, 32, 31},
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
38 {16384, 22725, 21407, 19266, 16384, 19266, 21407, 22725},
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
39 {22725, 31521, 29692, 26722, 22725, 26722, 29692, 31521},
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
40 {21407, 29692, 27969, 25172, 21407, 25172, 27969, 29692},
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
41 {19266, 26722, 25172, 22654, 19266, 22654, 25172, 26722}
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
42 };
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
43
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
44 /*
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
45 * The asm code is generated with:
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
46 *
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
47 * gcc-2.95 -fvec -D__ALTIVEC__ -O9 -fomit-frame-pointer -mregnames -S
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
48 * idct_altivec.c
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
49 *
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
50 * awk '{args=""; len=split ($2, arg, ",");
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
51 * for (i=1; i<=len; i++) { a=arg[i]; if (i<len) a=a",";
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
52 * args = args sprintf ("%-6s", a) }
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
53 * printf ("\t\"\t%-16s%-24s\\n\"\n", $1, args) }' idct_altivec.s |
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
54 * unexpand -a
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
55 *
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
56 * I then do some simple trimming on the function prolog/trailers
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
57 */
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
58
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
59 void mpeg2_idct_copy_altivec (int16_t * block, uint8_t * dest, int stride)
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
60 {
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
61 asm (" \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
62 "# stwu %r1, -128(%r1) \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
63 "# mflr %r0 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
64 "# stw %r0, 132(%r1) \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
65 "# addi %r0, %r1, 128 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
66 "# bl _savev25 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
67
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
68 " addi %r9, %r3, 112 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
69 " vspltish %v25, 4 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
70 " vxor %v13, %v13, %v13 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
71 " lis %r10, constants@ha \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
72 " lvx %v1, 0, %r9 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
73 " la %r10, constants@l(%r10) \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
74 " lvx %v5, 0, %r3 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
75 " addi %r9, %r3, 16 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
76 " lvx %v8, 0, %r10 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
77 " addi %r11, %r10, 32 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
78 " lvx %v12, 0, %r9 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
79 " lvx %v6, 0, %r11 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
80 " addi %r8, %r3, 48 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
81 " vslh %v1, %v1, %v25 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
82 " addi %r9, %r3, 80 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
83 " lvx %v11, 0, %r8 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
84 " vslh %v5, %v5, %v25 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
85 " lvx %v0, 0, %r9 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
86 " addi %r11, %r10, 64 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
87 " vsplth %v3, %v8, 2 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
88 " lvx %v7, 0, %r11 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
89 " addi %r9, %r3, 96 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
90 " vslh %v12, %v12, %v25 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
91 " vmhraddshs %v27, %v1, %v6, %v13 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
92 " addi %r8, %r3, 32 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
93 " vsplth %v2, %v8, 5 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
94 " lvx %v1, 0, %r9 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
95 " vslh %v11, %v11, %v25 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
96 " addi %r3, %r3, 64 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
97 " lvx %v9, 0, %r8 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
98 " addi %r9, %r10, 48 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
99 " vslh %v0, %v0, %v25 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
100 " lvx %v4, 0, %r9 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
101 " vmhraddshs %v31, %v12, %v6, %v13 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
102 " addi %r10, %r10, 16 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
103 " vmhraddshs %v30, %v0, %v7, %v13 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
104 " lvx %v10, 0, %r3 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
105 " vsplth %v19, %v8, 3 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
106 " vmhraddshs %v15, %v11, %v7, %v13 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
107 " lvx %v12, 0, %r10 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
108 " vsplth %v6, %v8, 4 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
109 " vslh %v1, %v1, %v25 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
110 " vsplth %v11, %v8, 1 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
111 " li %r9, 4 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
112 " vslh %v9, %v9, %v25 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
113 " vsplth %v7, %v8, 0 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
114 " vmhraddshs %v18, %v1, %v4, %v13 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
115 " vspltw %v8, %v8, 3 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
116 " vsubshs %v0, %v13, %v27 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
117 " vmhraddshs %v1, %v9, %v4, %v13 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
118 " vmhraddshs %v17, %v3, %v31, %v0 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
119 " vmhraddshs %v4, %v2, %v15, %v30 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
120 " vslh %v10, %v10, %v25 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
121 " vmhraddshs %v9, %v5, %v12, %v13 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
122 " vspltish %v25, 6 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
123 " vmhraddshs %v5, %v10, %v12, %v13 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
124 " vmhraddshs %v28, %v19, %v30, %v15 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
125 " vmhraddshs %v27, %v3, %v27, %v31 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
126 " vsubshs %v0, %v13, %v18 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
127 " vmhraddshs %v18, %v11, %v18, %v1 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
128 " vaddshs %v30, %v17, %v4 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
129 " vmhraddshs %v12, %v11, %v1, %v0 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
130 " vsubshs %v4, %v17, %v4 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
131 " vaddshs %v10, %v9, %v5 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
132 " vsubshs %v17, %v27, %v28 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
133 " vaddshs %v27, %v27, %v28 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
134 " vsubshs %v1, %v9, %v5 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
135 " vaddshs %v28, %v10, %v18 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
136 " vsubshs %v18, %v10, %v18 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
137 " vaddshs %v10, %v1, %v12 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
138 " vsubshs %v1, %v1, %v12 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
139 " vsubshs %v12, %v17, %v4 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
140 " vaddshs %v4, %v17, %v4 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
141 " vmhraddshs %v5, %v7, %v12, %v1 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
142 " vmhraddshs %v26, %v6, %v4, %v10 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
143 " vmhraddshs %v29, %v6, %v12, %v1 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
144 " vmhraddshs %v14, %v7, %v4, %v10 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
145 " vsubshs %v12, %v18, %v30 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
146 " vaddshs %v9, %v28, %v27 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
147 " vaddshs %v16, %v18, %v30 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
148 " vsubshs %v10, %v28, %v27 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
149 " vmrglh %v31, %v9, %v12 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
150 " vmrglh %v30, %v5, %v26 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
151 " vmrglh %v15, %v14, %v29 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
152 " vmrghh %v5, %v5, %v26 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
153 " vmrglh %v27, %v16, %v10 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
154 " vmrghh %v9, %v9, %v12 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
155 " vmrghh %v18, %v16, %v10 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
156 " vmrghh %v1, %v14, %v29 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
157 " vmrglh %v14, %v9, %v5 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
158 " vmrglh %v16, %v31, %v30 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
159 " vmrglh %v10, %v15, %v27 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
160 " vmrghh %v9, %v9, %v5 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
161 " vmrghh %v26, %v15, %v27 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
162 " vmrglh %v27, %v16, %v10 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
163 " vmrghh %v12, %v1, %v18 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
164 " vmrglh %v29, %v1, %v18 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
165 " vsubshs %v0, %v13, %v27 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
166 " vmrghh %v5, %v31, %v30 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
167 " vmrglh %v31, %v9, %v12 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
168 " vmrglh %v30, %v5, %v26 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
169 " vmrglh %v15, %v14, %v29 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
170 " vmhraddshs %v17, %v3, %v31, %v0 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
171 " vmrghh %v18, %v16, %v10 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
172 " vmhraddshs %v27, %v3, %v27, %v31 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
173 " vmhraddshs %v4, %v2, %v15, %v30 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
174 " vmrghh %v1, %v14, %v29 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
175 " vmhraddshs %v28, %v19, %v30, %v15 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
176 " vmrghh %v0, %v9, %v12 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
177 " vsubshs %v13, %v13, %v18 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
178 " vmrghh %v5, %v5, %v26 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
179 " vmhraddshs %v18, %v11, %v18, %v1 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
180 " vaddshs %v9, %v0, %v8 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
181 " vaddshs %v30, %v17, %v4 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
182 " vmhraddshs %v12, %v11, %v1, %v13 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
183 " vsubshs %v4, %v17, %v4 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
184 " vaddshs %v10, %v9, %v5 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
185 " vsubshs %v17, %v27, %v28 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
186 " vaddshs %v27, %v27, %v28 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
187 " vsubshs %v1, %v9, %v5 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
188 " vaddshs %v28, %v10, %v18 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
189 " vsubshs %v18, %v10, %v18 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
190 " vaddshs %v10, %v1, %v12 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
191 " vsubshs %v1, %v1, %v12 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
192 " vsubshs %v12, %v17, %v4 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
193 " vaddshs %v4, %v17, %v4 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
194 " vaddshs %v9, %v28, %v27 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
195 " vmhraddshs %v14, %v7, %v4, %v10 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
196 " vsrah %v9, %v9, %v25 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
197 " vmhraddshs %v5, %v7, %v12, %v1 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
198 " vpkshus %v0, %v9, %v9 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
199 " vmhraddshs %v29, %v6, %v12, %v1 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
200 " stvewx %v0, 0, %r4 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
201 " vaddshs %v16, %v18, %v30 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
202 " vsrah %v31, %v14, %v25 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
203 " stvewx %v0, %r9, %r4 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
204 " add %r4, %r4, %r5 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
205 " vsrah %v15, %v16, %v25 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
206 " vpkshus %v0, %v31, %v31 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
207 " vsrah %v1, %v5, %v25 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
208 " stvewx %v0, 0, %r4 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
209 " vsubshs %v12, %v18, %v30 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
210 " stvewx %v0, %r9, %r4 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
211 " vmhraddshs %v26, %v6, %v4, %v10 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
212 " vpkshus %v0, %v1, %v1 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
213 " add %r4, %r4, %r5 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
214 " vsrah %v5, %v12, %v25 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
215 " stvewx %v0, 0, %r4 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
216 " vsrah %v30, %v29, %v25 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
217 " stvewx %v0, %r9, %r4 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
218 " vsubshs %v10, %v28, %v27 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
219 " vpkshus %v0, %v15, %v15 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
220 " add %r4, %r4, %r5 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
221 " stvewx %v0, 0, %r4 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
222 " vsrah %v18, %v26, %v25 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
223 " stvewx %v0, %r9, %r4 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
224 " vsrah %v27, %v10, %v25 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
225 " vpkshus %v0, %v5, %v5 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
226 " add %r4, %r4, %r5 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
227 " stvewx %v0, 0, %r4 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
228 " stvewx %v0, %r9, %r4 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
229 " vpkshus %v0, %v30, %v30 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
230 " add %r4, %r4, %r5 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
231 " stvewx %v0, 0, %r4 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
232 " stvewx %v0, %r9, %r4 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
233 " vpkshus %v0, %v18, %v18 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
234 " add %r4, %r4, %r5 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
235 " stvewx %v0, 0, %r4 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
236 " stvewx %v0, %r9, %r4 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
237 " add %r4, %r4, %r5 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
238 " vpkshus %v0, %v27, %v27 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
239 " stvewx %v0, 0, %r4 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
240 " stvewx %v0, %r9, %r4 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
241
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
242 "# addi %r0, %r1, 128 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
243 "# bl _restv25 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
244 "# lwz %r0, 132(%r1) \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
245 "# mtlr %r0 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
246 "# la %r1, 128(%r1) \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
247
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
248 " vxor %v1, %v1, %v1 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
249 " addi %r9, %r3, 16 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
250 " stvx %v1, 0, %r3 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
251 " stvx %v1, 0, %r9 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
252 " addi %r11, %r3, 32 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
253 " stvx %v1, 0, %r11 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
254 " addi %r9, %r3, 48 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
255 " stvx %v1, 0, %r9 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
256 " addi %r11, %r3, -64 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
257 " stvx %v1, 0, %r11 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
258 " addi %r9, %r3, -48 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
259 " stvx %v1, 0, %r9 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
260 " addi %r11, %r3, -32 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
261 " stvx %v1, 0, %r11 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
262 " addi %r3, %r3, -16 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
263 " stvx %v1, 0, %r3 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
264 );
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
265 }
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
266
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
267 void mpeg2_idct_add_altivec (int last, int16_t * block,
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
268 uint8_t * dest, int stride)
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
269 {
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
270 asm (" \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
271 "# stwu %r1, -192(%r1) \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
272 "# mflr %r0 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
273 "# stw %r0, 196(%r1) \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
274 "# addi %r0, %r1, 192 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
275 "# bl _savev21 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
276
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
277 " addi %r9, %r4, 112 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
278 " vspltish %v21, 4 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
279 " vxor %v1, %v1, %v1 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
280 " lvx %v13, 0, %r9 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
281 " lis %r10, constants@ha \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
282 " vspltisw %v3, -1 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
283 " la %r10, constants@l(%r10) \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
284 " lvx %v5, 0, %r4 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
285 " addi %r9, %r4, 16 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
286 " lvx %v8, 0, %r10 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
287 " lvx %v12, 0, %r9 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
288 " addi %r11, %r10, 32 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
289 " lvx %v6, 0, %r11 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
290 " addi %r8, %r4, 48 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
291 " vslh %v13, %v13, %v21 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
292 " addi %r9, %r4, 80 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
293 " lvx %v11, 0, %r8 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
294 " vslh %v5, %v5, %v21 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
295 " lvx %v0, 0, %r9 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
296 " addi %r11, %r10, 64 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
297 " vsplth %v2, %v8, 2 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
298 " lvx %v7, 0, %r11 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
299 " vslh %v12, %v12, %v21 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
300 " addi %r9, %r4, 96 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
301 " vmhraddshs %v24, %v13, %v6, %v1 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
302 " addi %r8, %r4, 32 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
303 " vsplth %v17, %v8, 5 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
304 " lvx %v13, 0, %r9 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
305 " vslh %v11, %v11, %v21 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
306 " addi %r4, %r4, 64 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
307 " lvx %v10, 0, %r8 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
308 " vslh %v0, %v0, %v21 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
309 " addi %r9, %r10, 48 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
310 " vmhraddshs %v31, %v12, %v6, %v1 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
311 " lvx %v4, 0, %r9 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
312 " addi %r10, %r10, 16 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
313 " vmhraddshs %v26, %v0, %v7, %v1 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
314 " lvx %v9, 0, %r4 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
315 " vsplth %v16, %v8, 3 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
316 " vmhraddshs %v22, %v11, %v7, %v1 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
317 " lvx %v6, 0, %r10 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
318 " lvsl %v19, 0, %r5 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
319 " vsubshs %v12, %v1, %v24 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
320 " lvsl %v0, %r6, %r5 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
321 " vsplth %v11, %v8, 1 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
322 " vslh %v10, %v10, %v21 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
323 " vmrghb %v19, %v3, %v19 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
324 " lvx %v15, 0, %r5 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
325 " vslh %v13, %v13, %v21 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
326 " vmrghb %v3, %v3, %v0 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
327 " li %r9, 4 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
328 " vmhraddshs %v14, %v2, %v31, %v12 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
329 " vsplth %v7, %v8, 0 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
330 " vmhraddshs %v23, %v13, %v4, %v1 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
331 " vsplth %v18, %v8, 4 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
332 " vmhraddshs %v27, %v10, %v4, %v1 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
333 " vspltw %v8, %v8, 3 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
334 " vmhraddshs %v12, %v17, %v22, %v26 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
335 " vperm %v15, %v15, %v1, %v19 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
336 " vslh %v9, %v9, %v21 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
337 " vmhraddshs %v10, %v5, %v6, %v1 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
338 " vspltish %v21, 6 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
339 " vmhraddshs %v30, %v9, %v6, %v1 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
340 " vmhraddshs %v26, %v16, %v26, %v22 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
341 " vmhraddshs %v24, %v2, %v24, %v31 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
342 " vmhraddshs %v31, %v11, %v23, %v27 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
343 " vsubshs %v0, %v1, %v23 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
344 " vaddshs %v23, %v14, %v12 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
345 " vmhraddshs %v9, %v11, %v27, %v0 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
346 " vsubshs %v12, %v14, %v12 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
347 " vaddshs %v6, %v10, %v30 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
348 " vsubshs %v14, %v24, %v26 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
349 " vaddshs %v24, %v24, %v26 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
350 " vsubshs %v13, %v10, %v30 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
351 " vaddshs %v26, %v6, %v31 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
352 " vsubshs %v31, %v6, %v31 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
353 " vaddshs %v6, %v13, %v9 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
354 " vsubshs %v13, %v13, %v9 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
355 " vsubshs %v9, %v14, %v12 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
356 " vaddshs %v12, %v14, %v12 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
357 " vmhraddshs %v30, %v7, %v9, %v13 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
358 " vmhraddshs %v25, %v18, %v12, %v6 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
359 " vmhraddshs %v28, %v18, %v9, %v13 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
360 " vmhraddshs %v29, %v7, %v12, %v6 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
361 " vaddshs %v10, %v26, %v24 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
362 " vsubshs %v5, %v31, %v23 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
363 " vsubshs %v13, %v26, %v24 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
364 " vaddshs %v4, %v31, %v23 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
365 " vmrglh %v26, %v30, %v25 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
366 " vmrglh %v31, %v10, %v5 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
367 " vmrglh %v22, %v29, %v28 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
368 " vmrghh %v30, %v30, %v25 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
369 " vmrglh %v24, %v4, %v13 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
370 " vmrghh %v10, %v10, %v5 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
371 " vmrghh %v23, %v4, %v13 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
372 " vmrghh %v27, %v29, %v28 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
373 " vmrglh %v29, %v10, %v30 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
374 " vmrglh %v4, %v31, %v26 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
375 " vmrglh %v13, %v22, %v24 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
376 " vmrghh %v10, %v10, %v30 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
377 " vmrghh %v25, %v22, %v24 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
378 " vmrglh %v24, %v4, %v13 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
379 " vmrghh %v5, %v27, %v23 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
380 " vmrglh %v28, %v27, %v23 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
381 " vsubshs %v0, %v1, %v24 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
382 " vmrghh %v30, %v31, %v26 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
383 " vmrglh %v31, %v10, %v5 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
384 " vmrglh %v26, %v30, %v25 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
385 " vmrglh %v22, %v29, %v28 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
386 " vmhraddshs %v14, %v2, %v31, %v0 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
387 " vmrghh %v23, %v4, %v13 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
388 " vmhraddshs %v24, %v2, %v24, %v31 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
389 " vmhraddshs %v12, %v17, %v22, %v26 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
390 " vmrghh %v27, %v29, %v28 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
391 " vmhraddshs %v26, %v16, %v26, %v22 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
392 " vmrghh %v0, %v10, %v5 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
393 " vmhraddshs %v31, %v11, %v23, %v27 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
394 " vmrghh %v30, %v30, %v25 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
395 " vsubshs %v13, %v1, %v23 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
396 " vaddshs %v10, %v0, %v8 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
397 " vaddshs %v23, %v14, %v12 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
398 " vsubshs %v12, %v14, %v12 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
399 " vaddshs %v6, %v10, %v30 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
400 " vsubshs %v14, %v24, %v26 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
401 " vmhraddshs %v9, %v11, %v27, %v13 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
402 " vaddshs %v24, %v24, %v26 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
403 " vaddshs %v26, %v6, %v31 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
404 " vsubshs %v13, %v10, %v30 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
405 " vaddshs %v10, %v26, %v24 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
406 " vsubshs %v31, %v6, %v31 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
407 " vaddshs %v6, %v13, %v9 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
408 " vsrah %v10, %v10, %v21 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
409 " vsubshs %v13, %v13, %v9 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
410 " vaddshs %v0, %v15, %v10 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
411 " vsubshs %v9, %v14, %v12 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
412 " vaddshs %v12, %v14, %v12 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
413 " vpkshus %v15, %v0, %v0 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
414 " stvewx %v15, 0, %r5 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
415 " vaddshs %v4, %v31, %v23 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
416 " vmhraddshs %v29, %v7, %v12, %v6 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
417 " stvewx %v15, %r9, %r5 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
418 " add %r5, %r5, %r6 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
419 " vsubshs %v5, %v31, %v23 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
420 " lvx %v15, 0, %r5 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
421 " vmhraddshs %v30, %v7, %v9, %v13 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
422 " vsrah %v22, %v4, %v21 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
423 " vperm %v15, %v15, %v1, %v3 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
424 " vmhraddshs %v28, %v18, %v9, %v13 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
425 " vsrah %v31, %v29, %v21 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
426 " vsubshs %v13, %v26, %v24 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
427 " vaddshs %v0, %v15, %v31 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
428 " vsrah %v27, %v30, %v21 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
429 " vpkshus %v15, %v0, %v0 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
430 " vsrah %v30, %v5, %v21 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
431 " stvewx %v15, 0, %r5 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
432 " vsrah %v26, %v28, %v21 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
433 " stvewx %v15, %r9, %r5 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
434 " vmhraddshs %v25, %v18, %v12, %v6 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
435 " add %r5, %r5, %r6 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
436 " vsrah %v24, %v13, %v21 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
437 " lvx %v15, 0, %r5 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
438 " vperm %v15, %v15, %v1, %v19 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
439 " vsrah %v23, %v25, %v21 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
440 " vaddshs %v0, %v15, %v27 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
441 " vpkshus %v15, %v0, %v0 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
442 " stvewx %v15, 0, %r5 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
443 " stvewx %v15, %r9, %r5 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
444 " add %r5, %r5, %r6 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
445 " lvx %v15, 0, %r5 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
446 " vperm %v15, %v15, %v1, %v3 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
447 " vaddshs %v0, %v15, %v22 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
448 " vpkshus %v15, %v0, %v0 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
449 " stvewx %v15, 0, %r5 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
450 " stvewx %v15, %r9, %r5 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
451 " add %r5, %r5, %r6 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
452 " lvx %v15, 0, %r5 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
453 " vperm %v15, %v15, %v1, %v19 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
454 " vaddshs %v0, %v15, %v30 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
455 " vpkshus %v15, %v0, %v0 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
456 " stvewx %v15, 0, %r5 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
457 " stvewx %v15, %r9, %r5 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
458 " add %r5, %r5, %r6 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
459 " lvx %v15, 0, %r5 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
460 " vperm %v15, %v15, %v1, %v3 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
461 " vaddshs %v0, %v15, %v26 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
462 " vpkshus %v15, %v0, %v0 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
463 " stvewx %v15, 0, %r5 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
464 " stvewx %v15, %r9, %r5 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
465 " add %r5, %r5, %r6 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
466 " lvx %v15, 0, %r5 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
467 " vperm %v15, %v15, %v1, %v19 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
468 " vaddshs %v0, %v15, %v23 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
469 " vpkshus %v15, %v0, %v0 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
470 " stvewx %v15, 0, %r5 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
471 " stvewx %v15, %r9, %r5 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
472 " add %r5, %r5, %r6 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
473 " lvx %v15, 0, %r5 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
474 " vperm %v15, %v15, %v1, %v3 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
475 " vaddshs %v0, %v15, %v24 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
476 " vpkshus %v15, %v0, %v0 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
477 " stvewx %v15, 0, %r5 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
478 " stvewx %v15, %r9, %r5 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
479
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
480 "# addi %r0, %r1, 192 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
481 "# bl _restv21 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
482 "# lwz %r0, 196(%r1) \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
483 "# mtlr %r0 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
484 "# la %r1, 192(%r1) \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
485
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
486 " addi %r9, %r4, 16 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
487 " stvx %v1, 0, %r4 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
488 " stvx %v1, 0, %r9 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
489 " addi %r11, %r4, 32 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
490 " stvx %v1, 0, %r11 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
491 " addi %r9, %r4, 48 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
492 " stvx %v1, 0, %r9 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
493 " addi %r11, %r4, -64 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
494 " stvx %v1, 0, %r11 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
495 " addi %r9, %r4, -48 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
496 " stvx %v1, 0, %r9 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
497 " addi %r11, %r4, -32 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
498 " stvx %v1, 0, %r11 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
499 " addi %r4, %r4, -16 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
500 " stvx %v1, 0, %r4 \n"
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
501 );
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
502 }
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
503
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
504 void mpeg2_idct_altivec_init (void)
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
505 {
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
506 extern uint8_t mpeg2_scan_norm[64];
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
507 extern uint8_t mpeg2_scan_alt[64];
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
508 int i, j;
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
509
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
510 i = constants[0][0]; /* just pretending - keeps gcc happy */
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
511
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
512 /* the altivec idct uses a transposed input, so we patch scan tables */
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
513 for (i = 0; i < 64; i++) {
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
514 j = mpeg2_scan_norm[i];
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
515 mpeg2_scan_norm[i] = (j >> 3) | ((j & 7) << 3);
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
516 j = mpeg2_scan_alt[i];
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
517 mpeg2_scan_alt[i] = (j >> 3) | ((j & 7) << 3);
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
518 }
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
519 }
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
520
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
521 #endif /* ARCH_PPC */
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
522
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
523 #else /* __ALTIVEC__ */
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
524
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
525 #define vector_s16_t vector signed short
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
526 #define vector_u16_t vector unsigned short
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
527 #define vector_s8_t vector signed char
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
528 #define vector_u8_t vector unsigned char
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
529 #define vector_s32_t vector signed int
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
530 #define vector_u32_t vector unsigned int
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
531
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
532 #define IDCT_HALF \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
533 /* 1st stage */ \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
534 t1 = vec_mradds (a1, vx7, vx1 ); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
535 t8 = vec_mradds (a1, vx1, vec_subs (zero, vx7)); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
536 t7 = vec_mradds (a2, vx5, vx3); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
537 t3 = vec_mradds (ma2, vx3, vx5); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
538 \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
539 /* 2nd stage */ \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
540 t5 = vec_adds (vx0, vx4); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
541 t0 = vec_subs (vx0, vx4); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
542 t2 = vec_mradds (a0, vx6, vx2); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
543 t4 = vec_mradds (a0, vx2, vec_subs (zero, vx6)); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
544 t6 = vec_adds (t8, t3); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
545 t3 = vec_subs (t8, t3); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
546 t8 = vec_subs (t1, t7); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
547 t1 = vec_adds (t1, t7); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
548 \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
549 /* 3rd stage */ \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
550 t7 = vec_adds (t5, t2); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
551 t2 = vec_subs (t5, t2); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
552 t5 = vec_adds (t0, t4); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
553 t0 = vec_subs (t0, t4); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
554 t4 = vec_subs (t8, t3); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
555 t3 = vec_adds (t8, t3); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
556 \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
557 /* 4th stage */ \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
558 vy0 = vec_adds (t7, t1); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
559 vy7 = vec_subs (t7, t1); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
560 vy1 = vec_mradds (c4, t3, t5); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
561 vy6 = vec_mradds (mc4, t3, t5); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
562 vy2 = vec_mradds (c4, t4, t0); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
563 vy5 = vec_mradds (mc4, t4, t0); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
564 vy3 = vec_adds (t2, t6); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
565 vy4 = vec_subs (t2, t6);
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
566
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
567 #define IDCT \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
568 vector_s16_t vx0, vx1, vx2, vx3, vx4, vx5, vx6, vx7; \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
569 vector_s16_t vy0, vy1, vy2, vy3, vy4, vy5, vy6, vy7; \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
570 vector_s16_t a0, a1, a2, ma2, c4, mc4, zero, bias; \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
571 vector_s16_t t0, t1, t2, t3, t4, t5, t6, t7, t8; \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
572 vector_u16_t shift; \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
573 \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
574 c4 = vec_splat (constants[0], 0); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
575 a0 = vec_splat (constants[0], 1); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
576 a1 = vec_splat (constants[0], 2); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
577 a2 = vec_splat (constants[0], 3); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
578 mc4 = vec_splat (constants[0], 4); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
579 ma2 = vec_splat (constants[0], 5); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
580 bias = (vector_s16_t)vec_splat ((vector_s32_t)constants[0], 3); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
581 \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
582 zero = vec_splat_s16 (0); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
583 shift = vec_splat_u16 (4); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
584 \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
585 vx0 = vec_mradds (vec_sl (block[0], shift), constants[1], zero); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
586 vx1 = vec_mradds (vec_sl (block[1], shift), constants[2], zero); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
587 vx2 = vec_mradds (vec_sl (block[2], shift), constants[3], zero); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
588 vx3 = vec_mradds (vec_sl (block[3], shift), constants[4], zero); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
589 vx4 = vec_mradds (vec_sl (block[4], shift), constants[1], zero); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
590 vx5 = vec_mradds (vec_sl (block[5], shift), constants[4], zero); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
591 vx6 = vec_mradds (vec_sl (block[6], shift), constants[3], zero); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
592 vx7 = vec_mradds (vec_sl (block[7], shift), constants[2], zero); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
593 \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
594 IDCT_HALF \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
595 \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
596 vx0 = vec_mergeh (vy0, vy4); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
597 vx1 = vec_mergel (vy0, vy4); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
598 vx2 = vec_mergeh (vy1, vy5); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
599 vx3 = vec_mergel (vy1, vy5); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
600 vx4 = vec_mergeh (vy2, vy6); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
601 vx5 = vec_mergel (vy2, vy6); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
602 vx6 = vec_mergeh (vy3, vy7); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
603 vx7 = vec_mergel (vy3, vy7); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
604 \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
605 vy0 = vec_mergeh (vx0, vx4); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
606 vy1 = vec_mergel (vx0, vx4); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
607 vy2 = vec_mergeh (vx1, vx5); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
608 vy3 = vec_mergel (vx1, vx5); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
609 vy4 = vec_mergeh (vx2, vx6); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
610 vy5 = vec_mergel (vx2, vx6); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
611 vy6 = vec_mergeh (vx3, vx7); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
612 vy7 = vec_mergel (vx3, vx7); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
613 \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
614 vx0 = vec_adds (vec_mergeh (vy0, vy4), bias); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
615 vx1 = vec_mergel (vy0, vy4); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
616 vx2 = vec_mergeh (vy1, vy5); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
617 vx3 = vec_mergel (vy1, vy5); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
618 vx4 = vec_mergeh (vy2, vy6); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
619 vx5 = vec_mergel (vy2, vy6); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
620 vx6 = vec_mergeh (vy3, vy7); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
621 vx7 = vec_mergel (vy3, vy7); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
622 \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
623 IDCT_HALF \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
624 \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
625 shift = vec_splat_u16 (6); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
626 vx0 = vec_sra (vy0, shift); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
627 vx1 = vec_sra (vy1, shift); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
628 vx2 = vec_sra (vy2, shift); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
629 vx3 = vec_sra (vy3, shift); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
630 vx4 = vec_sra (vy4, shift); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
631 vx5 = vec_sra (vy5, shift); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
632 vx6 = vec_sra (vy6, shift); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
633 vx7 = vec_sra (vy7, shift);
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
634
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
635 static const vector_s16_t constants[5] = {
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
636 (vector_s16_t)(23170, 13573, 6518, 21895, -23170, -21895, 32, 31),
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
637 (vector_s16_t)(16384, 22725, 21407, 19266, 16384, 19266, 21407, 22725),
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
638 (vector_s16_t)(22725, 31521, 29692, 26722, 22725, 26722, 29692, 31521),
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
639 (vector_s16_t)(21407, 29692, 27969, 25172, 21407, 25172, 27969, 29692),
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
640 (vector_s16_t)(19266, 26722, 25172, 22654, 19266, 22654, 25172, 26722)
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
641 };
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
642
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
643 void mpeg2_idct_copy_altivec (vector_s16_t * const block, unsigned char * dest,
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
644 const int stride)
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
645 {
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
646 vector_u8_t tmp;
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
647
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
648 IDCT
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
649
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
650 #define COPY(dest,src) \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
651 tmp = vec_packsu (src, src); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
652 vec_ste ((vector_u32_t)tmp, 0, (unsigned int *)dest); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
653 vec_ste ((vector_u32_t)tmp, 4, (unsigned int *)dest);
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
654
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
655 COPY (dest, vx0) dest += stride;
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
656 COPY (dest, vx1) dest += stride;
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
657 COPY (dest, vx2) dest += stride;
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
658 COPY (dest, vx3) dest += stride;
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
659 COPY (dest, vx4) dest += stride;
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
660 COPY (dest, vx5) dest += stride;
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
661 COPY (dest, vx6) dest += stride;
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
662 COPY (dest, vx7)
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
663
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
664 memset (block, 0, 64 * sizeof (signed short));
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
665 }
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
666
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
667 void mpeg2_idct_add_altivec (const int last, vector_s16_t * const block,
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
668 unsigned char * dest, const int stride)
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
669 {
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
670 vector_u8_t tmp;
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
671 vector_s16_t tmp2, tmp3;
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
672 vector_u8_t perm0;
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
673 vector_u8_t perm1;
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
674 vector_u8_t p0, p1, p;
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
675
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
676 IDCT
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
677
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
678 p0 = vec_lvsl (0, dest);
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
679 p1 = vec_lvsl (stride, dest);
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
680 p = vec_splat_u8 (-1);
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
681 perm0 = vec_mergeh (p, p0);
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
682 perm1 = vec_mergeh (p, p1);
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
683
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
684 #define ADD(dest,src,perm) \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
685 /* *(uint64_t *)&tmp = *(uint64_t *)dest; */ \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
686 tmp = vec_ld (0, dest); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
687 tmp2 = (vector_s16_t)vec_perm (tmp, (vector_u8_t)zero, perm); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
688 tmp3 = vec_adds (tmp2, src); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
689 tmp = vec_packsu (tmp3, tmp3); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
690 vec_ste ((vector_u32_t)tmp, 0, (unsigned int *)dest); \
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
691 vec_ste ((vector_u32_t)tmp, 4, (unsigned int *)dest);
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
692
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
693 ADD (dest, vx0, perm0) dest += stride;
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
694 ADD (dest, vx1, perm1) dest += stride;
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
695 ADD (dest, vx2, perm0) dest += stride;
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
696 ADD (dest, vx3, perm1) dest += stride;
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
697 ADD (dest, vx4, perm0) dest += stride;
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
698 ADD (dest, vx5, perm1) dest += stride;
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
699 ADD (dest, vx6, perm0) dest += stride;
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
700 ADD (dest, vx7, perm1)
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
701
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
702 memset (block, 0, 64 * sizeof (signed short));
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
703 }
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
704
89b48bc6c441 Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents:
diff changeset
705 #endif /* __ALTIVEC__ */