1
2 /* autogenerated from gstaudiopack.orc */
3
4 #ifdef HAVE_CONFIG_H
5 #include "config.h"
6 #endif
7 #include <glib.h>
8
9 #ifndef _ORC_INTEGER_TYPEDEFS_
10 #define _ORC_INTEGER_TYPEDEFS_
11 #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
12 #include <stdint.h>
13 typedef int8_t orc_int8;
14 typedef int16_t orc_int16;
15 typedef int32_t orc_int32;
16 typedef int64_t orc_int64;
17 typedef uint8_t orc_uint8;
18 typedef uint16_t orc_uint16;
19 typedef uint32_t orc_uint32;
20 typedef uint64_t orc_uint64;
21 #define ORC_UINT64_C(x) UINT64_C(x)
22 #elif defined(_MSC_VER)
23 typedef signed __int8 orc_int8;
24 typedef signed __int16 orc_int16;
25 typedef signed __int32 orc_int32;
26 typedef signed __int64 orc_int64;
27 typedef unsigned __int8 orc_uint8;
28 typedef unsigned __int16 orc_uint16;
29 typedef unsigned __int32 orc_uint32;
30 typedef unsigned __int64 orc_uint64;
31 #define ORC_UINT64_C(x) (x##Ui64)
32 #define inline __inline
33 #else
34 #include <limits.h>
35 typedef signed char orc_int8;
36 typedef short orc_int16;
37 typedef int orc_int32;
38 typedef unsigned char orc_uint8;
39 typedef unsigned short orc_uint16;
40 typedef unsigned int orc_uint32;
41 #if INT_MAX == LONG_MAX
42 typedef long long orc_int64;
43 typedef unsigned long long orc_uint64;
44 #define ORC_UINT64_C(x) (x##ULL)
45 #else
46 typedef long orc_int64;
47 typedef unsigned long orc_uint64;
48 #define ORC_UINT64_C(x) (x##UL)
49 #endif
50 #endif
51 typedef union
52 {
53 orc_int16 i;
54 orc_int8 x2[2];
55 } orc_union16;
56 typedef union
57 {
58 orc_int32 i;
59 float f;
60 orc_int16 x2[2];
61 orc_int8 x4[4];
62 } orc_union32;
63 typedef union
64 {
65 orc_int64 i;
66 double f;
67 orc_int32 x2[2];
68 float x2f[2];
69 orc_int16 x4[4];
70 } orc_union64;
71 #endif
72 #ifndef ORC_RESTRICT
73 #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
74 #define ORC_RESTRICT restrict
75 #elif defined(__GNUC__) && __GNUC__ >= 4
76 #define ORC_RESTRICT __restrict__
77 #else
78 #define ORC_RESTRICT
79 #endif
80 #endif
81
82 #ifndef ORC_INTERNAL
83 #if defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)
84 #define ORC_INTERNAL __attribute__((visibility("hidden")))
85 #elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
86 #define ORC_INTERNAL __hidden
87 #elif defined (__GNUC__)
88 #define ORC_INTERNAL __attribute__((visibility("hidden")))
89 #else
90 #define ORC_INTERNAL
91 #endif
92 #endif
93
94
95 #ifndef DISABLE_ORC
96 #include <orc/orc.h>
97 #endif
98 void audio_orc_unpack_u8 (gint32 * ORC_RESTRICT d1,
99 const guint8 * ORC_RESTRICT s1, int n);
100 void audio_orc_unpack_u8_trunc (gint32 * ORC_RESTRICT d1,
101 const guint8 * ORC_RESTRICT s1, int n);
102 void audio_orc_unpack_s8 (gint32 * ORC_RESTRICT d1,
103 const guint8 * ORC_RESTRICT s1, int n);
104 void audio_orc_unpack_s8_trunc (gint32 * ORC_RESTRICT d1,
105 const guint8 * ORC_RESTRICT s1, int n);
106 void audio_orc_unpack_u16 (gint32 * ORC_RESTRICT d1,
107 const guint8 * ORC_RESTRICT s1, int n);
108 void audio_orc_unpack_u16_trunc (gint32 * ORC_RESTRICT d1,
109 const guint8 * ORC_RESTRICT s1, int n);
110 void audio_orc_unpack_s16 (gint32 * ORC_RESTRICT d1,
111 const guint8 * ORC_RESTRICT s1, int n);
112 void audio_orc_unpack_s16_trunc (gint32 * ORC_RESTRICT d1,
113 const guint8 * ORC_RESTRICT s1, int n);
114 void audio_orc_unpack_u16_swap (gint32 * ORC_RESTRICT d1,
115 const guint8 * ORC_RESTRICT s1, int n);
116 void audio_orc_unpack_u16_swap_trunc (gint32 * ORC_RESTRICT d1,
117 const guint8 * ORC_RESTRICT s1, int n);
118 void audio_orc_unpack_s16_swap (gint32 * ORC_RESTRICT d1,
119 const guint8 * ORC_RESTRICT s1, int n);
120 void audio_orc_unpack_s16_swap_trunc (gint32 * ORC_RESTRICT d1,
121 const guint8 * ORC_RESTRICT s1, int n);
122 void audio_orc_unpack_u24_32 (gint32 * ORC_RESTRICT d1,
123 const guint8 * ORC_RESTRICT s1, int n);
124 void audio_orc_unpack_s24_32 (gint32 * ORC_RESTRICT d1,
125 const guint8 * ORC_RESTRICT s1, int n);
126 void audio_orc_unpack_u24_32_swap (gint32 * ORC_RESTRICT d1,
127 const guint8 * ORC_RESTRICT s1, int n);
128 void audio_orc_unpack_s24_32_swap (gint32 * ORC_RESTRICT d1,
129 const guint8 * ORC_RESTRICT s1, int n);
130 void audio_orc_unpack_u32 (gint32 * ORC_RESTRICT d1,
131 const guint8 * ORC_RESTRICT s1, int n);
132 void audio_orc_unpack_u32_swap (gint32 * ORC_RESTRICT d1,
133 const guint8 * ORC_RESTRICT s1, int n);
134 void audio_orc_unpack_s32 (gint32 * ORC_RESTRICT d1,
135 const guint8 * ORC_RESTRICT s1, int n);
136 void audio_orc_unpack_s32_swap (gint32 * ORC_RESTRICT d1,
137 const guint8 * ORC_RESTRICT s1, int n);
138 void audio_orc_unpack_f32 (gdouble * ORC_RESTRICT d1,
139 const gfloat * ORC_RESTRICT s1, int n);
140 void audio_orc_unpack_f32_swap (gdouble * ORC_RESTRICT d1,
141 const gfloat * ORC_RESTRICT s1, int n);
142 void audio_orc_unpack_f64 (gdouble * ORC_RESTRICT d1,
143 const gdouble * ORC_RESTRICT s1, int n);
144 void audio_orc_unpack_f64_swap (gdouble * ORC_RESTRICT d1,
145 const gdouble * ORC_RESTRICT s1, int n);
146 void audio_orc_pack_u8 (guint8 * ORC_RESTRICT d1,
147 const gint32 * ORC_RESTRICT s1, int n);
148 void audio_orc_pack_s8 (guint8 * ORC_RESTRICT d1,
149 const gint32 * ORC_RESTRICT s1, int n);
150 void audio_orc_pack_u16 (guint8 * ORC_RESTRICT d1,
151 const gint32 * ORC_RESTRICT s1, int n);
152 void audio_orc_pack_s16 (guint8 * ORC_RESTRICT d1,
153 const gint32 * ORC_RESTRICT s1, int n);
154 void audio_orc_pack_u16_swap (guint8 * ORC_RESTRICT d1,
155 const gint32 * ORC_RESTRICT s1, int n);
156 void audio_orc_pack_s16_swap (guint8 * ORC_RESTRICT d1,
157 const gint32 * ORC_RESTRICT s1, int n);
158 void audio_orc_pack_u24_32 (guint8 * ORC_RESTRICT d1,
159 const gint32 * ORC_RESTRICT s1, int n);
160 void audio_orc_pack_s24_32 (guint8 * ORC_RESTRICT d1,
161 const gint32 * ORC_RESTRICT s1, int n);
162 void audio_orc_pack_u24_32_swap (guint8 * ORC_RESTRICT d1,
163 const gint32 * ORC_RESTRICT s1, int n);
164 void audio_orc_pack_s24_32_swap (guint8 * ORC_RESTRICT d1,
165 const gint32 * ORC_RESTRICT s1, int n);
166 void audio_orc_pack_u32 (guint8 * ORC_RESTRICT d1,
167 const gint32 * ORC_RESTRICT s1, int n);
168 void audio_orc_pack_s32 (guint8 * ORC_RESTRICT d1,
169 const gint32 * ORC_RESTRICT s1, int n);
170 void audio_orc_pack_u32_swap (guint8 * ORC_RESTRICT d1,
171 const gint32 * ORC_RESTRICT s1, int n);
172 void audio_orc_pack_s32_swap (guint8 * ORC_RESTRICT d1,
173 const gint32 * ORC_RESTRICT s1, int n);
174 void audio_orc_pack_f32 (gfloat * ORC_RESTRICT d1,
175 const gdouble * ORC_RESTRICT s1, int n);
176 void audio_orc_pack_f32_swap (gfloat * ORC_RESTRICT d1,
177 const gdouble * ORC_RESTRICT s1, int n);
178 void audio_orc_pack_f64 (gdouble * ORC_RESTRICT d1,
179 const gdouble * ORC_RESTRICT s1, int n);
180 void audio_orc_pack_f64_swap (gdouble * ORC_RESTRICT d1,
181 const gdouble * ORC_RESTRICT s1, int n);
182 void audio_orc_splat_u16 (guint16 * ORC_RESTRICT d1, int p1, int n);
183 void audio_orc_splat_u32 (guint32 * ORC_RESTRICT d1, int p1, int n);
184 void audio_orc_splat_u64 (guint64 * ORC_RESTRICT d1, int p1, int n);
185 void audio_orc_int_bias (gint32 * ORC_RESTRICT d1,
186 const gint32 * ORC_RESTRICT s1, int p1, int p2, int n);
187 void audio_orc_int_dither (gint32 * ORC_RESTRICT d1,
188 const gint32 * ORC_RESTRICT s1, const gint32 * ORC_RESTRICT s2, int p1,
189 int n);
190 void audio_orc_update_rand (guint32 * ORC_RESTRICT d1, int n);
191 void audio_orc_s32_to_double (gdouble * ORC_RESTRICT d1,
192 const gint32 * ORC_RESTRICT s1, int n);
193 void audio_orc_double_to_s32 (gint32 * ORC_RESTRICT d1,
194 const gdouble * ORC_RESTRICT s1, int n);
195
196
197 /* begin Orc C target preamble */
198 #define ORC_CLAMP(x,a,b) ((x)<(a) ? (a) : ((x)>(b) ? (b) : (x)))
199 #define ORC_ABS(a) ((a)<0 ? -(a) : (a))
200 #define ORC_MIN(a,b) ((a)<(b) ? (a) : (b))
201 #define ORC_MAX(a,b) ((a)>(b) ? (a) : (b))
202 #define ORC_SB_MAX 127
203 #define ORC_SB_MIN (-1-ORC_SB_MAX)
204 #define ORC_UB_MAX (orc_uint8) 255
205 #define ORC_UB_MIN 0
206 #define ORC_SW_MAX 32767
207 #define ORC_SW_MIN (-1-ORC_SW_MAX)
208 #define ORC_UW_MAX (orc_uint16)65535
209 #define ORC_UW_MIN 0
210 #define ORC_SL_MAX 2147483647
211 #define ORC_SL_MIN (-1-ORC_SL_MAX)
212 #define ORC_UL_MAX 4294967295U
213 #define ORC_UL_MIN 0
214 #define ORC_CLAMP_SB(x) ORC_CLAMP(x,ORC_SB_MIN,ORC_SB_MAX)
215 #define ORC_CLAMP_UB(x) ORC_CLAMP(x,ORC_UB_MIN,ORC_UB_MAX)
216 #define ORC_CLAMP_SW(x) ORC_CLAMP(x,ORC_SW_MIN,ORC_SW_MAX)
217 #define ORC_CLAMP_UW(x) ORC_CLAMP(x,ORC_UW_MIN,ORC_UW_MAX)
218 #define ORC_CLAMP_SL(x) ORC_CLAMP(x,ORC_SL_MIN,ORC_SL_MAX)
219 #define ORC_CLAMP_UL(x) ORC_CLAMP(x,ORC_UL_MIN,ORC_UL_MAX)
220 #define ORC_SWAP_W(x) ((((x)&0xffU)<<8) | (((x)&0xff00U)>>8))
221 #define ORC_SWAP_L(x) ((((x)&0xffU)<<24) | (((x)&0xff00U)<<8) | (((x)&0xff0000U)>>8) | (((x)&0xff000000U)>>24))
222 #define ORC_SWAP_Q(x) ((((x)&ORC_UINT64_C(0xff))<<56) | (((x)&ORC_UINT64_C(0xff00))<<40) | (((x)&ORC_UINT64_C(0xff0000))<<24) | (((x)&ORC_UINT64_C(0xff000000))<<8) | (((x)&ORC_UINT64_C(0xff00000000))>>8) | (((x)&ORC_UINT64_C(0xff0000000000))>>24) | (((x)&ORC_UINT64_C(0xff000000000000))>>40) | (((x)&ORC_UINT64_C(0xff00000000000000))>>56))
223 #define ORC_PTR_OFFSET(ptr,offset) ((void *)(((unsigned char *)(ptr)) + (offset)))
224 #define ORC_DENORMAL(x) ((x) & ((((x)&0x7f800000) == 0) ? 0xff800000 : 0xffffffff))
225 #define ORC_ISNAN(x) ((((x)&0x7f800000) == 0x7f800000) && (((x)&0x007fffff) != 0))
226 #define ORC_DENORMAL_DOUBLE(x) ((x) & ((((x)&ORC_UINT64_C(0x7ff0000000000000)) == 0) ? ORC_UINT64_C(0xfff0000000000000) : ORC_UINT64_C(0xffffffffffffffff)))
227 #define ORC_ISNAN_DOUBLE(x) ((((x)&ORC_UINT64_C(0x7ff0000000000000)) == ORC_UINT64_C(0x7ff0000000000000)) && (((x)&ORC_UINT64_C(0x000fffffffffffff)) != 0))
228 #ifndef ORC_RESTRICT
229 #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
230 #define ORC_RESTRICT restrict
231 #elif defined(__GNUC__) && __GNUC__ >= 4
232 #define ORC_RESTRICT __restrict__
233 #else
234 #define ORC_RESTRICT
235 #endif
236 #endif
237 /* end Orc C target preamble */
238
239
240
241 /* audio_orc_unpack_u8 */
242 #ifdef DISABLE_ORC
243 void
audio_orc_unpack_u8(gint32 * ORC_RESTRICT d1,const guint8 * ORC_RESTRICT s1,int n)244 audio_orc_unpack_u8 (gint32 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1,
245 int n)
246 {
247 int i;
248 orc_union32 *ORC_RESTRICT ptr0;
249 const orc_int8 *ORC_RESTRICT ptr4;
250 orc_int8 var33;
251 #if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
252 volatile orc_union32 var34;
253 #else
254 orc_union32 var34;
255 #endif
256 orc_union32 var35;
257 orc_union32 var36;
258
259 ptr0 = (orc_union32 *) d1;
260 ptr4 = (orc_int8 *) s1;
261
262 /* 2: loadpl */
263 var34.i = 0x80000000; /* -2147483648 or 1.061e-314f */
264
265 for (i = 0; i < n; i++) {
266 /* 0: loadb */
267 var33 = ptr4[i];
268 /* 1: splatbl */
269 var36.i =
270 ((((orc_uint32) var33) & 0xff) << 24) | ((((orc_uint32) var33) & 0xff)
271 << 16) | ((((orc_uint32) var33) & 0xff) << 8) | (((orc_uint32) var33) &
272 0xff);
273 /* 3: xorl */
274 var35.i = var36.i ^ var34.i;
275 /* 4: storel */
276 ptr0[i] = var35;
277 }
278
279 }
280
281 #else
282 static void
_backup_audio_orc_unpack_u8(OrcExecutor * ORC_RESTRICT ex)283 _backup_audio_orc_unpack_u8 (OrcExecutor * ORC_RESTRICT ex)
284 {
285 int i;
286 int n = ex->n;
287 orc_union32 *ORC_RESTRICT ptr0;
288 const orc_int8 *ORC_RESTRICT ptr4;
289 orc_int8 var33;
290 #if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
291 volatile orc_union32 var34;
292 #else
293 orc_union32 var34;
294 #endif
295 orc_union32 var35;
296 orc_union32 var36;
297
298 ptr0 = (orc_union32 *) ex->arrays[0];
299 ptr4 = (orc_int8 *) ex->arrays[4];
300
301 /* 2: loadpl */
302 var34.i = 0x80000000; /* -2147483648 or 1.061e-314f */
303
304 for (i = 0; i < n; i++) {
305 /* 0: loadb */
306 var33 = ptr4[i];
307 /* 1: splatbl */
308 var36.i =
309 ((((orc_uint32) var33) & 0xff) << 24) | ((((orc_uint32) var33) & 0xff)
310 << 16) | ((((orc_uint32) var33) & 0xff) << 8) | (((orc_uint32) var33) &
311 0xff);
312 /* 3: xorl */
313 var35.i = var36.i ^ var34.i;
314 /* 4: storel */
315 ptr0[i] = var35;
316 }
317
318 }
319
320 void
audio_orc_unpack_u8(gint32 * ORC_RESTRICT d1,const guint8 * ORC_RESTRICT s1,int n)321 audio_orc_unpack_u8 (gint32 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1,
322 int n)
323 {
324 OrcExecutor _ex, *ex = &_ex;
325 static volatile int p_inited = 0;
326 static OrcCode *c = 0;
327 void (*func) (OrcExecutor *);
328
329 if (!p_inited) {
330 orc_once_mutex_lock ();
331 if (!p_inited) {
332 OrcProgram *p;
333
334 #if 1
335 static const orc_uint8 bc[] = {
336 1, 9, 19, 97, 117, 100, 105, 111, 95, 111, 114, 99, 95, 117, 110, 112,
337 97, 99, 107, 95, 117, 56, 11, 4, 4, 12, 1, 1, 14, 4, 0, 0,
338 0, 128, 20, 4, 152, 32, 4, 132, 0, 32, 16, 2, 0,
339 };
340 p = orc_program_new_from_static_bytecode (bc);
341 orc_program_set_backup_function (p, _backup_audio_orc_unpack_u8);
342 #else
343 p = orc_program_new ();
344 orc_program_set_name (p, "audio_orc_unpack_u8");
345 orc_program_set_backup_function (p, _backup_audio_orc_unpack_u8);
346 orc_program_add_destination (p, 4, "d1");
347 orc_program_add_source (p, 1, "s1");
348 orc_program_add_constant (p, 4, 0x80000000, "c1");
349 orc_program_add_temporary (p, 4, "t1");
350
351 orc_program_append_2 (p, "splatbl", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1,
352 ORC_VAR_D1);
353 orc_program_append_2 (p, "xorl", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_C1,
354 ORC_VAR_D1);
355 #endif
356
357 orc_program_compile (p);
358 c = orc_program_take_code (p);
359 orc_program_free (p);
360 }
361 p_inited = TRUE;
362 orc_once_mutex_unlock ();
363 }
364 ex->arrays[ORC_VAR_A2] = c;
365 ex->program = 0;
366
367 ex->n = n;
368 ex->arrays[ORC_VAR_D1] = d1;
369 ex->arrays[ORC_VAR_S1] = (void *) s1;
370
371 func = c->exec;
372 func (ex);
373 }
374 #endif
375
376
377 /* audio_orc_unpack_u8_trunc */
378 #ifdef DISABLE_ORC
379 void
audio_orc_unpack_u8_trunc(gint32 * ORC_RESTRICT d1,const guint8 * ORC_RESTRICT s1,int n)380 audio_orc_unpack_u8_trunc (gint32 * ORC_RESTRICT d1,
381 const guint8 * ORC_RESTRICT s1, int n)
382 {
383 int i;
384 orc_union32 *ORC_RESTRICT ptr0;
385 const orc_int8 *ORC_RESTRICT ptr4;
386 orc_int8 var33;
387 #if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
388 volatile orc_union32 var34;
389 #else
390 orc_union32 var34;
391 #endif
392 orc_union32 var35;
393 orc_union32 var36;
394 orc_union32 var37;
395
396 ptr0 = (orc_union32 *) d1;
397 ptr4 = (orc_int8 *) s1;
398
399 /* 3: loadpl */
400 var34.i = 0x80000000; /* -2147483648 or 1.061e-314f */
401
402 for (i = 0; i < n; i++) {
403 /* 0: loadb */
404 var33 = ptr4[i];
405 /* 1: splatbl */
406 var36.i =
407 ((((orc_uint32) var33) & 0xff) << 24) | ((((orc_uint32) var33) & 0xff)
408 << 16) | ((((orc_uint32) var33) & 0xff) << 8) | (((orc_uint32) var33) &
409 0xff);
410 /* 2: shll */
411 var37.i = ((orc_uint32) var36.i) << 24;
412 /* 4: xorl */
413 var35.i = var37.i ^ var34.i;
414 /* 5: storel */
415 ptr0[i] = var35;
416 }
417
418 }
419
420 #else
421 static void
_backup_audio_orc_unpack_u8_trunc(OrcExecutor * ORC_RESTRICT ex)422 _backup_audio_orc_unpack_u8_trunc (OrcExecutor * ORC_RESTRICT ex)
423 {
424 int i;
425 int n = ex->n;
426 orc_union32 *ORC_RESTRICT ptr0;
427 const orc_int8 *ORC_RESTRICT ptr4;
428 orc_int8 var33;
429 #if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
430 volatile orc_union32 var34;
431 #else
432 orc_union32 var34;
433 #endif
434 orc_union32 var35;
435 orc_union32 var36;
436 orc_union32 var37;
437
438 ptr0 = (orc_union32 *) ex->arrays[0];
439 ptr4 = (orc_int8 *) ex->arrays[4];
440
441 /* 3: loadpl */
442 var34.i = 0x80000000; /* -2147483648 or 1.061e-314f */
443
444 for (i = 0; i < n; i++) {
445 /* 0: loadb */
446 var33 = ptr4[i];
447 /* 1: splatbl */
448 var36.i =
449 ((((orc_uint32) var33) & 0xff) << 24) | ((((orc_uint32) var33) & 0xff)
450 << 16) | ((((orc_uint32) var33) & 0xff) << 8) | (((orc_uint32) var33) &
451 0xff);
452 /* 2: shll */
453 var37.i = ((orc_uint32) var36.i) << 24;
454 /* 4: xorl */
455 var35.i = var37.i ^ var34.i;
456 /* 5: storel */
457 ptr0[i] = var35;
458 }
459
460 }
461
462 void
audio_orc_unpack_u8_trunc(gint32 * ORC_RESTRICT d1,const guint8 * ORC_RESTRICT s1,int n)463 audio_orc_unpack_u8_trunc (gint32 * ORC_RESTRICT d1,
464 const guint8 * ORC_RESTRICT s1, int n)
465 {
466 OrcExecutor _ex, *ex = &_ex;
467 static volatile int p_inited = 0;
468 static OrcCode *c = 0;
469 void (*func) (OrcExecutor *);
470
471 if (!p_inited) {
472 orc_once_mutex_lock ();
473 if (!p_inited) {
474 OrcProgram *p;
475
476 #if 1
477 static const orc_uint8 bc[] = {
478 1, 9, 25, 97, 117, 100, 105, 111, 95, 111, 114, 99, 95, 117, 110, 112,
479 97, 99, 107, 95, 117, 56, 95, 116, 114, 117, 110, 99, 11, 4, 4, 12,
480 1, 1, 14, 4, 0, 0, 0, 128, 14, 4, 24, 0, 0, 0, 20, 4,
481 152, 32, 4, 124, 32, 32, 17, 132, 0, 32, 16, 2, 0,
482 };
483 p = orc_program_new_from_static_bytecode (bc);
484 orc_program_set_backup_function (p, _backup_audio_orc_unpack_u8_trunc);
485 #else
486 p = orc_program_new ();
487 orc_program_set_name (p, "audio_orc_unpack_u8_trunc");
488 orc_program_set_backup_function (p, _backup_audio_orc_unpack_u8_trunc);
489 orc_program_add_destination (p, 4, "d1");
490 orc_program_add_source (p, 1, "s1");
491 orc_program_add_constant (p, 4, 0x80000000, "c1");
492 orc_program_add_constant (p, 4, 0x00000018, "c2");
493 orc_program_add_temporary (p, 4, "t1");
494
495 orc_program_append_2 (p, "splatbl", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1,
496 ORC_VAR_D1);
497 orc_program_append_2 (p, "shll", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C2,
498 ORC_VAR_D1);
499 orc_program_append_2 (p, "xorl", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_C1,
500 ORC_VAR_D1);
501 #endif
502
503 orc_program_compile (p);
504 c = orc_program_take_code (p);
505 orc_program_free (p);
506 }
507 p_inited = TRUE;
508 orc_once_mutex_unlock ();
509 }
510 ex->arrays[ORC_VAR_A2] = c;
511 ex->program = 0;
512
513 ex->n = n;
514 ex->arrays[ORC_VAR_D1] = d1;
515 ex->arrays[ORC_VAR_S1] = (void *) s1;
516
517 func = c->exec;
518 func (ex);
519 }
520 #endif
521
522
523 /* audio_orc_unpack_s8 */
524 #ifdef DISABLE_ORC
525 void
audio_orc_unpack_s8(gint32 * ORC_RESTRICT d1,const guint8 * ORC_RESTRICT s1,int n)526 audio_orc_unpack_s8 (gint32 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1,
527 int n)
528 {
529 int i;
530 orc_union32 *ORC_RESTRICT ptr0;
531 const orc_int8 *ORC_RESTRICT ptr4;
532 orc_int8 var34;
533 #if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
534 volatile orc_union32 var35;
535 #else
536 orc_union32 var35;
537 #endif
538 orc_union32 var36;
539 orc_union32 var37;
540
541 ptr0 = (orc_union32 *) d1;
542 ptr4 = (orc_int8 *) s1;
543
544 /* 2: loadpl */
545 var35.i = 0x00808080; /* 8421504 or 4.16078e-317f */
546
547 for (i = 0; i < n; i++) {
548 /* 0: loadb */
549 var34 = ptr4[i];
550 /* 1: splatbl */
551 var37.i =
552 ((((orc_uint32) var34) & 0xff) << 24) | ((((orc_uint32) var34) & 0xff)
553 << 16) | ((((orc_uint32) var34) & 0xff) << 8) | (((orc_uint32) var34) &
554 0xff);
555 /* 3: xorl */
556 var36.i = var37.i ^ var35.i;
557 /* 4: storel */
558 ptr0[i] = var36;
559 }
560
561 }
562
563 #else
564 static void
_backup_audio_orc_unpack_s8(OrcExecutor * ORC_RESTRICT ex)565 _backup_audio_orc_unpack_s8 (OrcExecutor * ORC_RESTRICT ex)
566 {
567 int i;
568 int n = ex->n;
569 orc_union32 *ORC_RESTRICT ptr0;
570 const orc_int8 *ORC_RESTRICT ptr4;
571 orc_int8 var34;
572 #if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
573 volatile orc_union32 var35;
574 #else
575 orc_union32 var35;
576 #endif
577 orc_union32 var36;
578 orc_union32 var37;
579
580 ptr0 = (orc_union32 *) ex->arrays[0];
581 ptr4 = (orc_int8 *) ex->arrays[4];
582
583 /* 2: loadpl */
584 var35.i = 0x00808080; /* 8421504 or 4.16078e-317f */
585
586 for (i = 0; i < n; i++) {
587 /* 0: loadb */
588 var34 = ptr4[i];
589 /* 1: splatbl */
590 var37.i =
591 ((((orc_uint32) var34) & 0xff) << 24) | ((((orc_uint32) var34) & 0xff)
592 << 16) | ((((orc_uint32) var34) & 0xff) << 8) | (((orc_uint32) var34) &
593 0xff);
594 /* 3: xorl */
595 var36.i = var37.i ^ var35.i;
596 /* 4: storel */
597 ptr0[i] = var36;
598 }
599
600 }
601
602 void
audio_orc_unpack_s8(gint32 * ORC_RESTRICT d1,const guint8 * ORC_RESTRICT s1,int n)603 audio_orc_unpack_s8 (gint32 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1,
604 int n)
605 {
606 OrcExecutor _ex, *ex = &_ex;
607 static volatile int p_inited = 0;
608 static OrcCode *c = 0;
609 void (*func) (OrcExecutor *);
610
611 if (!p_inited) {
612 orc_once_mutex_lock ();
613 if (!p_inited) {
614 OrcProgram *p;
615
616 #if 1
617 static const orc_uint8 bc[] = {
618 1, 9, 19, 97, 117, 100, 105, 111, 95, 111, 114, 99, 95, 117, 110, 112,
619 97, 99, 107, 95, 115, 56, 11, 4, 4, 12, 1, 1, 14, 4, 128, 128,
620 128, 0, 20, 2, 20, 4, 152, 33, 4, 132, 0, 33, 16, 2, 0,
621 };
622 p = orc_program_new_from_static_bytecode (bc);
623 orc_program_set_backup_function (p, _backup_audio_orc_unpack_s8);
624 #else
625 p = orc_program_new ();
626 orc_program_set_name (p, "audio_orc_unpack_s8");
627 orc_program_set_backup_function (p, _backup_audio_orc_unpack_s8);
628 orc_program_add_destination (p, 4, "d1");
629 orc_program_add_source (p, 1, "s1");
630 orc_program_add_constant (p, 4, 0x00808080, "c1");
631 orc_program_add_temporary (p, 2, "t1");
632 orc_program_add_temporary (p, 4, "t2");
633
634 orc_program_append_2 (p, "splatbl", 0, ORC_VAR_T2, ORC_VAR_S1, ORC_VAR_D1,
635 ORC_VAR_D1);
636 orc_program_append_2 (p, "xorl", 0, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_C1,
637 ORC_VAR_D1);
638 #endif
639
640 orc_program_compile (p);
641 c = orc_program_take_code (p);
642 orc_program_free (p);
643 }
644 p_inited = TRUE;
645 orc_once_mutex_unlock ();
646 }
647 ex->arrays[ORC_VAR_A2] = c;
648 ex->program = 0;
649
650 ex->n = n;
651 ex->arrays[ORC_VAR_D1] = d1;
652 ex->arrays[ORC_VAR_S1] = (void *) s1;
653
654 func = c->exec;
655 func (ex);
656 }
657 #endif
658
659
660 /* audio_orc_unpack_s8_trunc */
661 #ifdef DISABLE_ORC
662 void
audio_orc_unpack_s8_trunc(gint32 * ORC_RESTRICT d1,const guint8 * ORC_RESTRICT s1,int n)663 audio_orc_unpack_s8_trunc (gint32 * ORC_RESTRICT d1,
664 const guint8 * ORC_RESTRICT s1, int n)
665 {
666 int i;
667 orc_union32 *ORC_RESTRICT ptr0;
668 const orc_int8 *ORC_RESTRICT ptr4;
669 orc_int8 var33;
670 orc_union32 var34;
671 orc_union32 var35;
672
673 ptr0 = (orc_union32 *) d1;
674 ptr4 = (orc_int8 *) s1;
675
676
677 for (i = 0; i < n; i++) {
678 /* 0: loadb */
679 var33 = ptr4[i];
680 /* 1: splatbl */
681 var35.i =
682 ((((orc_uint32) var33) & 0xff) << 24) | ((((orc_uint32) var33) & 0xff)
683 << 16) | ((((orc_uint32) var33) & 0xff) << 8) | (((orc_uint32) var33) &
684 0xff);
685 /* 2: shll */
686 var34.i = ((orc_uint32) var35.i) << 24;
687 /* 3: storel */
688 ptr0[i] = var34;
689 }
690
691 }
692
693 #else
694 static void
_backup_audio_orc_unpack_s8_trunc(OrcExecutor * ORC_RESTRICT ex)695 _backup_audio_orc_unpack_s8_trunc (OrcExecutor * ORC_RESTRICT ex)
696 {
697 int i;
698 int n = ex->n;
699 orc_union32 *ORC_RESTRICT ptr0;
700 const orc_int8 *ORC_RESTRICT ptr4;
701 orc_int8 var33;
702 orc_union32 var34;
703 orc_union32 var35;
704
705 ptr0 = (orc_union32 *) ex->arrays[0];
706 ptr4 = (orc_int8 *) ex->arrays[4];
707
708
709 for (i = 0; i < n; i++) {
710 /* 0: loadb */
711 var33 = ptr4[i];
712 /* 1: splatbl */
713 var35.i =
714 ((((orc_uint32) var33) & 0xff) << 24) | ((((orc_uint32) var33) & 0xff)
715 << 16) | ((((orc_uint32) var33) & 0xff) << 8) | (((orc_uint32) var33) &
716 0xff);
717 /* 2: shll */
718 var34.i = ((orc_uint32) var35.i) << 24;
719 /* 3: storel */
720 ptr0[i] = var34;
721 }
722
723 }
724
725 void
audio_orc_unpack_s8_trunc(gint32 * ORC_RESTRICT d1,const guint8 * ORC_RESTRICT s1,int n)726 audio_orc_unpack_s8_trunc (gint32 * ORC_RESTRICT d1,
727 const guint8 * ORC_RESTRICT s1, int n)
728 {
729 OrcExecutor _ex, *ex = &_ex;
730 static volatile int p_inited = 0;
731 static OrcCode *c = 0;
732 void (*func) (OrcExecutor *);
733
734 if (!p_inited) {
735 orc_once_mutex_lock ();
736 if (!p_inited) {
737 OrcProgram *p;
738
739 #if 1
740 static const orc_uint8 bc[] = {
741 1, 9, 25, 97, 117, 100, 105, 111, 95, 111, 114, 99, 95, 117, 110, 112,
742 97, 99, 107, 95, 115, 56, 95, 116, 114, 117, 110, 99, 11, 4, 4, 12,
743 1, 1, 14, 4, 24, 0, 0, 0, 20, 4, 152, 32, 4, 124, 0, 32,
744 16, 2, 0,
745 };
746 p = orc_program_new_from_static_bytecode (bc);
747 orc_program_set_backup_function (p, _backup_audio_orc_unpack_s8_trunc);
748 #else
749 p = orc_program_new ();
750 orc_program_set_name (p, "audio_orc_unpack_s8_trunc");
751 orc_program_set_backup_function (p, _backup_audio_orc_unpack_s8_trunc);
752 orc_program_add_destination (p, 4, "d1");
753 orc_program_add_source (p, 1, "s1");
754 orc_program_add_constant (p, 4, 0x00000018, "c1");
755 orc_program_add_temporary (p, 4, "t1");
756
757 orc_program_append_2 (p, "splatbl", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1,
758 ORC_VAR_D1);
759 orc_program_append_2 (p, "shll", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_C1,
760 ORC_VAR_D1);
761 #endif
762
763 orc_program_compile (p);
764 c = orc_program_take_code (p);
765 orc_program_free (p);
766 }
767 p_inited = TRUE;
768 orc_once_mutex_unlock ();
769 }
770 ex->arrays[ORC_VAR_A2] = c;
771 ex->program = 0;
772
773 ex->n = n;
774 ex->arrays[ORC_VAR_D1] = d1;
775 ex->arrays[ORC_VAR_S1] = (void *) s1;
776
777 func = c->exec;
778 func (ex);
779 }
780 #endif
781
782
783 /* audio_orc_unpack_u16 */
784 #ifdef DISABLE_ORC
785 void
audio_orc_unpack_u16(gint32 * ORC_RESTRICT d1,const guint8 * ORC_RESTRICT s1,int n)786 audio_orc_unpack_u16 (gint32 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1,
787 int n)
788 {
789 int i;
790 orc_union32 *ORC_RESTRICT ptr0;
791 const orc_union16 *ORC_RESTRICT ptr4;
792 orc_union16 var33;
793 orc_union16 var34;
794 #if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
795 volatile orc_union32 var35;
796 #else
797 orc_union32 var35;
798 #endif
799 orc_union32 var36;
800 orc_union32 var37;
801
802 ptr0 = (orc_union32 *) d1;
803 ptr4 = (orc_union16 *) s1;
804
805 /* 3: loadpl */
806 var35.i = 0x80000000; /* -2147483648 or 1.061e-314f */
807
808 for (i = 0; i < n; i++) {
809 /* 0: loadw */
810 var33 = ptr4[i];
811 /* 1: loadw */
812 var34 = ptr4[i];
813 /* 2: mergewl */
814 {
815 orc_union32 _dest;
816 _dest.x2[0] = var33.i;
817 _dest.x2[1] = var34.i;
818 var37.i = _dest.i;
819 }
820 /* 4: xorl */
821 var36.i = var37.i ^ var35.i;
822 /* 5: storel */
823 ptr0[i] = var36;
824 }
825
826 }
827
828 #else
829 static void
_backup_audio_orc_unpack_u16(OrcExecutor * ORC_RESTRICT ex)830 _backup_audio_orc_unpack_u16 (OrcExecutor * ORC_RESTRICT ex)
831 {
832 int i;
833 int n = ex->n;
834 orc_union32 *ORC_RESTRICT ptr0;
835 const orc_union16 *ORC_RESTRICT ptr4;
836 orc_union16 var33;
837 orc_union16 var34;
838 #if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
839 volatile orc_union32 var35;
840 #else
841 orc_union32 var35;
842 #endif
843 orc_union32 var36;
844 orc_union32 var37;
845
846 ptr0 = (orc_union32 *) ex->arrays[0];
847 ptr4 = (orc_union16 *) ex->arrays[4];
848
849 /* 3: loadpl */
850 var35.i = 0x80000000; /* -2147483648 or 1.061e-314f */
851
852 for (i = 0; i < n; i++) {
853 /* 0: loadw */
854 var33 = ptr4[i];
855 /* 1: loadw */
856 var34 = ptr4[i];
857 /* 2: mergewl */
858 {
859 orc_union32 _dest;
860 _dest.x2[0] = var33.i;
861 _dest.x2[1] = var34.i;
862 var37.i = _dest.i;
863 }
864 /* 4: xorl */
865 var36.i = var37.i ^ var35.i;
866 /* 5: storel */
867 ptr0[i] = var36;
868 }
869
870 }
871
872 void
audio_orc_unpack_u16(gint32 * ORC_RESTRICT d1,const guint8 * ORC_RESTRICT s1,int n)873 audio_orc_unpack_u16 (gint32 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1,
874 int n)
875 {
876 OrcExecutor _ex, *ex = &_ex;
877 static volatile int p_inited = 0;
878 static OrcCode *c = 0;
879 void (*func) (OrcExecutor *);
880
881 if (!p_inited) {
882 orc_once_mutex_lock ();
883 if (!p_inited) {
884 OrcProgram *p;
885
886 #if 1
887 static const orc_uint8 bc[] = {
888 1, 9, 20, 97, 117, 100, 105, 111, 95, 111, 114, 99, 95, 117, 110, 112,
889 97, 99, 107, 95, 117, 49, 54, 11, 4, 4, 12, 2, 2, 14, 4, 0,
890 0, 0, 128, 20, 4, 195, 32, 4, 4, 132, 0, 32, 16, 2, 0,
891 };
892 p = orc_program_new_from_static_bytecode (bc);
893 orc_program_set_backup_function (p, _backup_audio_orc_unpack_u16);
894 #else
895 p = orc_program_new ();
896 orc_program_set_name (p, "audio_orc_unpack_u16");
897 orc_program_set_backup_function (p, _backup_audio_orc_unpack_u16);
898 orc_program_add_destination (p, 4, "d1");
899 orc_program_add_source (p, 2, "s1");
900 orc_program_add_constant (p, 4, 0x80000000, "c1");
901 orc_program_add_temporary (p, 4, "t1");
902
903 orc_program_append_2 (p, "mergewl", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_S1,
904 ORC_VAR_D1);
905 orc_program_append_2 (p, "xorl", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_C1,
906 ORC_VAR_D1);
907 #endif
908
909 orc_program_compile (p);
910 c = orc_program_take_code (p);
911 orc_program_free (p);
912 }
913 p_inited = TRUE;
914 orc_once_mutex_unlock ();
915 }
916 ex->arrays[ORC_VAR_A2] = c;
917 ex->program = 0;
918
919 ex->n = n;
920 ex->arrays[ORC_VAR_D1] = d1;
921 ex->arrays[ORC_VAR_S1] = (void *) s1;
922
923 func = c->exec;
924 func (ex);
925 }
926 #endif
927
928
929 /* audio_orc_unpack_u16_trunc */
930 #ifdef DISABLE_ORC
931 void
audio_orc_unpack_u16_trunc(gint32 * ORC_RESTRICT d1,const guint8 * ORC_RESTRICT s1,int n)932 audio_orc_unpack_u16_trunc (gint32 * ORC_RESTRICT d1,
933 const guint8 * ORC_RESTRICT s1, int n)
934 {
935 int i;
936 orc_union32 *ORC_RESTRICT ptr0;
937 const orc_union16 *ORC_RESTRICT ptr4;
938 orc_union16 var33;
939 orc_union16 var34;
940 #if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
941 volatile orc_union32 var35;
942 #else
943 orc_union32 var35;
944 #endif
945 orc_union32 var36;
946 orc_union32 var37;
947 orc_union32 var38;
948
949 ptr0 = (orc_union32 *) d1;
950 ptr4 = (orc_union16 *) s1;
951
952 /* 4: loadpl */
953 var35.i = 0x80000000; /* -2147483648 or 1.061e-314f */
954
955 for (i = 0; i < n; i++) {
956 /* 0: loadw */
957 var33 = ptr4[i];
958 /* 1: loadw */
959 var34 = ptr4[i];
960 /* 2: mergewl */
961 {
962 orc_union32 _dest;
963 _dest.x2[0] = var33.i;
964 _dest.x2[1] = var34.i;
965 var37.i = _dest.i;
966 }
967 /* 3: shll */
968 var38.i = ((orc_uint32) var37.i) << 16;
969 /* 5: xorl */
970 var36.i = var38.i ^ var35.i;
971 /* 6: storel */
972 ptr0[i] = var36;
973 }
974
975 }
976
977 #else
978 static void
_backup_audio_orc_unpack_u16_trunc(OrcExecutor * ORC_RESTRICT ex)979 _backup_audio_orc_unpack_u16_trunc (OrcExecutor * ORC_RESTRICT ex)
980 {
981 int i;
982 int n = ex->n;
983 orc_union32 *ORC_RESTRICT ptr0;
984 const orc_union16 *ORC_RESTRICT ptr4;
985 orc_union16 var33;
986 orc_union16 var34;
987 #if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
988 volatile orc_union32 var35;
989 #else
990 orc_union32 var35;
991 #endif
992 orc_union32 var36;
993 orc_union32 var37;
994 orc_union32 var38;
995
996 ptr0 = (orc_union32 *) ex->arrays[0];
997 ptr4 = (orc_union16 *) ex->arrays[4];
998
999 /* 4: loadpl */
1000 var35.i = 0x80000000; /* -2147483648 or 1.061e-314f */
1001
1002 for (i = 0; i < n; i++) {
1003 /* 0: loadw */
1004 var33 = ptr4[i];
1005 /* 1: loadw */
1006 var34 = ptr4[i];
1007 /* 2: mergewl */
1008 {
1009 orc_union32 _dest;
1010 _dest.x2[0] = var33.i;
1011 _dest.x2[1] = var34.i;
1012 var37.i = _dest.i;
1013 }
1014 /* 3: shll */
1015 var38.i = ((orc_uint32) var37.i) << 16;
1016 /* 5: xorl */
1017 var36.i = var38.i ^ var35.i;
1018 /* 6: storel */
1019 ptr0[i] = var36;
1020 }
1021
1022 }
1023
1024 void
audio_orc_unpack_u16_trunc(gint32 * ORC_RESTRICT d1,const guint8 * ORC_RESTRICT s1,int n)1025 audio_orc_unpack_u16_trunc (gint32 * ORC_RESTRICT d1,
1026 const guint8 * ORC_RESTRICT s1, int n)
1027 {
1028 OrcExecutor _ex, *ex = &_ex;
1029 static volatile int p_inited = 0;
1030 static OrcCode *c = 0;
1031 void (*func) (OrcExecutor *);
1032
1033 if (!p_inited) {
1034 orc_once_mutex_lock ();
1035 if (!p_inited) {
1036 OrcProgram *p;
1037
1038 #if 1
1039 static const orc_uint8 bc[] = {
1040 1, 9, 26, 97, 117, 100, 105, 111, 95, 111, 114, 99, 95, 117, 110, 112,
1041 97, 99, 107, 95, 117, 49, 54, 95, 116, 114, 117, 110, 99, 11, 4, 4,
1042 12, 2, 2, 14, 4, 16, 0, 0, 0, 14, 4, 0, 0, 0, 128, 20,
1043 4, 195, 32, 4, 4, 124, 32, 32, 16, 132, 0, 32, 17, 2, 0,
1044 };
1045 p = orc_program_new_from_static_bytecode (bc);
1046 orc_program_set_backup_function (p, _backup_audio_orc_unpack_u16_trunc);
1047 #else
1048 p = orc_program_new ();
1049 orc_program_set_name (p, "audio_orc_unpack_u16_trunc");
1050 orc_program_set_backup_function (p, _backup_audio_orc_unpack_u16_trunc);
1051 orc_program_add_destination (p, 4, "d1");
1052 orc_program_add_source (p, 2, "s1");
1053 orc_program_add_constant (p, 4, 0x00000010, "c1");
1054 orc_program_add_constant (p, 4, 0x80000000, "c2");
1055 orc_program_add_temporary (p, 4, "t1");
1056
1057 orc_program_append_2 (p, "mergewl", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_S1,
1058 ORC_VAR_D1);
1059 orc_program_append_2 (p, "shll", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1,
1060 ORC_VAR_D1);
1061 orc_program_append_2 (p, "xorl", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_C2,
1062 ORC_VAR_D1);
1063 #endif
1064
1065 orc_program_compile (p);
1066 c = orc_program_take_code (p);
1067 orc_program_free (p);
1068 }
1069 p_inited = TRUE;
1070 orc_once_mutex_unlock ();
1071 }
1072 ex->arrays[ORC_VAR_A2] = c;
1073 ex->program = 0;
1074
1075 ex->n = n;
1076 ex->arrays[ORC_VAR_D1] = d1;
1077 ex->arrays[ORC_VAR_S1] = (void *) s1;
1078
1079 func = c->exec;
1080 func (ex);
1081 }
1082 #endif
1083
1084
1085 /* audio_orc_unpack_s16 */
1086 #ifdef DISABLE_ORC
1087 void
audio_orc_unpack_s16(gint32 * ORC_RESTRICT d1,const guint8 * ORC_RESTRICT s1,int n)1088 audio_orc_unpack_s16 (gint32 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1,
1089 int n)
1090 {
1091 int i;
1092 orc_union32 *ORC_RESTRICT ptr0;
1093 const orc_union16 *ORC_RESTRICT ptr4;
1094 orc_union16 var33;
1095 orc_union16 var34;
1096 #if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
1097 volatile orc_union32 var35;
1098 #else
1099 orc_union32 var35;
1100 #endif
1101 orc_union32 var36;
1102 orc_union32 var37;
1103
1104 ptr0 = (orc_union32 *) d1;
1105 ptr4 = (orc_union16 *) s1;
1106
1107 /* 3: loadpl */
1108 var35.i = 0x00008000; /* 32768 or 1.61895e-319f */
1109
1110 for (i = 0; i < n; i++) {
1111 /* 0: loadw */
1112 var33 = ptr4[i];
1113 /* 1: loadw */
1114 var34 = ptr4[i];
1115 /* 2: mergewl */
1116 {
1117 orc_union32 _dest;
1118 _dest.x2[0] = var33.i;
1119 _dest.x2[1] = var34.i;
1120 var37.i = _dest.i;
1121 }
1122 /* 4: xorl */
1123 var36.i = var37.i ^ var35.i;
1124 /* 5: storel */
1125 ptr0[i] = var36;
1126 }
1127
1128 }
1129
1130 #else
1131 static void
_backup_audio_orc_unpack_s16(OrcExecutor * ORC_RESTRICT ex)1132 _backup_audio_orc_unpack_s16 (OrcExecutor * ORC_RESTRICT ex)
1133 {
1134 int i;
1135 int n = ex->n;
1136 orc_union32 *ORC_RESTRICT ptr0;
1137 const orc_union16 *ORC_RESTRICT ptr4;
1138 orc_union16 var33;
1139 orc_union16 var34;
1140 #if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
1141 volatile orc_union32 var35;
1142 #else
1143 orc_union32 var35;
1144 #endif
1145 orc_union32 var36;
1146 orc_union32 var37;
1147
1148 ptr0 = (orc_union32 *) ex->arrays[0];
1149 ptr4 = (orc_union16 *) ex->arrays[4];
1150
1151 /* 3: loadpl */
1152 var35.i = 0x00008000; /* 32768 or 1.61895e-319f */
1153
1154 for (i = 0; i < n; i++) {
1155 /* 0: loadw */
1156 var33 = ptr4[i];
1157 /* 1: loadw */
1158 var34 = ptr4[i];
1159 /* 2: mergewl */
1160 {
1161 orc_union32 _dest;
1162 _dest.x2[0] = var33.i;
1163 _dest.x2[1] = var34.i;
1164 var37.i = _dest.i;
1165 }
1166 /* 4: xorl */
1167 var36.i = var37.i ^ var35.i;
1168 /* 5: storel */
1169 ptr0[i] = var36;
1170 }
1171
1172 }
1173
1174 void
audio_orc_unpack_s16(gint32 * ORC_RESTRICT d1,const guint8 * ORC_RESTRICT s1,int n)1175 audio_orc_unpack_s16 (gint32 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1,
1176 int n)
1177 {
1178 OrcExecutor _ex, *ex = &_ex;
1179 static volatile int p_inited = 0;
1180 static OrcCode *c = 0;
1181 void (*func) (OrcExecutor *);
1182
1183 if (!p_inited) {
1184 orc_once_mutex_lock ();
1185 if (!p_inited) {
1186 OrcProgram *p;
1187
1188 #if 1
1189 static const orc_uint8 bc[] = {
1190 1, 9, 20, 97, 117, 100, 105, 111, 95, 111, 114, 99, 95, 117, 110, 112,
1191 97, 99, 107, 95, 115, 49, 54, 11, 4, 4, 12, 2, 2, 14, 4, 0,
1192 128, 0, 0, 20, 4, 195, 32, 4, 4, 132, 0, 32, 16, 2, 0,
1193 };
1194 p = orc_program_new_from_static_bytecode (bc);
1195 orc_program_set_backup_function (p, _backup_audio_orc_unpack_s16);
1196 #else
1197 p = orc_program_new ();
1198 orc_program_set_name (p, "audio_orc_unpack_s16");
1199 orc_program_set_backup_function (p, _backup_audio_orc_unpack_s16);
1200 orc_program_add_destination (p, 4, "d1");
1201 orc_program_add_source (p, 2, "s1");
1202 orc_program_add_constant (p, 4, 0x00008000, "c1");
1203 orc_program_add_temporary (p, 4, "t1");
1204
1205 orc_program_append_2 (p, "mergewl", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_S1,
1206 ORC_VAR_D1);
1207 orc_program_append_2 (p, "xorl", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_C1,
1208 ORC_VAR_D1);
1209 #endif
1210
1211 orc_program_compile (p);
1212 c = orc_program_take_code (p);
1213 orc_program_free (p);
1214 }
1215 p_inited = TRUE;
1216 orc_once_mutex_unlock ();
1217 }
1218 ex->arrays[ORC_VAR_A2] = c;
1219 ex->program = 0;
1220
1221 ex->n = n;
1222 ex->arrays[ORC_VAR_D1] = d1;
1223 ex->arrays[ORC_VAR_S1] = (void *) s1;
1224
1225 func = c->exec;
1226 func (ex);
1227 }
1228 #endif
1229
1230
1231 /* audio_orc_unpack_s16_trunc */
1232 #ifdef DISABLE_ORC
1233 void
audio_orc_unpack_s16_trunc(gint32 * ORC_RESTRICT d1,const guint8 * ORC_RESTRICT s1,int n)1234 audio_orc_unpack_s16_trunc (gint32 * ORC_RESTRICT d1,
1235 const guint8 * ORC_RESTRICT s1, int n)
1236 {
1237 int i;
1238 orc_union32 *ORC_RESTRICT ptr0;
1239 const orc_union16 *ORC_RESTRICT ptr4;
1240 orc_union16 var33;
1241 orc_union32 var34;
1242 orc_union32 var35;
1243
1244 ptr0 = (orc_union32 *) d1;
1245 ptr4 = (orc_union16 *) s1;
1246
1247
1248 for (i = 0; i < n; i++) {
1249 /* 0: loadw */
1250 var33 = ptr4[i];
1251 /* 1: convuwl */
1252 var35.i = (orc_uint16) var33.i;
1253 /* 2: shll */
1254 var34.i = ((orc_uint32) var35.i) << 16;
1255 /* 3: storel */
1256 ptr0[i] = var34;
1257 }
1258
1259 }
1260
1261 #else
1262 static void
_backup_audio_orc_unpack_s16_trunc(OrcExecutor * ORC_RESTRICT ex)1263 _backup_audio_orc_unpack_s16_trunc (OrcExecutor * ORC_RESTRICT ex)
1264 {
1265 int i;
1266 int n = ex->n;
1267 orc_union32 *ORC_RESTRICT ptr0;
1268 const orc_union16 *ORC_RESTRICT ptr4;
1269 orc_union16 var33;
1270 orc_union32 var34;
1271 orc_union32 var35;
1272
1273 ptr0 = (orc_union32 *) ex->arrays[0];
1274 ptr4 = (orc_union16 *) ex->arrays[4];
1275
1276
1277 for (i = 0; i < n; i++) {
1278 /* 0: loadw */
1279 var33 = ptr4[i];
1280 /* 1: convuwl */
1281 var35.i = (orc_uint16) var33.i;
1282 /* 2: shll */
1283 var34.i = ((orc_uint32) var35.i) << 16;
1284 /* 3: storel */
1285 ptr0[i] = var34;
1286 }
1287
1288 }
1289
1290 void
audio_orc_unpack_s16_trunc(gint32 * ORC_RESTRICT d1,const guint8 * ORC_RESTRICT s1,int n)1291 audio_orc_unpack_s16_trunc (gint32 * ORC_RESTRICT d1,
1292 const guint8 * ORC_RESTRICT s1, int n)
1293 {
1294 OrcExecutor _ex, *ex = &_ex;
1295 static volatile int p_inited = 0;
1296 static OrcCode *c = 0;
1297 void (*func) (OrcExecutor *);
1298
1299 if (!p_inited) {
1300 orc_once_mutex_lock ();
1301 if (!p_inited) {
1302 OrcProgram *p;
1303
1304 #if 1
1305 static const orc_uint8 bc[] = {
1306 1, 9, 26, 97, 117, 100, 105, 111, 95, 111, 114, 99, 95, 117, 110, 112,
1307 97, 99, 107, 95, 115, 49, 54, 95, 116, 114, 117, 110, 99, 11, 4, 4,
1308 12, 2, 2, 14, 4, 16, 0, 0, 0, 20, 4, 154, 32, 4, 124, 0,
1309 32, 16, 2, 0,
1310 };
1311 p = orc_program_new_from_static_bytecode (bc);
1312 orc_program_set_backup_function (p, _backup_audio_orc_unpack_s16_trunc);
1313 #else
1314 p = orc_program_new ();
1315 orc_program_set_name (p, "audio_orc_unpack_s16_trunc");
1316 orc_program_set_backup_function (p, _backup_audio_orc_unpack_s16_trunc);
1317 orc_program_add_destination (p, 4, "d1");
1318 orc_program_add_source (p, 2, "s1");
1319 orc_program_add_constant (p, 4, 0x00000010, "c1");
1320 orc_program_add_temporary (p, 4, "t1");
1321
1322 orc_program_append_2 (p, "convuwl", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1,
1323 ORC_VAR_D1);
1324 orc_program_append_2 (p, "shll", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_C1,
1325 ORC_VAR_D1);
1326 #endif
1327
1328 orc_program_compile (p);
1329 c = orc_program_take_code (p);
1330 orc_program_free (p);
1331 }
1332 p_inited = TRUE;
1333 orc_once_mutex_unlock ();
1334 }
1335 ex->arrays[ORC_VAR_A2] = c;
1336 ex->program = 0;
1337
1338 ex->n = n;
1339 ex->arrays[ORC_VAR_D1] = d1;
1340 ex->arrays[ORC_VAR_S1] = (void *) s1;
1341
1342 func = c->exec;
1343 func (ex);
1344 }
1345 #endif
1346
1347
1348 /* audio_orc_unpack_u16_swap */
1349 #ifdef DISABLE_ORC
1350 void
audio_orc_unpack_u16_swap(gint32 * ORC_RESTRICT d1,const guint8 * ORC_RESTRICT s1,int n)1351 audio_orc_unpack_u16_swap (gint32 * ORC_RESTRICT d1,
1352 const guint8 * ORC_RESTRICT s1, int n)
1353 {
1354 int i;
1355 orc_union32 *ORC_RESTRICT ptr0;
1356 const orc_union16 *ORC_RESTRICT ptr4;
1357 orc_union16 var34;
1358 #if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
1359 volatile orc_union32 var35;
1360 #else
1361 orc_union32 var35;
1362 #endif
1363 orc_union32 var36;
1364 orc_union16 var37;
1365 orc_union32 var38;
1366
1367 ptr0 = (orc_union32 *) d1;
1368 ptr4 = (orc_union16 *) s1;
1369
1370 /* 3: loadpl */
1371 var35.i = 0x80000000; /* -2147483648 or 1.061e-314f */
1372
1373 for (i = 0; i < n; i++) {
1374 /* 0: loadw */
1375 var34 = ptr4[i];
1376 /* 1: swapw */
1377 var37.i = ORC_SWAP_W (var34.i);
1378 /* 2: mergewl */
1379 {
1380 orc_union32 _dest;
1381 _dest.x2[0] = var37.i;
1382 _dest.x2[1] = var37.i;
1383 var38.i = _dest.i;
1384 }
1385 /* 4: xorl */
1386 var36.i = var38.i ^ var35.i;
1387 /* 5: storel */
1388 ptr0[i] = var36;
1389 }
1390
1391 }
1392
1393 #else
1394 static void
_backup_audio_orc_unpack_u16_swap(OrcExecutor * ORC_RESTRICT ex)1395 _backup_audio_orc_unpack_u16_swap (OrcExecutor * ORC_RESTRICT ex)
1396 {
1397 int i;
1398 int n = ex->n;
1399 orc_union32 *ORC_RESTRICT ptr0;
1400 const orc_union16 *ORC_RESTRICT ptr4;
1401 orc_union16 var34;
1402 #if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
1403 volatile orc_union32 var35;
1404 #else
1405 orc_union32 var35;
1406 #endif
1407 orc_union32 var36;
1408 orc_union16 var37;
1409 orc_union32 var38;
1410
1411 ptr0 = (orc_union32 *) ex->arrays[0];
1412 ptr4 = (orc_union16 *) ex->arrays[4];
1413
1414 /* 3: loadpl */
1415 var35.i = 0x80000000; /* -2147483648 or 1.061e-314f */
1416
1417 for (i = 0; i < n; i++) {
1418 /* 0: loadw */
1419 var34 = ptr4[i];
1420 /* 1: swapw */
1421 var37.i = ORC_SWAP_W (var34.i);
1422 /* 2: mergewl */
1423 {
1424 orc_union32 _dest;
1425 _dest.x2[0] = var37.i;
1426 _dest.x2[1] = var37.i;
1427 var38.i = _dest.i;
1428 }
1429 /* 4: xorl */
1430 var36.i = var38.i ^ var35.i;
1431 /* 5: storel */
1432 ptr0[i] = var36;
1433 }
1434
1435 }
1436
1437 void
audio_orc_unpack_u16_swap(gint32 * ORC_RESTRICT d1,const guint8 * ORC_RESTRICT s1,int n)1438 audio_orc_unpack_u16_swap (gint32 * ORC_RESTRICT d1,
1439 const guint8 * ORC_RESTRICT s1, int n)
1440 {
1441 OrcExecutor _ex, *ex = &_ex;
1442 static volatile int p_inited = 0;
1443 static OrcCode *c = 0;
1444 void (*func) (OrcExecutor *);
1445
1446 if (!p_inited) {
1447 orc_once_mutex_lock ();
1448 if (!p_inited) {
1449 OrcProgram *p;
1450
1451 #if 1
1452 static const orc_uint8 bc[] = {
1453 1, 9, 25, 97, 117, 100, 105, 111, 95, 111, 114, 99, 95, 117, 110, 112,
1454 97, 99, 107, 95, 117, 49, 54, 95, 115, 119, 97, 112, 11, 4, 4, 12,
1455 2, 2, 14, 4, 0, 0, 0, 128, 20, 2, 20, 4, 183, 32, 4, 195,
1456 33, 32, 32, 132, 0, 33, 16, 2, 0,
1457 };
1458 p = orc_program_new_from_static_bytecode (bc);
1459 orc_program_set_backup_function (p, _backup_audio_orc_unpack_u16_swap);
1460 #else
1461 p = orc_program_new ();
1462 orc_program_set_name (p, "audio_orc_unpack_u16_swap");
1463 orc_program_set_backup_function (p, _backup_audio_orc_unpack_u16_swap);
1464 orc_program_add_destination (p, 4, "d1");
1465 orc_program_add_source (p, 2, "s1");
1466 orc_program_add_constant (p, 4, 0x80000000, "c1");
1467 orc_program_add_temporary (p, 2, "t1");
1468 orc_program_add_temporary (p, 4, "t2");
1469
1470 orc_program_append_2 (p, "swapw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1,
1471 ORC_VAR_D1);
1472 orc_program_append_2 (p, "mergewl", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_T1,
1473 ORC_VAR_D1);
1474 orc_program_append_2 (p, "xorl", 0, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_C1,
1475 ORC_VAR_D1);
1476 #endif
1477
1478 orc_program_compile (p);
1479 c = orc_program_take_code (p);
1480 orc_program_free (p);
1481 }
1482 p_inited = TRUE;
1483 orc_once_mutex_unlock ();
1484 }
1485 ex->arrays[ORC_VAR_A2] = c;
1486 ex->program = 0;
1487
1488 ex->n = n;
1489 ex->arrays[ORC_VAR_D1] = d1;
1490 ex->arrays[ORC_VAR_S1] = (void *) s1;
1491
1492 func = c->exec;
1493 func (ex);
1494 }
1495 #endif
1496
1497
1498 /* audio_orc_unpack_u16_swap_trunc */
1499 #ifdef DISABLE_ORC
1500 void
audio_orc_unpack_u16_swap_trunc(gint32 * ORC_RESTRICT d1,const guint8 * ORC_RESTRICT s1,int n)1501 audio_orc_unpack_u16_swap_trunc (gint32 * ORC_RESTRICT d1,
1502 const guint8 * ORC_RESTRICT s1, int n)
1503 {
1504 int i;
1505 orc_union32 *ORC_RESTRICT ptr0;
1506 const orc_union16 *ORC_RESTRICT ptr4;
1507 orc_union16 var34;
1508 #if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
1509 volatile orc_union32 var35;
1510 #else
1511 orc_union32 var35;
1512 #endif
1513 orc_union32 var36;
1514 orc_union16 var37;
1515 orc_union32 var38;
1516 orc_union32 var39;
1517
1518 ptr0 = (orc_union32 *) d1;
1519 ptr4 = (orc_union16 *) s1;
1520
1521 /* 4: loadpl */
1522 var35.i = 0x80000000; /* -2147483648 or 1.061e-314f */
1523
1524 for (i = 0; i < n; i++) {
1525 /* 0: loadw */
1526 var34 = ptr4[i];
1527 /* 1: swapw */
1528 var37.i = ORC_SWAP_W (var34.i);
1529 /* 2: convuwl */
1530 var38.i = (orc_uint16) var37.i;
1531 /* 3: shll */
1532 var39.i = ((orc_uint32) var38.i) << 16;
1533 /* 5: xorl */
1534 var36.i = var39.i ^ var35.i;
1535 /* 6: storel */
1536 ptr0[i] = var36;
1537 }
1538
1539 }
1540
1541 #else
1542 static void
_backup_audio_orc_unpack_u16_swap_trunc(OrcExecutor * ORC_RESTRICT ex)1543 _backup_audio_orc_unpack_u16_swap_trunc (OrcExecutor * ORC_RESTRICT ex)
1544 {
1545 int i;
1546 int n = ex->n;
1547 orc_union32 *ORC_RESTRICT ptr0;
1548 const orc_union16 *ORC_RESTRICT ptr4;
1549 orc_union16 var34;
1550 #if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
1551 volatile orc_union32 var35;
1552 #else
1553 orc_union32 var35;
1554 #endif
1555 orc_union32 var36;
1556 orc_union16 var37;
1557 orc_union32 var38;
1558 orc_union32 var39;
1559
1560 ptr0 = (orc_union32 *) ex->arrays[0];
1561 ptr4 = (orc_union16 *) ex->arrays[4];
1562
1563 /* 4: loadpl */
1564 var35.i = 0x80000000; /* -2147483648 or 1.061e-314f */
1565
1566 for (i = 0; i < n; i++) {
1567 /* 0: loadw */
1568 var34 = ptr4[i];
1569 /* 1: swapw */
1570 var37.i = ORC_SWAP_W (var34.i);
1571 /* 2: convuwl */
1572 var38.i = (orc_uint16) var37.i;
1573 /* 3: shll */
1574 var39.i = ((orc_uint32) var38.i) << 16;
1575 /* 5: xorl */
1576 var36.i = var39.i ^ var35.i;
1577 /* 6: storel */
1578 ptr0[i] = var36;
1579 }
1580
1581 }
1582
1583 void
audio_orc_unpack_u16_swap_trunc(gint32 * ORC_RESTRICT d1,const guint8 * ORC_RESTRICT s1,int n)1584 audio_orc_unpack_u16_swap_trunc (gint32 * ORC_RESTRICT d1,
1585 const guint8 * ORC_RESTRICT s1, int n)
1586 {
1587 OrcExecutor _ex, *ex = &_ex;
1588 static volatile int p_inited = 0;
1589 static OrcCode *c = 0;
1590 void (*func) (OrcExecutor *);
1591
1592 if (!p_inited) {
1593 orc_once_mutex_lock ();
1594 if (!p_inited) {
1595 OrcProgram *p;
1596
1597 #if 1
1598 static const orc_uint8 bc[] = {
1599 1, 9, 31, 97, 117, 100, 105, 111, 95, 111, 114, 99, 95, 117, 110, 112,
1600 97, 99, 107, 95, 117, 49, 54, 95, 115, 119, 97, 112, 95, 116, 114, 117,
1601 110, 99, 11, 4, 4, 12, 2, 2, 14, 4, 16, 0, 0, 0, 14, 4,
1602 0, 0, 0, 128, 20, 2, 20, 4, 183, 32, 4, 154, 33, 32, 124, 33,
1603 33, 16, 132, 0, 33, 17, 2, 0,
1604 };
1605 p = orc_program_new_from_static_bytecode (bc);
1606 orc_program_set_backup_function (p,
1607 _backup_audio_orc_unpack_u16_swap_trunc);
1608 #else
1609 p = orc_program_new ();
1610 orc_program_set_name (p, "audio_orc_unpack_u16_swap_trunc");
1611 orc_program_set_backup_function (p,
1612 _backup_audio_orc_unpack_u16_swap_trunc);
1613 orc_program_add_destination (p, 4, "d1");
1614 orc_program_add_source (p, 2, "s1");
1615 orc_program_add_constant (p, 4, 0x00000010, "c1");
1616 orc_program_add_constant (p, 4, 0x80000000, "c2");
1617 orc_program_add_temporary (p, 2, "t1");
1618 orc_program_add_temporary (p, 4, "t2");
1619
1620 orc_program_append_2 (p, "swapw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1,
1621 ORC_VAR_D1);
1622 orc_program_append_2 (p, "convuwl", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1,
1623 ORC_VAR_D1);
1624 orc_program_append_2 (p, "shll", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C1,
1625 ORC_VAR_D1);
1626 orc_program_append_2 (p, "xorl", 0, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_C2,
1627 ORC_VAR_D1);
1628 #endif
1629
1630 orc_program_compile (p);
1631 c = orc_program_take_code (p);
1632 orc_program_free (p);
1633 }
1634 p_inited = TRUE;
1635 orc_once_mutex_unlock ();
1636 }
1637 ex->arrays[ORC_VAR_A2] = c;
1638 ex->program = 0;
1639
1640 ex->n = n;
1641 ex->arrays[ORC_VAR_D1] = d1;
1642 ex->arrays[ORC_VAR_S1] = (void *) s1;
1643
1644 func = c->exec;
1645 func (ex);
1646 }
1647 #endif
1648
1649
1650 /* audio_orc_unpack_s16_swap */
1651 #ifdef DISABLE_ORC
1652 void
audio_orc_unpack_s16_swap(gint32 * ORC_RESTRICT d1,const guint8 * ORC_RESTRICT s1,int n)1653 audio_orc_unpack_s16_swap (gint32 * ORC_RESTRICT d1,
1654 const guint8 * ORC_RESTRICT s1, int n)
1655 {
1656 int i;
1657 orc_union32 *ORC_RESTRICT ptr0;
1658 const orc_union16 *ORC_RESTRICT ptr4;
1659 orc_union16 var33;
1660 orc_union32 var34;
1661 orc_union16 var35;
1662
1663 ptr0 = (orc_union32 *) d1;
1664 ptr4 = (orc_union16 *) s1;
1665
1666
1667 for (i = 0; i < n; i++) {
1668 /* 0: loadw */
1669 var33 = ptr4[i];
1670 /* 1: swapw */
1671 var35.i = ORC_SWAP_W (var33.i);
1672 /* 2: mergewl */
1673 {
1674 orc_union32 _dest;
1675 _dest.x2[0] = var35.i;
1676 _dest.x2[1] = var35.i;
1677 var34.i = _dest.i;
1678 }
1679 /* 3: storel */
1680 ptr0[i] = var34;
1681 }
1682
1683 }
1684
1685 #else
1686 static void
_backup_audio_orc_unpack_s16_swap(OrcExecutor * ORC_RESTRICT ex)1687 _backup_audio_orc_unpack_s16_swap (OrcExecutor * ORC_RESTRICT ex)
1688 {
1689 int i;
1690 int n = ex->n;
1691 orc_union32 *ORC_RESTRICT ptr0;
1692 const orc_union16 *ORC_RESTRICT ptr4;
1693 orc_union16 var33;
1694 orc_union32 var34;
1695 orc_union16 var35;
1696
1697 ptr0 = (orc_union32 *) ex->arrays[0];
1698 ptr4 = (orc_union16 *) ex->arrays[4];
1699
1700
1701 for (i = 0; i < n; i++) {
1702 /* 0: loadw */
1703 var33 = ptr4[i];
1704 /* 1: swapw */
1705 var35.i = ORC_SWAP_W (var33.i);
1706 /* 2: mergewl */
1707 {
1708 orc_union32 _dest;
1709 _dest.x2[0] = var35.i;
1710 _dest.x2[1] = var35.i;
1711 var34.i = _dest.i;
1712 }
1713 /* 3: storel */
1714 ptr0[i] = var34;
1715 }
1716
1717 }
1718
1719 void
audio_orc_unpack_s16_swap(gint32 * ORC_RESTRICT d1,const guint8 * ORC_RESTRICT s1,int n)1720 audio_orc_unpack_s16_swap (gint32 * ORC_RESTRICT d1,
1721 const guint8 * ORC_RESTRICT s1, int n)
1722 {
1723 OrcExecutor _ex, *ex = &_ex;
1724 static volatile int p_inited = 0;
1725 static OrcCode *c = 0;
1726 void (*func) (OrcExecutor *);
1727
1728 if (!p_inited) {
1729 orc_once_mutex_lock ();
1730 if (!p_inited) {
1731 OrcProgram *p;
1732
1733 #if 1
1734 static const orc_uint8 bc[] = {
1735 1, 9, 25, 97, 117, 100, 105, 111, 95, 111, 114, 99, 95, 117, 110, 112,
1736 97, 99, 107, 95, 115, 49, 54, 95, 115, 119, 97, 112, 11, 4, 4, 12,
1737 2, 2, 20, 2, 183, 32, 4, 195, 0, 32, 32, 2, 0,
1738 };
1739 p = orc_program_new_from_static_bytecode (bc);
1740 orc_program_set_backup_function (p, _backup_audio_orc_unpack_s16_swap);
1741 #else
1742 p = orc_program_new ();
1743 orc_program_set_name (p, "audio_orc_unpack_s16_swap");
1744 orc_program_set_backup_function (p, _backup_audio_orc_unpack_s16_swap);
1745 orc_program_add_destination (p, 4, "d1");
1746 orc_program_add_source (p, 2, "s1");
1747 orc_program_add_temporary (p, 2, "t1");
1748
1749 orc_program_append_2 (p, "swapw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1,
1750 ORC_VAR_D1);
1751 orc_program_append_2 (p, "mergewl", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T1,
1752 ORC_VAR_D1);
1753 #endif
1754
1755 orc_program_compile (p);
1756 c = orc_program_take_code (p);
1757 orc_program_free (p);
1758 }
1759 p_inited = TRUE;
1760 orc_once_mutex_unlock ();
1761 }
1762 ex->arrays[ORC_VAR_A2] = c;
1763 ex->program = 0;
1764
1765 ex->n = n;
1766 ex->arrays[ORC_VAR_D1] = d1;
1767 ex->arrays[ORC_VAR_S1] = (void *) s1;
1768
1769 func = c->exec;
1770 func (ex);
1771 }
1772 #endif
1773
1774
1775 /* audio_orc_unpack_s16_swap_trunc */
1776 #ifdef DISABLE_ORC
1777 void
audio_orc_unpack_s16_swap_trunc(gint32 * ORC_RESTRICT d1,const guint8 * ORC_RESTRICT s1,int n)1778 audio_orc_unpack_s16_swap_trunc (gint32 * ORC_RESTRICT d1,
1779 const guint8 * ORC_RESTRICT s1, int n)
1780 {
1781 int i;
1782 orc_union32 *ORC_RESTRICT ptr0;
1783 const orc_union16 *ORC_RESTRICT ptr4;
1784 orc_union16 var34;
1785 orc_union32 var35;
1786 orc_union16 var36;
1787 orc_union32 var37;
1788
1789 ptr0 = (orc_union32 *) d1;
1790 ptr4 = (orc_union16 *) s1;
1791
1792
1793 for (i = 0; i < n; i++) {
1794 /* 0: loadw */
1795 var34 = ptr4[i];
1796 /* 1: swapw */
1797 var36.i = ORC_SWAP_W (var34.i);
1798 /* 2: convuwl */
1799 var37.i = (orc_uint16) var36.i;
1800 /* 3: shll */
1801 var35.i = ((orc_uint32) var37.i) << 16;
1802 /* 4: storel */
1803 ptr0[i] = var35;
1804 }
1805
1806 }
1807
1808 #else
1809 static void
_backup_audio_orc_unpack_s16_swap_trunc(OrcExecutor * ORC_RESTRICT ex)1810 _backup_audio_orc_unpack_s16_swap_trunc (OrcExecutor * ORC_RESTRICT ex)
1811 {
1812 int i;
1813 int n = ex->n;
1814 orc_union32 *ORC_RESTRICT ptr0;
1815 const orc_union16 *ORC_RESTRICT ptr4;
1816 orc_union16 var34;
1817 orc_union32 var35;
1818 orc_union16 var36;
1819 orc_union32 var37;
1820
1821 ptr0 = (orc_union32 *) ex->arrays[0];
1822 ptr4 = (orc_union16 *) ex->arrays[4];
1823
1824
1825 for (i = 0; i < n; i++) {
1826 /* 0: loadw */
1827 var34 = ptr4[i];
1828 /* 1: swapw */
1829 var36.i = ORC_SWAP_W (var34.i);
1830 /* 2: convuwl */
1831 var37.i = (orc_uint16) var36.i;
1832 /* 3: shll */
1833 var35.i = ((orc_uint32) var37.i) << 16;
1834 /* 4: storel */
1835 ptr0[i] = var35;
1836 }
1837
1838 }
1839
1840 void
audio_orc_unpack_s16_swap_trunc(gint32 * ORC_RESTRICT d1,const guint8 * ORC_RESTRICT s1,int n)1841 audio_orc_unpack_s16_swap_trunc (gint32 * ORC_RESTRICT d1,
1842 const guint8 * ORC_RESTRICT s1, int n)
1843 {
1844 OrcExecutor _ex, *ex = &_ex;
1845 static volatile int p_inited = 0;
1846 static OrcCode *c = 0;
1847 void (*func) (OrcExecutor *);
1848
1849 if (!p_inited) {
1850 orc_once_mutex_lock ();
1851 if (!p_inited) {
1852 OrcProgram *p;
1853
1854 #if 1
1855 static const orc_uint8 bc[] = {
1856 1, 9, 31, 97, 117, 100, 105, 111, 95, 111, 114, 99, 95, 117, 110, 112,
1857 97, 99, 107, 95, 115, 49, 54, 95, 115, 119, 97, 112, 95, 116, 114, 117,
1858 110, 99, 11, 4, 4, 12, 2, 2, 14, 4, 16, 0, 0, 0, 20, 2,
1859 20, 4, 183, 32, 4, 154, 33, 32, 124, 0, 33, 16, 2, 0,
1860 };
1861 p = orc_program_new_from_static_bytecode (bc);
1862 orc_program_set_backup_function (p,
1863 _backup_audio_orc_unpack_s16_swap_trunc);
1864 #else
1865 p = orc_program_new ();
1866 orc_program_set_name (p, "audio_orc_unpack_s16_swap_trunc");
1867 orc_program_set_backup_function (p,
1868 _backup_audio_orc_unpack_s16_swap_trunc);
1869 orc_program_add_destination (p, 4, "d1");
1870 orc_program_add_source (p, 2, "s1");
1871 orc_program_add_constant (p, 4, 0x00000010, "c1");
1872 orc_program_add_temporary (p, 2, "t1");
1873 orc_program_add_temporary (p, 4, "t2");
1874
1875 orc_program_append_2 (p, "swapw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1,
1876 ORC_VAR_D1);
1877 orc_program_append_2 (p, "convuwl", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1,
1878 ORC_VAR_D1);
1879 orc_program_append_2 (p, "shll", 0, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_C1,
1880 ORC_VAR_D1);
1881 #endif
1882
1883 orc_program_compile (p);
1884 c = orc_program_take_code (p);
1885 orc_program_free (p);
1886 }
1887 p_inited = TRUE;
1888 orc_once_mutex_unlock ();
1889 }
1890 ex->arrays[ORC_VAR_A2] = c;
1891 ex->program = 0;
1892
1893 ex->n = n;
1894 ex->arrays[ORC_VAR_D1] = d1;
1895 ex->arrays[ORC_VAR_S1] = (void *) s1;
1896
1897 func = c->exec;
1898 func (ex);
1899 }
1900 #endif
1901
1902
1903 /* audio_orc_unpack_u24_32 */
1904 #ifdef DISABLE_ORC
1905 void
audio_orc_unpack_u24_32(gint32 * ORC_RESTRICT d1,const guint8 * ORC_RESTRICT s1,int n)1906 audio_orc_unpack_u24_32 (gint32 * ORC_RESTRICT d1,
1907 const guint8 * ORC_RESTRICT s1, int n)
1908 {
1909 int i;
1910 orc_union32 *ORC_RESTRICT ptr0;
1911 const orc_union32 *ORC_RESTRICT ptr4;
1912 orc_union32 var33;
1913 #if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
1914 volatile orc_union32 var34;
1915 #else
1916 orc_union32 var34;
1917 #endif
1918 orc_union32 var35;
1919 orc_union32 var36;
1920
1921 ptr0 = (orc_union32 *) d1;
1922 ptr4 = (orc_union32 *) s1;
1923
1924 /* 2: loadpl */
1925 var34.i = 0x80000000; /* -2147483648 or 1.061e-314f */
1926
1927 for (i = 0; i < n; i++) {
1928 /* 0: loadl */
1929 var33 = ptr4[i];
1930 /* 1: shll */
1931 var36.i = ((orc_uint32) var33.i) << 8;
1932 /* 3: xorl */
1933 var35.i = var36.i ^ var34.i;
1934 /* 4: storel */
1935 ptr0[i] = var35;
1936 }
1937
1938 }
1939
1940 #else
1941 static void
_backup_audio_orc_unpack_u24_32(OrcExecutor * ORC_RESTRICT ex)1942 _backup_audio_orc_unpack_u24_32 (OrcExecutor * ORC_RESTRICT ex)
1943 {
1944 int i;
1945 int n = ex->n;
1946 orc_union32 *ORC_RESTRICT ptr0;
1947 const orc_union32 *ORC_RESTRICT ptr4;
1948 orc_union32 var33;
1949 #if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
1950 volatile orc_union32 var34;
1951 #else
1952 orc_union32 var34;
1953 #endif
1954 orc_union32 var35;
1955 orc_union32 var36;
1956
1957 ptr0 = (orc_union32 *) ex->arrays[0];
1958 ptr4 = (orc_union32 *) ex->arrays[4];
1959
1960 /* 2: loadpl */
1961 var34.i = 0x80000000; /* -2147483648 or 1.061e-314f */
1962
1963 for (i = 0; i < n; i++) {
1964 /* 0: loadl */
1965 var33 = ptr4[i];
1966 /* 1: shll */
1967 var36.i = ((orc_uint32) var33.i) << 8;
1968 /* 3: xorl */
1969 var35.i = var36.i ^ var34.i;
1970 /* 4: storel */
1971 ptr0[i] = var35;
1972 }
1973
1974 }
1975
1976 void
audio_orc_unpack_u24_32(gint32 * ORC_RESTRICT d1,const guint8 * ORC_RESTRICT s1,int n)1977 audio_orc_unpack_u24_32 (gint32 * ORC_RESTRICT d1,
1978 const guint8 * ORC_RESTRICT s1, int n)
1979 {
1980 OrcExecutor _ex, *ex = &_ex;
1981 static volatile int p_inited = 0;
1982 static OrcCode *c = 0;
1983 void (*func) (OrcExecutor *);
1984
1985 if (!p_inited) {
1986 orc_once_mutex_lock ();
1987 if (!p_inited) {
1988 OrcProgram *p;
1989
1990 #if 1
1991 static const orc_uint8 bc[] = {
1992 1, 9, 23, 97, 117, 100, 105, 111, 95, 111, 114, 99, 95, 117, 110, 112,
1993 97, 99, 107, 95, 117, 50, 52, 95, 51, 50, 11, 4, 4, 12, 4, 4,
1994 14, 4, 8, 0, 0, 0, 14, 4, 0, 0, 0, 128, 20, 4, 124, 32,
1995 4, 16, 132, 0, 32, 17, 2, 0,
1996 };
1997 p = orc_program_new_from_static_bytecode (bc);
1998 orc_program_set_backup_function (p, _backup_audio_orc_unpack_u24_32);
1999 #else
2000 p = orc_program_new ();
2001 orc_program_set_name (p, "audio_orc_unpack_u24_32");
2002 orc_program_set_backup_function (p, _backup_audio_orc_unpack_u24_32);
2003 orc_program_add_destination (p, 4, "d1");
2004 orc_program_add_source (p, 4, "s1");
2005 orc_program_add_constant (p, 4, 0x00000008, "c1");
2006 orc_program_add_constant (p, 4, 0x80000000, "c2");
2007 orc_program_add_temporary (p, 4, "t1");
2008
2009 orc_program_append_2 (p, "shll", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_C1,
2010 ORC_VAR_D1);
2011 orc_program_append_2 (p, "xorl", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_C2,
2012 ORC_VAR_D1);
2013 #endif
2014
2015 orc_program_compile (p);
2016 c = orc_program_take_code (p);
2017 orc_program_free (p);
2018 }
2019 p_inited = TRUE;
2020 orc_once_mutex_unlock ();
2021 }
2022 ex->arrays[ORC_VAR_A2] = c;
2023 ex->program = 0;
2024
2025 ex->n = n;
2026 ex->arrays[ORC_VAR_D1] = d1;
2027 ex->arrays[ORC_VAR_S1] = (void *) s1;
2028
2029 func = c->exec;
2030 func (ex);
2031 }
2032 #endif
2033
2034
2035 /* audio_orc_unpack_s24_32 */
2036 #ifdef DISABLE_ORC
2037 void
audio_orc_unpack_s24_32(gint32 * ORC_RESTRICT d1,const guint8 * ORC_RESTRICT s1,int n)2038 audio_orc_unpack_s24_32 (gint32 * ORC_RESTRICT d1,
2039 const guint8 * ORC_RESTRICT s1, int n)
2040 {
2041 int i;
2042 orc_union32 *ORC_RESTRICT ptr0;
2043 const orc_union32 *ORC_RESTRICT ptr4;
2044 orc_union32 var32;
2045 orc_union32 var33;
2046
2047 ptr0 = (orc_union32 *) d1;
2048 ptr4 = (orc_union32 *) s1;
2049
2050
2051 for (i = 0; i < n; i++) {
2052 /* 0: loadl */
2053 var32 = ptr4[i];
2054 /* 1: shll */
2055 var33.i = ((orc_uint32) var32.i) << 8;
2056 /* 2: storel */
2057 ptr0[i] = var33;
2058 }
2059
2060 }
2061
2062 #else
2063 static void
_backup_audio_orc_unpack_s24_32(OrcExecutor * ORC_RESTRICT ex)2064 _backup_audio_orc_unpack_s24_32 (OrcExecutor * ORC_RESTRICT ex)
2065 {
2066 int i;
2067 int n = ex->n;
2068 orc_union32 *ORC_RESTRICT ptr0;
2069 const orc_union32 *ORC_RESTRICT ptr4;
2070 orc_union32 var32;
2071 orc_union32 var33;
2072
2073 ptr0 = (orc_union32 *) ex->arrays[0];
2074 ptr4 = (orc_union32 *) ex->arrays[4];
2075
2076
2077 for (i = 0; i < n; i++) {
2078 /* 0: loadl */
2079 var32 = ptr4[i];
2080 /* 1: shll */
2081 var33.i = ((orc_uint32) var32.i) << 8;
2082 /* 2: storel */
2083 ptr0[i] = var33;
2084 }
2085
2086 }
2087
2088 void
audio_orc_unpack_s24_32(gint32 * ORC_RESTRICT d1,const guint8 * ORC_RESTRICT s1,int n)2089 audio_orc_unpack_s24_32 (gint32 * ORC_RESTRICT d1,
2090 const guint8 * ORC_RESTRICT s1, int n)
2091 {
2092 OrcExecutor _ex, *ex = &_ex;
2093 static volatile int p_inited = 0;
2094 static OrcCode *c = 0;
2095 void (*func) (OrcExecutor *);
2096
2097 if (!p_inited) {
2098 orc_once_mutex_lock ();
2099 if (!p_inited) {
2100 OrcProgram *p;
2101
2102 #if 1
2103 static const orc_uint8 bc[] = {
2104 1, 9, 23, 97, 117, 100, 105, 111, 95, 111, 114, 99, 95, 117, 110, 112,
2105 97, 99, 107, 95, 115, 50, 52, 95, 51, 50, 11, 4, 4, 12, 4, 4,
2106 14, 4, 8, 0, 0, 0, 124, 0, 4, 16, 2, 0,
2107 };
2108 p = orc_program_new_from_static_bytecode (bc);
2109 orc_program_set_backup_function (p, _backup_audio_orc_unpack_s24_32);
2110 #else
2111 p = orc_program_new ();
2112 orc_program_set_name (p, "audio_orc_unpack_s24_32");
2113 orc_program_set_backup_function (p, _backup_audio_orc_unpack_s24_32);
2114 orc_program_add_destination (p, 4, "d1");
2115 orc_program_add_source (p, 4, "s1");
2116 orc_program_add_constant (p, 4, 0x00000008, "c1");
2117
2118 orc_program_append_2 (p, "shll", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_C1,
2119 ORC_VAR_D1);
2120 #endif
2121
2122 orc_program_compile (p);
2123 c = orc_program_take_code (p);
2124 orc_program_free (p);
2125 }
2126 p_inited = TRUE;
2127 orc_once_mutex_unlock ();
2128 }
2129 ex->arrays[ORC_VAR_A2] = c;
2130 ex->program = 0;
2131
2132 ex->n = n;
2133 ex->arrays[ORC_VAR_D1] = d1;
2134 ex->arrays[ORC_VAR_S1] = (void *) s1;
2135
2136 func = c->exec;
2137 func (ex);
2138 }
2139 #endif
2140
2141
2142 /* audio_orc_unpack_u24_32_swap */
2143 #ifdef DISABLE_ORC
2144 void
audio_orc_unpack_u24_32_swap(gint32 * ORC_RESTRICT d1,const guint8 * ORC_RESTRICT s1,int n)2145 audio_orc_unpack_u24_32_swap (gint32 * ORC_RESTRICT d1,
2146 const guint8 * ORC_RESTRICT s1, int n)
2147 {
2148 int i;
2149 orc_union32 *ORC_RESTRICT ptr0;
2150 const orc_union32 *ORC_RESTRICT ptr4;
2151 orc_union32 var33;
2152 #if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
2153 volatile orc_union32 var34;
2154 #else
2155 orc_union32 var34;
2156 #endif
2157 orc_union32 var35;
2158 orc_union32 var36;
2159 orc_union32 var37;
2160
2161 ptr0 = (orc_union32 *) d1;
2162 ptr4 = (orc_union32 *) s1;
2163
2164 /* 3: loadpl */
2165 var34.i = 0x80000000; /* -2147483648 or 1.061e-314f */
2166
2167 for (i = 0; i < n; i++) {
2168 /* 0: loadl */
2169 var33 = ptr4[i];
2170 /* 1: swapl */
2171 var36.i = ORC_SWAP_L (var33.i);
2172 /* 2: shll */
2173 var37.i = ((orc_uint32) var36.i) << 8;
2174 /* 4: xorl */
2175 var35.i = var37.i ^ var34.i;
2176 /* 5: storel */
2177 ptr0[i] = var35;
2178 }
2179
2180 }
2181
2182 #else
2183 static void
_backup_audio_orc_unpack_u24_32_swap(OrcExecutor * ORC_RESTRICT ex)2184 _backup_audio_orc_unpack_u24_32_swap (OrcExecutor * ORC_RESTRICT ex)
2185 {
2186 int i;
2187 int n = ex->n;
2188 orc_union32 *ORC_RESTRICT ptr0;
2189 const orc_union32 *ORC_RESTRICT ptr4;
2190 orc_union32 var33;
2191 #if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
2192 volatile orc_union32 var34;
2193 #else
2194 orc_union32 var34;
2195 #endif
2196 orc_union32 var35;
2197 orc_union32 var36;
2198 orc_union32 var37;
2199
2200 ptr0 = (orc_union32 *) ex->arrays[0];
2201 ptr4 = (orc_union32 *) ex->arrays[4];
2202
2203 /* 3: loadpl */
2204 var34.i = 0x80000000; /* -2147483648 or 1.061e-314f */
2205
2206 for (i = 0; i < n; i++) {
2207 /* 0: loadl */
2208 var33 = ptr4[i];
2209 /* 1: swapl */
2210 var36.i = ORC_SWAP_L (var33.i);
2211 /* 2: shll */
2212 var37.i = ((orc_uint32) var36.i) << 8;
2213 /* 4: xorl */
2214 var35.i = var37.i ^ var34.i;
2215 /* 5: storel */
2216 ptr0[i] = var35;
2217 }
2218
2219 }
2220
2221 void
audio_orc_unpack_u24_32_swap(gint32 * ORC_RESTRICT d1,const guint8 * ORC_RESTRICT s1,int n)2222 audio_orc_unpack_u24_32_swap (gint32 * ORC_RESTRICT d1,
2223 const guint8 * ORC_RESTRICT s1, int n)
2224 {
2225 OrcExecutor _ex, *ex = &_ex;
2226 static volatile int p_inited = 0;
2227 static OrcCode *c = 0;
2228 void (*func) (OrcExecutor *);
2229
2230 if (!p_inited) {
2231 orc_once_mutex_lock ();
2232 if (!p_inited) {
2233 OrcProgram *p;
2234
2235 #if 1
2236 static const orc_uint8 bc[] = {
2237 1, 9, 28, 97, 117, 100, 105, 111, 95, 111, 114, 99, 95, 117, 110, 112,
2238 97, 99, 107, 95, 117, 50, 52, 95, 51, 50, 95, 115, 119, 97, 112, 11,
2239 4, 4, 12, 4, 4, 14, 4, 8, 0, 0, 0, 14, 4, 0, 0, 0,
2240 128, 20, 4, 184, 32, 4, 124, 32, 32, 16, 132, 0, 32, 17, 2, 0,
2241
2242 };
2243 p = orc_program_new_from_static_bytecode (bc);
2244 orc_program_set_backup_function (p, _backup_audio_orc_unpack_u24_32_swap);
2245 #else
2246 p = orc_program_new ();
2247 orc_program_set_name (p, "audio_orc_unpack_u24_32_swap");
2248 orc_program_set_backup_function (p, _backup_audio_orc_unpack_u24_32_swap);
2249 orc_program_add_destination (p, 4, "d1");
2250 orc_program_add_source (p, 4, "s1");
2251 orc_program_add_constant (p, 4, 0x00000008, "c1");
2252 orc_program_add_constant (p, 4, 0x80000000, "c2");
2253 orc_program_add_temporary (p, 4, "t1");
2254
2255 orc_program_append_2 (p, "swapl", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1,
2256 ORC_VAR_D1);
2257 orc_program_append_2 (p, "shll", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1,
2258 ORC_VAR_D1);
2259 orc_program_append_2 (p, "xorl", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_C2,
2260 ORC_VAR_D1);
2261 #endif
2262
2263 orc_program_compile (p);
2264 c = orc_program_take_code (p);
2265 orc_program_free (p);
2266 }
2267 p_inited = TRUE;
2268 orc_once_mutex_unlock ();
2269 }
2270 ex->arrays[ORC_VAR_A2] = c;
2271 ex->program = 0;
2272
2273 ex->n = n;
2274 ex->arrays[ORC_VAR_D1] = d1;
2275 ex->arrays[ORC_VAR_S1] = (void *) s1;
2276
2277 func = c->exec;
2278 func (ex);
2279 }
2280 #endif
2281
2282
2283 /* audio_orc_unpack_s24_32_swap */
2284 #ifdef DISABLE_ORC
2285 void
audio_orc_unpack_s24_32_swap(gint32 * ORC_RESTRICT d1,const guint8 * ORC_RESTRICT s1,int n)2286 audio_orc_unpack_s24_32_swap (gint32 * ORC_RESTRICT d1,
2287 const guint8 * ORC_RESTRICT s1, int n)
2288 {
2289 int i;
2290 orc_union32 *ORC_RESTRICT ptr0;
2291 const orc_union32 *ORC_RESTRICT ptr4;
2292 orc_union32 var33;
2293 orc_union32 var34;
2294 orc_union32 var35;
2295
2296 ptr0 = (orc_union32 *) d1;
2297 ptr4 = (orc_union32 *) s1;
2298
2299
2300 for (i = 0; i < n; i++) {
2301 /* 0: loadl */
2302 var33 = ptr4[i];
2303 /* 1: swapl */
2304 var35.i = ORC_SWAP_L (var33.i);
2305 /* 2: shll */
2306 var34.i = ((orc_uint32) var35.i) << 8;
2307 /* 3: storel */
2308 ptr0[i] = var34;
2309 }
2310
2311 }
2312
2313 #else
2314 static void
_backup_audio_orc_unpack_s24_32_swap(OrcExecutor * ORC_RESTRICT ex)2315 _backup_audio_orc_unpack_s24_32_swap (OrcExecutor * ORC_RESTRICT ex)
2316 {
2317 int i;
2318 int n = ex->n;
2319 orc_union32 *ORC_RESTRICT ptr0;
2320 const orc_union32 *ORC_RESTRICT ptr4;
2321 orc_union32 var33;
2322 orc_union32 var34;
2323 orc_union32 var35;
2324
2325 ptr0 = (orc_union32 *) ex->arrays[0];
2326 ptr4 = (orc_union32 *) ex->arrays[4];
2327
2328
2329 for (i = 0; i < n; i++) {
2330 /* 0: loadl */
2331 var33 = ptr4[i];
2332 /* 1: swapl */
2333 var35.i = ORC_SWAP_L (var33.i);
2334 /* 2: shll */
2335 var34.i = ((orc_uint32) var35.i) << 8;
2336 /* 3: storel */
2337 ptr0[i] = var34;
2338 }
2339
2340 }
2341
2342 void
audio_orc_unpack_s24_32_swap(gint32 * ORC_RESTRICT d1,const guint8 * ORC_RESTRICT s1,int n)2343 audio_orc_unpack_s24_32_swap (gint32 * ORC_RESTRICT d1,
2344 const guint8 * ORC_RESTRICT s1, int n)
2345 {
2346 OrcExecutor _ex, *ex = &_ex;
2347 static volatile int p_inited = 0;
2348 static OrcCode *c = 0;
2349 void (*func) (OrcExecutor *);
2350
2351 if (!p_inited) {
2352 orc_once_mutex_lock ();
2353 if (!p_inited) {
2354 OrcProgram *p;
2355
2356 #if 1
2357 static const orc_uint8 bc[] = {
2358 1, 9, 28, 97, 117, 100, 105, 111, 95, 111, 114, 99, 95, 117, 110, 112,
2359 97, 99, 107, 95, 115, 50, 52, 95, 51, 50, 95, 115, 119, 97, 112, 11,
2360 4, 4, 12, 4, 4, 14, 4, 8, 0, 0, 0, 20, 4, 184, 32, 4,
2361 124, 0, 32, 16, 2, 0,
2362 };
2363 p = orc_program_new_from_static_bytecode (bc);
2364 orc_program_set_backup_function (p, _backup_audio_orc_unpack_s24_32_swap);
2365 #else
2366 p = orc_program_new ();
2367 orc_program_set_name (p, "audio_orc_unpack_s24_32_swap");
2368 orc_program_set_backup_function (p, _backup_audio_orc_unpack_s24_32_swap);
2369 orc_program_add_destination (p, 4, "d1");
2370 orc_program_add_source (p, 4, "s1");
2371 orc_program_add_constant (p, 4, 0x00000008, "c1");
2372 orc_program_add_temporary (p, 4, "t1");
2373
2374 orc_program_append_2 (p, "swapl", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1,
2375 ORC_VAR_D1);
2376 orc_program_append_2 (p, "shll", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_C1,
2377 ORC_VAR_D1);
2378 #endif
2379
2380 orc_program_compile (p);
2381 c = orc_program_take_code (p);
2382 orc_program_free (p);
2383 }
2384 p_inited = TRUE;
2385 orc_once_mutex_unlock ();
2386 }
2387 ex->arrays[ORC_VAR_A2] = c;
2388 ex->program = 0;
2389
2390 ex->n = n;
2391 ex->arrays[ORC_VAR_D1] = d1;
2392 ex->arrays[ORC_VAR_S1] = (void *) s1;
2393
2394 func = c->exec;
2395 func (ex);
2396 }
2397 #endif
2398
2399
2400 /* audio_orc_unpack_u32 */
2401 #ifdef DISABLE_ORC
2402 void
audio_orc_unpack_u32(gint32 * ORC_RESTRICT d1,const guint8 * ORC_RESTRICT s1,int n)2403 audio_orc_unpack_u32 (gint32 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1,
2404 int n)
2405 {
2406 int i;
2407 orc_union32 *ORC_RESTRICT ptr0;
2408 const orc_union32 *ORC_RESTRICT ptr4;
2409 orc_union32 var32;
2410 #if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
2411 volatile orc_union32 var33;
2412 #else
2413 orc_union32 var33;
2414 #endif
2415 orc_union32 var34;
2416
2417 ptr0 = (orc_union32 *) d1;
2418 ptr4 = (orc_union32 *) s1;
2419
2420 /* 1: loadpl */
2421 var33.i = 0x80000000; /* -2147483648 or 1.061e-314f */
2422
2423 for (i = 0; i < n; i++) {
2424 /* 0: loadl */
2425 var32 = ptr4[i];
2426 /* 2: xorl */
2427 var34.i = var32.i ^ var33.i;
2428 /* 3: storel */
2429 ptr0[i] = var34;
2430 }
2431
2432 }
2433
2434 #else
2435 static void
_backup_audio_orc_unpack_u32(OrcExecutor * ORC_RESTRICT ex)2436 _backup_audio_orc_unpack_u32 (OrcExecutor * ORC_RESTRICT ex)
2437 {
2438 int i;
2439 int n = ex->n;
2440 orc_union32 *ORC_RESTRICT ptr0;
2441 const orc_union32 *ORC_RESTRICT ptr4;
2442 orc_union32 var32;
2443 #if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
2444 volatile orc_union32 var33;
2445 #else
2446 orc_union32 var33;
2447 #endif
2448 orc_union32 var34;
2449
2450 ptr0 = (orc_union32 *) ex->arrays[0];
2451 ptr4 = (orc_union32 *) ex->arrays[4];
2452
2453 /* 1: loadpl */
2454 var33.i = 0x80000000; /* -2147483648 or 1.061e-314f */
2455
2456 for (i = 0; i < n; i++) {
2457 /* 0: loadl */
2458 var32 = ptr4[i];
2459 /* 2: xorl */
2460 var34.i = var32.i ^ var33.i;
2461 /* 3: storel */
2462 ptr0[i] = var34;
2463 }
2464
2465 }
2466
2467 void
audio_orc_unpack_u32(gint32 * ORC_RESTRICT d1,const guint8 * ORC_RESTRICT s1,int n)2468 audio_orc_unpack_u32 (gint32 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1,
2469 int n)
2470 {
2471 OrcExecutor _ex, *ex = &_ex;
2472 static volatile int p_inited = 0;
2473 static OrcCode *c = 0;
2474 void (*func) (OrcExecutor *);
2475
2476 if (!p_inited) {
2477 orc_once_mutex_lock ();
2478 if (!p_inited) {
2479 OrcProgram *p;
2480
2481 #if 1
2482 static const orc_uint8 bc[] = {
2483 1, 9, 20, 97, 117, 100, 105, 111, 95, 111, 114, 99, 95, 117, 110, 112,
2484 97, 99, 107, 95, 117, 51, 50, 11, 4, 4, 12, 4, 4, 14, 4, 0,
2485 0, 0, 128, 132, 0, 4, 16, 2, 0,
2486 };
2487 p = orc_program_new_from_static_bytecode (bc);
2488 orc_program_set_backup_function (p, _backup_audio_orc_unpack_u32);
2489 #else
2490 p = orc_program_new ();
2491 orc_program_set_name (p, "audio_orc_unpack_u32");
2492 orc_program_set_backup_function (p, _backup_audio_orc_unpack_u32);
2493 orc_program_add_destination (p, 4, "d1");
2494 orc_program_add_source (p, 4, "s1");
2495 orc_program_add_constant (p, 4, 0x80000000, "c1");
2496
2497 orc_program_append_2 (p, "xorl", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_C1,
2498 ORC_VAR_D1);
2499 #endif
2500
2501 orc_program_compile (p);
2502 c = orc_program_take_code (p);
2503 orc_program_free (p);
2504 }
2505 p_inited = TRUE;
2506 orc_once_mutex_unlock ();
2507 }
2508 ex->arrays[ORC_VAR_A2] = c;
2509 ex->program = 0;
2510
2511 ex->n = n;
2512 ex->arrays[ORC_VAR_D1] = d1;
2513 ex->arrays[ORC_VAR_S1] = (void *) s1;
2514
2515 func = c->exec;
2516 func (ex);
2517 }
2518 #endif
2519
2520
2521 /* audio_orc_unpack_u32_swap */
2522 #ifdef DISABLE_ORC
2523 void
audio_orc_unpack_u32_swap(gint32 * ORC_RESTRICT d1,const guint8 * ORC_RESTRICT s1,int n)2524 audio_orc_unpack_u32_swap (gint32 * ORC_RESTRICT d1,
2525 const guint8 * ORC_RESTRICT s1, int n)
2526 {
2527 int i;
2528 orc_union32 *ORC_RESTRICT ptr0;
2529 const orc_union32 *ORC_RESTRICT ptr4;
2530 orc_union32 var33;
2531 #if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
2532 volatile orc_union32 var34;
2533 #else
2534 orc_union32 var34;
2535 #endif
2536 orc_union32 var35;
2537 orc_union32 var36;
2538
2539 ptr0 = (orc_union32 *) d1;
2540 ptr4 = (orc_union32 *) s1;
2541
2542 /* 2: loadpl */
2543 var34.i = 0x80000000; /* -2147483648 or 1.061e-314f */
2544
2545 for (i = 0; i < n; i++) {
2546 /* 0: loadl */
2547 var33 = ptr4[i];
2548 /* 1: swapl */
2549 var36.i = ORC_SWAP_L (var33.i);
2550 /* 3: xorl */
2551 var35.i = var36.i ^ var34.i;
2552 /* 4: storel */
2553 ptr0[i] = var35;
2554 }
2555
2556 }
2557
2558 #else
2559 static void
_backup_audio_orc_unpack_u32_swap(OrcExecutor * ORC_RESTRICT ex)2560 _backup_audio_orc_unpack_u32_swap (OrcExecutor * ORC_RESTRICT ex)
2561 {
2562 int i;
2563 int n = ex->n;
2564 orc_union32 *ORC_RESTRICT ptr0;
2565 const orc_union32 *ORC_RESTRICT ptr4;
2566 orc_union32 var33;
2567 #if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
2568 volatile orc_union32 var34;
2569 #else
2570 orc_union32 var34;
2571 #endif
2572 orc_union32 var35;
2573 orc_union32 var36;
2574
2575 ptr0 = (orc_union32 *) ex->arrays[0];
2576 ptr4 = (orc_union32 *) ex->arrays[4];
2577
2578 /* 2: loadpl */
2579 var34.i = 0x80000000; /* -2147483648 or 1.061e-314f */
2580
2581 for (i = 0; i < n; i++) {
2582 /* 0: loadl */
2583 var33 = ptr4[i];
2584 /* 1: swapl */
2585 var36.i = ORC_SWAP_L (var33.i);
2586 /* 3: xorl */
2587 var35.i = var36.i ^ var34.i;
2588 /* 4: storel */
2589 ptr0[i] = var35;
2590 }
2591
2592 }
2593
2594 void
audio_orc_unpack_u32_swap(gint32 * ORC_RESTRICT d1,const guint8 * ORC_RESTRICT s1,int n)2595 audio_orc_unpack_u32_swap (gint32 * ORC_RESTRICT d1,
2596 const guint8 * ORC_RESTRICT s1, int n)
2597 {
2598 OrcExecutor _ex, *ex = &_ex;
2599 static volatile int p_inited = 0;
2600 static OrcCode *c = 0;
2601 void (*func) (OrcExecutor *);
2602
2603 if (!p_inited) {
2604 orc_once_mutex_lock ();
2605 if (!p_inited) {
2606 OrcProgram *p;
2607
2608 #if 1
2609 static const orc_uint8 bc[] = {
2610 1, 9, 25, 97, 117, 100, 105, 111, 95, 111, 114, 99, 95, 117, 110, 112,
2611 97, 99, 107, 95, 117, 51, 50, 95, 115, 119, 97, 112, 11, 4, 4, 12,
2612 4, 4, 14, 4, 0, 0, 0, 128, 20, 4, 184, 32, 4, 132, 0, 32,
2613 16, 2, 0,
2614 };
2615 p = orc_program_new_from_static_bytecode (bc);
2616 orc_program_set_backup_function (p, _backup_audio_orc_unpack_u32_swap);
2617 #else
2618 p = orc_program_new ();
2619 orc_program_set_name (p, "audio_orc_unpack_u32_swap");
2620 orc_program_set_backup_function (p, _backup_audio_orc_unpack_u32_swap);
2621 orc_program_add_destination (p, 4, "d1");
2622 orc_program_add_source (p, 4, "s1");
2623 orc_program_add_constant (p, 4, 0x80000000, "c1");
2624 orc_program_add_temporary (p, 4, "t1");
2625
2626 orc_program_append_2 (p, "swapl", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1,
2627 ORC_VAR_D1);
2628 orc_program_append_2 (p, "xorl", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_C1,
2629 ORC_VAR_D1);
2630 #endif
2631
2632 orc_program_compile (p);
2633 c = orc_program_take_code (p);
2634 orc_program_free (p);
2635 }
2636 p_inited = TRUE;
2637 orc_once_mutex_unlock ();
2638 }
2639 ex->arrays[ORC_VAR_A2] = c;
2640 ex->program = 0;
2641
2642 ex->n = n;
2643 ex->arrays[ORC_VAR_D1] = d1;
2644 ex->arrays[ORC_VAR_S1] = (void *) s1;
2645
2646 func = c->exec;
2647 func (ex);
2648 }
2649 #endif
2650
2651
2652 /* audio_orc_unpack_s32 */
2653 #ifdef DISABLE_ORC
2654 void
audio_orc_unpack_s32(gint32 * ORC_RESTRICT d1,const guint8 * ORC_RESTRICT s1,int n)2655 audio_orc_unpack_s32 (gint32 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1,
2656 int n)
2657 {
2658 int i;
2659 orc_union32 *ORC_RESTRICT ptr0;
2660 const orc_union32 *ORC_RESTRICT ptr4;
2661 orc_union32 var32;
2662 orc_union32 var33;
2663
2664 ptr0 = (orc_union32 *) d1;
2665 ptr4 = (orc_union32 *) s1;
2666
2667
2668 for (i = 0; i < n; i++) {
2669 /* 0: loadl */
2670 var32 = ptr4[i];
2671 /* 1: copyl */
2672 var33.i = var32.i;
2673 /* 2: storel */
2674 ptr0[i] = var33;
2675 }
2676
2677 }
2678
2679 #else
2680 static void
_backup_audio_orc_unpack_s32(OrcExecutor * ORC_RESTRICT ex)2681 _backup_audio_orc_unpack_s32 (OrcExecutor * ORC_RESTRICT ex)
2682 {
2683 int i;
2684 int n = ex->n;
2685 orc_union32 *ORC_RESTRICT ptr0;
2686 const orc_union32 *ORC_RESTRICT ptr4;
2687 orc_union32 var32;
2688 orc_union32 var33;
2689
2690 ptr0 = (orc_union32 *) ex->arrays[0];
2691 ptr4 = (orc_union32 *) ex->arrays[4];
2692
2693
2694 for (i = 0; i < n; i++) {
2695 /* 0: loadl */
2696 var32 = ptr4[i];
2697 /* 1: copyl */
2698 var33.i = var32.i;
2699 /* 2: storel */
2700 ptr0[i] = var33;
2701 }
2702
2703 }
2704
2705 void
audio_orc_unpack_s32(gint32 * ORC_RESTRICT d1,const guint8 * ORC_RESTRICT s1,int n)2706 audio_orc_unpack_s32 (gint32 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1,
2707 int n)
2708 {
2709 OrcExecutor _ex, *ex = &_ex;
2710 static volatile int p_inited = 0;
2711 static OrcCode *c = 0;
2712 void (*func) (OrcExecutor *);
2713
2714 if (!p_inited) {
2715 orc_once_mutex_lock ();
2716 if (!p_inited) {
2717 OrcProgram *p;
2718
2719 #if 1
2720 static const orc_uint8 bc[] = {
2721 1, 9, 20, 97, 117, 100, 105, 111, 95, 111, 114, 99, 95, 117, 110, 112,
2722 97, 99, 107, 95, 115, 51, 50, 11, 4, 4, 12, 4, 4, 112, 0, 4,
2723 2, 0,
2724 };
2725 p = orc_program_new_from_static_bytecode (bc);
2726 orc_program_set_backup_function (p, _backup_audio_orc_unpack_s32);
2727 #else
2728 p = orc_program_new ();
2729 orc_program_set_name (p, "audio_orc_unpack_s32");
2730 orc_program_set_backup_function (p, _backup_audio_orc_unpack_s32);
2731 orc_program_add_destination (p, 4, "d1");
2732 orc_program_add_source (p, 4, "s1");
2733
2734 orc_program_append_2 (p, "copyl", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1,
2735 ORC_VAR_D1);
2736 #endif
2737
2738 orc_program_compile (p);
2739 c = orc_program_take_code (p);
2740 orc_program_free (p);
2741 }
2742 p_inited = TRUE;
2743 orc_once_mutex_unlock ();
2744 }
2745 ex->arrays[ORC_VAR_A2] = c;
2746 ex->program = 0;
2747
2748 ex->n = n;
2749 ex->arrays[ORC_VAR_D1] = d1;
2750 ex->arrays[ORC_VAR_S1] = (void *) s1;
2751
2752 func = c->exec;
2753 func (ex);
2754 }
2755 #endif
2756
2757
2758 /* audio_orc_unpack_s32_swap */
2759 #ifdef DISABLE_ORC
2760 void
audio_orc_unpack_s32_swap(gint32 * ORC_RESTRICT d1,const guint8 * ORC_RESTRICT s1,int n)2761 audio_orc_unpack_s32_swap (gint32 * ORC_RESTRICT d1,
2762 const guint8 * ORC_RESTRICT s1, int n)
2763 {
2764 int i;
2765 orc_union32 *ORC_RESTRICT ptr0;
2766 const orc_union32 *ORC_RESTRICT ptr4;
2767 orc_union32 var32;
2768 orc_union32 var33;
2769
2770 ptr0 = (orc_union32 *) d1;
2771 ptr4 = (orc_union32 *) s1;
2772
2773
2774 for (i = 0; i < n; i++) {
2775 /* 0: loadl */
2776 var32 = ptr4[i];
2777 /* 1: swapl */
2778 var33.i = ORC_SWAP_L (var32.i);
2779 /* 2: storel */
2780 ptr0[i] = var33;
2781 }
2782
2783 }
2784
2785 #else
2786 static void
_backup_audio_orc_unpack_s32_swap(OrcExecutor * ORC_RESTRICT ex)2787 _backup_audio_orc_unpack_s32_swap (OrcExecutor * ORC_RESTRICT ex)
2788 {
2789 int i;
2790 int n = ex->n;
2791 orc_union32 *ORC_RESTRICT ptr0;
2792 const orc_union32 *ORC_RESTRICT ptr4;
2793 orc_union32 var32;
2794 orc_union32 var33;
2795
2796 ptr0 = (orc_union32 *) ex->arrays[0];
2797 ptr4 = (orc_union32 *) ex->arrays[4];
2798
2799
2800 for (i = 0; i < n; i++) {
2801 /* 0: loadl */
2802 var32 = ptr4[i];
2803 /* 1: swapl */
2804 var33.i = ORC_SWAP_L (var32.i);
2805 /* 2: storel */
2806 ptr0[i] = var33;
2807 }
2808
2809 }
2810
2811 void
audio_orc_unpack_s32_swap(gint32 * ORC_RESTRICT d1,const guint8 * ORC_RESTRICT s1,int n)2812 audio_orc_unpack_s32_swap (gint32 * ORC_RESTRICT d1,
2813 const guint8 * ORC_RESTRICT s1, int n)
2814 {
2815 OrcExecutor _ex, *ex = &_ex;
2816 static volatile int p_inited = 0;
2817 static OrcCode *c = 0;
2818 void (*func) (OrcExecutor *);
2819
2820 if (!p_inited) {
2821 orc_once_mutex_lock ();
2822 if (!p_inited) {
2823 OrcProgram *p;
2824
2825 #if 1
2826 static const orc_uint8 bc[] = {
2827 1, 9, 25, 97, 117, 100, 105, 111, 95, 111, 114, 99, 95, 117, 110, 112,
2828 97, 99, 107, 95, 115, 51, 50, 95, 115, 119, 97, 112, 11, 4, 4, 12,
2829 4, 4, 184, 0, 4, 2, 0,
2830 };
2831 p = orc_program_new_from_static_bytecode (bc);
2832 orc_program_set_backup_function (p, _backup_audio_orc_unpack_s32_swap);
2833 #else
2834 p = orc_program_new ();
2835 orc_program_set_name (p, "audio_orc_unpack_s32_swap");
2836 orc_program_set_backup_function (p, _backup_audio_orc_unpack_s32_swap);
2837 orc_program_add_destination (p, 4, "d1");
2838 orc_program_add_source (p, 4, "s1");
2839
2840 orc_program_append_2 (p, "swapl", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1,
2841 ORC_VAR_D1);
2842 #endif
2843
2844 orc_program_compile (p);
2845 c = orc_program_take_code (p);
2846 orc_program_free (p);
2847 }
2848 p_inited = TRUE;
2849 orc_once_mutex_unlock ();
2850 }
2851 ex->arrays[ORC_VAR_A2] = c;
2852 ex->program = 0;
2853
2854 ex->n = n;
2855 ex->arrays[ORC_VAR_D1] = d1;
2856 ex->arrays[ORC_VAR_S1] = (void *) s1;
2857
2858 func = c->exec;
2859 func (ex);
2860 }
2861 #endif
2862
2863
2864 /* audio_orc_unpack_f32 */
2865 #ifdef DISABLE_ORC
2866 void
audio_orc_unpack_f32(gdouble * ORC_RESTRICT d1,const gfloat * ORC_RESTRICT s1,int n)2867 audio_orc_unpack_f32 (gdouble * ORC_RESTRICT d1, const gfloat * ORC_RESTRICT s1,
2868 int n)
2869 {
2870 int i;
2871 orc_union64 *ORC_RESTRICT ptr0;
2872 const orc_union32 *ORC_RESTRICT ptr4;
2873 orc_union32 var32;
2874 orc_union64 var33;
2875
2876 ptr0 = (orc_union64 *) d1;
2877 ptr4 = (orc_union32 *) s1;
2878
2879
2880 for (i = 0; i < n; i++) {
2881 /* 0: loadl */
2882 var32 = ptr4[i];
2883 /* 1: convfd */
2884 {
2885 orc_union32 _src1;
2886 _src1.i = ORC_DENORMAL (var32.i);
2887 var33.f = _src1.f;
2888 }
2889 /* 2: storeq */
2890 ptr0[i] = var33;
2891 }
2892
2893 }
2894
2895 #else
2896 static void
_backup_audio_orc_unpack_f32(OrcExecutor * ORC_RESTRICT ex)2897 _backup_audio_orc_unpack_f32 (OrcExecutor * ORC_RESTRICT ex)
2898 {
2899 int i;
2900 int n = ex->n;
2901 orc_union64 *ORC_RESTRICT ptr0;
2902 const orc_union32 *ORC_RESTRICT ptr4;
2903 orc_union32 var32;
2904 orc_union64 var33;
2905
2906 ptr0 = (orc_union64 *) ex->arrays[0];
2907 ptr4 = (orc_union32 *) ex->arrays[4];
2908
2909
2910 for (i = 0; i < n; i++) {
2911 /* 0: loadl */
2912 var32 = ptr4[i];
2913 /* 1: convfd */
2914 {
2915 orc_union32 _src1;
2916 _src1.i = ORC_DENORMAL (var32.i);
2917 var33.f = _src1.f;
2918 }
2919 /* 2: storeq */
2920 ptr0[i] = var33;
2921 }
2922
2923 }
2924
2925 void
audio_orc_unpack_f32(gdouble * ORC_RESTRICT d1,const gfloat * ORC_RESTRICT s1,int n)2926 audio_orc_unpack_f32 (gdouble * ORC_RESTRICT d1, const gfloat * ORC_RESTRICT s1,
2927 int n)
2928 {
2929 OrcExecutor _ex, *ex = &_ex;
2930 static volatile int p_inited = 0;
2931 static OrcCode *c = 0;
2932 void (*func) (OrcExecutor *);
2933
2934 if (!p_inited) {
2935 orc_once_mutex_lock ();
2936 if (!p_inited) {
2937 OrcProgram *p;
2938
2939 #if 1
2940 static const orc_uint8 bc[] = {
2941 1, 9, 20, 97, 117, 100, 105, 111, 95, 111, 114, 99, 95, 117, 110, 112,
2942 97, 99, 107, 95, 102, 51, 50, 11, 8, 8, 12, 4, 4, 224, 0, 4,
2943 2, 0,
2944 };
2945 p = orc_program_new_from_static_bytecode (bc);
2946 orc_program_set_backup_function (p, _backup_audio_orc_unpack_f32);
2947 #else
2948 p = orc_program_new ();
2949 orc_program_set_name (p, "audio_orc_unpack_f32");
2950 orc_program_set_backup_function (p, _backup_audio_orc_unpack_f32);
2951 orc_program_add_destination (p, 8, "d1");
2952 orc_program_add_source (p, 4, "s1");
2953
2954 orc_program_append_2 (p, "convfd", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1,
2955 ORC_VAR_D1);
2956 #endif
2957
2958 orc_program_compile (p);
2959 c = orc_program_take_code (p);
2960 orc_program_free (p);
2961 }
2962 p_inited = TRUE;
2963 orc_once_mutex_unlock ();
2964 }
2965 ex->arrays[ORC_VAR_A2] = c;
2966 ex->program = 0;
2967
2968 ex->n = n;
2969 ex->arrays[ORC_VAR_D1] = d1;
2970 ex->arrays[ORC_VAR_S1] = (void *) s1;
2971
2972 func = c->exec;
2973 func (ex);
2974 }
2975 #endif
2976
2977
2978 /* audio_orc_unpack_f32_swap */
2979 #ifdef DISABLE_ORC
2980 void
audio_orc_unpack_f32_swap(gdouble * ORC_RESTRICT d1,const gfloat * ORC_RESTRICT s1,int n)2981 audio_orc_unpack_f32_swap (gdouble * ORC_RESTRICT d1,
2982 const gfloat * ORC_RESTRICT s1, int n)
2983 {
2984 int i;
2985 orc_union64 *ORC_RESTRICT ptr0;
2986 const orc_union32 *ORC_RESTRICT ptr4;
2987 orc_union32 var33;
2988 orc_union64 var34;
2989 orc_union32 var35;
2990
2991 ptr0 = (orc_union64 *) d1;
2992 ptr4 = (orc_union32 *) s1;
2993
2994
2995 for (i = 0; i < n; i++) {
2996 /* 0: loadl */
2997 var33 = ptr4[i];
2998 /* 1: swapl */
2999 var35.i = ORC_SWAP_L (var33.i);
3000 /* 2: convfd */
3001 {
3002 orc_union32 _src1;
3003 _src1.i = ORC_DENORMAL (var35.i);
3004 var34.f = _src1.f;
3005 }
3006 /* 3: storeq */
3007 ptr0[i] = var34;
3008 }
3009
3010 }
3011
3012 #else
3013 static void
_backup_audio_orc_unpack_f32_swap(OrcExecutor * ORC_RESTRICT ex)3014 _backup_audio_orc_unpack_f32_swap (OrcExecutor * ORC_RESTRICT ex)
3015 {
3016 int i;
3017 int n = ex->n;
3018 orc_union64 *ORC_RESTRICT ptr0;
3019 const orc_union32 *ORC_RESTRICT ptr4;
3020 orc_union32 var33;
3021 orc_union64 var34;
3022 orc_union32 var35;
3023
3024 ptr0 = (orc_union64 *) ex->arrays[0];
3025 ptr4 = (orc_union32 *) ex->arrays[4];
3026
3027
3028 for (i = 0; i < n; i++) {
3029 /* 0: loadl */
3030 var33 = ptr4[i];
3031 /* 1: swapl */
3032 var35.i = ORC_SWAP_L (var33.i);
3033 /* 2: convfd */
3034 {
3035 orc_union32 _src1;
3036 _src1.i = ORC_DENORMAL (var35.i);
3037 var34.f = _src1.f;
3038 }
3039 /* 3: storeq */
3040 ptr0[i] = var34;
3041 }
3042
3043 }
3044
3045 void
audio_orc_unpack_f32_swap(gdouble * ORC_RESTRICT d1,const gfloat * ORC_RESTRICT s1,int n)3046 audio_orc_unpack_f32_swap (gdouble * ORC_RESTRICT d1,
3047 const gfloat * ORC_RESTRICT s1, int n)
3048 {
3049 OrcExecutor _ex, *ex = &_ex;
3050 static volatile int p_inited = 0;
3051 static OrcCode *c = 0;
3052 void (*func) (OrcExecutor *);
3053
3054 if (!p_inited) {
3055 orc_once_mutex_lock ();
3056 if (!p_inited) {
3057 OrcProgram *p;
3058
3059 #if 1
3060 static const orc_uint8 bc[] = {
3061 1, 9, 25, 97, 117, 100, 105, 111, 95, 111, 114, 99, 95, 117, 110, 112,
3062 97, 99, 107, 95, 102, 51, 50, 95, 115, 119, 97, 112, 11, 8, 8, 12,
3063 4, 4, 20, 4, 184, 32, 4, 224, 0, 32, 2, 0,
3064 };
3065 p = orc_program_new_from_static_bytecode (bc);
3066 orc_program_set_backup_function (p, _backup_audio_orc_unpack_f32_swap);
3067 #else
3068 p = orc_program_new ();
3069 orc_program_set_name (p, "audio_orc_unpack_f32_swap");
3070 orc_program_set_backup_function (p, _backup_audio_orc_unpack_f32_swap);
3071 orc_program_add_destination (p, 8, "d1");
3072 orc_program_add_source (p, 4, "s1");
3073 orc_program_add_temporary (p, 4, "t1");
3074
3075 orc_program_append_2 (p, "swapl", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1,
3076 ORC_VAR_D1);
3077 orc_program_append_2 (p, "convfd", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1,
3078 ORC_VAR_D1);
3079 #endif
3080
3081 orc_program_compile (p);
3082 c = orc_program_take_code (p);
3083 orc_program_free (p);
3084 }
3085 p_inited = TRUE;
3086 orc_once_mutex_unlock ();
3087 }
3088 ex->arrays[ORC_VAR_A2] = c;
3089 ex->program = 0;
3090
3091 ex->n = n;
3092 ex->arrays[ORC_VAR_D1] = d1;
3093 ex->arrays[ORC_VAR_S1] = (void *) s1;
3094
3095 func = c->exec;
3096 func (ex);
3097 }
3098 #endif
3099
3100
3101 /* audio_orc_unpack_f64 */
3102 #ifdef DISABLE_ORC
3103 void
audio_orc_unpack_f64(gdouble * ORC_RESTRICT d1,const gdouble * ORC_RESTRICT s1,int n)3104 audio_orc_unpack_f64 (gdouble * ORC_RESTRICT d1,
3105 const gdouble * ORC_RESTRICT s1, int n)
3106 {
3107 int i;
3108 orc_union64 *ORC_RESTRICT ptr0;
3109 const orc_union64 *ORC_RESTRICT ptr4;
3110 orc_union64 var32;
3111 orc_union64 var33;
3112
3113 ptr0 = (orc_union64 *) d1;
3114 ptr4 = (orc_union64 *) s1;
3115
3116
3117 for (i = 0; i < n; i++) {
3118 /* 0: loadq */
3119 var32 = ptr4[i];
3120 /* 1: copyq */
3121 var33.i = var32.i;
3122 /* 2: storeq */
3123 ptr0[i] = var33;
3124 }
3125
3126 }
3127
3128 #else
3129 static void
_backup_audio_orc_unpack_f64(OrcExecutor * ORC_RESTRICT ex)3130 _backup_audio_orc_unpack_f64 (OrcExecutor * ORC_RESTRICT ex)
3131 {
3132 int i;
3133 int n = ex->n;
3134 orc_union64 *ORC_RESTRICT ptr0;
3135 const orc_union64 *ORC_RESTRICT ptr4;
3136 orc_union64 var32;
3137 orc_union64 var33;
3138
3139 ptr0 = (orc_union64 *) ex->arrays[0];
3140 ptr4 = (orc_union64 *) ex->arrays[4];
3141
3142
3143 for (i = 0; i < n; i++) {
3144 /* 0: loadq */
3145 var32 = ptr4[i];
3146 /* 1: copyq */
3147 var33.i = var32.i;
3148 /* 2: storeq */
3149 ptr0[i] = var33;
3150 }
3151
3152 }
3153
3154 void
audio_orc_unpack_f64(gdouble * ORC_RESTRICT d1,const gdouble * ORC_RESTRICT s1,int n)3155 audio_orc_unpack_f64 (gdouble * ORC_RESTRICT d1,
3156 const gdouble * ORC_RESTRICT s1, int n)
3157 {
3158 OrcExecutor _ex, *ex = &_ex;
3159 static volatile int p_inited = 0;
3160 static OrcCode *c = 0;
3161 void (*func) (OrcExecutor *);
3162
3163 if (!p_inited) {
3164 orc_once_mutex_lock ();
3165 if (!p_inited) {
3166 OrcProgram *p;
3167
3168 #if 1
3169 static const orc_uint8 bc[] = {
3170 1, 9, 20, 97, 117, 100, 105, 111, 95, 111, 114, 99, 95, 117, 110, 112,
3171 97, 99, 107, 95, 102, 54, 52, 11, 8, 8, 12, 8, 8, 137, 0, 4,
3172 2, 0,
3173 };
3174 p = orc_program_new_from_static_bytecode (bc);
3175 orc_program_set_backup_function (p, _backup_audio_orc_unpack_f64);
3176 #else
3177 p = orc_program_new ();
3178 orc_program_set_name (p, "audio_orc_unpack_f64");
3179 orc_program_set_backup_function (p, _backup_audio_orc_unpack_f64);
3180 orc_program_add_destination (p, 8, "d1");
3181 orc_program_add_source (p, 8, "s1");
3182
3183 orc_program_append_2 (p, "copyq", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1,
3184 ORC_VAR_D1);
3185 #endif
3186
3187 orc_program_compile (p);
3188 c = orc_program_take_code (p);
3189 orc_program_free (p);
3190 }
3191 p_inited = TRUE;
3192 orc_once_mutex_unlock ();
3193 }
3194 ex->arrays[ORC_VAR_A2] = c;
3195 ex->program = 0;
3196
3197 ex->n = n;
3198 ex->arrays[ORC_VAR_D1] = d1;
3199 ex->arrays[ORC_VAR_S1] = (void *) s1;
3200
3201 func = c->exec;
3202 func (ex);
3203 }
3204 #endif
3205
3206
3207 /* audio_orc_unpack_f64_swap */
3208 #ifdef DISABLE_ORC
3209 void
audio_orc_unpack_f64_swap(gdouble * ORC_RESTRICT d1,const gdouble * ORC_RESTRICT s1,int n)3210 audio_orc_unpack_f64_swap (gdouble * ORC_RESTRICT d1,
3211 const gdouble * ORC_RESTRICT s1, int n)
3212 {
3213 int i;
3214 orc_union64 *ORC_RESTRICT ptr0;
3215 const orc_union64 *ORC_RESTRICT ptr4;
3216 orc_union64 var32;
3217 orc_union64 var33;
3218
3219 ptr0 = (orc_union64 *) d1;
3220 ptr4 = (orc_union64 *) s1;
3221
3222
3223 for (i = 0; i < n; i++) {
3224 /* 0: loadq */
3225 var32 = ptr4[i];
3226 /* 1: swapq */
3227 var33.i = ORC_SWAP_Q (var32.i);
3228 /* 2: storeq */
3229 ptr0[i] = var33;
3230 }
3231
3232 }
3233
3234 #else
3235 static void
_backup_audio_orc_unpack_f64_swap(OrcExecutor * ORC_RESTRICT ex)3236 _backup_audio_orc_unpack_f64_swap (OrcExecutor * ORC_RESTRICT ex)
3237 {
3238 int i;
3239 int n = ex->n;
3240 orc_union64 *ORC_RESTRICT ptr0;
3241 const orc_union64 *ORC_RESTRICT ptr4;
3242 orc_union64 var32;
3243 orc_union64 var33;
3244
3245 ptr0 = (orc_union64 *) ex->arrays[0];
3246 ptr4 = (orc_union64 *) ex->arrays[4];
3247
3248
3249 for (i = 0; i < n; i++) {
3250 /* 0: loadq */
3251 var32 = ptr4[i];
3252 /* 1: swapq */
3253 var33.i = ORC_SWAP_Q (var32.i);
3254 /* 2: storeq */
3255 ptr0[i] = var33;
3256 }
3257
3258 }
3259
3260 void
audio_orc_unpack_f64_swap(gdouble * ORC_RESTRICT d1,const gdouble * ORC_RESTRICT s1,int n)3261 audio_orc_unpack_f64_swap (gdouble * ORC_RESTRICT d1,
3262 const gdouble * ORC_RESTRICT s1, int n)
3263 {
3264 OrcExecutor _ex, *ex = &_ex;
3265 static volatile int p_inited = 0;
3266 static OrcCode *c = 0;
3267 void (*func) (OrcExecutor *);
3268
3269 if (!p_inited) {
3270 orc_once_mutex_lock ();
3271 if (!p_inited) {
3272 OrcProgram *p;
3273
3274 #if 1
3275 static const orc_uint8 bc[] = {
3276 1, 9, 25, 97, 117, 100, 105, 111, 95, 111, 114, 99, 95, 117, 110, 112,
3277 97, 99, 107, 95, 102, 54, 52, 95, 115, 119, 97, 112, 11, 8, 8, 12,
3278 8, 8, 186, 0, 4, 2, 0,
3279 };
3280 p = orc_program_new_from_static_bytecode (bc);
3281 orc_program_set_backup_function (p, _backup_audio_orc_unpack_f64_swap);
3282 #else
3283 p = orc_program_new ();
3284 orc_program_set_name (p, "audio_orc_unpack_f64_swap");
3285 orc_program_set_backup_function (p, _backup_audio_orc_unpack_f64_swap);
3286 orc_program_add_destination (p, 8, "d1");
3287 orc_program_add_source (p, 8, "s1");
3288
3289 orc_program_append_2 (p, "swapq", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1,
3290 ORC_VAR_D1);
3291 #endif
3292
3293 orc_program_compile (p);
3294 c = orc_program_take_code (p);
3295 orc_program_free (p);
3296 }
3297 p_inited = TRUE;
3298 orc_once_mutex_unlock ();
3299 }
3300 ex->arrays[ORC_VAR_A2] = c;
3301 ex->program = 0;
3302
3303 ex->n = n;
3304 ex->arrays[ORC_VAR_D1] = d1;
3305 ex->arrays[ORC_VAR_S1] = (void *) s1;
3306
3307 func = c->exec;
3308 func (ex);
3309 }
3310 #endif
3311
3312
3313 /* audio_orc_pack_u8 */
3314 #ifdef DISABLE_ORC
3315 void
audio_orc_pack_u8(guint8 * ORC_RESTRICT d1,const gint32 * ORC_RESTRICT s1,int n)3316 audio_orc_pack_u8 (guint8 * ORC_RESTRICT d1, const gint32 * ORC_RESTRICT s1,
3317 int n)
3318 {
3319 int i;
3320 orc_int8 *ORC_RESTRICT ptr0;
3321 const orc_union32 *ORC_RESTRICT ptr4;
3322 orc_union32 var34;
3323 #if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
3324 volatile orc_union32 var35;
3325 #else
3326 orc_union32 var35;
3327 #endif
3328 orc_int8 var36;
3329 orc_union32 var37;
3330 orc_union16 var38;
3331
3332 ptr0 = (orc_int8 *) d1;
3333 ptr4 = (orc_union32 *) s1;
3334
3335 /* 1: loadpl */
3336 var35.i = 0x80000000; /* -2147483648 or 1.061e-314f */
3337
3338 for (i = 0; i < n; i++) {
3339 /* 0: loadl */
3340 var34 = ptr4[i];
3341 /* 2: xorl */
3342 var37.i = var34.i ^ var35.i;
3343 /* 3: convhlw */
3344 var38.i = ((orc_uint32) var37.i) >> 16;
3345 /* 4: convhwb */
3346 var36 = ((orc_uint16) var38.i) >> 8;
3347 /* 5: storeb */
3348 ptr0[i] = var36;
3349 }
3350
3351 }
3352
3353 #else
3354 static void
_backup_audio_orc_pack_u8(OrcExecutor * ORC_RESTRICT ex)3355 _backup_audio_orc_pack_u8 (OrcExecutor * ORC_RESTRICT ex)
3356 {
3357 int i;
3358 int n = ex->n;
3359 orc_int8 *ORC_RESTRICT ptr0;
3360 const orc_union32 *ORC_RESTRICT ptr4;
3361 orc_union32 var34;
3362 #if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
3363 volatile orc_union32 var35;
3364 #else
3365 orc_union32 var35;
3366 #endif
3367 orc_int8 var36;
3368 orc_union32 var37;
3369 orc_union16 var38;
3370
3371 ptr0 = (orc_int8 *) ex->arrays[0];
3372 ptr4 = (orc_union32 *) ex->arrays[4];
3373
3374 /* 1: loadpl */
3375 var35.i = 0x80000000; /* -2147483648 or 1.061e-314f */
3376
3377 for (i = 0; i < n; i++) {
3378 /* 0: loadl */
3379 var34 = ptr4[i];
3380 /* 2: xorl */
3381 var37.i = var34.i ^ var35.i;
3382 /* 3: convhlw */
3383 var38.i = ((orc_uint32) var37.i) >> 16;
3384 /* 4: convhwb */
3385 var36 = ((orc_uint16) var38.i) >> 8;
3386 /* 5: storeb */
3387 ptr0[i] = var36;
3388 }
3389
3390 }
3391
3392 void
audio_orc_pack_u8(guint8 * ORC_RESTRICT d1,const gint32 * ORC_RESTRICT s1,int n)3393 audio_orc_pack_u8 (guint8 * ORC_RESTRICT d1, const gint32 * ORC_RESTRICT s1,
3394 int n)
3395 {
3396 OrcExecutor _ex, *ex = &_ex;
3397 static volatile int p_inited = 0;
3398 static OrcCode *c = 0;
3399 void (*func) (OrcExecutor *);
3400
3401 if (!p_inited) {
3402 orc_once_mutex_lock ();
3403 if (!p_inited) {
3404 OrcProgram *p;
3405
3406 #if 1
3407 static const orc_uint8 bc[] = {
3408 1, 9, 17, 97, 117, 100, 105, 111, 95, 111, 114, 99, 95, 112, 97, 99,
3409 107, 95, 117, 56, 11, 1, 1, 12, 4, 4, 14, 4, 0, 0, 0, 128,
3410 20, 4, 20, 2, 132, 32, 4, 16, 164, 33, 32, 158, 0, 33, 2, 0,
3411
3412 };
3413 p = orc_program_new_from_static_bytecode (bc);
3414 orc_program_set_backup_function (p, _backup_audio_orc_pack_u8);
3415 #else
3416 p = orc_program_new ();
3417 orc_program_set_name (p, "audio_orc_pack_u8");
3418 orc_program_set_backup_function (p, _backup_audio_orc_pack_u8);
3419 orc_program_add_destination (p, 1, "d1");
3420 orc_program_add_source (p, 4, "s1");
3421 orc_program_add_constant (p, 4, 0x80000000, "c1");
3422 orc_program_add_temporary (p, 4, "t1");
3423 orc_program_add_temporary (p, 2, "t2");
3424
3425 orc_program_append_2 (p, "xorl", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_C1,
3426 ORC_VAR_D1);
3427 orc_program_append_2 (p, "convhlw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1,
3428 ORC_VAR_D1);
3429 orc_program_append_2 (p, "convhwb", 0, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_D1,
3430 ORC_VAR_D1);
3431 #endif
3432
3433 orc_program_compile (p);
3434 c = orc_program_take_code (p);
3435 orc_program_free (p);
3436 }
3437 p_inited = TRUE;
3438 orc_once_mutex_unlock ();
3439 }
3440 ex->arrays[ORC_VAR_A2] = c;
3441 ex->program = 0;
3442
3443 ex->n = n;
3444 ex->arrays[ORC_VAR_D1] = d1;
3445 ex->arrays[ORC_VAR_S1] = (void *) s1;
3446
3447 func = c->exec;
3448 func (ex);
3449 }
3450 #endif
3451
3452
3453 /* audio_orc_pack_s8 */
3454 #ifdef DISABLE_ORC
3455 void
audio_orc_pack_s8(guint8 * ORC_RESTRICT d1,const gint32 * ORC_RESTRICT s1,int n)3456 audio_orc_pack_s8 (guint8 * ORC_RESTRICT d1, const gint32 * ORC_RESTRICT s1,
3457 int n)
3458 {
3459 int i;
3460 orc_int8 *ORC_RESTRICT ptr0;
3461 const orc_union32 *ORC_RESTRICT ptr4;
3462 orc_union32 var33;
3463 orc_int8 var34;
3464 orc_union16 var35;
3465
3466 ptr0 = (orc_int8 *) d1;
3467 ptr4 = (orc_union32 *) s1;
3468
3469
3470 for (i = 0; i < n; i++) {
3471 /* 0: loadl */
3472 var33 = ptr4[i];
3473 /* 1: convhlw */
3474 var35.i = ((orc_uint32) var33.i) >> 16;
3475 /* 2: convhwb */
3476 var34 = ((orc_uint16) var35.i) >> 8;
3477 /* 3: storeb */
3478 ptr0[i] = var34;
3479 }
3480
3481 }
3482
3483 #else
3484 static void
_backup_audio_orc_pack_s8(OrcExecutor * ORC_RESTRICT ex)3485 _backup_audio_orc_pack_s8 (OrcExecutor * ORC_RESTRICT ex)
3486 {
3487 int i;
3488 int n = ex->n;
3489 orc_int8 *ORC_RESTRICT ptr0;
3490 const orc_union32 *ORC_RESTRICT ptr4;
3491 orc_union32 var33;
3492 orc_int8 var34;
3493 orc_union16 var35;
3494
3495 ptr0 = (orc_int8 *) ex->arrays[0];
3496 ptr4 = (orc_union32 *) ex->arrays[4];
3497
3498
3499 for (i = 0; i < n; i++) {
3500 /* 0: loadl */
3501 var33 = ptr4[i];
3502 /* 1: convhlw */
3503 var35.i = ((orc_uint32) var33.i) >> 16;
3504 /* 2: convhwb */
3505 var34 = ((orc_uint16) var35.i) >> 8;
3506 /* 3: storeb */
3507 ptr0[i] = var34;
3508 }
3509
3510 }
3511
3512 void
audio_orc_pack_s8(guint8 * ORC_RESTRICT d1,const gint32 * ORC_RESTRICT s1,int n)3513 audio_orc_pack_s8 (guint8 * ORC_RESTRICT d1, const gint32 * ORC_RESTRICT s1,
3514 int n)
3515 {
3516 OrcExecutor _ex, *ex = &_ex;
3517 static volatile int p_inited = 0;
3518 static OrcCode *c = 0;
3519 void (*func) (OrcExecutor *);
3520
3521 if (!p_inited) {
3522 orc_once_mutex_lock ();
3523 if (!p_inited) {
3524 OrcProgram *p;
3525
3526 #if 1
3527 static const orc_uint8 bc[] = {
3528 1, 9, 17, 97, 117, 100, 105, 111, 95, 111, 114, 99, 95, 112, 97, 99,
3529 107, 95, 115, 56, 11, 1, 1, 12, 4, 4, 20, 2, 164, 32, 4, 158,
3530 0, 32, 2, 0,
3531 };
3532 p = orc_program_new_from_static_bytecode (bc);
3533 orc_program_set_backup_function (p, _backup_audio_orc_pack_s8);
3534 #else
3535 p = orc_program_new ();
3536 orc_program_set_name (p, "audio_orc_pack_s8");
3537 orc_program_set_backup_function (p, _backup_audio_orc_pack_s8);
3538 orc_program_add_destination (p, 1, "d1");
3539 orc_program_add_source (p, 4, "s1");
3540 orc_program_add_temporary (p, 2, "t1");
3541
3542 orc_program_append_2 (p, "convhlw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1,
3543 ORC_VAR_D1);
3544 orc_program_append_2 (p, "convhwb", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1,
3545 ORC_VAR_D1);
3546 #endif
3547
3548 orc_program_compile (p);
3549 c = orc_program_take_code (p);
3550 orc_program_free (p);
3551 }
3552 p_inited = TRUE;
3553 orc_once_mutex_unlock ();
3554 }
3555 ex->arrays[ORC_VAR_A2] = c;
3556 ex->program = 0;
3557
3558 ex->n = n;
3559 ex->arrays[ORC_VAR_D1] = d1;
3560 ex->arrays[ORC_VAR_S1] = (void *) s1;
3561
3562 func = c->exec;
3563 func (ex);
3564 }
3565 #endif
3566
3567
3568 /* audio_orc_pack_u16 */
3569 #ifdef DISABLE_ORC
3570 void
audio_orc_pack_u16(guint8 * ORC_RESTRICT d1,const gint32 * ORC_RESTRICT s1,int n)3571 audio_orc_pack_u16 (guint8 * ORC_RESTRICT d1, const gint32 * ORC_RESTRICT s1,
3572 int n)
3573 {
3574 int i;
3575 orc_union16 *ORC_RESTRICT ptr0;
3576 const orc_union32 *ORC_RESTRICT ptr4;
3577 orc_union32 var33;
3578 #if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
3579 volatile orc_union32 var34;
3580 #else
3581 orc_union32 var34;
3582 #endif
3583 orc_union16 var35;
3584 orc_union32 var36;
3585
3586 ptr0 = (orc_union16 *) d1;
3587 ptr4 = (orc_union32 *) s1;
3588
3589 /* 1: loadpl */
3590 var34.i = 0x80000000; /* -2147483648 or 1.061e-314f */
3591
3592 for (i = 0; i < n; i++) {
3593 /* 0: loadl */
3594 var33 = ptr4[i];
3595 /* 2: xorl */
3596 var36.i = var33.i ^ var34.i;
3597 /* 3: convhlw */
3598 var35.i = ((orc_uint32) var36.i) >> 16;
3599 /* 4: storew */
3600 ptr0[i] = var35;
3601 }
3602
3603 }
3604
3605 #else
3606 static void
_backup_audio_orc_pack_u16(OrcExecutor * ORC_RESTRICT ex)3607 _backup_audio_orc_pack_u16 (OrcExecutor * ORC_RESTRICT ex)
3608 {
3609 int i;
3610 int n = ex->n;
3611 orc_union16 *ORC_RESTRICT ptr0;
3612 const orc_union32 *ORC_RESTRICT ptr4;
3613 orc_union32 var33;
3614 #if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
3615 volatile orc_union32 var34;
3616 #else
3617 orc_union32 var34;
3618 #endif
3619 orc_union16 var35;
3620 orc_union32 var36;
3621
3622 ptr0 = (orc_union16 *) ex->arrays[0];
3623 ptr4 = (orc_union32 *) ex->arrays[4];
3624
3625 /* 1: loadpl */
3626 var34.i = 0x80000000; /* -2147483648 or 1.061e-314f */
3627
3628 for (i = 0; i < n; i++) {
3629 /* 0: loadl */
3630 var33 = ptr4[i];
3631 /* 2: xorl */
3632 var36.i = var33.i ^ var34.i;
3633 /* 3: convhlw */
3634 var35.i = ((orc_uint32) var36.i) >> 16;
3635 /* 4: storew */
3636 ptr0[i] = var35;
3637 }
3638
3639 }
3640
3641 void
audio_orc_pack_u16(guint8 * ORC_RESTRICT d1,const gint32 * ORC_RESTRICT s1,int n)3642 audio_orc_pack_u16 (guint8 * ORC_RESTRICT d1, const gint32 * ORC_RESTRICT s1,
3643 int n)
3644 {
3645 OrcExecutor _ex, *ex = &_ex;
3646 static volatile int p_inited = 0;
3647 static OrcCode *c = 0;
3648 void (*func) (OrcExecutor *);
3649
3650 if (!p_inited) {
3651 orc_once_mutex_lock ();
3652 if (!p_inited) {
3653 OrcProgram *p;
3654
3655 #if 1
3656 static const orc_uint8 bc[] = {
3657 1, 9, 18, 97, 117, 100, 105, 111, 95, 111, 114, 99, 95, 112, 97, 99,
3658 107, 95, 117, 49, 54, 11, 2, 2, 12, 4, 4, 14, 4, 0, 0, 0,
3659 128, 20, 4, 132, 32, 4, 16, 164, 0, 32, 2, 0,
3660 };
3661 p = orc_program_new_from_static_bytecode (bc);
3662 orc_program_set_backup_function (p, _backup_audio_orc_pack_u16);
3663 #else
3664 p = orc_program_new ();
3665 orc_program_set_name (p, "audio_orc_pack_u16");
3666 orc_program_set_backup_function (p, _backup_audio_orc_pack_u16);
3667 orc_program_add_destination (p, 2, "d1");
3668 orc_program_add_source (p, 4, "s1");
3669 orc_program_add_constant (p, 4, 0x80000000, "c1");
3670 orc_program_add_temporary (p, 4, "t1");
3671
3672 orc_program_append_2 (p, "xorl", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_C1,
3673 ORC_VAR_D1);
3674 orc_program_append_2 (p, "convhlw", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1,
3675 ORC_VAR_D1);
3676 #endif
3677
3678 orc_program_compile (p);
3679 c = orc_program_take_code (p);
3680 orc_program_free (p);
3681 }
3682 p_inited = TRUE;
3683 orc_once_mutex_unlock ();
3684 }
3685 ex->arrays[ORC_VAR_A2] = c;
3686 ex->program = 0;
3687
3688 ex->n = n;
3689 ex->arrays[ORC_VAR_D1] = d1;
3690 ex->arrays[ORC_VAR_S1] = (void *) s1;
3691
3692 func = c->exec;
3693 func (ex);
3694 }
3695 #endif
3696
3697
3698 /* audio_orc_pack_s16 */
3699 #ifdef DISABLE_ORC
3700 void
audio_orc_pack_s16(guint8 * ORC_RESTRICT d1,const gint32 * ORC_RESTRICT s1,int n)3701 audio_orc_pack_s16 (guint8 * ORC_RESTRICT d1, const gint32 * ORC_RESTRICT s1,
3702 int n)
3703 {
3704 int i;
3705 orc_union16 *ORC_RESTRICT ptr0;
3706 const orc_union32 *ORC_RESTRICT ptr4;
3707 orc_union32 var32;
3708 orc_union16 var33;
3709
3710 ptr0 = (orc_union16 *) d1;
3711 ptr4 = (orc_union32 *) s1;
3712
3713
3714 for (i = 0; i < n; i++) {
3715 /* 0: loadl */
3716 var32 = ptr4[i];
3717 /* 1: convhlw */
3718 var33.i = ((orc_uint32) var32.i) >> 16;
3719 /* 2: storew */
3720 ptr0[i] = var33;
3721 }
3722
3723 }
3724
3725 #else
3726 static void
_backup_audio_orc_pack_s16(OrcExecutor * ORC_RESTRICT ex)3727 _backup_audio_orc_pack_s16 (OrcExecutor * ORC_RESTRICT ex)
3728 {
3729 int i;
3730 int n = ex->n;
3731 orc_union16 *ORC_RESTRICT ptr0;
3732 const orc_union32 *ORC_RESTRICT ptr4;
3733 orc_union32 var32;
3734 orc_union16 var33;
3735
3736 ptr0 = (orc_union16 *) ex->arrays[0];
3737 ptr4 = (orc_union32 *) ex->arrays[4];
3738
3739
3740 for (i = 0; i < n; i++) {
3741 /* 0: loadl */
3742 var32 = ptr4[i];
3743 /* 1: convhlw */
3744 var33.i = ((orc_uint32) var32.i) >> 16;
3745 /* 2: storew */
3746 ptr0[i] = var33;
3747 }
3748
3749 }
3750
3751 void
audio_orc_pack_s16(guint8 * ORC_RESTRICT d1,const gint32 * ORC_RESTRICT s1,int n)3752 audio_orc_pack_s16 (guint8 * ORC_RESTRICT d1, const gint32 * ORC_RESTRICT s1,
3753 int n)
3754 {
3755 OrcExecutor _ex, *ex = &_ex;
3756 static volatile int p_inited = 0;
3757 static OrcCode *c = 0;
3758 void (*func) (OrcExecutor *);
3759
3760 if (!p_inited) {
3761 orc_once_mutex_lock ();
3762 if (!p_inited) {
3763 OrcProgram *p;
3764
3765 #if 1
3766 static const orc_uint8 bc[] = {
3767 1, 9, 18, 97, 117, 100, 105, 111, 95, 111, 114, 99, 95, 112, 97, 99,
3768 107, 95, 115, 49, 54, 11, 2, 2, 12, 4, 4, 164, 0, 4, 2, 0,
3769
3770 };
3771 p = orc_program_new_from_static_bytecode (bc);
3772 orc_program_set_backup_function (p, _backup_audio_orc_pack_s16);
3773 #else
3774 p = orc_program_new ();
3775 orc_program_set_name (p, "audio_orc_pack_s16");
3776 orc_program_set_backup_function (p, _backup_audio_orc_pack_s16);
3777 orc_program_add_destination (p, 2, "d1");
3778 orc_program_add_source (p, 4, "s1");
3779
3780 orc_program_append_2 (p, "convhlw", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1,
3781 ORC_VAR_D1);
3782 #endif
3783
3784 orc_program_compile (p);
3785 c = orc_program_take_code (p);
3786 orc_program_free (p);
3787 }
3788 p_inited = TRUE;
3789 orc_once_mutex_unlock ();
3790 }
3791 ex->arrays[ORC_VAR_A2] = c;
3792 ex->program = 0;
3793
3794 ex->n = n;
3795 ex->arrays[ORC_VAR_D1] = d1;
3796 ex->arrays[ORC_VAR_S1] = (void *) s1;
3797
3798 func = c->exec;
3799 func (ex);
3800 }
3801 #endif
3802
3803
3804 /* audio_orc_pack_u16_swap */
3805 #ifdef DISABLE_ORC
3806 void
audio_orc_pack_u16_swap(guint8 * ORC_RESTRICT d1,const gint32 * ORC_RESTRICT s1,int n)3807 audio_orc_pack_u16_swap (guint8 * ORC_RESTRICT d1,
3808 const gint32 * ORC_RESTRICT s1, int n)
3809 {
3810 int i;
3811 orc_union16 *ORC_RESTRICT ptr0;
3812 const orc_union32 *ORC_RESTRICT ptr4;
3813 orc_union32 var34;
3814 #if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
3815 volatile orc_union32 var35;
3816 #else
3817 orc_union32 var35;
3818 #endif
3819 orc_union16 var36;
3820 orc_union32 var37;
3821 orc_union16 var38;
3822
3823 ptr0 = (orc_union16 *) d1;
3824 ptr4 = (orc_union32 *) s1;
3825
3826 /* 1: loadpl */
3827 var35.i = 0x80000000; /* -2147483648 or 1.061e-314f */
3828
3829 for (i = 0; i < n; i++) {
3830 /* 0: loadl */
3831 var34 = ptr4[i];
3832 /* 2: xorl */
3833 var37.i = var34.i ^ var35.i;
3834 /* 3: convhlw */
3835 var38.i = ((orc_uint32) var37.i) >> 16;
3836 /* 4: swapw */
3837 var36.i = ORC_SWAP_W (var38.i);
3838 /* 5: storew */
3839 ptr0[i] = var36;
3840 }
3841
3842 }
3843
3844 #else
3845 static void
_backup_audio_orc_pack_u16_swap(OrcExecutor * ORC_RESTRICT ex)3846 _backup_audio_orc_pack_u16_swap (OrcExecutor * ORC_RESTRICT ex)
3847 {
3848 int i;
3849 int n = ex->n;
3850 orc_union16 *ORC_RESTRICT ptr0;
3851 const orc_union32 *ORC_RESTRICT ptr4;
3852 orc_union32 var34;
3853 #if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
3854 volatile orc_union32 var35;
3855 #else
3856 orc_union32 var35;
3857 #endif
3858 orc_union16 var36;
3859 orc_union32 var37;
3860 orc_union16 var38;
3861
3862 ptr0 = (orc_union16 *) ex->arrays[0];
3863 ptr4 = (orc_union32 *) ex->arrays[4];
3864
3865 /* 1: loadpl */
3866 var35.i = 0x80000000; /* -2147483648 or 1.061e-314f */
3867
3868 for (i = 0; i < n; i++) {
3869 /* 0: loadl */
3870 var34 = ptr4[i];
3871 /* 2: xorl */
3872 var37.i = var34.i ^ var35.i;
3873 /* 3: convhlw */
3874 var38.i = ((orc_uint32) var37.i) >> 16;
3875 /* 4: swapw */
3876 var36.i = ORC_SWAP_W (var38.i);
3877 /* 5: storew */
3878 ptr0[i] = var36;
3879 }
3880
3881 }
3882
3883 void
audio_orc_pack_u16_swap(guint8 * ORC_RESTRICT d1,const gint32 * ORC_RESTRICT s1,int n)3884 audio_orc_pack_u16_swap (guint8 * ORC_RESTRICT d1,
3885 const gint32 * ORC_RESTRICT s1, int n)
3886 {
3887 OrcExecutor _ex, *ex = &_ex;
3888 static volatile int p_inited = 0;
3889 static OrcCode *c = 0;
3890 void (*func) (OrcExecutor *);
3891
3892 if (!p_inited) {
3893 orc_once_mutex_lock ();
3894 if (!p_inited) {
3895 OrcProgram *p;
3896
3897 #if 1
3898 static const orc_uint8 bc[] = {
3899 1, 9, 23, 97, 117, 100, 105, 111, 95, 111, 114, 99, 95, 112, 97, 99,
3900 107, 95, 117, 49, 54, 95, 115, 119, 97, 112, 11, 2, 2, 12, 4, 4,
3901 14, 4, 0, 0, 0, 128, 20, 4, 20, 2, 132, 32, 4, 16, 164, 33,
3902 32, 183, 0, 33, 2, 0,
3903 };
3904 p = orc_program_new_from_static_bytecode (bc);
3905 orc_program_set_backup_function (p, _backup_audio_orc_pack_u16_swap);
3906 #else
3907 p = orc_program_new ();
3908 orc_program_set_name (p, "audio_orc_pack_u16_swap");
3909 orc_program_set_backup_function (p, _backup_audio_orc_pack_u16_swap);
3910 orc_program_add_destination (p, 2, "d1");
3911 orc_program_add_source (p, 4, "s1");
3912 orc_program_add_constant (p, 4, 0x80000000, "c1");
3913 orc_program_add_temporary (p, 4, "t1");
3914 orc_program_add_temporary (p, 2, "t2");
3915
3916 orc_program_append_2 (p, "xorl", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_C1,
3917 ORC_VAR_D1);
3918 orc_program_append_2 (p, "convhlw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1,
3919 ORC_VAR_D1);
3920 orc_program_append_2 (p, "swapw", 0, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_D1,
3921 ORC_VAR_D1);
3922 #endif
3923
3924 orc_program_compile (p);
3925 c = orc_program_take_code (p);
3926 orc_program_free (p);
3927 }
3928 p_inited = TRUE;
3929 orc_once_mutex_unlock ();
3930 }
3931 ex->arrays[ORC_VAR_A2] = c;
3932 ex->program = 0;
3933
3934 ex->n = n;
3935 ex->arrays[ORC_VAR_D1] = d1;
3936 ex->arrays[ORC_VAR_S1] = (void *) s1;
3937
3938 func = c->exec;
3939 func (ex);
3940 }
3941 #endif
3942
3943
3944 /* audio_orc_pack_s16_swap */
3945 #ifdef DISABLE_ORC
3946 void
audio_orc_pack_s16_swap(guint8 * ORC_RESTRICT d1,const gint32 * ORC_RESTRICT s1,int n)3947 audio_orc_pack_s16_swap (guint8 * ORC_RESTRICT d1,
3948 const gint32 * ORC_RESTRICT s1, int n)
3949 {
3950 int i;
3951 orc_union16 *ORC_RESTRICT ptr0;
3952 const orc_union32 *ORC_RESTRICT ptr4;
3953 orc_union32 var33;
3954 orc_union16 var34;
3955 orc_union16 var35;
3956
3957 ptr0 = (orc_union16 *) d1;
3958 ptr4 = (orc_union32 *) s1;
3959
3960
3961 for (i = 0; i < n; i++) {
3962 /* 0: loadl */
3963 var33 = ptr4[i];
3964 /* 1: convhlw */
3965 var35.i = ((orc_uint32) var33.i) >> 16;
3966 /* 2: swapw */
3967 var34.i = ORC_SWAP_W (var35.i);
3968 /* 3: storew */
3969 ptr0[i] = var34;
3970 }
3971
3972 }
3973
3974 #else
3975 static void
_backup_audio_orc_pack_s16_swap(OrcExecutor * ORC_RESTRICT ex)3976 _backup_audio_orc_pack_s16_swap (OrcExecutor * ORC_RESTRICT ex)
3977 {
3978 int i;
3979 int n = ex->n;
3980 orc_union16 *ORC_RESTRICT ptr0;
3981 const orc_union32 *ORC_RESTRICT ptr4;
3982 orc_union32 var33;
3983 orc_union16 var34;
3984 orc_union16 var35;
3985
3986 ptr0 = (orc_union16 *) ex->arrays[0];
3987 ptr4 = (orc_union32 *) ex->arrays[4];
3988
3989
3990 for (i = 0; i < n; i++) {
3991 /* 0: loadl */
3992 var33 = ptr4[i];
3993 /* 1: convhlw */
3994 var35.i = ((orc_uint32) var33.i) >> 16;
3995 /* 2: swapw */
3996 var34.i = ORC_SWAP_W (var35.i);
3997 /* 3: storew */
3998 ptr0[i] = var34;
3999 }
4000
4001 }
4002
4003 void
audio_orc_pack_s16_swap(guint8 * ORC_RESTRICT d1,const gint32 * ORC_RESTRICT s1,int n)4004 audio_orc_pack_s16_swap (guint8 * ORC_RESTRICT d1,
4005 const gint32 * ORC_RESTRICT s1, int n)
4006 {
4007 OrcExecutor _ex, *ex = &_ex;
4008 static volatile int p_inited = 0;
4009 static OrcCode *c = 0;
4010 void (*func) (OrcExecutor *);
4011
4012 if (!p_inited) {
4013 orc_once_mutex_lock ();
4014 if (!p_inited) {
4015 OrcProgram *p;
4016
4017 #if 1
4018 static const orc_uint8 bc[] = {
4019 1, 9, 23, 97, 117, 100, 105, 111, 95, 111, 114, 99, 95, 112, 97, 99,
4020 107, 95, 115, 49, 54, 95, 115, 119, 97, 112, 11, 2, 2, 12, 4, 4,
4021 20, 2, 164, 32, 4, 183, 0, 32, 2, 0,
4022 };
4023 p = orc_program_new_from_static_bytecode (bc);
4024 orc_program_set_backup_function (p, _backup_audio_orc_pack_s16_swap);
4025 #else
4026 p = orc_program_new ();
4027 orc_program_set_name (p, "audio_orc_pack_s16_swap");
4028 orc_program_set_backup_function (p, _backup_audio_orc_pack_s16_swap);
4029 orc_program_add_destination (p, 2, "d1");
4030 orc_program_add_source (p, 4, "s1");
4031 orc_program_add_temporary (p, 2, "t1");
4032
4033 orc_program_append_2 (p, "convhlw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1,
4034 ORC_VAR_D1);
4035 orc_program_append_2 (p, "swapw", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1,
4036 ORC_VAR_D1);
4037 #endif
4038
4039 orc_program_compile (p);
4040 c = orc_program_take_code (p);
4041 orc_program_free (p);
4042 }
4043 p_inited = TRUE;
4044 orc_once_mutex_unlock ();
4045 }
4046 ex->arrays[ORC_VAR_A2] = c;
4047 ex->program = 0;
4048
4049 ex->n = n;
4050 ex->arrays[ORC_VAR_D1] = d1;
4051 ex->arrays[ORC_VAR_S1] = (void *) s1;
4052
4053 func = c->exec;
4054 func (ex);
4055 }
4056 #endif
4057
4058
4059 /* audio_orc_pack_u24_32 */
4060 #ifdef DISABLE_ORC
4061 void
audio_orc_pack_u24_32(guint8 * ORC_RESTRICT d1,const gint32 * ORC_RESTRICT s1,int n)4062 audio_orc_pack_u24_32 (guint8 * ORC_RESTRICT d1, const gint32 * ORC_RESTRICT s1,
4063 int n)
4064 {
4065 int i;
4066 orc_union32 *ORC_RESTRICT ptr0;
4067 const orc_union32 *ORC_RESTRICT ptr4;
4068 orc_union32 var33;
4069 #if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
4070 volatile orc_union32 var34;
4071 #else
4072 orc_union32 var34;
4073 #endif
4074 orc_union32 var35;
4075 orc_union32 var36;
4076
4077 ptr0 = (orc_union32 *) d1;
4078 ptr4 = (orc_union32 *) s1;
4079
4080 /* 1: loadpl */
4081 var34.i = 0x80000000; /* -2147483648 or 1.061e-314f */
4082
4083 for (i = 0; i < n; i++) {
4084 /* 0: loadl */
4085 var33 = ptr4[i];
4086 /* 2: xorl */
4087 var36.i = var33.i ^ var34.i;
4088 /* 3: shrul */
4089 var35.i = ((orc_uint32) var36.i) >> 8;
4090 /* 4: storel */
4091 ptr0[i] = var35;
4092 }
4093
4094 }
4095
4096 #else
4097 static void
_backup_audio_orc_pack_u24_32(OrcExecutor * ORC_RESTRICT ex)4098 _backup_audio_orc_pack_u24_32 (OrcExecutor * ORC_RESTRICT ex)
4099 {
4100 int i;
4101 int n = ex->n;
4102 orc_union32 *ORC_RESTRICT ptr0;
4103 const orc_union32 *ORC_RESTRICT ptr4;
4104 orc_union32 var33;
4105 #if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
4106 volatile orc_union32 var34;
4107 #else
4108 orc_union32 var34;
4109 #endif
4110 orc_union32 var35;
4111 orc_union32 var36;
4112
4113 ptr0 = (orc_union32 *) ex->arrays[0];
4114 ptr4 = (orc_union32 *) ex->arrays[4];
4115
4116 /* 1: loadpl */
4117 var34.i = 0x80000000; /* -2147483648 or 1.061e-314f */
4118
4119 for (i = 0; i < n; i++) {
4120 /* 0: loadl */
4121 var33 = ptr4[i];
4122 /* 2: xorl */
4123 var36.i = var33.i ^ var34.i;
4124 /* 3: shrul */
4125 var35.i = ((orc_uint32) var36.i) >> 8;
4126 /* 4: storel */
4127 ptr0[i] = var35;
4128 }
4129
4130 }
4131
4132 void
audio_orc_pack_u24_32(guint8 * ORC_RESTRICT d1,const gint32 * ORC_RESTRICT s1,int n)4133 audio_orc_pack_u24_32 (guint8 * ORC_RESTRICT d1, const gint32 * ORC_RESTRICT s1,
4134 int n)
4135 {
4136 OrcExecutor _ex, *ex = &_ex;
4137 static volatile int p_inited = 0;
4138 static OrcCode *c = 0;
4139 void (*func) (OrcExecutor *);
4140
4141 if (!p_inited) {
4142 orc_once_mutex_lock ();
4143 if (!p_inited) {
4144 OrcProgram *p;
4145
4146 #if 1
4147 static const orc_uint8 bc[] = {
4148 1, 9, 21, 97, 117, 100, 105, 111, 95, 111, 114, 99, 95, 112, 97, 99,
4149 107, 95, 117, 50, 52, 95, 51, 50, 11, 4, 4, 12, 4, 4, 14, 4,
4150 0, 0, 0, 128, 14, 4, 8, 0, 0, 0, 20, 4, 132, 32, 4, 16,
4151 126, 0, 32, 17, 2, 0,
4152 };
4153 p = orc_program_new_from_static_bytecode (bc);
4154 orc_program_set_backup_function (p, _backup_audio_orc_pack_u24_32);
4155 #else
4156 p = orc_program_new ();
4157 orc_program_set_name (p, "audio_orc_pack_u24_32");
4158 orc_program_set_backup_function (p, _backup_audio_orc_pack_u24_32);
4159 orc_program_add_destination (p, 4, "d1");
4160 orc_program_add_source (p, 4, "s1");
4161 orc_program_add_constant (p, 4, 0x80000000, "c1");
4162 orc_program_add_constant (p, 4, 0x00000008, "c2");
4163 orc_program_add_temporary (p, 4, "t1");
4164
4165 orc_program_append_2 (p, "xorl", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_C1,
4166 ORC_VAR_D1);
4167 orc_program_append_2 (p, "shrul", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_C2,
4168 ORC_VAR_D1);
4169 #endif
4170
4171 orc_program_compile (p);
4172 c = orc_program_take_code (p);
4173 orc_program_free (p);
4174 }
4175 p_inited = TRUE;
4176 orc_once_mutex_unlock ();
4177 }
4178 ex->arrays[ORC_VAR_A2] = c;
4179 ex->program = 0;
4180
4181 ex->n = n;
4182 ex->arrays[ORC_VAR_D1] = d1;
4183 ex->arrays[ORC_VAR_S1] = (void *) s1;
4184
4185 func = c->exec;
4186 func (ex);
4187 }
4188 #endif
4189
4190
4191 /* audio_orc_pack_s24_32 */
4192 #ifdef DISABLE_ORC
4193 void
audio_orc_pack_s24_32(guint8 * ORC_RESTRICT d1,const gint32 * ORC_RESTRICT s1,int n)4194 audio_orc_pack_s24_32 (guint8 * ORC_RESTRICT d1, const gint32 * ORC_RESTRICT s1,
4195 int n)
4196 {
4197 int i;
4198 orc_union32 *ORC_RESTRICT ptr0;
4199 const orc_union32 *ORC_RESTRICT ptr4;
4200 orc_union32 var32;
4201 orc_union32 var33;
4202
4203 ptr0 = (orc_union32 *) d1;
4204 ptr4 = (orc_union32 *) s1;
4205
4206
4207 for (i = 0; i < n; i++) {
4208 /* 0: loadl */
4209 var32 = ptr4[i];
4210 /* 1: shrsl */
4211 var33.i = var32.i >> 8;
4212 /* 2: storel */
4213 ptr0[i] = var33;
4214 }
4215
4216 }
4217
4218 #else
4219 static void
_backup_audio_orc_pack_s24_32(OrcExecutor * ORC_RESTRICT ex)4220 _backup_audio_orc_pack_s24_32 (OrcExecutor * ORC_RESTRICT ex)
4221 {
4222 int i;
4223 int n = ex->n;
4224 orc_union32 *ORC_RESTRICT ptr0;
4225 const orc_union32 *ORC_RESTRICT ptr4;
4226 orc_union32 var32;
4227 orc_union32 var33;
4228
4229 ptr0 = (orc_union32 *) ex->arrays[0];
4230 ptr4 = (orc_union32 *) ex->arrays[4];
4231
4232
4233 for (i = 0; i < n; i++) {
4234 /* 0: loadl */
4235 var32 = ptr4[i];
4236 /* 1: shrsl */
4237 var33.i = var32.i >> 8;
4238 /* 2: storel */
4239 ptr0[i] = var33;
4240 }
4241
4242 }
4243
4244 void
audio_orc_pack_s24_32(guint8 * ORC_RESTRICT d1,const gint32 * ORC_RESTRICT s1,int n)4245 audio_orc_pack_s24_32 (guint8 * ORC_RESTRICT d1, const gint32 * ORC_RESTRICT s1,
4246 int n)
4247 {
4248 OrcExecutor _ex, *ex = &_ex;
4249 static volatile int p_inited = 0;
4250 static OrcCode *c = 0;
4251 void (*func) (OrcExecutor *);
4252
4253 if (!p_inited) {
4254 orc_once_mutex_lock ();
4255 if (!p_inited) {
4256 OrcProgram *p;
4257
4258 #if 1
4259 static const orc_uint8 bc[] = {
4260 1, 9, 21, 97, 117, 100, 105, 111, 95, 111, 114, 99, 95, 112, 97, 99,
4261 107, 95, 115, 50, 52, 95, 51, 50, 11, 4, 4, 12, 4, 4, 14, 4,
4262 8, 0, 0, 0, 125, 0, 4, 16, 2, 0,
4263 };
4264 p = orc_program_new_from_static_bytecode (bc);
4265 orc_program_set_backup_function (p, _backup_audio_orc_pack_s24_32);
4266 #else
4267 p = orc_program_new ();
4268 orc_program_set_name (p, "audio_orc_pack_s24_32");
4269 orc_program_set_backup_function (p, _backup_audio_orc_pack_s24_32);
4270 orc_program_add_destination (p, 4, "d1");
4271 orc_program_add_source (p, 4, "s1");
4272 orc_program_add_constant (p, 4, 0x00000008, "c1");
4273
4274 orc_program_append_2 (p, "shrsl", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_C1,
4275 ORC_VAR_D1);
4276 #endif
4277
4278 orc_program_compile (p);
4279 c = orc_program_take_code (p);
4280 orc_program_free (p);
4281 }
4282 p_inited = TRUE;
4283 orc_once_mutex_unlock ();
4284 }
4285 ex->arrays[ORC_VAR_A2] = c;
4286 ex->program = 0;
4287
4288 ex->n = n;
4289 ex->arrays[ORC_VAR_D1] = d1;
4290 ex->arrays[ORC_VAR_S1] = (void *) s1;
4291
4292 func = c->exec;
4293 func (ex);
4294 }
4295 #endif
4296
4297
4298 /* audio_orc_pack_u24_32_swap */
4299 #ifdef DISABLE_ORC
4300 void
audio_orc_pack_u24_32_swap(guint8 * ORC_RESTRICT d1,const gint32 * ORC_RESTRICT s1,int n)4301 audio_orc_pack_u24_32_swap (guint8 * ORC_RESTRICT d1,
4302 const gint32 * ORC_RESTRICT s1, int n)
4303 {
4304 int i;
4305 orc_union32 *ORC_RESTRICT ptr0;
4306 const orc_union32 *ORC_RESTRICT ptr4;
4307 orc_union32 var33;
4308 #if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
4309 volatile orc_union32 var34;
4310 #else
4311 orc_union32 var34;
4312 #endif
4313 orc_union32 var35;
4314 orc_union32 var36;
4315 orc_union32 var37;
4316
4317 ptr0 = (orc_union32 *) d1;
4318 ptr4 = (orc_union32 *) s1;
4319
4320 /* 1: loadpl */
4321 var34.i = 0x80000000; /* -2147483648 or 1.061e-314f */
4322
4323 for (i = 0; i < n; i++) {
4324 /* 0: loadl */
4325 var33 = ptr4[i];
4326 /* 2: xorl */
4327 var36.i = var33.i ^ var34.i;
4328 /* 3: shrul */
4329 var37.i = ((orc_uint32) var36.i) >> 8;
4330 /* 4: swapl */
4331 var35.i = ORC_SWAP_L (var37.i);
4332 /* 5: storel */
4333 ptr0[i] = var35;
4334 }
4335
4336 }
4337
4338 #else
4339 static void
_backup_audio_orc_pack_u24_32_swap(OrcExecutor * ORC_RESTRICT ex)4340 _backup_audio_orc_pack_u24_32_swap (OrcExecutor * ORC_RESTRICT ex)
4341 {
4342 int i;
4343 int n = ex->n;
4344 orc_union32 *ORC_RESTRICT ptr0;
4345 const orc_union32 *ORC_RESTRICT ptr4;
4346 orc_union32 var33;
4347 #if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
4348 volatile orc_union32 var34;
4349 #else
4350 orc_union32 var34;
4351 #endif
4352 orc_union32 var35;
4353 orc_union32 var36;
4354 orc_union32 var37;
4355
4356 ptr0 = (orc_union32 *) ex->arrays[0];
4357 ptr4 = (orc_union32 *) ex->arrays[4];
4358
4359 /* 1: loadpl */
4360 var34.i = 0x80000000; /* -2147483648 or 1.061e-314f */
4361
4362 for (i = 0; i < n; i++) {
4363 /* 0: loadl */
4364 var33 = ptr4[i];
4365 /* 2: xorl */
4366 var36.i = var33.i ^ var34.i;
4367 /* 3: shrul */
4368 var37.i = ((orc_uint32) var36.i) >> 8;
4369 /* 4: swapl */
4370 var35.i = ORC_SWAP_L (var37.i);
4371 /* 5: storel */
4372 ptr0[i] = var35;
4373 }
4374
4375 }
4376
4377 void
audio_orc_pack_u24_32_swap(guint8 * ORC_RESTRICT d1,const gint32 * ORC_RESTRICT s1,int n)4378 audio_orc_pack_u24_32_swap (guint8 * ORC_RESTRICT d1,
4379 const gint32 * ORC_RESTRICT s1, int n)
4380 {
4381 OrcExecutor _ex, *ex = &_ex;
4382 static volatile int p_inited = 0;
4383 static OrcCode *c = 0;
4384 void (*func) (OrcExecutor *);
4385
4386 if (!p_inited) {
4387 orc_once_mutex_lock ();
4388 if (!p_inited) {
4389 OrcProgram *p;
4390
4391 #if 1
4392 static const orc_uint8 bc[] = {
4393 1, 9, 26, 97, 117, 100, 105, 111, 95, 111, 114, 99, 95, 112, 97, 99,
4394 107, 95, 117, 50, 52, 95, 51, 50, 95, 115, 119, 97, 112, 11, 4, 4,
4395 12, 4, 4, 14, 4, 0, 0, 0, 128, 14, 4, 8, 0, 0, 0, 20,
4396 4, 132, 32, 4, 16, 126, 32, 32, 17, 184, 0, 32, 2, 0,
4397 };
4398 p = orc_program_new_from_static_bytecode (bc);
4399 orc_program_set_backup_function (p, _backup_audio_orc_pack_u24_32_swap);
4400 #else
4401 p = orc_program_new ();
4402 orc_program_set_name (p, "audio_orc_pack_u24_32_swap");
4403 orc_program_set_backup_function (p, _backup_audio_orc_pack_u24_32_swap);
4404 orc_program_add_destination (p, 4, "d1");
4405 orc_program_add_source (p, 4, "s1");
4406 orc_program_add_constant (p, 4, 0x80000000, "c1");
4407 orc_program_add_constant (p, 4, 0x00000008, "c2");
4408 orc_program_add_temporary (p, 4, "t1");
4409
4410 orc_program_append_2 (p, "xorl", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_C1,
4411 ORC_VAR_D1);
4412 orc_program_append_2 (p, "shrul", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C2,
4413 ORC_VAR_D1);
4414 orc_program_append_2 (p, "swapl", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1,
4415 ORC_VAR_D1);
4416 #endif
4417
4418 orc_program_compile (p);
4419 c = orc_program_take_code (p);
4420 orc_program_free (p);
4421 }
4422 p_inited = TRUE;
4423 orc_once_mutex_unlock ();
4424 }
4425 ex->arrays[ORC_VAR_A2] = c;
4426 ex->program = 0;
4427
4428 ex->n = n;
4429 ex->arrays[ORC_VAR_D1] = d1;
4430 ex->arrays[ORC_VAR_S1] = (void *) s1;
4431
4432 func = c->exec;
4433 func (ex);
4434 }
4435 #endif
4436
4437
4438 /* audio_orc_pack_s24_32_swap */
4439 #ifdef DISABLE_ORC
4440 void
audio_orc_pack_s24_32_swap(guint8 * ORC_RESTRICT d1,const gint32 * ORC_RESTRICT s1,int n)4441 audio_orc_pack_s24_32_swap (guint8 * ORC_RESTRICT d1,
4442 const gint32 * ORC_RESTRICT s1, int n)
4443 {
4444 int i;
4445 orc_union32 *ORC_RESTRICT ptr0;
4446 const orc_union32 *ORC_RESTRICT ptr4;
4447 orc_union32 var33;
4448 orc_union32 var34;
4449 orc_union32 var35;
4450
4451 ptr0 = (orc_union32 *) d1;
4452 ptr4 = (orc_union32 *) s1;
4453
4454
4455 for (i = 0; i < n; i++) {
4456 /* 0: loadl */
4457 var33 = ptr4[i];
4458 /* 1: shrsl */
4459 var35.i = var33.i >> 8;
4460 /* 2: swapl */
4461 var34.i = ORC_SWAP_L (var35.i);
4462 /* 3: storel */
4463 ptr0[i] = var34;
4464 }
4465
4466 }
4467
4468 #else
4469 static void
_backup_audio_orc_pack_s24_32_swap(OrcExecutor * ORC_RESTRICT ex)4470 _backup_audio_orc_pack_s24_32_swap (OrcExecutor * ORC_RESTRICT ex)
4471 {
4472 int i;
4473 int n = ex->n;
4474 orc_union32 *ORC_RESTRICT ptr0;
4475 const orc_union32 *ORC_RESTRICT ptr4;
4476 orc_union32 var33;
4477 orc_union32 var34;
4478 orc_union32 var35;
4479
4480 ptr0 = (orc_union32 *) ex->arrays[0];
4481 ptr4 = (orc_union32 *) ex->arrays[4];
4482
4483
4484 for (i = 0; i < n; i++) {
4485 /* 0: loadl */
4486 var33 = ptr4[i];
4487 /* 1: shrsl */
4488 var35.i = var33.i >> 8;
4489 /* 2: swapl */
4490 var34.i = ORC_SWAP_L (var35.i);
4491 /* 3: storel */
4492 ptr0[i] = var34;
4493 }
4494
4495 }
4496
4497 void
audio_orc_pack_s24_32_swap(guint8 * ORC_RESTRICT d1,const gint32 * ORC_RESTRICT s1,int n)4498 audio_orc_pack_s24_32_swap (guint8 * ORC_RESTRICT d1,
4499 const gint32 * ORC_RESTRICT s1, int n)
4500 {
4501 OrcExecutor _ex, *ex = &_ex;
4502 static volatile int p_inited = 0;
4503 static OrcCode *c = 0;
4504 void (*func) (OrcExecutor *);
4505
4506 if (!p_inited) {
4507 orc_once_mutex_lock ();
4508 if (!p_inited) {
4509 OrcProgram *p;
4510
4511 #if 1
4512 static const orc_uint8 bc[] = {
4513 1, 9, 26, 97, 117, 100, 105, 111, 95, 111, 114, 99, 95, 112, 97, 99,
4514 107, 95, 115, 50, 52, 95, 51, 50, 95, 115, 119, 97, 112, 11, 4, 4,
4515 12, 4, 4, 14, 4, 8, 0, 0, 0, 20, 4, 125, 32, 4, 16, 184,
4516 0, 32, 2, 0,
4517 };
4518 p = orc_program_new_from_static_bytecode (bc);
4519 orc_program_set_backup_function (p, _backup_audio_orc_pack_s24_32_swap);
4520 #else
4521 p = orc_program_new ();
4522 orc_program_set_name (p, "audio_orc_pack_s24_32_swap");
4523 orc_program_set_backup_function (p, _backup_audio_orc_pack_s24_32_swap);
4524 orc_program_add_destination (p, 4, "d1");
4525 orc_program_add_source (p, 4, "s1");
4526 orc_program_add_constant (p, 4, 0x00000008, "c1");
4527 orc_program_add_temporary (p, 4, "t1");
4528
4529 orc_program_append_2 (p, "shrsl", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_C1,
4530 ORC_VAR_D1);
4531 orc_program_append_2 (p, "swapl", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1,
4532 ORC_VAR_D1);
4533 #endif
4534
4535 orc_program_compile (p);
4536 c = orc_program_take_code (p);
4537 orc_program_free (p);
4538 }
4539 p_inited = TRUE;
4540 orc_once_mutex_unlock ();
4541 }
4542 ex->arrays[ORC_VAR_A2] = c;
4543 ex->program = 0;
4544
4545 ex->n = n;
4546 ex->arrays[ORC_VAR_D1] = d1;
4547 ex->arrays[ORC_VAR_S1] = (void *) s1;
4548
4549 func = c->exec;
4550 func (ex);
4551 }
4552 #endif
4553
4554
4555 /* audio_orc_pack_u32 */
4556 #ifdef DISABLE_ORC
4557 void
audio_orc_pack_u32(guint8 * ORC_RESTRICT d1,const gint32 * ORC_RESTRICT s1,int n)4558 audio_orc_pack_u32 (guint8 * ORC_RESTRICT d1, const gint32 * ORC_RESTRICT s1,
4559 int n)
4560 {
4561 int i;
4562 orc_union32 *ORC_RESTRICT ptr0;
4563 const orc_union32 *ORC_RESTRICT ptr4;
4564 orc_union32 var32;
4565 #if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
4566 volatile orc_union32 var33;
4567 #else
4568 orc_union32 var33;
4569 #endif
4570 orc_union32 var34;
4571
4572 ptr0 = (orc_union32 *) d1;
4573 ptr4 = (orc_union32 *) s1;
4574
4575 /* 1: loadpl */
4576 var33.i = 0x80000000; /* -2147483648 or 1.061e-314f */
4577
4578 for (i = 0; i < n; i++) {
4579 /* 0: loadl */
4580 var32 = ptr4[i];
4581 /* 2: xorl */
4582 var34.i = var32.i ^ var33.i;
4583 /* 3: storel */
4584 ptr0[i] = var34;
4585 }
4586
4587 }
4588
4589 #else
4590 static void
_backup_audio_orc_pack_u32(OrcExecutor * ORC_RESTRICT ex)4591 _backup_audio_orc_pack_u32 (OrcExecutor * ORC_RESTRICT ex)
4592 {
4593 int i;
4594 int n = ex->n;
4595 orc_union32 *ORC_RESTRICT ptr0;
4596 const orc_union32 *ORC_RESTRICT ptr4;
4597 orc_union32 var32;
4598 #if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
4599 volatile orc_union32 var33;
4600 #else
4601 orc_union32 var33;
4602 #endif
4603 orc_union32 var34;
4604
4605 ptr0 = (orc_union32 *) ex->arrays[0];
4606 ptr4 = (orc_union32 *) ex->arrays[4];
4607
4608 /* 1: loadpl */
4609 var33.i = 0x80000000; /* -2147483648 or 1.061e-314f */
4610
4611 for (i = 0; i < n; i++) {
4612 /* 0: loadl */
4613 var32 = ptr4[i];
4614 /* 2: xorl */
4615 var34.i = var32.i ^ var33.i;
4616 /* 3: storel */
4617 ptr0[i] = var34;
4618 }
4619
4620 }
4621
4622 void
audio_orc_pack_u32(guint8 * ORC_RESTRICT d1,const gint32 * ORC_RESTRICT s1,int n)4623 audio_orc_pack_u32 (guint8 * ORC_RESTRICT d1, const gint32 * ORC_RESTRICT s1,
4624 int n)
4625 {
4626 OrcExecutor _ex, *ex = &_ex;
4627 static volatile int p_inited = 0;
4628 static OrcCode *c = 0;
4629 void (*func) (OrcExecutor *);
4630
4631 if (!p_inited) {
4632 orc_once_mutex_lock ();
4633 if (!p_inited) {
4634 OrcProgram *p;
4635
4636 #if 1
4637 static const orc_uint8 bc[] = {
4638 1, 9, 18, 97, 117, 100, 105, 111, 95, 111, 114, 99, 95, 112, 97, 99,
4639 107, 95, 117, 51, 50, 11, 4, 4, 12, 4, 4, 14, 4, 0, 0, 0,
4640 128, 132, 0, 4, 16, 2, 0,
4641 };
4642 p = orc_program_new_from_static_bytecode (bc);
4643 orc_program_set_backup_function (p, _backup_audio_orc_pack_u32);
4644 #else
4645 p = orc_program_new ();
4646 orc_program_set_name (p, "audio_orc_pack_u32");
4647 orc_program_set_backup_function (p, _backup_audio_orc_pack_u32);
4648 orc_program_add_destination (p, 4, "d1");
4649 orc_program_add_source (p, 4, "s1");
4650 orc_program_add_constant (p, 4, 0x80000000, "c1");
4651
4652 orc_program_append_2 (p, "xorl", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_C1,
4653 ORC_VAR_D1);
4654 #endif
4655
4656 orc_program_compile (p);
4657 c = orc_program_take_code (p);
4658 orc_program_free (p);
4659 }
4660 p_inited = TRUE;
4661 orc_once_mutex_unlock ();
4662 }
4663 ex->arrays[ORC_VAR_A2] = c;
4664 ex->program = 0;
4665
4666 ex->n = n;
4667 ex->arrays[ORC_VAR_D1] = d1;
4668 ex->arrays[ORC_VAR_S1] = (void *) s1;
4669
4670 func = c->exec;
4671 func (ex);
4672 }
4673 #endif
4674
4675
4676 /* audio_orc_pack_s32 */
4677 #ifdef DISABLE_ORC
4678 void
audio_orc_pack_s32(guint8 * ORC_RESTRICT d1,const gint32 * ORC_RESTRICT s1,int n)4679 audio_orc_pack_s32 (guint8 * ORC_RESTRICT d1, const gint32 * ORC_RESTRICT s1,
4680 int n)
4681 {
4682 int i;
4683 orc_union32 *ORC_RESTRICT ptr0;
4684 const orc_union32 *ORC_RESTRICT ptr4;
4685 orc_union32 var32;
4686 orc_union32 var33;
4687
4688 ptr0 = (orc_union32 *) d1;
4689 ptr4 = (orc_union32 *) s1;
4690
4691
4692 for (i = 0; i < n; i++) {
4693 /* 0: loadl */
4694 var32 = ptr4[i];
4695 /* 1: copyl */
4696 var33.i = var32.i;
4697 /* 2: storel */
4698 ptr0[i] = var33;
4699 }
4700
4701 }
4702
4703 #else
4704 static void
_backup_audio_orc_pack_s32(OrcExecutor * ORC_RESTRICT ex)4705 _backup_audio_orc_pack_s32 (OrcExecutor * ORC_RESTRICT ex)
4706 {
4707 int i;
4708 int n = ex->n;
4709 orc_union32 *ORC_RESTRICT ptr0;
4710 const orc_union32 *ORC_RESTRICT ptr4;
4711 orc_union32 var32;
4712 orc_union32 var33;
4713
4714 ptr0 = (orc_union32 *) ex->arrays[0];
4715 ptr4 = (orc_union32 *) ex->arrays[4];
4716
4717
4718 for (i = 0; i < n; i++) {
4719 /* 0: loadl */
4720 var32 = ptr4[i];
4721 /* 1: copyl */
4722 var33.i = var32.i;
4723 /* 2: storel */
4724 ptr0[i] = var33;
4725 }
4726
4727 }
4728
4729 void
audio_orc_pack_s32(guint8 * ORC_RESTRICT d1,const gint32 * ORC_RESTRICT s1,int n)4730 audio_orc_pack_s32 (guint8 * ORC_RESTRICT d1, const gint32 * ORC_RESTRICT s1,
4731 int n)
4732 {
4733 OrcExecutor _ex, *ex = &_ex;
4734 static volatile int p_inited = 0;
4735 static OrcCode *c = 0;
4736 void (*func) (OrcExecutor *);
4737
4738 if (!p_inited) {
4739 orc_once_mutex_lock ();
4740 if (!p_inited) {
4741 OrcProgram *p;
4742
4743 #if 1
4744 static const orc_uint8 bc[] = {
4745 1, 9, 18, 97, 117, 100, 105, 111, 95, 111, 114, 99, 95, 112, 97, 99,
4746 107, 95, 115, 51, 50, 11, 4, 4, 12, 4, 4, 112, 0, 4, 2, 0,
4747
4748 };
4749 p = orc_program_new_from_static_bytecode (bc);
4750 orc_program_set_backup_function (p, _backup_audio_orc_pack_s32);
4751 #else
4752 p = orc_program_new ();
4753 orc_program_set_name (p, "audio_orc_pack_s32");
4754 orc_program_set_backup_function (p, _backup_audio_orc_pack_s32);
4755 orc_program_add_destination (p, 4, "d1");
4756 orc_program_add_source (p, 4, "s1");
4757
4758 orc_program_append_2 (p, "copyl", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1,
4759 ORC_VAR_D1);
4760 #endif
4761
4762 orc_program_compile (p);
4763 c = orc_program_take_code (p);
4764 orc_program_free (p);
4765 }
4766 p_inited = TRUE;
4767 orc_once_mutex_unlock ();
4768 }
4769 ex->arrays[ORC_VAR_A2] = c;
4770 ex->program = 0;
4771
4772 ex->n = n;
4773 ex->arrays[ORC_VAR_D1] = d1;
4774 ex->arrays[ORC_VAR_S1] = (void *) s1;
4775
4776 func = c->exec;
4777 func (ex);
4778 }
4779 #endif
4780
4781
4782 /* audio_orc_pack_u32_swap */
4783 #ifdef DISABLE_ORC
4784 void
audio_orc_pack_u32_swap(guint8 * ORC_RESTRICT d1,const gint32 * ORC_RESTRICT s1,int n)4785 audio_orc_pack_u32_swap (guint8 * ORC_RESTRICT d1,
4786 const gint32 * ORC_RESTRICT s1, int n)
4787 {
4788 int i;
4789 orc_union32 *ORC_RESTRICT ptr0;
4790 const orc_union32 *ORC_RESTRICT ptr4;
4791 orc_union32 var33;
4792 #if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
4793 volatile orc_union32 var34;
4794 #else
4795 orc_union32 var34;
4796 #endif
4797 orc_union32 var35;
4798 orc_union32 var36;
4799
4800 ptr0 = (orc_union32 *) d1;
4801 ptr4 = (orc_union32 *) s1;
4802
4803 /* 1: loadpl */
4804 var34.i = 0x80000000; /* -2147483648 or 1.061e-314f */
4805
4806 for (i = 0; i < n; i++) {
4807 /* 0: loadl */
4808 var33 = ptr4[i];
4809 /* 2: xorl */
4810 var36.i = var33.i ^ var34.i;
4811 /* 3: swapl */
4812 var35.i = ORC_SWAP_L (var36.i);
4813 /* 4: storel */
4814 ptr0[i] = var35;
4815 }
4816
4817 }
4818
4819 #else
4820 static void
_backup_audio_orc_pack_u32_swap(OrcExecutor * ORC_RESTRICT ex)4821 _backup_audio_orc_pack_u32_swap (OrcExecutor * ORC_RESTRICT ex)
4822 {
4823 int i;
4824 int n = ex->n;
4825 orc_union32 *ORC_RESTRICT ptr0;
4826 const orc_union32 *ORC_RESTRICT ptr4;
4827 orc_union32 var33;
4828 #if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
4829 volatile orc_union32 var34;
4830 #else
4831 orc_union32 var34;
4832 #endif
4833 orc_union32 var35;
4834 orc_union32 var36;
4835
4836 ptr0 = (orc_union32 *) ex->arrays[0];
4837 ptr4 = (orc_union32 *) ex->arrays[4];
4838
4839 /* 1: loadpl */
4840 var34.i = 0x80000000; /* -2147483648 or 1.061e-314f */
4841
4842 for (i = 0; i < n; i++) {
4843 /* 0: loadl */
4844 var33 = ptr4[i];
4845 /* 2: xorl */
4846 var36.i = var33.i ^ var34.i;
4847 /* 3: swapl */
4848 var35.i = ORC_SWAP_L (var36.i);
4849 /* 4: storel */
4850 ptr0[i] = var35;
4851 }
4852
4853 }
4854
4855 void
audio_orc_pack_u32_swap(guint8 * ORC_RESTRICT d1,const gint32 * ORC_RESTRICT s1,int n)4856 audio_orc_pack_u32_swap (guint8 * ORC_RESTRICT d1,
4857 const gint32 * ORC_RESTRICT s1, int n)
4858 {
4859 OrcExecutor _ex, *ex = &_ex;
4860 static volatile int p_inited = 0;
4861 static OrcCode *c = 0;
4862 void (*func) (OrcExecutor *);
4863
4864 if (!p_inited) {
4865 orc_once_mutex_lock ();
4866 if (!p_inited) {
4867 OrcProgram *p;
4868
4869 #if 1
4870 static const orc_uint8 bc[] = {
4871 1, 9, 23, 97, 117, 100, 105, 111, 95, 111, 114, 99, 95, 112, 97, 99,
4872 107, 95, 117, 51, 50, 95, 115, 119, 97, 112, 11, 4, 4, 12, 4, 4,
4873 14, 4, 0, 0, 0, 128, 20, 4, 132, 32, 4, 16, 184, 0, 32, 2,
4874 0,
4875 };
4876 p = orc_program_new_from_static_bytecode (bc);
4877 orc_program_set_backup_function (p, _backup_audio_orc_pack_u32_swap);
4878 #else
4879 p = orc_program_new ();
4880 orc_program_set_name (p, "audio_orc_pack_u32_swap");
4881 orc_program_set_backup_function (p, _backup_audio_orc_pack_u32_swap);
4882 orc_program_add_destination (p, 4, "d1");
4883 orc_program_add_source (p, 4, "s1");
4884 orc_program_add_constant (p, 4, 0x80000000, "c1");
4885 orc_program_add_temporary (p, 4, "t1");
4886
4887 orc_program_append_2 (p, "xorl", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_C1,
4888 ORC_VAR_D1);
4889 orc_program_append_2 (p, "swapl", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1,
4890 ORC_VAR_D1);
4891 #endif
4892
4893 orc_program_compile (p);
4894 c = orc_program_take_code (p);
4895 orc_program_free (p);
4896 }
4897 p_inited = TRUE;
4898 orc_once_mutex_unlock ();
4899 }
4900 ex->arrays[ORC_VAR_A2] = c;
4901 ex->program = 0;
4902
4903 ex->n = n;
4904 ex->arrays[ORC_VAR_D1] = d1;
4905 ex->arrays[ORC_VAR_S1] = (void *) s1;
4906
4907 func = c->exec;
4908 func (ex);
4909 }
4910 #endif
4911
4912
4913 /* audio_orc_pack_s32_swap */
4914 #ifdef DISABLE_ORC
4915 void
audio_orc_pack_s32_swap(guint8 * ORC_RESTRICT d1,const gint32 * ORC_RESTRICT s1,int n)4916 audio_orc_pack_s32_swap (guint8 * ORC_RESTRICT d1,
4917 const gint32 * ORC_RESTRICT s1, int n)
4918 {
4919 int i;
4920 orc_union32 *ORC_RESTRICT ptr0;
4921 const orc_union32 *ORC_RESTRICT ptr4;
4922 orc_union32 var32;
4923 orc_union32 var33;
4924
4925 ptr0 = (orc_union32 *) d1;
4926 ptr4 = (orc_union32 *) s1;
4927
4928
4929 for (i = 0; i < n; i++) {
4930 /* 0: loadl */
4931 var32 = ptr4[i];
4932 /* 1: swapl */
4933 var33.i = ORC_SWAP_L (var32.i);
4934 /* 2: storel */
4935 ptr0[i] = var33;
4936 }
4937
4938 }
4939
4940 #else
4941 static void
_backup_audio_orc_pack_s32_swap(OrcExecutor * ORC_RESTRICT ex)4942 _backup_audio_orc_pack_s32_swap (OrcExecutor * ORC_RESTRICT ex)
4943 {
4944 int i;
4945 int n = ex->n;
4946 orc_union32 *ORC_RESTRICT ptr0;
4947 const orc_union32 *ORC_RESTRICT ptr4;
4948 orc_union32 var32;
4949 orc_union32 var33;
4950
4951 ptr0 = (orc_union32 *) ex->arrays[0];
4952 ptr4 = (orc_union32 *) ex->arrays[4];
4953
4954
4955 for (i = 0; i < n; i++) {
4956 /* 0: loadl */
4957 var32 = ptr4[i];
4958 /* 1: swapl */
4959 var33.i = ORC_SWAP_L (var32.i);
4960 /* 2: storel */
4961 ptr0[i] = var33;
4962 }
4963
4964 }
4965
4966 void
audio_orc_pack_s32_swap(guint8 * ORC_RESTRICT d1,const gint32 * ORC_RESTRICT s1,int n)4967 audio_orc_pack_s32_swap (guint8 * ORC_RESTRICT d1,
4968 const gint32 * ORC_RESTRICT s1, int n)
4969 {
4970 OrcExecutor _ex, *ex = &_ex;
4971 static volatile int p_inited = 0;
4972 static OrcCode *c = 0;
4973 void (*func) (OrcExecutor *);
4974
4975 if (!p_inited) {
4976 orc_once_mutex_lock ();
4977 if (!p_inited) {
4978 OrcProgram *p;
4979
4980 #if 1
4981 static const orc_uint8 bc[] = {
4982 1, 9, 23, 97, 117, 100, 105, 111, 95, 111, 114, 99, 95, 112, 97, 99,
4983 107, 95, 115, 51, 50, 95, 115, 119, 97, 112, 11, 4, 4, 12, 4, 4,
4984 184, 0, 4, 2, 0,
4985 };
4986 p = orc_program_new_from_static_bytecode (bc);
4987 orc_program_set_backup_function (p, _backup_audio_orc_pack_s32_swap);
4988 #else
4989 p = orc_program_new ();
4990 orc_program_set_name (p, "audio_orc_pack_s32_swap");
4991 orc_program_set_backup_function (p, _backup_audio_orc_pack_s32_swap);
4992 orc_program_add_destination (p, 4, "d1");
4993 orc_program_add_source (p, 4, "s1");
4994
4995 orc_program_append_2 (p, "swapl", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1,
4996 ORC_VAR_D1);
4997 #endif
4998
4999 orc_program_compile (p);
5000 c = orc_program_take_code (p);
5001 orc_program_free (p);
5002 }
5003 p_inited = TRUE;
5004 orc_once_mutex_unlock ();
5005 }
5006 ex->arrays[ORC_VAR_A2] = c;
5007 ex->program = 0;
5008
5009 ex->n = n;
5010 ex->arrays[ORC_VAR_D1] = d1;
5011 ex->arrays[ORC_VAR_S1] = (void *) s1;
5012
5013 func = c->exec;
5014 func (ex);
5015 }
5016 #endif
5017
5018
5019 /* audio_orc_pack_f32 */
5020 #ifdef DISABLE_ORC
5021 void
audio_orc_pack_f32(gfloat * ORC_RESTRICT d1,const gdouble * ORC_RESTRICT s1,int n)5022 audio_orc_pack_f32 (gfloat * ORC_RESTRICT d1, const gdouble * ORC_RESTRICT s1,
5023 int n)
5024 {
5025 int i;
5026 orc_union32 *ORC_RESTRICT ptr0;
5027 const orc_union64 *ORC_RESTRICT ptr4;
5028 orc_union64 var32;
5029 orc_union32 var33;
5030
5031 ptr0 = (orc_union32 *) d1;
5032 ptr4 = (orc_union64 *) s1;
5033
5034
5035 for (i = 0; i < n; i++) {
5036 /* 0: loadq */
5037 var32 = ptr4[i];
5038 /* 1: convdf */
5039 {
5040 orc_union64 _src1;
5041 orc_union32 _dest;
5042 _src1.i = ORC_DENORMAL_DOUBLE (var32.i);
5043 _dest.f = _src1.f;
5044 var33.i = ORC_DENORMAL (_dest.i);
5045 }
5046 /* 2: storel */
5047 ptr0[i] = var33;
5048 }
5049
5050 }
5051
5052 #else
5053 static void
_backup_audio_orc_pack_f32(OrcExecutor * ORC_RESTRICT ex)5054 _backup_audio_orc_pack_f32 (OrcExecutor * ORC_RESTRICT ex)
5055 {
5056 int i;
5057 int n = ex->n;
5058 orc_union32 *ORC_RESTRICT ptr0;
5059 const orc_union64 *ORC_RESTRICT ptr4;
5060 orc_union64 var32;
5061 orc_union32 var33;
5062
5063 ptr0 = (orc_union32 *) ex->arrays[0];
5064 ptr4 = (orc_union64 *) ex->arrays[4];
5065
5066
5067 for (i = 0; i < n; i++) {
5068 /* 0: loadq */
5069 var32 = ptr4[i];
5070 /* 1: convdf */
5071 {
5072 orc_union64 _src1;
5073 orc_union32 _dest;
5074 _src1.i = ORC_DENORMAL_DOUBLE (var32.i);
5075 _dest.f = _src1.f;
5076 var33.i = ORC_DENORMAL (_dest.i);
5077 }
5078 /* 2: storel */
5079 ptr0[i] = var33;
5080 }
5081
5082 }
5083
5084 void
audio_orc_pack_f32(gfloat * ORC_RESTRICT d1,const gdouble * ORC_RESTRICT s1,int n)5085 audio_orc_pack_f32 (gfloat * ORC_RESTRICT d1, const gdouble * ORC_RESTRICT s1,
5086 int n)
5087 {
5088 OrcExecutor _ex, *ex = &_ex;
5089 static volatile int p_inited = 0;
5090 static OrcCode *c = 0;
5091 void (*func) (OrcExecutor *);
5092
5093 if (!p_inited) {
5094 orc_once_mutex_lock ();
5095 if (!p_inited) {
5096 OrcProgram *p;
5097
5098 #if 1
5099 static const orc_uint8 bc[] = {
5100 1, 9, 18, 97, 117, 100, 105, 111, 95, 111, 114, 99, 95, 112, 97, 99,
5101 107, 95, 102, 51, 50, 11, 4, 4, 12, 8, 8, 225, 0, 4, 2, 0,
5102
5103 };
5104 p = orc_program_new_from_static_bytecode (bc);
5105 orc_program_set_backup_function (p, _backup_audio_orc_pack_f32);
5106 #else
5107 p = orc_program_new ();
5108 orc_program_set_name (p, "audio_orc_pack_f32");
5109 orc_program_set_backup_function (p, _backup_audio_orc_pack_f32);
5110 orc_program_add_destination (p, 4, "d1");
5111 orc_program_add_source (p, 8, "s1");
5112
5113 orc_program_append_2 (p, "convdf", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1,
5114 ORC_VAR_D1);
5115 #endif
5116
5117 orc_program_compile (p);
5118 c = orc_program_take_code (p);
5119 orc_program_free (p);
5120 }
5121 p_inited = TRUE;
5122 orc_once_mutex_unlock ();
5123 }
5124 ex->arrays[ORC_VAR_A2] = c;
5125 ex->program = 0;
5126
5127 ex->n = n;
5128 ex->arrays[ORC_VAR_D1] = d1;
5129 ex->arrays[ORC_VAR_S1] = (void *) s1;
5130
5131 func = c->exec;
5132 func (ex);
5133 }
5134 #endif
5135
5136
5137 /* audio_orc_pack_f32_swap */
5138 #ifdef DISABLE_ORC
5139 void
audio_orc_pack_f32_swap(gfloat * ORC_RESTRICT d1,const gdouble * ORC_RESTRICT s1,int n)5140 audio_orc_pack_f32_swap (gfloat * ORC_RESTRICT d1,
5141 const gdouble * ORC_RESTRICT s1, int n)
5142 {
5143 int i;
5144 orc_union32 *ORC_RESTRICT ptr0;
5145 const orc_union64 *ORC_RESTRICT ptr4;
5146 orc_union64 var33;
5147 orc_union32 var34;
5148 orc_union32 var35;
5149
5150 ptr0 = (orc_union32 *) d1;
5151 ptr4 = (orc_union64 *) s1;
5152
5153
5154 for (i = 0; i < n; i++) {
5155 /* 0: loadq */
5156 var33 = ptr4[i];
5157 /* 1: convdf */
5158 {
5159 orc_union64 _src1;
5160 orc_union32 _dest;
5161 _src1.i = ORC_DENORMAL_DOUBLE (var33.i);
5162 _dest.f = _src1.f;
5163 var35.i = ORC_DENORMAL (_dest.i);
5164 }
5165 /* 2: swapl */
5166 var34.i = ORC_SWAP_L (var35.i);
5167 /* 3: storel */
5168 ptr0[i] = var34;
5169 }
5170
5171 }
5172
5173 #else
5174 static void
_backup_audio_orc_pack_f32_swap(OrcExecutor * ORC_RESTRICT ex)5175 _backup_audio_orc_pack_f32_swap (OrcExecutor * ORC_RESTRICT ex)
5176 {
5177 int i;
5178 int n = ex->n;
5179 orc_union32 *ORC_RESTRICT ptr0;
5180 const orc_union64 *ORC_RESTRICT ptr4;
5181 orc_union64 var33;
5182 orc_union32 var34;
5183 orc_union32 var35;
5184
5185 ptr0 = (orc_union32 *) ex->arrays[0];
5186 ptr4 = (orc_union64 *) ex->arrays[4];
5187
5188
5189 for (i = 0; i < n; i++) {
5190 /* 0: loadq */
5191 var33 = ptr4[i];
5192 /* 1: convdf */
5193 {
5194 orc_union64 _src1;
5195 orc_union32 _dest;
5196 _src1.i = ORC_DENORMAL_DOUBLE (var33.i);
5197 _dest.f = _src1.f;
5198 var35.i = ORC_DENORMAL (_dest.i);
5199 }
5200 /* 2: swapl */
5201 var34.i = ORC_SWAP_L (var35.i);
5202 /* 3: storel */
5203 ptr0[i] = var34;
5204 }
5205
5206 }
5207
5208 void
audio_orc_pack_f32_swap(gfloat * ORC_RESTRICT d1,const gdouble * ORC_RESTRICT s1,int n)5209 audio_orc_pack_f32_swap (gfloat * ORC_RESTRICT d1,
5210 const gdouble * ORC_RESTRICT s1, int n)
5211 {
5212 OrcExecutor _ex, *ex = &_ex;
5213 static volatile int p_inited = 0;
5214 static OrcCode *c = 0;
5215 void (*func) (OrcExecutor *);
5216
5217 if (!p_inited) {
5218 orc_once_mutex_lock ();
5219 if (!p_inited) {
5220 OrcProgram *p;
5221
5222 #if 1
5223 static const orc_uint8 bc[] = {
5224 1, 9, 23, 97, 117, 100, 105, 111, 95, 111, 114, 99, 95, 112, 97, 99,
5225 107, 95, 102, 51, 50, 95, 115, 119, 97, 112, 11, 4, 4, 12, 8, 8,
5226 20, 4, 225, 32, 4, 184, 0, 32, 2, 0,
5227 };
5228 p = orc_program_new_from_static_bytecode (bc);
5229 orc_program_set_backup_function (p, _backup_audio_orc_pack_f32_swap);
5230 #else
5231 p = orc_program_new ();
5232 orc_program_set_name (p, "audio_orc_pack_f32_swap");
5233 orc_program_set_backup_function (p, _backup_audio_orc_pack_f32_swap);
5234 orc_program_add_destination (p, 4, "d1");
5235 orc_program_add_source (p, 8, "s1");
5236 orc_program_add_temporary (p, 4, "t1");
5237
5238 orc_program_append_2 (p, "convdf", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1,
5239 ORC_VAR_D1);
5240 orc_program_append_2 (p, "swapl", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1,
5241 ORC_VAR_D1);
5242 #endif
5243
5244 orc_program_compile (p);
5245 c = orc_program_take_code (p);
5246 orc_program_free (p);
5247 }
5248 p_inited = TRUE;
5249 orc_once_mutex_unlock ();
5250 }
5251 ex->arrays[ORC_VAR_A2] = c;
5252 ex->program = 0;
5253
5254 ex->n = n;
5255 ex->arrays[ORC_VAR_D1] = d1;
5256 ex->arrays[ORC_VAR_S1] = (void *) s1;
5257
5258 func = c->exec;
5259 func (ex);
5260 }
5261 #endif
5262
5263
5264 /* audio_orc_pack_f64 */
5265 #ifdef DISABLE_ORC
5266 void
audio_orc_pack_f64(gdouble * ORC_RESTRICT d1,const gdouble * ORC_RESTRICT s1,int n)5267 audio_orc_pack_f64 (gdouble * ORC_RESTRICT d1, const gdouble * ORC_RESTRICT s1,
5268 int n)
5269 {
5270 int i;
5271 orc_union64 *ORC_RESTRICT ptr0;
5272 const orc_union64 *ORC_RESTRICT ptr4;
5273 orc_union64 var32;
5274 orc_union64 var33;
5275
5276 ptr0 = (orc_union64 *) d1;
5277 ptr4 = (orc_union64 *) s1;
5278
5279
5280 for (i = 0; i < n; i++) {
5281 /* 0: loadq */
5282 var32 = ptr4[i];
5283 /* 1: copyq */
5284 var33.i = var32.i;
5285 /* 2: storeq */
5286 ptr0[i] = var33;
5287 }
5288
5289 }
5290
5291 #else
5292 static void
_backup_audio_orc_pack_f64(OrcExecutor * ORC_RESTRICT ex)5293 _backup_audio_orc_pack_f64 (OrcExecutor * ORC_RESTRICT ex)
5294 {
5295 int i;
5296 int n = ex->n;
5297 orc_union64 *ORC_RESTRICT ptr0;
5298 const orc_union64 *ORC_RESTRICT ptr4;
5299 orc_union64 var32;
5300 orc_union64 var33;
5301
5302 ptr0 = (orc_union64 *) ex->arrays[0];
5303 ptr4 = (orc_union64 *) ex->arrays[4];
5304
5305
5306 for (i = 0; i < n; i++) {
5307 /* 0: loadq */
5308 var32 = ptr4[i];
5309 /* 1: copyq */
5310 var33.i = var32.i;
5311 /* 2: storeq */
5312 ptr0[i] = var33;
5313 }
5314
5315 }
5316
5317 void
audio_orc_pack_f64(gdouble * ORC_RESTRICT d1,const gdouble * ORC_RESTRICT s1,int n)5318 audio_orc_pack_f64 (gdouble * ORC_RESTRICT d1, const gdouble * ORC_RESTRICT s1,
5319 int n)
5320 {
5321 OrcExecutor _ex, *ex = &_ex;
5322 static volatile int p_inited = 0;
5323 static OrcCode *c = 0;
5324 void (*func) (OrcExecutor *);
5325
5326 if (!p_inited) {
5327 orc_once_mutex_lock ();
5328 if (!p_inited) {
5329 OrcProgram *p;
5330
5331 #if 1
5332 static const orc_uint8 bc[] = {
5333 1, 9, 18, 97, 117, 100, 105, 111, 95, 111, 114, 99, 95, 112, 97, 99,
5334 107, 95, 102, 54, 52, 11, 8, 8, 12, 8, 8, 137, 0, 4, 2, 0,
5335
5336 };
5337 p = orc_program_new_from_static_bytecode (bc);
5338 orc_program_set_backup_function (p, _backup_audio_orc_pack_f64);
5339 #else
5340 p = orc_program_new ();
5341 orc_program_set_name (p, "audio_orc_pack_f64");
5342 orc_program_set_backup_function (p, _backup_audio_orc_pack_f64);
5343 orc_program_add_destination (p, 8, "d1");
5344 orc_program_add_source (p, 8, "s1");
5345
5346 orc_program_append_2 (p, "copyq", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1,
5347 ORC_VAR_D1);
5348 #endif
5349
5350 orc_program_compile (p);
5351 c = orc_program_take_code (p);
5352 orc_program_free (p);
5353 }
5354 p_inited = TRUE;
5355 orc_once_mutex_unlock ();
5356 }
5357 ex->arrays[ORC_VAR_A2] = c;
5358 ex->program = 0;
5359
5360 ex->n = n;
5361 ex->arrays[ORC_VAR_D1] = d1;
5362 ex->arrays[ORC_VAR_S1] = (void *) s1;
5363
5364 func = c->exec;
5365 func (ex);
5366 }
5367 #endif
5368
5369
5370 /* audio_orc_pack_f64_swap */
5371 #ifdef DISABLE_ORC
5372 void
audio_orc_pack_f64_swap(gdouble * ORC_RESTRICT d1,const gdouble * ORC_RESTRICT s1,int n)5373 audio_orc_pack_f64_swap (gdouble * ORC_RESTRICT d1,
5374 const gdouble * ORC_RESTRICT s1, int n)
5375 {
5376 int i;
5377 orc_union64 *ORC_RESTRICT ptr0;
5378 const orc_union64 *ORC_RESTRICT ptr4;
5379 orc_union64 var32;
5380 orc_union64 var33;
5381
5382 ptr0 = (orc_union64 *) d1;
5383 ptr4 = (orc_union64 *) s1;
5384
5385
5386 for (i = 0; i < n; i++) {
5387 /* 0: loadq */
5388 var32 = ptr4[i];
5389 /* 1: swapq */
5390 var33.i = ORC_SWAP_Q (var32.i);
5391 /* 2: storeq */
5392 ptr0[i] = var33;
5393 }
5394
5395 }
5396
5397 #else
5398 static void
_backup_audio_orc_pack_f64_swap(OrcExecutor * ORC_RESTRICT ex)5399 _backup_audio_orc_pack_f64_swap (OrcExecutor * ORC_RESTRICT ex)
5400 {
5401 int i;
5402 int n = ex->n;
5403 orc_union64 *ORC_RESTRICT ptr0;
5404 const orc_union64 *ORC_RESTRICT ptr4;
5405 orc_union64 var32;
5406 orc_union64 var33;
5407
5408 ptr0 = (orc_union64 *) ex->arrays[0];
5409 ptr4 = (orc_union64 *) ex->arrays[4];
5410
5411
5412 for (i = 0; i < n; i++) {
5413 /* 0: loadq */
5414 var32 = ptr4[i];
5415 /* 1: swapq */
5416 var33.i = ORC_SWAP_Q (var32.i);
5417 /* 2: storeq */
5418 ptr0[i] = var33;
5419 }
5420
5421 }
5422
5423 void
audio_orc_pack_f64_swap(gdouble * ORC_RESTRICT d1,const gdouble * ORC_RESTRICT s1,int n)5424 audio_orc_pack_f64_swap (gdouble * ORC_RESTRICT d1,
5425 const gdouble * ORC_RESTRICT s1, int n)
5426 {
5427 OrcExecutor _ex, *ex = &_ex;
5428 static volatile int p_inited = 0;
5429 static OrcCode *c = 0;
5430 void (*func) (OrcExecutor *);
5431
5432 if (!p_inited) {
5433 orc_once_mutex_lock ();
5434 if (!p_inited) {
5435 OrcProgram *p;
5436
5437 #if 1
5438 static const orc_uint8 bc[] = {
5439 1, 9, 23, 97, 117, 100, 105, 111, 95, 111, 114, 99, 95, 112, 97, 99,
5440 107, 95, 102, 54, 52, 95, 115, 119, 97, 112, 11, 8, 8, 12, 8, 8,
5441 186, 0, 4, 2, 0,
5442 };
5443 p = orc_program_new_from_static_bytecode (bc);
5444 orc_program_set_backup_function (p, _backup_audio_orc_pack_f64_swap);
5445 #else
5446 p = orc_program_new ();
5447 orc_program_set_name (p, "audio_orc_pack_f64_swap");
5448 orc_program_set_backup_function (p, _backup_audio_orc_pack_f64_swap);
5449 orc_program_add_destination (p, 8, "d1");
5450 orc_program_add_source (p, 8, "s1");
5451
5452 orc_program_append_2 (p, "swapq", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1,
5453 ORC_VAR_D1);
5454 #endif
5455
5456 orc_program_compile (p);
5457 c = orc_program_take_code (p);
5458 orc_program_free (p);
5459 }
5460 p_inited = TRUE;
5461 orc_once_mutex_unlock ();
5462 }
5463 ex->arrays[ORC_VAR_A2] = c;
5464 ex->program = 0;
5465
5466 ex->n = n;
5467 ex->arrays[ORC_VAR_D1] = d1;
5468 ex->arrays[ORC_VAR_S1] = (void *) s1;
5469
5470 func = c->exec;
5471 func (ex);
5472 }
5473 #endif
5474
5475
5476 /* audio_orc_splat_u16 */
5477 #ifdef DISABLE_ORC
5478 void
audio_orc_splat_u16(guint16 * ORC_RESTRICT d1,int p1,int n)5479 audio_orc_splat_u16 (guint16 * ORC_RESTRICT d1, int p1, int n)
5480 {
5481 int i;
5482 orc_union16 *ORC_RESTRICT ptr0;
5483 orc_union16 var32;
5484 orc_union16 var33;
5485
5486 ptr0 = (orc_union16 *) d1;
5487
5488 /* 0: loadpw */
5489 var32.i = p1;
5490
5491 for (i = 0; i < n; i++) {
5492 /* 1: copyw */
5493 var33.i = var32.i;
5494 /* 2: storew */
5495 ptr0[i] = var33;
5496 }
5497
5498 }
5499
5500 #else
5501 static void
_backup_audio_orc_splat_u16(OrcExecutor * ORC_RESTRICT ex)5502 _backup_audio_orc_splat_u16 (OrcExecutor * ORC_RESTRICT ex)
5503 {
5504 int i;
5505 int n = ex->n;
5506 orc_union16 *ORC_RESTRICT ptr0;
5507 orc_union16 var32;
5508 orc_union16 var33;
5509
5510 ptr0 = (orc_union16 *) ex->arrays[0];
5511
5512 /* 0: loadpw */
5513 var32.i = ex->params[24];
5514
5515 for (i = 0; i < n; i++) {
5516 /* 1: copyw */
5517 var33.i = var32.i;
5518 /* 2: storew */
5519 ptr0[i] = var33;
5520 }
5521
5522 }
5523
5524 void
audio_orc_splat_u16(guint16 * ORC_RESTRICT d1,int p1,int n)5525 audio_orc_splat_u16 (guint16 * ORC_RESTRICT d1, int p1, int n)
5526 {
5527 OrcExecutor _ex, *ex = &_ex;
5528 static volatile int p_inited = 0;
5529 static OrcCode *c = 0;
5530 void (*func) (OrcExecutor *);
5531
5532 if (!p_inited) {
5533 orc_once_mutex_lock ();
5534 if (!p_inited) {
5535 OrcProgram *p;
5536
5537 #if 1
5538 static const orc_uint8 bc[] = {
5539 1, 9, 19, 97, 117, 100, 105, 111, 95, 111, 114, 99, 95, 115, 112, 108,
5540 97, 116, 95, 117, 49, 54, 11, 2, 2, 16, 2, 79, 0, 24, 2, 0,
5541
5542 };
5543 p = orc_program_new_from_static_bytecode (bc);
5544 orc_program_set_backup_function (p, _backup_audio_orc_splat_u16);
5545 #else
5546 p = orc_program_new ();
5547 orc_program_set_name (p, "audio_orc_splat_u16");
5548 orc_program_set_backup_function (p, _backup_audio_orc_splat_u16);
5549 orc_program_add_destination (p, 2, "d1");
5550 orc_program_add_parameter (p, 2, "p1");
5551
5552 orc_program_append_2 (p, "copyw", 0, ORC_VAR_D1, ORC_VAR_P1, ORC_VAR_D1,
5553 ORC_VAR_D1);
5554 #endif
5555
5556 orc_program_compile (p);
5557 c = orc_program_take_code (p);
5558 orc_program_free (p);
5559 }
5560 p_inited = TRUE;
5561 orc_once_mutex_unlock ();
5562 }
5563 ex->arrays[ORC_VAR_A2] = c;
5564 ex->program = 0;
5565
5566 ex->n = n;
5567 ex->arrays[ORC_VAR_D1] = d1;
5568 ex->params[ORC_VAR_P1] = p1;
5569
5570 func = c->exec;
5571 func (ex);
5572 }
5573 #endif
5574
5575
5576 /* audio_orc_splat_u32 */
5577 #ifdef DISABLE_ORC
5578 void
audio_orc_splat_u32(guint32 * ORC_RESTRICT d1,int p1,int n)5579 audio_orc_splat_u32 (guint32 * ORC_RESTRICT d1, int p1, int n)
5580 {
5581 int i;
5582 orc_union32 *ORC_RESTRICT ptr0;
5583 orc_union32 var32;
5584 orc_union32 var33;
5585
5586 ptr0 = (orc_union32 *) d1;
5587
5588 /* 0: loadpl */
5589 var32.i = p1;
5590
5591 for (i = 0; i < n; i++) {
5592 /* 1: copyl */
5593 var33.i = var32.i;
5594 /* 2: storel */
5595 ptr0[i] = var33;
5596 }
5597
5598 }
5599
5600 #else
5601 static void
_backup_audio_orc_splat_u32(OrcExecutor * ORC_RESTRICT ex)5602 _backup_audio_orc_splat_u32 (OrcExecutor * ORC_RESTRICT ex)
5603 {
5604 int i;
5605 int n = ex->n;
5606 orc_union32 *ORC_RESTRICT ptr0;
5607 orc_union32 var32;
5608 orc_union32 var33;
5609
5610 ptr0 = (orc_union32 *) ex->arrays[0];
5611
5612 /* 0: loadpl */
5613 var32.i = ex->params[24];
5614
5615 for (i = 0; i < n; i++) {
5616 /* 1: copyl */
5617 var33.i = var32.i;
5618 /* 2: storel */
5619 ptr0[i] = var33;
5620 }
5621
5622 }
5623
5624 void
audio_orc_splat_u32(guint32 * ORC_RESTRICT d1,int p1,int n)5625 audio_orc_splat_u32 (guint32 * ORC_RESTRICT d1, int p1, int n)
5626 {
5627 OrcExecutor _ex, *ex = &_ex;
5628 static volatile int p_inited = 0;
5629 static OrcCode *c = 0;
5630 void (*func) (OrcExecutor *);
5631
5632 if (!p_inited) {
5633 orc_once_mutex_lock ();
5634 if (!p_inited) {
5635 OrcProgram *p;
5636
5637 #if 1
5638 static const orc_uint8 bc[] = {
5639 1, 9, 19, 97, 117, 100, 105, 111, 95, 111, 114, 99, 95, 115, 112, 108,
5640 97, 116, 95, 117, 51, 50, 11, 4, 4, 16, 4, 112, 0, 24, 2, 0,
5641
5642 };
5643 p = orc_program_new_from_static_bytecode (bc);
5644 orc_program_set_backup_function (p, _backup_audio_orc_splat_u32);
5645 #else
5646 p = orc_program_new ();
5647 orc_program_set_name (p, "audio_orc_splat_u32");
5648 orc_program_set_backup_function (p, _backup_audio_orc_splat_u32);
5649 orc_program_add_destination (p, 4, "d1");
5650 orc_program_add_parameter (p, 4, "p1");
5651
5652 orc_program_append_2 (p, "copyl", 0, ORC_VAR_D1, ORC_VAR_P1, ORC_VAR_D1,
5653 ORC_VAR_D1);
5654 #endif
5655
5656 orc_program_compile (p);
5657 c = orc_program_take_code (p);
5658 orc_program_free (p);
5659 }
5660 p_inited = TRUE;
5661 orc_once_mutex_unlock ();
5662 }
5663 ex->arrays[ORC_VAR_A2] = c;
5664 ex->program = 0;
5665
5666 ex->n = n;
5667 ex->arrays[ORC_VAR_D1] = d1;
5668 ex->params[ORC_VAR_P1] = p1;
5669
5670 func = c->exec;
5671 func (ex);
5672 }
5673 #endif
5674
5675
5676 /* audio_orc_splat_u64 */
5677 #ifdef DISABLE_ORC
5678 void
audio_orc_splat_u64(guint64 * ORC_RESTRICT d1,int p1,int n)5679 audio_orc_splat_u64 (guint64 * ORC_RESTRICT d1, int p1, int n)
5680 {
5681 int i;
5682 orc_union64 *ORC_RESTRICT ptr0;
5683 orc_union64 var32;
5684 orc_union64 var33;
5685
5686 ptr0 = (orc_union64 *) d1;
5687
5688 /* 0: loadpq */
5689 var32.i = p1;
5690
5691 for (i = 0; i < n; i++) {
5692 /* 1: copyq */
5693 var33.i = var32.i;
5694 /* 2: storeq */
5695 ptr0[i] = var33;
5696 }
5697
5698 }
5699
5700 #else
5701 static void
_backup_audio_orc_splat_u64(OrcExecutor * ORC_RESTRICT ex)5702 _backup_audio_orc_splat_u64 (OrcExecutor * ORC_RESTRICT ex)
5703 {
5704 int i;
5705 int n = ex->n;
5706 orc_union64 *ORC_RESTRICT ptr0;
5707 orc_union64 var32;
5708 orc_union64 var33;
5709
5710 ptr0 = (orc_union64 *) ex->arrays[0];
5711
5712 /* 0: loadpq */
5713 var32.i =
5714 (ex->params[24] & 0xffffffff) | ((orc_uint64) (ex->params[24 +
5715 (ORC_VAR_T1 - ORC_VAR_P1)]) << 32);
5716
5717 for (i = 0; i < n; i++) {
5718 /* 1: copyq */
5719 var33.i = var32.i;
5720 /* 2: storeq */
5721 ptr0[i] = var33;
5722 }
5723
5724 }
5725
5726 void
audio_orc_splat_u64(guint64 * ORC_RESTRICT d1,int p1,int n)5727 audio_orc_splat_u64 (guint64 * ORC_RESTRICT d1, int p1, int n)
5728 {
5729 OrcExecutor _ex, *ex = &_ex;
5730 static volatile int p_inited = 0;
5731 static OrcCode *c = 0;
5732 void (*func) (OrcExecutor *);
5733
5734 if (!p_inited) {
5735 orc_once_mutex_lock ();
5736 if (!p_inited) {
5737 OrcProgram *p;
5738
5739 #if 1
5740 static const orc_uint8 bc[] = {
5741 1, 9, 19, 97, 117, 100, 105, 111, 95, 111, 114, 99, 95, 115, 112, 108,
5742 97, 116, 95, 117, 54, 52, 11, 8, 8, 16, 8, 137, 0, 24, 2, 0,
5743
5744 };
5745 p = orc_program_new_from_static_bytecode (bc);
5746 orc_program_set_backup_function (p, _backup_audio_orc_splat_u64);
5747 #else
5748 p = orc_program_new ();
5749 orc_program_set_name (p, "audio_orc_splat_u64");
5750 orc_program_set_backup_function (p, _backup_audio_orc_splat_u64);
5751 orc_program_add_destination (p, 8, "d1");
5752 orc_program_add_parameter (p, 8, "p1");
5753
5754 orc_program_append_2 (p, "copyq", 0, ORC_VAR_D1, ORC_VAR_P1, ORC_VAR_D1,
5755 ORC_VAR_D1);
5756 #endif
5757
5758 orc_program_compile (p);
5759 c = orc_program_take_code (p);
5760 orc_program_free (p);
5761 }
5762 p_inited = TRUE;
5763 orc_once_mutex_unlock ();
5764 }
5765 ex->arrays[ORC_VAR_A2] = c;
5766 ex->program = 0;
5767
5768 ex->n = n;
5769 ex->arrays[ORC_VAR_D1] = d1;
5770 ex->params[ORC_VAR_P1] = p1;
5771
5772 func = c->exec;
5773 func (ex);
5774 }
5775 #endif
5776
5777
5778 /* audio_orc_int_bias */
5779 #ifdef DISABLE_ORC
5780 void
audio_orc_int_bias(gint32 * ORC_RESTRICT d1,const gint32 * ORC_RESTRICT s1,int p1,int p2,int n)5781 audio_orc_int_bias (gint32 * ORC_RESTRICT d1, const gint32 * ORC_RESTRICT s1,
5782 int p1, int p2, int n)
5783 {
5784 int i;
5785 orc_union32 *ORC_RESTRICT ptr0;
5786 const orc_union32 *ORC_RESTRICT ptr4;
5787 orc_union32 var33;
5788 orc_union32 var34;
5789 orc_union32 var35;
5790 orc_union32 var36;
5791 orc_union32 var37;
5792
5793 ptr0 = (orc_union32 *) d1;
5794 ptr4 = (orc_union32 *) s1;
5795
5796 /* 1: loadpl */
5797 var34.i = p1;
5798 /* 3: loadpl */
5799 var35.i = p2;
5800
5801 for (i = 0; i < n; i++) {
5802 /* 0: loadl */
5803 var33 = ptr4[i];
5804 /* 2: addssl */
5805 var37.i = ORC_CLAMP_SL ((orc_int64) var33.i + (orc_int64) var34.i);
5806 /* 4: andl */
5807 var36.i = var37.i & var35.i;
5808 /* 5: storel */
5809 ptr0[i] = var36;
5810 }
5811
5812 }
5813
5814 #else
5815 static void
_backup_audio_orc_int_bias(OrcExecutor * ORC_RESTRICT ex)5816 _backup_audio_orc_int_bias (OrcExecutor * ORC_RESTRICT ex)
5817 {
5818 int i;
5819 int n = ex->n;
5820 orc_union32 *ORC_RESTRICT ptr0;
5821 const orc_union32 *ORC_RESTRICT ptr4;
5822 orc_union32 var33;
5823 orc_union32 var34;
5824 orc_union32 var35;
5825 orc_union32 var36;
5826 orc_union32 var37;
5827
5828 ptr0 = (orc_union32 *) ex->arrays[0];
5829 ptr4 = (orc_union32 *) ex->arrays[4];
5830
5831 /* 1: loadpl */
5832 var34.i = ex->params[24];
5833 /* 3: loadpl */
5834 var35.i = ex->params[25];
5835
5836 for (i = 0; i < n; i++) {
5837 /* 0: loadl */
5838 var33 = ptr4[i];
5839 /* 2: addssl */
5840 var37.i = ORC_CLAMP_SL ((orc_int64) var33.i + (orc_int64) var34.i);
5841 /* 4: andl */
5842 var36.i = var37.i & var35.i;
5843 /* 5: storel */
5844 ptr0[i] = var36;
5845 }
5846
5847 }
5848
5849 void
audio_orc_int_bias(gint32 * ORC_RESTRICT d1,const gint32 * ORC_RESTRICT s1,int p1,int p2,int n)5850 audio_orc_int_bias (gint32 * ORC_RESTRICT d1, const gint32 * ORC_RESTRICT s1,
5851 int p1, int p2, int n)
5852 {
5853 OrcExecutor _ex, *ex = &_ex;
5854 static volatile int p_inited = 0;
5855 static OrcCode *c = 0;
5856 void (*func) (OrcExecutor *);
5857
5858 if (!p_inited) {
5859 orc_once_mutex_lock ();
5860 if (!p_inited) {
5861 OrcProgram *p;
5862
5863 #if 1
5864 static const orc_uint8 bc[] = {
5865 1, 9, 18, 97, 117, 100, 105, 111, 95, 111, 114, 99, 95, 105, 110, 116,
5866 95, 98, 105, 97, 115, 11, 4, 4, 12, 4, 4, 16, 4, 16, 4, 20,
5867 4, 104, 32, 4, 24, 106, 0, 32, 25, 2, 0,
5868 };
5869 p = orc_program_new_from_static_bytecode (bc);
5870 orc_program_set_backup_function (p, _backup_audio_orc_int_bias);
5871 #else
5872 p = orc_program_new ();
5873 orc_program_set_name (p, "audio_orc_int_bias");
5874 orc_program_set_backup_function (p, _backup_audio_orc_int_bias);
5875 orc_program_add_destination (p, 4, "d1");
5876 orc_program_add_source (p, 4, "s1");
5877 orc_program_add_parameter (p, 4, "p1");
5878 orc_program_add_parameter (p, 4, "p2");
5879 orc_program_add_temporary (p, 4, "t1");
5880
5881 orc_program_append_2 (p, "addssl", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_P1,
5882 ORC_VAR_D1);
5883 orc_program_append_2 (p, "andl", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_P2,
5884 ORC_VAR_D1);
5885 #endif
5886
5887 orc_program_compile (p);
5888 c = orc_program_take_code (p);
5889 orc_program_free (p);
5890 }
5891 p_inited = TRUE;
5892 orc_once_mutex_unlock ();
5893 }
5894 ex->arrays[ORC_VAR_A2] = c;
5895 ex->program = 0;
5896
5897 ex->n = n;
5898 ex->arrays[ORC_VAR_D1] = d1;
5899 ex->arrays[ORC_VAR_S1] = (void *) s1;
5900 ex->params[ORC_VAR_P1] = p1;
5901 ex->params[ORC_VAR_P2] = p2;
5902
5903 func = c->exec;
5904 func (ex);
5905 }
5906 #endif
5907
5908
5909 /* audio_orc_int_dither */
5910 #ifdef DISABLE_ORC
5911 void
audio_orc_int_dither(gint32 * ORC_RESTRICT d1,const gint32 * ORC_RESTRICT s1,const gint32 * ORC_RESTRICT s2,int p1,int n)5912 audio_orc_int_dither (gint32 * ORC_RESTRICT d1, const gint32 * ORC_RESTRICT s1,
5913 const gint32 * ORC_RESTRICT s2, int p1, int n)
5914 {
5915 int i;
5916 orc_union32 *ORC_RESTRICT ptr0;
5917 const orc_union32 *ORC_RESTRICT ptr4;
5918 const orc_union32 *ORC_RESTRICT ptr5;
5919 orc_union32 var33;
5920 orc_union32 var34;
5921 orc_union32 var35;
5922 orc_union32 var36;
5923 orc_union32 var37;
5924
5925 ptr0 = (orc_union32 *) d1;
5926 ptr4 = (orc_union32 *) s1;
5927 ptr5 = (orc_union32 *) s2;
5928
5929 /* 3: loadpl */
5930 var35.i = p1;
5931
5932 for (i = 0; i < n; i++) {
5933 /* 0: loadl */
5934 var33 = ptr4[i];
5935 /* 1: loadl */
5936 var34 = ptr5[i];
5937 /* 2: addssl */
5938 var37.i = ORC_CLAMP_SL ((orc_int64) var33.i + (orc_int64) var34.i);
5939 /* 4: andl */
5940 var36.i = var37.i & var35.i;
5941 /* 5: storel */
5942 ptr0[i] = var36;
5943 }
5944
5945 }
5946
5947 #else
5948 static void
_backup_audio_orc_int_dither(OrcExecutor * ORC_RESTRICT ex)5949 _backup_audio_orc_int_dither (OrcExecutor * ORC_RESTRICT ex)
5950 {
5951 int i;
5952 int n = ex->n;
5953 orc_union32 *ORC_RESTRICT ptr0;
5954 const orc_union32 *ORC_RESTRICT ptr4;
5955 const orc_union32 *ORC_RESTRICT ptr5;
5956 orc_union32 var33;
5957 orc_union32 var34;
5958 orc_union32 var35;
5959 orc_union32 var36;
5960 orc_union32 var37;
5961
5962 ptr0 = (orc_union32 *) ex->arrays[0];
5963 ptr4 = (orc_union32 *) ex->arrays[4];
5964 ptr5 = (orc_union32 *) ex->arrays[5];
5965
5966 /* 3: loadpl */
5967 var35.i = ex->params[24];
5968
5969 for (i = 0; i < n; i++) {
5970 /* 0: loadl */
5971 var33 = ptr4[i];
5972 /* 1: loadl */
5973 var34 = ptr5[i];
5974 /* 2: addssl */
5975 var37.i = ORC_CLAMP_SL ((orc_int64) var33.i + (orc_int64) var34.i);
5976 /* 4: andl */
5977 var36.i = var37.i & var35.i;
5978 /* 5: storel */
5979 ptr0[i] = var36;
5980 }
5981
5982 }
5983
5984 void
audio_orc_int_dither(gint32 * ORC_RESTRICT d1,const gint32 * ORC_RESTRICT s1,const gint32 * ORC_RESTRICT s2,int p1,int n)5985 audio_orc_int_dither (gint32 * ORC_RESTRICT d1, const gint32 * ORC_RESTRICT s1,
5986 const gint32 * ORC_RESTRICT s2, int p1, int n)
5987 {
5988 OrcExecutor _ex, *ex = &_ex;
5989 static volatile int p_inited = 0;
5990 static OrcCode *c = 0;
5991 void (*func) (OrcExecutor *);
5992
5993 if (!p_inited) {
5994 orc_once_mutex_lock ();
5995 if (!p_inited) {
5996 OrcProgram *p;
5997
5998 #if 1
5999 static const orc_uint8 bc[] = {
6000 1, 9, 20, 97, 117, 100, 105, 111, 95, 111, 114, 99, 95, 105, 110, 116,
6001 95, 100, 105, 116, 104, 101, 114, 11, 4, 4, 12, 4, 4, 12, 4, 4,
6002 16, 4, 20, 4, 104, 32, 4, 5, 106, 0, 32, 24, 2, 0,
6003 };
6004 p = orc_program_new_from_static_bytecode (bc);
6005 orc_program_set_backup_function (p, _backup_audio_orc_int_dither);
6006 #else
6007 p = orc_program_new ();
6008 orc_program_set_name (p, "audio_orc_int_dither");
6009 orc_program_set_backup_function (p, _backup_audio_orc_int_dither);
6010 orc_program_add_destination (p, 4, "d1");
6011 orc_program_add_source (p, 4, "s1");
6012 orc_program_add_source (p, 4, "s2");
6013 orc_program_add_parameter (p, 4, "p1");
6014 orc_program_add_temporary (p, 4, "t1");
6015
6016 orc_program_append_2 (p, "addssl", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_S2,
6017 ORC_VAR_D1);
6018 orc_program_append_2 (p, "andl", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_P1,
6019 ORC_VAR_D1);
6020 #endif
6021
6022 orc_program_compile (p);
6023 c = orc_program_take_code (p);
6024 orc_program_free (p);
6025 }
6026 p_inited = TRUE;
6027 orc_once_mutex_unlock ();
6028 }
6029 ex->arrays[ORC_VAR_A2] = c;
6030 ex->program = 0;
6031
6032 ex->n = n;
6033 ex->arrays[ORC_VAR_D1] = d1;
6034 ex->arrays[ORC_VAR_S1] = (void *) s1;
6035 ex->arrays[ORC_VAR_S2] = (void *) s2;
6036 ex->params[ORC_VAR_P1] = p1;
6037
6038 func = c->exec;
6039 func (ex);
6040 }
6041 #endif
6042
6043
6044 /* audio_orc_update_rand */
6045 #ifdef DISABLE_ORC
6046 void
audio_orc_update_rand(guint32 * ORC_RESTRICT d1,int n)6047 audio_orc_update_rand (guint32 * ORC_RESTRICT d1, int n)
6048 {
6049 int i;
6050 orc_union32 *ORC_RESTRICT ptr0;
6051 orc_union32 var33;
6052 #if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
6053 volatile orc_union32 var34;
6054 #else
6055 orc_union32 var34;
6056 #endif
6057 #if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
6058 volatile orc_union32 var35;
6059 #else
6060 orc_union32 var35;
6061 #endif
6062 orc_union32 var36;
6063 orc_union32 var37;
6064
6065 ptr0 = (orc_union32 *) d1;
6066
6067 /* 1: loadpl */
6068 var34.i = 0x41c64e6d; /* 1103515245 or 5.45209e-315f */
6069 /* 3: loadpl */
6070 var35.i = 0x00003039; /* 12345 or 6.09924e-320f */
6071
6072 for (i = 0; i < n; i++) {
6073 /* 0: loadl */
6074 var33 = ptr0[i];
6075 /* 2: mulll */
6076 var37.i = (((orc_uint32) var33.i) * ((orc_uint32) var34.i)) & 0xffffffff;
6077 /* 4: addl */
6078 var36.i = ((orc_uint32) var37.i) + ((orc_uint32) var35.i);
6079 /* 5: storel */
6080 ptr0[i] = var36;
6081 }
6082
6083 }
6084
6085 #else
6086 static void
_backup_audio_orc_update_rand(OrcExecutor * ORC_RESTRICT ex)6087 _backup_audio_orc_update_rand (OrcExecutor * ORC_RESTRICT ex)
6088 {
6089 int i;
6090 int n = ex->n;
6091 orc_union32 *ORC_RESTRICT ptr0;
6092 orc_union32 var33;
6093 #if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
6094 volatile orc_union32 var34;
6095 #else
6096 orc_union32 var34;
6097 #endif
6098 #if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
6099 volatile orc_union32 var35;
6100 #else
6101 orc_union32 var35;
6102 #endif
6103 orc_union32 var36;
6104 orc_union32 var37;
6105
6106 ptr0 = (orc_union32 *) ex->arrays[0];
6107
6108 /* 1: loadpl */
6109 var34.i = 0x41c64e6d; /* 1103515245 or 5.45209e-315f */
6110 /* 3: loadpl */
6111 var35.i = 0x00003039; /* 12345 or 6.09924e-320f */
6112
6113 for (i = 0; i < n; i++) {
6114 /* 0: loadl */
6115 var33 = ptr0[i];
6116 /* 2: mulll */
6117 var37.i = (((orc_uint32) var33.i) * ((orc_uint32) var34.i)) & 0xffffffff;
6118 /* 4: addl */
6119 var36.i = ((orc_uint32) var37.i) + ((orc_uint32) var35.i);
6120 /* 5: storel */
6121 ptr0[i] = var36;
6122 }
6123
6124 }
6125
6126 void
audio_orc_update_rand(guint32 * ORC_RESTRICT d1,int n)6127 audio_orc_update_rand (guint32 * ORC_RESTRICT d1, int n)
6128 {
6129 OrcExecutor _ex, *ex = &_ex;
6130 static volatile int p_inited = 0;
6131 static OrcCode *c = 0;
6132 void (*func) (OrcExecutor *);
6133
6134 if (!p_inited) {
6135 orc_once_mutex_lock ();
6136 if (!p_inited) {
6137 OrcProgram *p;
6138
6139 #if 1
6140 static const orc_uint8 bc[] = {
6141 1, 9, 21, 97, 117, 100, 105, 111, 95, 111, 114, 99, 95, 117, 112, 100,
6142 97, 116, 101, 95, 114, 97, 110, 100, 11, 4, 4, 14, 4, 109, 78, 198,
6143 65, 14, 4, 57, 48, 0, 0, 20, 4, 120, 32, 0, 16, 103, 0, 32,
6144 17, 2, 0,
6145 };
6146 p = orc_program_new_from_static_bytecode (bc);
6147 orc_program_set_backup_function (p, _backup_audio_orc_update_rand);
6148 #else
6149 p = orc_program_new ();
6150 orc_program_set_name (p, "audio_orc_update_rand");
6151 orc_program_set_backup_function (p, _backup_audio_orc_update_rand);
6152 orc_program_add_destination (p, 4, "d1");
6153 orc_program_add_constant (p, 4, 0x41c64e6d, "c1");
6154 orc_program_add_constant (p, 4, 0x00003039, "c2");
6155 orc_program_add_temporary (p, 4, "t1");
6156
6157 orc_program_append_2 (p, "mulll", 0, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_C1,
6158 ORC_VAR_D1);
6159 orc_program_append_2 (p, "addl", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_C2,
6160 ORC_VAR_D1);
6161 #endif
6162
6163 orc_program_compile (p);
6164 c = orc_program_take_code (p);
6165 orc_program_free (p);
6166 }
6167 p_inited = TRUE;
6168 orc_once_mutex_unlock ();
6169 }
6170 ex->arrays[ORC_VAR_A2] = c;
6171 ex->program = 0;
6172
6173 ex->n = n;
6174 ex->arrays[ORC_VAR_D1] = d1;
6175
6176 func = c->exec;
6177 func (ex);
6178 }
6179 #endif
6180
6181
6182 /* audio_orc_s32_to_double */
6183 #ifdef DISABLE_ORC
6184 void
audio_orc_s32_to_double(gdouble * ORC_RESTRICT d1,const gint32 * ORC_RESTRICT s1,int n)6185 audio_orc_s32_to_double (gdouble * ORC_RESTRICT d1,
6186 const gint32 * ORC_RESTRICT s1, int n)
6187 {
6188 int i;
6189 orc_union64 *ORC_RESTRICT ptr0;
6190 const orc_union32 *ORC_RESTRICT ptr4;
6191 orc_union32 var33;
6192 #if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
6193 volatile orc_union64 var34;
6194 #else
6195 orc_union64 var34;
6196 #endif
6197 orc_union64 var35;
6198 orc_union64 var36;
6199
6200 ptr0 = (orc_union64 *) d1;
6201 ptr4 = (orc_union32 *) s1;
6202
6203 /* 2: loadpq */
6204 var34.i = ORC_UINT64_C (0x41e0000000000000); /* 2.14748e+09f */
6205
6206 for (i = 0; i < n; i++) {
6207 /* 0: loadl */
6208 var33 = ptr4[i];
6209 /* 1: convld */
6210 var36.f = var33.i;
6211 /* 3: divd */
6212 {
6213 orc_union64 _src1;
6214 orc_union64 _src2;
6215 orc_union64 _dest1;
6216 _src1.i = ORC_DENORMAL_DOUBLE (var36.i);
6217 _src2.i = ORC_DENORMAL_DOUBLE (var34.i);
6218 _dest1.f = _src1.f / _src2.f;
6219 var35.i = ORC_DENORMAL_DOUBLE (_dest1.i);
6220 }
6221 /* 4: storeq */
6222 ptr0[i] = var35;
6223 }
6224
6225 }
6226
6227 #else
6228 static void
_backup_audio_orc_s32_to_double(OrcExecutor * ORC_RESTRICT ex)6229 _backup_audio_orc_s32_to_double (OrcExecutor * ORC_RESTRICT ex)
6230 {
6231 int i;
6232 int n = ex->n;
6233 orc_union64 *ORC_RESTRICT ptr0;
6234 const orc_union32 *ORC_RESTRICT ptr4;
6235 orc_union32 var33;
6236 #if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
6237 volatile orc_union64 var34;
6238 #else
6239 orc_union64 var34;
6240 #endif
6241 orc_union64 var35;
6242 orc_union64 var36;
6243
6244 ptr0 = (orc_union64 *) ex->arrays[0];
6245 ptr4 = (orc_union32 *) ex->arrays[4];
6246
6247 /* 2: loadpq */
6248 var34.i = ORC_UINT64_C (0x41e0000000000000); /* 2.14748e+09f */
6249
6250 for (i = 0; i < n; i++) {
6251 /* 0: loadl */
6252 var33 = ptr4[i];
6253 /* 1: convld */
6254 var36.f = var33.i;
6255 /* 3: divd */
6256 {
6257 orc_union64 _src1;
6258 orc_union64 _src2;
6259 orc_union64 _dest1;
6260 _src1.i = ORC_DENORMAL_DOUBLE (var36.i);
6261 _src2.i = ORC_DENORMAL_DOUBLE (var34.i);
6262 _dest1.f = _src1.f / _src2.f;
6263 var35.i = ORC_DENORMAL_DOUBLE (_dest1.i);
6264 }
6265 /* 4: storeq */
6266 ptr0[i] = var35;
6267 }
6268
6269 }
6270
6271 void
audio_orc_s32_to_double(gdouble * ORC_RESTRICT d1,const gint32 * ORC_RESTRICT s1,int n)6272 audio_orc_s32_to_double (gdouble * ORC_RESTRICT d1,
6273 const gint32 * ORC_RESTRICT s1, int n)
6274 {
6275 OrcExecutor _ex, *ex = &_ex;
6276 static volatile int p_inited = 0;
6277 static OrcCode *c = 0;
6278 void (*func) (OrcExecutor *);
6279
6280 if (!p_inited) {
6281 orc_once_mutex_lock ();
6282 if (!p_inited) {
6283 OrcProgram *p;
6284
6285 #if 1
6286 static const orc_uint8 bc[] = {
6287 1, 9, 23, 97, 117, 100, 105, 111, 95, 111, 114, 99, 95, 115, 51, 50,
6288 95, 116, 111, 95, 100, 111, 117, 98, 108, 101, 11, 8, 8, 12, 4, 4,
6289 15, 8, 0, 0, 0, 0, 0, 0, 224, 65, 20, 8, 223, 32, 4, 215,
6290 0, 32, 16, 2, 0,
6291 };
6292 p = orc_program_new_from_static_bytecode (bc);
6293 orc_program_set_backup_function (p, _backup_audio_orc_s32_to_double);
6294 #else
6295 p = orc_program_new ();
6296 orc_program_set_name (p, "audio_orc_s32_to_double");
6297 orc_program_set_backup_function (p, _backup_audio_orc_s32_to_double);
6298 orc_program_add_destination (p, 8, "d1");
6299 orc_program_add_source (p, 4, "s1");
6300 orc_program_add_constant_int64 (p, 8, 0x41e0000000000000ULL, "c1");
6301 orc_program_add_temporary (p, 8, "t1");
6302
6303 orc_program_append_2 (p, "convld", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1,
6304 ORC_VAR_D1);
6305 orc_program_append_2 (p, "divd", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_C1,
6306 ORC_VAR_D1);
6307 #endif
6308
6309 orc_program_compile (p);
6310 c = orc_program_take_code (p);
6311 orc_program_free (p);
6312 }
6313 p_inited = TRUE;
6314 orc_once_mutex_unlock ();
6315 }
6316 ex->arrays[ORC_VAR_A2] = c;
6317 ex->program = 0;
6318
6319 ex->n = n;
6320 ex->arrays[ORC_VAR_D1] = d1;
6321 ex->arrays[ORC_VAR_S1] = (void *) s1;
6322
6323 func = c->exec;
6324 func (ex);
6325 }
6326 #endif
6327
6328
6329 /* audio_orc_double_to_s32 */
6330 #ifdef DISABLE_ORC
6331 void
audio_orc_double_to_s32(gint32 * ORC_RESTRICT d1,const gdouble * ORC_RESTRICT s1,int n)6332 audio_orc_double_to_s32 (gint32 * ORC_RESTRICT d1,
6333 const gdouble * ORC_RESTRICT s1, int n)
6334 {
6335 int i;
6336 orc_union32 *ORC_RESTRICT ptr0;
6337 const orc_union64 *ORC_RESTRICT ptr4;
6338 orc_union64 var33;
6339 #if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
6340 volatile orc_union64 var34;
6341 #else
6342 #ifdef OHOS_OPT_COMPAT
6343 /** ohos.opt.compat.0036
6344 * Fix audio playback noise issue. The variable may be changed unexpectedly, and this
6345 * modification ensures that every read is not omitted due to compiler optimizations.
6346 */
6347 volatile orc_union64 var34;
6348 #else
6349 orc_union64 var34;
6350 #endif
6351 #endif
6352 orc_union32 var35;
6353 orc_union64 var36;
6354
6355 ptr0 = (orc_union32 *) d1;
6356 ptr4 = (orc_union64 *) s1;
6357
6358 /* 1: loadpq */
6359 var34.i = ORC_UINT64_C (0x41e0000000000000); /* 2.14748e+09f */
6360
6361 for (i = 0; i < n; i++) {
6362 /* 0: loadq */
6363 var33 = ptr4[i];
6364 /* 2: muld */
6365 {
6366 orc_union64 _src1;
6367 orc_union64 _src2;
6368 orc_union64 _dest1;
6369 _src1.i = ORC_DENORMAL_DOUBLE (var33.i);
6370 _src2.i = ORC_DENORMAL_DOUBLE (var34.i);
6371 _dest1.f = _src1.f * _src2.f;
6372 var36.i = ORC_DENORMAL_DOUBLE (_dest1.i);
6373 }
6374 /* 3: convdl */
6375 {
6376 int tmp;
6377 tmp = var36.f;
6378 if (tmp == 0x80000000 && !(var36.i & ORC_UINT64_C (0x8000000000000000)))
6379 tmp = 0x7fffffff;
6380 var35.i = tmp;
6381 }
6382 /* 4: storel */
6383 ptr0[i] = var35;
6384 }
6385
6386 }
6387
6388 #else
6389 static void
_backup_audio_orc_double_to_s32(OrcExecutor * ORC_RESTRICT ex)6390 _backup_audio_orc_double_to_s32 (OrcExecutor * ORC_RESTRICT ex)
6391 {
6392 int i;
6393 int n = ex->n;
6394 orc_union32 *ORC_RESTRICT ptr0;
6395 const orc_union64 *ORC_RESTRICT ptr4;
6396 orc_union64 var33;
6397 #if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
6398 volatile orc_union64 var34;
6399 #else
6400 #ifdef OHOS_OPT_COMPAT
6401 /** ohos.opt.compat.0036
6402 * Fix audio playback noise issue. The variable may be changed unexpectedly, and this
6403 * modification ensures that every read is not omitted due to compiler optimizations.
6404 */
6405 volatile orc_union64 var34;
6406 #else
6407 orc_union64 var34;
6408 #endif
6409 #endif
6410 orc_union32 var35;
6411 orc_union64 var36;
6412
6413 ptr0 = (orc_union32 *) ex->arrays[0];
6414 ptr4 = (orc_union64 *) ex->arrays[4];
6415
6416 /* 1: loadpq */
6417 var34.i = ORC_UINT64_C (0x41e0000000000000); /* 2.14748e+09f */
6418
6419 for (i = 0; i < n; i++) {
6420 /* 0: loadq */
6421 var33 = ptr4[i];
6422 /* 2: muld */
6423 {
6424 orc_union64 _src1;
6425 orc_union64 _src2;
6426 orc_union64 _dest1;
6427 _src1.i = ORC_DENORMAL_DOUBLE (var33.i);
6428 _src2.i = ORC_DENORMAL_DOUBLE (var34.i);
6429 _dest1.f = _src1.f * _src2.f;
6430 var36.i = ORC_DENORMAL_DOUBLE (_dest1.i);
6431 }
6432 /* 3: convdl */
6433 {
6434 int tmp;
6435 tmp = var36.f;
6436 if (tmp == 0x80000000 && !(var36.i & ORC_UINT64_C (0x8000000000000000)))
6437 tmp = 0x7fffffff;
6438 var35.i = tmp;
6439 }
6440 /* 4: storel */
6441 ptr0[i] = var35;
6442 }
6443
6444 }
6445
6446 void
audio_orc_double_to_s32(gint32 * ORC_RESTRICT d1,const gdouble * ORC_RESTRICT s1,int n)6447 audio_orc_double_to_s32 (gint32 * ORC_RESTRICT d1,
6448 const gdouble * ORC_RESTRICT s1, int n)
6449 {
6450 OrcExecutor _ex, *ex = &_ex;
6451 static volatile int p_inited = 0;
6452 static OrcCode *c = 0;
6453 void (*func) (OrcExecutor *);
6454
6455 if (!p_inited) {
6456 orc_once_mutex_lock ();
6457 if (!p_inited) {
6458 OrcProgram *p;
6459
6460 #if 1
6461 static const orc_uint8 bc[] = {
6462 1, 9, 23, 97, 117, 100, 105, 111, 95, 111, 114, 99, 95, 100, 111, 117,
6463 98, 108, 101, 95, 116, 111, 95, 115, 51, 50, 11, 4, 4, 12, 8, 8,
6464 15, 8, 0, 0, 0, 0, 0, 0, 224, 65, 20, 8, 214, 32, 4, 16,
6465 222, 0, 32, 2, 0,
6466 };
6467 p = orc_program_new_from_static_bytecode (bc);
6468 orc_program_set_backup_function (p, _backup_audio_orc_double_to_s32);
6469 #else
6470 p = orc_program_new ();
6471 orc_program_set_name (p, "audio_orc_double_to_s32");
6472 orc_program_set_backup_function (p, _backup_audio_orc_double_to_s32);
6473 orc_program_add_destination (p, 4, "d1");
6474 orc_program_add_source (p, 8, "s1");
6475 orc_program_add_constant_int64 (p, 8, 0x41e0000000000000ULL, "c1");
6476 orc_program_add_temporary (p, 8, "t1");
6477
6478 orc_program_append_2 (p, "muld", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_C1,
6479 ORC_VAR_D1);
6480 orc_program_append_2 (p, "convdl", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1,
6481 ORC_VAR_D1);
6482 #endif
6483
6484 orc_program_compile (p);
6485 c = orc_program_take_code (p);
6486 orc_program_free (p);
6487 }
6488 p_inited = TRUE;
6489 orc_once_mutex_unlock ();
6490 }
6491 ex->arrays[ORC_VAR_A2] = c;
6492 ex->program = 0;
6493
6494 ex->n = n;
6495 ex->arrays[ORC_VAR_D1] = d1;
6496 ex->arrays[ORC_VAR_S1] = (void *) s1;
6497
6498 func = c->exec;
6499 func (ex);
6500 }
6501 #endif
6502