Merge branch 'plugin-move-opus'
[platform/upstream/gstreamer.git] / gst / adder / gstadderorc.orc
1 .function adder_orc_add_s32
2 .dest 4 d1 gint32
3 .source 4 s1 gint32
4
5 addssl d1, d1, s1
6
7
8 .function adder_orc_add_s16
9 .dest 2 d1 gint16
10 .source 2 s1 gint16
11
12 addssw d1, d1, s1
13
14
15 .function adder_orc_add_s8
16 .dest 1 d1 gint8
17 .source 1 s1 gint8
18
19 addssb d1, d1, s1
20
21
22 .function adder_orc_add_u32
23 .dest 4 d1 guint32
24 .source 4 s1 guint32
25
26 addusl d1, d1, s1
27
28
29 .function adder_orc_add_u16
30 .dest 2 d1 guint16
31 .source 2 s1 guint16
32
33 addusw d1, d1, s1
34
35
36 .function adder_orc_add_u8
37 .dest 1 d1 guint8
38 .source 1 s1 guint8
39
40 addusb d1, d1, s1
41
42
43 .function adder_orc_add_f32
44 .dest 4 d1 float
45 .source 4 s1 float
46
47 addf d1, d1, s1
48
49 .function adder_orc_add_f64
50 .dest 8 d1 double
51 .source 8 s1 double
52
53 addd d1, d1, s1
54
55
56 .function adder_orc_volume_u8
57 .dest 1 d1 guint8
58 .param 1 p1
59 .const 1 c1 0x80
60 .temp 2 t1
61 .temp 1 t2
62
63 xorb t2, d1, c1
64 mulsbw t1, t2, p1
65 shrsw t1, t1, 3
66 convssswb t2, t1
67 xorb d1, t2, c1
68
69
70 .function adder_orc_volume_s8
71 .dest 1 d1 gint8
72 .param 1 p1
73 .temp 2 t1
74
75 mulsbw t1, d1, p1
76 shrsw t1, t1, 3
77 convssswb d1, t1
78
79
80 .function adder_orc_volume_u16
81 .dest 2 d1 guint16
82 .param 2 p1
83 .const 2 c1 0x8000
84 .temp 4 t1
85 .temp 2 t2
86
87 xorw t2, d1, c1
88 mulswl t1, t2, p1
89 shrsl t1, t1, 11
90 convssslw t2, t1
91 xorw d1, t2, c1
92
93
94 .function adder_orc_volume_s16
95 .dest 2 d1 gint16
96 .param 2 p1
97 .temp 4 t1
98
99 mulswl t1, d1, p1
100 shrsl t1, t1, 11
101 convssslw d1, t1
102
103
104 .function adder_orc_volume_u32
105 .dest 4 d1 guint32
106 .param 4 p1
107 .const 4 c1 0x80000000
108 .temp 8 t1
109 .temp 4 t2
110
111 xorl t2, d1, c1
112 mulslq t1, t2, p1
113 shrsq t1, t1, 27
114 convsssql t2, t1
115 xorl d1, t2, c1
116
117
118 .function adder_orc_volume_s32
119 .dest 4 d1 gint32
120 .param 4 p1
121 .temp 8 t1
122
123 mulslq t1, d1, p1
124 shrsq t1, t1, 27
125 convsssql d1, t1
126
127 .function adder_orc_volume_f32
128 .dest 4 d1 float
129 .floatparam 4 p1
130
131 mulf d1, d1, p1
132
133
134 .function adder_orc_volume_f64
135 .dest 8 d1 double
136 .doubleparam 8 p1
137
138 muld d1, d1, p1
139
140
141 .function adder_orc_add_volume_u8
142 .dest 1 d1 guint8
143 .source 1 s1 guint8
144 .param 1 p1
145 .const 1 c1 0x80
146 .temp 2 t1
147 .temp 1 t2
148
149 xorb t2, s1, c1
150 mulsbw t1, t2, p1
151 shrsw t1, t1, 3
152 convssswb t2, t1
153 xorb t2, t2, c1
154 addusb d1, d1, t2
155
156
157 .function adder_orc_add_volume_s8
158 .dest 1 d1 gint8
159 .source 1 s1 gint8
160 .param 1 p1
161 .temp 2 t1
162 .temp 1 t2
163
164 mulsbw t1, s1, p1
165 shrsw t1, t1, 3
166 convssswb t2, t1
167 addssb d1, d1, t2
168
169
170 .function adder_orc_add_volume_u16
171 .dest 2 d1 guint16
172 .source 2 s1 guint16
173 .param 2 p1
174 .const 2 c1 0x8000
175 .temp 4 t1
176 .temp 2 t2
177
178 xorw t2, s1, c1
179 mulswl t1, t2, p1
180 shrsl t1, t1, 11
181 convssslw t2, t1
182 xorw t2, t2, c1
183 addusw d1, d1, t2
184
185
186 .function adder_orc_add_volume_s16
187 .dest 2 d1 gint16
188 .source 2 s1 gint16
189 .param 2 p1
190 .temp 4 t1
191 .temp 2 t2
192
193 mulswl t1, s1, p1
194 shrsl t1, t1, 11
195 convssslw t2, t1
196 addssw d1, d1, t2
197
198
199 .function adder_orc_add_volume_u32
200 .dest 4 d1 guint32
201 .source 4 s1 guint32
202 .param 4 p1
203 .const 4 c1 0x80000000
204 .temp 8 t1
205 .temp 4 t2
206
207 xorl t2, s1, c1
208 mulslq t1, t2, p1
209 shrsq t1, t1, 27
210 convsssql t2, t1
211 xorl t2, t2, c1
212 addusl d1, d1, t2
213
214
215 .function adder_orc_add_volume_s32
216 .dest 4 d1 gint32
217 .source 4 s1 gint32
218 .param 4 p1
219 .temp 8 t1
220 .temp 4 t2
221
222 mulslq t1, s1, p1
223 shrsq t1, t1, 27
224 convsssql t2, t1
225 addssl d1, d1, t2
226
227
228 .function adder_orc_add_volume_f32
229 .dest 4 d1 float
230 .source 4 s1 float
231 .floatparam 4 p1
232 .temp 4 t1
233
234 mulf t1, s1, p1
235 addf d1, d1, t1
236
237
238 .function adder_orc_add_volume_f64
239 .dest 8 d1 double
240 .source 8 s1 double
241 .doubleparam 8 p1
242 .temp 8 t1
243
244 muld t1, s1, p1
245 addd d1, d1, t1
246
247