annotate liba52/liba52_changes.diff @ 30518:654cad7ea876

Rename exit_reason_t enum to exit_reason and do not typedef it. The _t namespace is reserved for POSIX; the typedef is pointless obfuscation.
author diego
date Sun, 14 Feb 2010 11:02:05 +0000
parents cd3ae709054f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
19249
9960f9ef96fd cosmetics: Make patch apply cleanly.
diego
parents: 18721
diff changeset
1 --- include/a52.h 2006-06-12 15:04:57.000000000 +0200
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2 +++ liba52/a52.h 2006-06-05 02:23:02.000000000 +0200
28797
dcdc0c85d354 Sync local changes file with #ifdef --> #if conversion.
diego
parents: 28593
diff changeset
3 @@ -59,4 +66,9 @@
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
4 int a52_block (a52_state_t * state);
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
5 void a52_free (a52_state_t * state);
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
6
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
7 +void* a52_resample_init(uint32_t mm_accel,int flags,int chans);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
8 +extern int (* a52_resample) (float * _f, int16_t * s16);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
9 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
10 +uint16_t crc16_block(uint8_t *data,uint32_t num_bytes);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
11 +
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
12 #endif /* A52_H */
19249
9960f9ef96fd cosmetics: Make patch apply cleanly.
diego
parents: 18721
diff changeset
13 --- liba52/a52_internal.h 2006-06-12 15:05:07.000000000 +0200
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
14 +++ liba52/a52_internal.h 2006-06-05 02:23:02.000000000 +0200
28797
dcdc0c85d354 Sync local changes file with #ifdef --> #if conversion.
diego
parents: 28593
diff changeset
15 @@ -103,18 +107,34 @@
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
16 #define DELTA_BIT_NONE (2)
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
17 #define DELTA_BIT_RESERVED (3)
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
18
28797
dcdc0c85d354 Sync local changes file with #ifdef --> #if conversion.
diego
parents: 28593
diff changeset
19 +#if ARCH_X86_64
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
20 +# define REG_a "rax"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
21 +# define REG_d "rdx"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
22 +# define REG_S "rsi"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
23 +# define REG_D "rdi"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
24 +# define REG_BP "rbp"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
25 +#else
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
26 +# define REG_a "eax"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
27 +# define REG_d "edx"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
28 +# define REG_S "esi"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
29 +# define REG_D "edi"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
30 +# define REG_BP "ebp"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
31 +#endif
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
32 +
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
33 void a52_bit_allocate (a52_state_t * state, ba_t * ba, int bndstart,
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
34 int start, int end, int fastleak, int slowleak,
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
35 expbap_t * expbap);
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
36
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
37 int a52_downmix_init (int input, int flags, sample_t * level,
18721
722ac20fac5f sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 18720
diff changeset
38 sample_t clev, sample_t slev);
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
39 +void downmix_accel_init(uint32_t mm_accel);
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
40 int a52_downmix_coeff (sample_t * coeff, int acmod, int output, sample_t level,
18721
722ac20fac5f sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 18720
diff changeset
41 sample_t clev, sample_t slev);
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
42 -void a52_downmix (sample_t * samples, int acmod, int output, sample_t bias,
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
43 +extern void (*a52_downmix) (sample_t * samples, int acmod, int output, sample_t bias,
18721
722ac20fac5f sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 18720
diff changeset
44 sample_t clev, sample_t slev);
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
45 -void a52_upmix (sample_t * samples, int acmod, int output);
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
46 +extern void (*a52_upmix) (sample_t * samples, int acmod, int output);
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
47
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
48 void a52_imdct_init (uint32_t mm_accel);
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
49 void a52_imdct_256 (sample_t * data, sample_t * delay, sample_t bias);
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
50 -void a52_imdct_512 (sample_t * data, sample_t * delay, sample_t bias);
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
51 +extern void (*a52_imdct_512) (sample_t * data, sample_t * delay, sample_t bias);
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
52 +void imdct_do_512 (sample_t * data, sample_t * delay, sample_t bias);
19249
9960f9ef96fd cosmetics: Make patch apply cleanly.
diego
parents: 18721
diff changeset
53 --- liba52/bitstream.c 2006-06-12 15:05:07.000000000 +0200
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
54 +++ liba52/bitstream.c 2006-06-05 02:23:02.000000000 +0200
28797
dcdc0c85d354 Sync local changes file with #ifdef --> #if conversion.
diego
parents: 28593
diff changeset
55 @@ -31,6 +35,10 @@
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
56
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
57 #define BUFFER_SIZE 4096
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
58
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
59 +#ifdef ALT_BITSTREAM_READER
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
60 +int indx=0;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
61 +#endif
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
62 +
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
63 void a52_bitstream_set_ptr (a52_state_t * state, uint8_t * buf)
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
64 {
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
65 int align;
28797
dcdc0c85d354 Sync local changes file with #ifdef --> #if conversion.
diego
parents: 28593
diff changeset
66 @@ -38,6 +46,9 @@
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
67 align = (long)buf & 3;
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
68 state->buffer_start = (uint32_t *) (buf - align);
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
69 state->bits_left = 0;
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
70 +#ifdef ALT_BITSTREAM_READER
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
71 + indx=0;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
72 +#endif
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
73 bitstream_get (state, align * 8);
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
74 }
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
75
19249
9960f9ef96fd cosmetics: Make patch apply cleanly.
diego
parents: 18721
diff changeset
76 --- liba52/bitstream.h 2006-06-12 15:05:07.000000000 +0200
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
77 +++ liba52/bitstream.h 2006-06-05 02:23:02.000000000 +0200
28797
dcdc0c85d354 Sync local changes file with #ifdef --> #if conversion.
diego
parents: 28593
diff changeset
78 @@ -21,6 +25,42 @@
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
79 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
80 */
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
81
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
82 +/* code from ffmpeg/libavcodec */
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
83 +#if defined(__sparc__) || defined(hpux)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
84 +/*
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
85 + * the alt bitstream reader performs unaligned memory accesses; that doesn't work
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
86 + * on sparc/hpux. For now, disable ALT_BITSTREAM_READER.
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
87 + */
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
88 +#undef ALT_BITSTREAM_READER
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
89 +#else
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
90 +// alternative (faster) bitstram reader (reades upto 3 bytes over the end of the input)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
91 +#define ALT_BITSTREAM_READER
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
92 +
23873
49a433e2e78f cosmetics: misc typo fixes
diego
parents: 21491
diff changeset
93 +/* used to avoid misaligned exceptions on some archs (alpha, ...) */
28797
dcdc0c85d354 Sync local changes file with #ifdef --> #if conversion.
diego
parents: 28593
diff changeset
94 +#if ARCH_X86 || HAVE_ARMV6
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
95 +# define unaligned32(a) (*(uint32_t*)(a))
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
96 +#else
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
97 +# ifdef __GNUC__
27454
2eb96f52529a Drop av_always_inline definition. It is duplicated from libavutil and
diego
parents: 27453
diff changeset
98 +static inline uint32_t unaligned32(const void *v) {
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
99 + struct Unaligned {
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
100 + uint32_t i;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
101 + } __attribute__((packed));
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
102 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
103 + return ((const struct Unaligned *) v)->i;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
104 +}
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
105 +# elif defined(__DECC)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
106 +static inline uint32_t unaligned32(const void *v) {
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
107 + return *(const __unaligned uint32_t *) v;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
108 +}
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
109 +# else
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
110 +static inline uint32_t unaligned32(const void *v) {
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
111 + return *(const uint32_t *) v;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
112 +}
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
113 +# endif
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
114 +#endif //!ARCH_X86
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
115 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
116 +#endif
18721
722ac20fac5f sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 18720
diff changeset
117 +
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
118 /* (stolen from the kernel) */
29401
f01023c524c3 Replace WORDS_BIGENDIAN by HAVE_BIGENDIAN in all internal code.
diego
parents: 29264
diff changeset
119 #if HAVE_BIGENDIAN
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
120
28797
dcdc0c85d354 Sync local changes file with #ifdef --> #if conversion.
diego
parents: 28593
diff changeset
121 @@ -28,7 +68,7 @@
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
122
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
123 #else
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
124
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
125 -# if 0 && defined (__i386__)
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
126 +# if defined (__i386__)
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
127
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
128 # define swab32(x) __i386_swab32(x)
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
129 static inline const uint32_t __i386_swab32(uint32_t x)
28797
dcdc0c85d354 Sync local changes file with #ifdef --> #if conversion.
diego
parents: 28593
diff changeset
130 @@ -39,19 +79,34 @@
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
131
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
132 # else
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
133
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
134 -# define swab32(x)\
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
135 -((((uint8_t*)&x)[0] << 24) | (((uint8_t*)&x)[1] << 16) | \
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
136 - (((uint8_t*)&x)[2] << 8) | (((uint8_t*)&x)[3]))
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
137 -
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
138 +# define swab32(x) __generic_swab32(x)
27454
2eb96f52529a Drop av_always_inline definition. It is duplicated from libavutil and
diego
parents: 27453
diff changeset
139 + static inline const uint32_t __generic_swab32(uint32_t x)
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
140 + {
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
141 + return ((((uint8_t*)&x)[0] << 24) | (((uint8_t*)&x)[1] << 16) |
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
142 + (((uint8_t*)&x)[2] << 8) | (((uint8_t*)&x)[3]));
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
143 + }
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
144 # endif
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
145 #endif
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
146
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
147 +#ifdef ALT_BITSTREAM_READER
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
148 +extern int indx;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
149 +#endif
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
150 +
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
151 void a52_bitstream_set_ptr (a52_state_t * state, uint8_t * buf);
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
152 uint32_t a52_bitstream_get_bh (a52_state_t * state, uint32_t num_bits);
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
153 int32_t a52_bitstream_get_bh_2 (a52_state_t * state, uint32_t num_bits);
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
154
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
155 static inline uint32_t bitstream_get (a52_state_t * state, uint32_t num_bits)
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
156 {
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
157 +#ifdef ALT_BITSTREAM_READER
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
158 + uint32_t result= swab32( unaligned32(((uint8_t *)state->buffer_start)+(indx>>3)) );
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
159 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
160 + result<<= (indx&0x07);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
161 + result>>= 32 - num_bits;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
162 + indx+= num_bits;
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
163 +
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
164 + return result;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
165 +#else
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
166 uint32_t result;
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
167
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
168 if (num_bits < state->bits_left) {
28797
dcdc0c85d354 Sync local changes file with #ifdef --> #if conversion.
diego
parents: 28593
diff changeset
169 @@ -61,10 +116,29 @@
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
170 }
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
171
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
172 return a52_bitstream_get_bh (state, num_bits);
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
173 +#endif
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
174 +}
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
175 +
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
176 +static inline void bitstream_skip(a52_state_t * state, int num_bits)
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
177 +{
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
178 +#ifdef ALT_BITSTREAM_READER
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
179 + indx+= num_bits;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
180 +#else
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
181 + bitstream_get(state, num_bits);
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
182 +#endif
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
183 }
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
184
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
185 static inline int32_t bitstream_get_2 (a52_state_t * state, uint32_t num_bits)
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
186 {
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
187 +#ifdef ALT_BITSTREAM_READER
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
188 + int32_t result= swab32( unaligned32(((uint8_t *)state->buffer_start)+(indx>>3)) );
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
189 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
190 + result<<= (indx&0x07);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
191 + result>>= 32 - num_bits;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
192 + indx+= num_bits;
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
193 +
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
194 + return result;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
195 +#else
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
196 int32_t result;
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
197
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
198 if (num_bits < state->bits_left) {
28797
dcdc0c85d354 Sync local changes file with #ifdef --> #if conversion.
diego
parents: 28593
diff changeset
199 @@ -74,4 +148,5 @@
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
200 }
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
201
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
202 return a52_bitstream_get_bh_2 (state, num_bits);
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
203 +#endif
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
204 }
19249
9960f9ef96fd cosmetics: Make patch apply cleanly.
diego
parents: 18721
diff changeset
205 --- liba52/downmix.c 2006-06-12 15:17:53.000000000 +0200
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
206 +++ liba52/downmix.c 2006-06-05 02:23:02.000000000 +0200
28797
dcdc0c85d354 Sync local changes file with #ifdef --> #if conversion.
diego
parents: 28593
diff changeset
207 @@ -19,18 +23,46 @@
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
208 * You should have received a copy of the GNU General Public License
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
209 * along with this program; if not, write to the Free Software
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
210 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
211 + *
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
212 + * SSE optimizations from Michael Niedermayer (michaelni@gmx.at)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
213 */
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
214
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
215 #include "config.h"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
216
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
217 #include <string.h>
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
218 #include <inttypes.h>
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
219
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
220 #include "a52.h"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
221 #include "a52_internal.h"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
222 +#include "mm_accel.h"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
223
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
224 #define CONVERT(acmod,output) (((output) << 3) + (acmod))
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
225
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
226 +
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
227 +void (*a52_downmix)(sample_t * samples, int acmod, int output, sample_t bias,
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
228 + sample_t clev, sample_t slev)= NULL;
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
229 +void (*a52_upmix)(sample_t * samples, int acmod, int output)= NULL;
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
230 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
231 +static void downmix_SSE (sample_t * samples, int acmod, int output, sample_t bias,
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
232 + sample_t clev, sample_t slev);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
233 +static void downmix_3dnow (sample_t * samples, int acmod, int output, sample_t bias,
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
234 + sample_t clev, sample_t slev);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
235 +static void downmix_C (sample_t * samples, int acmod, int output, sample_t bias,
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
236 + sample_t clev, sample_t slev);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
237 +static void upmix_MMX (sample_t * samples, int acmod, int output);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
238 +static void upmix_C (sample_t * samples, int acmod, int output);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
239 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
240 +void downmix_accel_init(uint32_t mm_accel)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
241 +{
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
242 + a52_upmix= upmix_C;
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
243 + a52_downmix= downmix_C;
28797
dcdc0c85d354 Sync local changes file with #ifdef --> #if conversion.
diego
parents: 28593
diff changeset
244 +#if ARCH_X86 || ARCH_X86_64
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
245 + if(mm_accel & MM_ACCEL_X86_MMX) a52_upmix= upmix_MMX;
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
246 + if(mm_accel & MM_ACCEL_X86_SSE) a52_downmix= downmix_SSE;
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
247 + if(mm_accel & MM_ACCEL_X86_3DNOW) a52_downmix= downmix_3dnow;
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
248 +#endif
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
249 +}
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
250 +
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
251 int a52_downmix_init (int input, int flags, sample_t * level,
18721
722ac20fac5f sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 18720
diff changeset
252 sample_t clev, sample_t slev)
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
253 {
28797
dcdc0c85d354 Sync local changes file with #ifdef --> #if conversion.
diego
parents: 28593
diff changeset
254 @@ -447,7 +479,7 @@
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
255 samples[i] = 0;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
256 }
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
257
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
258 -void a52_downmix (sample_t * samples, int acmod, int output, sample_t bias,
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
259 +void downmix_C (sample_t * samples, int acmod, int output, sample_t bias,
18721
722ac20fac5f sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 18720
diff changeset
260 sample_t clev, sample_t slev)
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
261 {
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
262 switch (CONVERT (acmod, output & A52_CHANNEL_MASK)) {
28797
dcdc0c85d354 Sync local changes file with #ifdef --> #if conversion.
diego
parents: 28593
diff changeset
263 @@ -559,7 +591,7 @@
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
264 break;
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
265
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
266 case CONVERT (A52_3F2R, A52_2F1R):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
267 - mix3to2 (samples, bias);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
268 + mix3to2 (samples, bias); //FIXME possible bug? (output doesnt seem to be used)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
269 move2to1 (samples + 768, samples + 512, bias);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
270 break;
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
271
28797
dcdc0c85d354 Sync local changes file with #ifdef --> #if conversion.
diego
parents: 28593
diff changeset
272 @@ -583,12 +615,12 @@
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
273 break;
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
274
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
275 case CONVERT (A52_3F1R, A52_3F2R):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
276 - memcpy (samples + 1027, samples + 768, 256 * sizeof (sample_t));
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
277 + memcpy (samples + 1024, samples + 768, 256 * sizeof (sample_t));
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
278 break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
279 }
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
280 }
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
281
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
282 -void a52_upmix (sample_t * samples, int acmod, int output)
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
283 +void upmix_C (sample_t * samples, int acmod, int output)
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
284 {
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
285 switch (CONVERT (acmod, output & A52_CHANNEL_MASK)) {
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
286
28797
dcdc0c85d354 Sync local changes file with #ifdef --> #if conversion.
diego
parents: 28593
diff changeset
287 @@ -653,3 +685,1104 @@
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
288 goto mix_31to21;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
289 }
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
290 }
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
291 +
28797
dcdc0c85d354 Sync local changes file with #ifdef --> #if conversion.
diego
parents: 28593
diff changeset
292 +#if ARCH_X86 || ARCH_X86_64
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
293 +static void mix2to1_SSE (sample_t * dest, sample_t * src, sample_t bias)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
294 +{
27754
08d18fe9da52 Change all occurrences of asm and __asm to __asm__, same as was done for FFmpeg.
diego
parents: 27454
diff changeset
295 + __asm__ volatile(
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
296 + "movlps %2, %%xmm7 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
297 + "shufps $0x00, %%xmm7, %%xmm7 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
298 + "mov $-1024, %%"REG_S" \n\t"
19373
87dddfc314fd Update for changes from r19378 (ASMALIGN macro).
diego
parents: 19249
diff changeset
299 + ASMALIGN(4)
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
300 + "1: \n\t"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
301 + "movaps (%0, %%"REG_S"), %%xmm0 \n\t"
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
302 + "movaps 16(%0, %%"REG_S"), %%xmm1\n\t"
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
303 + "addps (%1, %%"REG_S"), %%xmm0 \n\t"
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
304 + "addps 16(%1, %%"REG_S"), %%xmm1\n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
305 + "addps %%xmm7, %%xmm0 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
306 + "addps %%xmm7, %%xmm1 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
307 + "movaps %%xmm0, (%1, %%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
308 + "movaps %%xmm1, 16(%1, %%"REG_S")\n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
309 + "add $32, %%"REG_S" \n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
310 + " jnz 1b \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
311 + :: "r" (src+256), "r" (dest+256), "m" (bias)
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
312 + : "%"REG_S
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
313 + );
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
314 +}
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
315 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
316 +static void mix3to1_SSE (sample_t * samples, sample_t bias)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
317 +{
27754
08d18fe9da52 Change all occurrences of asm and __asm to __asm__, same as was done for FFmpeg.
diego
parents: 27454
diff changeset
318 + __asm__ volatile(
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
319 + "movlps %1, %%xmm7 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
320 + "shufps $0x00, %%xmm7, %%xmm7 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
321 + "mov $-1024, %%"REG_S" \n\t"
19373
87dddfc314fd Update for changes from r19378 (ASMALIGN macro).
diego
parents: 19249
diff changeset
322 + ASMALIGN(4)
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
323 + "1: \n\t"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
324 + "movaps (%0, %%"REG_S"), %%xmm0 \n\t"
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
325 + "movaps 1024(%0, %%"REG_S"), %%xmm1\n\t"
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
326 + "addps 2048(%0, %%"REG_S"), %%xmm0\n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
327 + "addps %%xmm7, %%xmm1 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
328 + "addps %%xmm1, %%xmm0 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
329 + "movaps %%xmm0, (%0, %%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
330 + "add $16, %%"REG_S" \n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
331 + " jnz 1b \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
332 + :: "r" (samples+256), "m" (bias)
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
333 + : "%"REG_S
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
334 + );
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
335 +}
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
336 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
337 +static void mix4to1_SSE (sample_t * samples, sample_t bias)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
338 +{
27754
08d18fe9da52 Change all occurrences of asm and __asm to __asm__, same as was done for FFmpeg.
diego
parents: 27454
diff changeset
339 + __asm__ volatile(
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
340 + "movlps %1, %%xmm7 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
341 + "shufps $0x00, %%xmm7, %%xmm7 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
342 + "mov $-1024, %%"REG_S" \n\t"
19373
87dddfc314fd Update for changes from r19378 (ASMALIGN macro).
diego
parents: 19249
diff changeset
343 + ASMALIGN(4)
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
344 + "1: \n\t"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
345 + "movaps (%0, %%"REG_S"), %%xmm0 \n\t"
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
346 + "movaps 1024(%0, %%"REG_S"), %%xmm1\n\t"
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
347 + "addps 2048(%0, %%"REG_S"), %%xmm0\n\t"
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
348 + "addps 3072(%0, %%"REG_S"), %%xmm1\n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
349 + "addps %%xmm7, %%xmm0 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
350 + "addps %%xmm1, %%xmm0 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
351 + "movaps %%xmm0, (%0, %%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
352 + "add $16, %%"REG_S" \n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
353 + " jnz 1b \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
354 + :: "r" (samples+256), "m" (bias)
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
355 + : "%"REG_S
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
356 + );
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
357 +}
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
358 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
359 +static void mix5to1_SSE (sample_t * samples, sample_t bias)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
360 +{
27754
08d18fe9da52 Change all occurrences of asm and __asm to __asm__, same as was done for FFmpeg.
diego
parents: 27454
diff changeset
361 + __asm__ volatile(
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
362 + "movlps %1, %%xmm7 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
363 + "shufps $0x00, %%xmm7, %%xmm7 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
364 + "mov $-1024, %%"REG_S" \n\t"
19373
87dddfc314fd Update for changes from r19378 (ASMALIGN macro).
diego
parents: 19249
diff changeset
365 + ASMALIGN(4)
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
366 + "1: \n\t"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
367 + "movaps (%0, %%"REG_S"), %%xmm0 \n\t"
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
368 + "movaps 1024(%0, %%"REG_S"), %%xmm1\n\t"
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
369 + "addps 2048(%0, %%"REG_S"), %%xmm0\n\t"
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
370 + "addps 3072(%0, %%"REG_S"), %%xmm1\n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
371 + "addps %%xmm7, %%xmm0 \n\t"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
372 + "addps 4096(%0, %%"REG_S"), %%xmm1\n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
373 + "addps %%xmm1, %%xmm0 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
374 + "movaps %%xmm0, (%0, %%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
375 + "add $16, %%"REG_S" \n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
376 + " jnz 1b \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
377 + :: "r" (samples+256), "m" (bias)
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
378 + : "%"REG_S
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
379 + );
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
380 +}
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
381 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
382 +static void mix3to2_SSE (sample_t * samples, sample_t bias)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
383 +{
27754
08d18fe9da52 Change all occurrences of asm and __asm to __asm__, same as was done for FFmpeg.
diego
parents: 27454
diff changeset
384 + __asm__ volatile(
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
385 + "movlps %1, %%xmm7 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
386 + "shufps $0x00, %%xmm7, %%xmm7 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
387 + "mov $-1024, %%"REG_S" \n\t"
19373
87dddfc314fd Update for changes from r19378 (ASMALIGN macro).
diego
parents: 19249
diff changeset
388 + ASMALIGN(4)
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
389 + "1: \n\t"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
390 + "movaps 1024(%0, %%"REG_S"), %%xmm0\n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
391 + "addps %%xmm7, %%xmm0 \n\t" //common
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
392 + "movaps (%0, %%"REG_S"), %%xmm1 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
393 + "movaps 2048(%0, %%"REG_S"), %%xmm2\n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
394 + "addps %%xmm0, %%xmm1 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
395 + "addps %%xmm0, %%xmm2 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
396 + "movaps %%xmm1, (%0, %%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
397 + "movaps %%xmm2, 1024(%0, %%"REG_S")\n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
398 + "add $16, %%"REG_S" \n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
399 + " jnz 1b \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
400 + :: "r" (samples+256), "m" (bias)
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
401 + : "%"REG_S
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
402 + );
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
403 +}
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
404 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
405 +static void mix21to2_SSE (sample_t * left, sample_t * right, sample_t bias)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
406 +{
27754
08d18fe9da52 Change all occurrences of asm and __asm to __asm__, same as was done for FFmpeg.
diego
parents: 27454
diff changeset
407 + __asm__ volatile(
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
408 + "movlps %2, %%xmm7 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
409 + "shufps $0x00, %%xmm7, %%xmm7 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
410 + "mov $-1024, %%"REG_S" \n\t"
19373
87dddfc314fd Update for changes from r19378 (ASMALIGN macro).
diego
parents: 19249
diff changeset
411 + ASMALIGN(4)
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
412 + "1: \n\t"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
413 + "movaps 1024(%1, %%"REG_S"), %%xmm0\n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
414 + "addps %%xmm7, %%xmm0 \n\t" //common
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
415 + "movaps (%0, %%"REG_S"), %%xmm1 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
416 + "movaps (%1, %%"REG_S"), %%xmm2 \n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
417 + "addps %%xmm0, %%xmm1 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
418 + "addps %%xmm0, %%xmm2 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
419 + "movaps %%xmm1, (%0, %%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
420 + "movaps %%xmm2, (%1, %%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
421 + "add $16, %%"REG_S" \n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
422 + " jnz 1b \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
423 + :: "r" (left+256), "r" (right+256), "m" (bias)
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
424 + : "%"REG_S
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
425 + );
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
426 +}
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
427 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
428 +static void mix21toS_SSE (sample_t * samples, sample_t bias)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
429 +{
27754
08d18fe9da52 Change all occurrences of asm and __asm to __asm__, same as was done for FFmpeg.
diego
parents: 27454
diff changeset
430 + __asm__ volatile(
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
431 + "movlps %1, %%xmm7 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
432 + "shufps $0x00, %%xmm7, %%xmm7 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
433 + "mov $-1024, %%"REG_S" \n\t"
19373
87dddfc314fd Update for changes from r19378 (ASMALIGN macro).
diego
parents: 19249
diff changeset
434 + ASMALIGN(4)
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
435 + "1: \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
436 + "movaps 2048(%0, %%"REG_S"), %%xmm0\n\t" // surround
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
437 + "movaps (%0, %%"REG_S"), %%xmm1 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
438 + "movaps 1024(%0, %%"REG_S"), %%xmm2\n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
439 + "addps %%xmm7, %%xmm1 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
440 + "addps %%xmm7, %%xmm2 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
441 + "subps %%xmm0, %%xmm1 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
442 + "addps %%xmm0, %%xmm2 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
443 + "movaps %%xmm1, (%0, %%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
444 + "movaps %%xmm2, 1024(%0, %%"REG_S")\n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
445 + "add $16, %%"REG_S" \n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
446 + " jnz 1b \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
447 + :: "r" (samples+256), "m" (bias)
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
448 + : "%"REG_S
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
449 + );
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
450 +}
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
451 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
452 +static void mix31to2_SSE (sample_t * samples, sample_t bias)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
453 +{
27754
08d18fe9da52 Change all occurrences of asm and __asm to __asm__, same as was done for FFmpeg.
diego
parents: 27454
diff changeset
454 + __asm__ volatile(
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
455 + "movlps %1, %%xmm7 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
456 + "shufps $0x00, %%xmm7, %%xmm7 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
457 + "mov $-1024, %%"REG_S" \n\t"
19373
87dddfc314fd Update for changes from r19378 (ASMALIGN macro).
diego
parents: 19249
diff changeset
458 + ASMALIGN(4)
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
459 + "1: \n\t"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
460 + "movaps 1024(%0, %%"REG_S"), %%xmm0\n\t"
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
461 + "addps 3072(%0, %%"REG_S"), %%xmm0\n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
462 + "addps %%xmm7, %%xmm0 \n\t" // common
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
463 + "movaps (%0, %%"REG_S"), %%xmm1 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
464 + "movaps 2048(%0, %%"REG_S"), %%xmm2\n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
465 + "addps %%xmm0, %%xmm1 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
466 + "addps %%xmm0, %%xmm2 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
467 + "movaps %%xmm1, (%0, %%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
468 + "movaps %%xmm2, 1024(%0, %%"REG_S")\n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
469 + "add $16, %%"REG_S" \n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
470 + " jnz 1b \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
471 + :: "r" (samples+256), "m" (bias)
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
472 + : "%"REG_S
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
473 + );
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
474 +}
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
475 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
476 +static void mix31toS_SSE (sample_t * samples, sample_t bias)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
477 +{
27754
08d18fe9da52 Change all occurrences of asm and __asm to __asm__, same as was done for FFmpeg.
diego
parents: 27454
diff changeset
478 + __asm__ volatile(
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
479 + "movlps %1, %%xmm7 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
480 + "shufps $0x00, %%xmm7, %%xmm7 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
481 + "mov $-1024, %%"REG_S" \n\t"
19373
87dddfc314fd Update for changes from r19378 (ASMALIGN macro).
diego
parents: 19249
diff changeset
482 + ASMALIGN(4)
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
483 + "1: \n\t"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
484 + "movaps 1024(%0, %%"REG_S"), %%xmm0\n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
485 + "movaps 3072(%0, %%"REG_S"), %%xmm3\n\t" // surround
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
486 + "addps %%xmm7, %%xmm0 \n\t" // common
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
487 + "movaps (%0, %%"REG_S"), %%xmm1 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
488 + "movaps 2048(%0, %%"REG_S"), %%xmm2\n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
489 + "addps %%xmm0, %%xmm1 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
490 + "addps %%xmm0, %%xmm2 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
491 + "subps %%xmm3, %%xmm1 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
492 + "addps %%xmm3, %%xmm2 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
493 + "movaps %%xmm1, (%0, %%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
494 + "movaps %%xmm2, 1024(%0, %%"REG_S")\n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
495 + "add $16, %%"REG_S" \n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
496 + " jnz 1b \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
497 + :: "r" (samples+256), "m" (bias)
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
498 + : "%"REG_S
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
499 + );
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
500 +}
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
501 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
502 +static void mix22toS_SSE (sample_t * samples, sample_t bias)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
503 +{
27754
08d18fe9da52 Change all occurrences of asm and __asm to __asm__, same as was done for FFmpeg.
diego
parents: 27454
diff changeset
504 + __asm__ volatile(
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
505 + "movlps %1, %%xmm7 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
506 + "shufps $0x00, %%xmm7, %%xmm7 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
507 + "mov $-1024, %%"REG_S" \n\t"
19373
87dddfc314fd Update for changes from r19378 (ASMALIGN macro).
diego
parents: 19249
diff changeset
508 + ASMALIGN(4)
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
509 + "1: \n\t"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
510 + "movaps 2048(%0, %%"REG_S"), %%xmm0\n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
511 + "addps 3072(%0, %%"REG_S"), %%xmm0\n\t" // surround
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
512 + "movaps (%0, %%"REG_S"), %%xmm1 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
513 + "movaps 1024(%0, %%"REG_S"), %%xmm2\n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
514 + "addps %%xmm7, %%xmm1 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
515 + "addps %%xmm7, %%xmm2 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
516 + "subps %%xmm0, %%xmm1 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
517 + "addps %%xmm0, %%xmm2 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
518 + "movaps %%xmm1, (%0, %%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
519 + "movaps %%xmm2, 1024(%0, %%"REG_S")\n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
520 + "add $16, %%"REG_S" \n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
521 + " jnz 1b \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
522 + :: "r" (samples+256), "m" (bias)
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
523 + : "%"REG_S
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
524 + );
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
525 +}
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
526 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
527 +static void mix32to2_SSE (sample_t * samples, sample_t bias)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
528 +{
27754
08d18fe9da52 Change all occurrences of asm and __asm to __asm__, same as was done for FFmpeg.
diego
parents: 27454
diff changeset
529 + __asm__ volatile(
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
530 + "movlps %1, %%xmm7 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
531 + "shufps $0x00, %%xmm7, %%xmm7 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
532 + "mov $-1024, %%"REG_S" \n\t"
19373
87dddfc314fd Update for changes from r19378 (ASMALIGN macro).
diego
parents: 19249
diff changeset
533 + ASMALIGN(4)
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
534 + "1: \n\t"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
535 + "movaps 1024(%0, %%"REG_S"), %%xmm0\n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
536 + "addps %%xmm7, %%xmm0 \n\t" // common
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
537 + "movaps %%xmm0, %%xmm1 \n\t" // common
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
538 + "addps (%0, %%"REG_S"), %%xmm0 \n\t"
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
539 + "addps 2048(%0, %%"REG_S"), %%xmm1\n\t"
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
540 + "addps 3072(%0, %%"REG_S"), %%xmm0\n\t"
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
541 + "addps 4096(%0, %%"REG_S"), %%xmm1\n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
542 + "movaps %%xmm0, (%0, %%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
543 + "movaps %%xmm1, 1024(%0, %%"REG_S")\n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
544 + "add $16, %%"REG_S" \n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
545 + " jnz 1b \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
546 + :: "r" (samples+256), "m" (bias)
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
547 + : "%"REG_S
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
548 + );
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
549 +}
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
550 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
551 +static void mix32toS_SSE (sample_t * samples, sample_t bias)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
552 +{
27754
08d18fe9da52 Change all occurrences of asm and __asm to __asm__, same as was done for FFmpeg.
diego
parents: 27454
diff changeset
553 + __asm__ volatile(
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
554 + "movlps %1, %%xmm7 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
555 + "shufps $0x00, %%xmm7, %%xmm7 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
556 + "mov $-1024, %%"REG_S" \n\t"
19373
87dddfc314fd Update for changes from r19378 (ASMALIGN macro).
diego
parents: 19249
diff changeset
557 + ASMALIGN(4)
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
558 + "1: \n\t"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
559 + "movaps 1024(%0, %%"REG_S"), %%xmm0\n\t"
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
560 + "movaps 3072(%0, %%"REG_S"), %%xmm2\n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
561 + "addps %%xmm7, %%xmm0 \n\t" // common
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
562 + "addps 4096(%0, %%"REG_S"), %%xmm2\n\t" // surround
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
563 + "movaps (%0, %%"REG_S"), %%xmm1 \n\t"
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
564 + "movaps 2048(%0, %%"REG_S"), %%xmm3\n\t"
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
565 + "subps %%xmm2, %%xmm1 \n\t"
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
566 + "addps %%xmm2, %%xmm3 \n\t"
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
567 + "addps %%xmm0, %%xmm1 \n\t"
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
568 + "addps %%xmm0, %%xmm3 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
569 + "movaps %%xmm1, (%0, %%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
570 + "movaps %%xmm3, 1024(%0, %%"REG_S")\n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
571 + "add $16, %%"REG_S" \n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
572 + " jnz 1b \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
573 + :: "r" (samples+256), "m" (bias)
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
574 + : "%"REG_S
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
575 + );
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
576 +}
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
577 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
578 +static void move2to1_SSE (sample_t * src, sample_t * dest, sample_t bias)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
579 +{
27754
08d18fe9da52 Change all occurrences of asm and __asm to __asm__, same as was done for FFmpeg.
diego
parents: 27454
diff changeset
580 + __asm__ volatile(
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
581 + "movlps %2, %%xmm7 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
582 + "shufps $0x00, %%xmm7, %%xmm7 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
583 + "mov $-1024, %%"REG_S" \n\t"
19373
87dddfc314fd Update for changes from r19378 (ASMALIGN macro).
diego
parents: 19249
diff changeset
584 + ASMALIGN(4)
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
585 + "1: \n\t"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
586 + "movaps (%0, %%"REG_S"), %%xmm0 \n\t"
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
587 + "movaps 16(%0, %%"REG_S"), %%xmm1\n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
588 + "addps 1024(%0, %%"REG_S"), %%xmm0\n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
589 + "addps 1040(%0, %%"REG_S"), %%xmm1\n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
590 + "addps %%xmm7, %%xmm0 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
591 + "addps %%xmm7, %%xmm1 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
592 + "movaps %%xmm0, (%1, %%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
593 + "movaps %%xmm1, 16(%1, %%"REG_S")\n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
594 + "add $32, %%"REG_S" \n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
595 + " jnz 1b \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
596 + :: "r" (src+256), "r" (dest+256), "m" (bias)
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
597 + : "%"REG_S
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
598 + );
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
599 +}
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
600 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
601 +static void zero_MMX(sample_t * samples)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
602 +{
27754
08d18fe9da52 Change all occurrences of asm and __asm to __asm__, same as was done for FFmpeg.
diego
parents: 27454
diff changeset
603 + __asm__ volatile(
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
604 + "mov $-1024, %%"REG_S" \n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
605 + "pxor %%mm0, %%mm0 \n\t"
19373
87dddfc314fd Update for changes from r19378 (ASMALIGN macro).
diego
parents: 19249
diff changeset
606 + ASMALIGN(4)
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
607 + "1: \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
608 + "movq %%mm0, (%0, %%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
609 + "movq %%mm0, 8(%0, %%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
610 + "movq %%mm0, 16(%0, %%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
611 + "movq %%mm0, 24(%0, %%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
612 + "add $32, %%"REG_S" \n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
613 + " jnz 1b \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
614 + "emms"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
615 + :: "r" (samples+256)
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
616 + : "%"REG_S
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
617 + );
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
618 +}
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
619 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
620 +static void downmix_SSE (sample_t * samples, int acmod, int output, sample_t bias,
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
621 + sample_t clev, sample_t slev)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
622 +{
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
623 + switch (CONVERT (acmod, output & A52_CHANNEL_MASK)) {
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
624 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
625 + case CONVERT (A52_CHANNEL, A52_CHANNEL2):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
626 + memcpy (samples, samples + 256, 256 * sizeof (sample_t));
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
627 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
628 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
629 + case CONVERT (A52_CHANNEL, A52_MONO):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
630 + case CONVERT (A52_STEREO, A52_MONO):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
631 + mix_2to1_SSE:
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
632 + mix2to1_SSE (samples, samples + 256, bias);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
633 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
634 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
635 + case CONVERT (A52_2F1R, A52_MONO):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
636 + if (slev == 0)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
637 + goto mix_2to1_SSE;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
638 + case CONVERT (A52_3F, A52_MONO):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
639 + mix_3to1_SSE:
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
640 + mix3to1_SSE (samples, bias);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
641 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
642 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
643 + case CONVERT (A52_3F1R, A52_MONO):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
644 + if (slev == 0)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
645 + goto mix_3to1_SSE;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
646 + case CONVERT (A52_2F2R, A52_MONO):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
647 + if (slev == 0)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
648 + goto mix_2to1_SSE;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
649 + mix4to1_SSE (samples, bias);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
650 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
651 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
652 + case CONVERT (A52_3F2R, A52_MONO):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
653 + if (slev == 0)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
654 + goto mix_3to1_SSE;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
655 + mix5to1_SSE (samples, bias);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
656 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
657 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
658 + case CONVERT (A52_MONO, A52_DOLBY):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
659 + memcpy (samples + 256, samples, 256 * sizeof (sample_t));
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
660 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
661 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
662 + case CONVERT (A52_3F, A52_STEREO):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
663 + case CONVERT (A52_3F, A52_DOLBY):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
664 + mix_3to2_SSE:
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
665 + mix3to2_SSE (samples, bias);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
666 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
667 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
668 + case CONVERT (A52_2F1R, A52_STEREO):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
669 + if (slev == 0)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
670 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
671 + mix21to2_SSE (samples, samples + 256, bias);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
672 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
673 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
674 + case CONVERT (A52_2F1R, A52_DOLBY):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
675 + mix21toS_SSE (samples, bias);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
676 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
677 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
678 + case CONVERT (A52_3F1R, A52_STEREO):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
679 + if (slev == 0)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
680 + goto mix_3to2_SSE;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
681 + mix31to2_SSE (samples, bias);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
682 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
683 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
684 + case CONVERT (A52_3F1R, A52_DOLBY):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
685 + mix31toS_SSE (samples, bias);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
686 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
687 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
688 + case CONVERT (A52_2F2R, A52_STEREO):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
689 + if (slev == 0)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
690 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
691 + mix2to1_SSE (samples, samples + 512, bias);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
692 + mix2to1_SSE (samples + 256, samples + 768, bias);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
693 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
694 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
695 + case CONVERT (A52_2F2R, A52_DOLBY):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
696 + mix22toS_SSE (samples, bias);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
697 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
698 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
699 + case CONVERT (A52_3F2R, A52_STEREO):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
700 + if (slev == 0)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
701 + goto mix_3to2_SSE;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
702 + mix32to2_SSE (samples, bias);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
703 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
704 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
705 + case CONVERT (A52_3F2R, A52_DOLBY):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
706 + mix32toS_SSE (samples, bias);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
707 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
708 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
709 + case CONVERT (A52_3F1R, A52_3F):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
710 + if (slev == 0)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
711 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
712 + mix21to2_SSE (samples, samples + 512, bias);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
713 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
714 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
715 + case CONVERT (A52_3F2R, A52_3F):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
716 + if (slev == 0)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
717 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
718 + mix2to1_SSE (samples, samples + 768, bias);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
719 + mix2to1_SSE (samples + 512, samples + 1024, bias);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
720 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
721 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
722 + case CONVERT (A52_3F1R, A52_2F1R):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
723 + mix3to2_SSE (samples, bias);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
724 + memcpy (samples + 512, samples + 768, 256 * sizeof (sample_t));
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
725 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
726 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
727 + case CONVERT (A52_2F2R, A52_2F1R):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
728 + mix2to1_SSE (samples + 512, samples + 768, bias);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
729 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
730 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
731 + case CONVERT (A52_3F2R, A52_2F1R):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
732 + mix3to2_SSE (samples, bias); //FIXME possible bug? (output doesnt seem to be used)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
733 + move2to1_SSE (samples + 768, samples + 512, bias);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
734 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
735 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
736 + case CONVERT (A52_3F2R, A52_3F1R):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
737 + mix2to1_SSE (samples + 768, samples + 1024, bias);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
738 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
739 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
740 + case CONVERT (A52_2F1R, A52_2F2R):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
741 + memcpy (samples + 768, samples + 512, 256 * sizeof (sample_t));
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
742 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
743 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
744 + case CONVERT (A52_3F1R, A52_2F2R):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
745 + mix3to2_SSE (samples, bias);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
746 + memcpy (samples + 512, samples + 768, 256 * sizeof (sample_t));
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
747 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
748 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
749 + case CONVERT (A52_3F2R, A52_2F2R):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
750 + mix3to2_SSE (samples, bias);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
751 + memcpy (samples + 512, samples + 768, 256 * sizeof (sample_t));
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
752 + memcpy (samples + 768, samples + 1024, 256 * sizeof (sample_t));
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
753 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
754 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
755 + case CONVERT (A52_3F1R, A52_3F2R):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
756 + memcpy (samples + 1024, samples + 768, 256 * sizeof (sample_t));
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
757 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
758 + }
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
759 +}
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
760 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
761 +static void upmix_MMX (sample_t * samples, int acmod, int output)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
762 +{
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
763 + switch (CONVERT (acmod, output & A52_CHANNEL_MASK)) {
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
764 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
765 + case CONVERT (A52_CHANNEL, A52_CHANNEL2):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
766 + memcpy (samples + 256, samples, 256 * sizeof (sample_t));
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
767 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
768 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
769 + case CONVERT (A52_3F2R, A52_MONO):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
770 + zero_MMX (samples + 1024);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
771 + case CONVERT (A52_3F1R, A52_MONO):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
772 + case CONVERT (A52_2F2R, A52_MONO):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
773 + zero_MMX (samples + 768);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
774 + case CONVERT (A52_3F, A52_MONO):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
775 + case CONVERT (A52_2F1R, A52_MONO):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
776 + zero_MMX (samples + 512);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
777 + case CONVERT (A52_CHANNEL, A52_MONO):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
778 + case CONVERT (A52_STEREO, A52_MONO):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
779 + zero_MMX (samples + 256);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
780 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
781 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
782 + case CONVERT (A52_3F2R, A52_STEREO):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
783 + case CONVERT (A52_3F2R, A52_DOLBY):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
784 + zero_MMX (samples + 1024);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
785 + case CONVERT (A52_3F1R, A52_STEREO):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
786 + case CONVERT (A52_3F1R, A52_DOLBY):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
787 + zero_MMX (samples + 768);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
788 + case CONVERT (A52_3F, A52_STEREO):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
789 + case CONVERT (A52_3F, A52_DOLBY):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
790 + mix_3to2_MMX:
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
791 + memcpy (samples + 512, samples + 256, 256 * sizeof (sample_t));
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
792 + zero_MMX (samples + 256);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
793 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
794 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
795 + case CONVERT (A52_2F2R, A52_STEREO):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
796 + case CONVERT (A52_2F2R, A52_DOLBY):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
797 + zero_MMX (samples + 768);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
798 + case CONVERT (A52_2F1R, A52_STEREO):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
799 + case CONVERT (A52_2F1R, A52_DOLBY):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
800 + zero_MMX (samples + 512);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
801 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
802 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
803 + case CONVERT (A52_3F2R, A52_3F):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
804 + zero_MMX (samples + 1024);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
805 + case CONVERT (A52_3F1R, A52_3F):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
806 + case CONVERT (A52_2F2R, A52_2F1R):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
807 + zero_MMX (samples + 768);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
808 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
809 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
810 + case CONVERT (A52_3F2R, A52_3F1R):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
811 + zero_MMX (samples + 1024);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
812 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
813 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
814 + case CONVERT (A52_3F2R, A52_2F1R):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
815 + zero_MMX (samples + 1024);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
816 + case CONVERT (A52_3F1R, A52_2F1R):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
817 + mix_31to21_MMX:
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
818 + memcpy (samples + 768, samples + 512, 256 * sizeof (sample_t));
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
819 + goto mix_3to2_MMX;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
820 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
821 + case CONVERT (A52_3F2R, A52_2F2R):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
822 + memcpy (samples + 1024, samples + 768, 256 * sizeof (sample_t));
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
823 + goto mix_31to21_MMX;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
824 + }
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
825 +}
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
826 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
827 +static void mix2to1_3dnow (sample_t * dest, sample_t * src, sample_t bias)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
828 +{
27754
08d18fe9da52 Change all occurrences of asm and __asm to __asm__, same as was done for FFmpeg.
diego
parents: 27454
diff changeset
829 + __asm__ volatile(
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
830 + "movd %2, %%mm7 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
831 + "punpckldq %2, %%mm7 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
832 + "mov $-1024, %%"REG_S" \n\t"
19373
87dddfc314fd Update for changes from r19378 (ASMALIGN macro).
diego
parents: 19249
diff changeset
833 + ASMALIGN(4)
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
834 + "1: \n\t"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
835 + "movq (%0, %%"REG_S"), %%mm0 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
836 + "movq 8(%0, %%"REG_S"), %%mm1 \n\t"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
837 + "movq 16(%0, %%"REG_S"), %%mm2 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
838 + "movq 24(%0, %%"REG_S"), %%mm3 \n\t"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
839 + "pfadd (%1, %%"REG_S"), %%mm0 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
840 + "pfadd 8(%1, %%"REG_S"), %%mm1 \n\t"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
841 + "pfadd 16(%1, %%"REG_S"), %%mm2 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
842 + "pfadd 24(%1, %%"REG_S"), %%mm3 \n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
843 + "pfadd %%mm7, %%mm0 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
844 + "pfadd %%mm7, %%mm1 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
845 + "pfadd %%mm7, %%mm2 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
846 + "pfadd %%mm7, %%mm3 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
847 + "movq %%mm0, (%1, %%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
848 + "movq %%mm1, 8(%1, %%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
849 + "movq %%mm2, 16(%1, %%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
850 + "movq %%mm3, 24(%1, %%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
851 + "add $32, %%"REG_S" \n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
852 + " jnz 1b \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
853 + :: "r" (src+256), "r" (dest+256), "m" (bias)
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
854 + : "%"REG_S
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
855 + );
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
856 +}
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
857 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
858 +static void mix3to1_3dnow (sample_t * samples, sample_t bias)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
859 +{
27754
08d18fe9da52 Change all occurrences of asm and __asm to __asm__, same as was done for FFmpeg.
diego
parents: 27454
diff changeset
860 + __asm__ volatile(
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
861 + "movd %1, %%mm7 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
862 + "punpckldq %1, %%mm7 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
863 + "mov $-1024, %%"REG_S" \n\t"
19373
87dddfc314fd Update for changes from r19378 (ASMALIGN macro).
diego
parents: 19249
diff changeset
864 + ASMALIGN(4)
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
865 + "1: \n\t"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
866 + "movq (%0, %%"REG_S"), %%mm0 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
867 + "movq 8(%0, %%"REG_S"), %%mm1 \n\t"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
868 + "movq 1024(%0, %%"REG_S"), %%mm2\n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
869 + "movq 1032(%0, %%"REG_S"), %%mm3\n\t"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
870 + "pfadd 2048(%0, %%"REG_S"), %%mm0\n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
871 + "pfadd 2056(%0, %%"REG_S"), %%mm1\n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
872 + "pfadd %%mm7, %%mm0 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
873 + "pfadd %%mm7, %%mm1 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
874 + "pfadd %%mm2, %%mm0 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
875 + "pfadd %%mm3, %%mm1 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
876 + "movq %%mm0, (%0, %%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
877 + "movq %%mm1, 8(%0, %%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
878 + "add $16, %%"REG_S" \n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
879 + " jnz 1b \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
880 + :: "r" (samples+256), "m" (bias)
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
881 + : "%"REG_S
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
882 + );
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
883 +}
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
884 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
885 +static void mix4to1_3dnow (sample_t * samples, sample_t bias)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
886 +{
27754
08d18fe9da52 Change all occurrences of asm and __asm to __asm__, same as was done for FFmpeg.
diego
parents: 27454
diff changeset
887 + __asm__ volatile(
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
888 + "movd %1, %%mm7 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
889 + "punpckldq %1, %%mm7 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
890 + "mov $-1024, %%"REG_S" \n\t"
19373
87dddfc314fd Update for changes from r19378 (ASMALIGN macro).
diego
parents: 19249
diff changeset
891 + ASMALIGN(4)
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
892 + "1: \n\t"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
893 + "movq (%0, %%"REG_S"), %%mm0 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
894 + "movq 8(%0, %%"REG_S"), %%mm1 \n\t"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
895 + "movq 1024(%0, %%"REG_S"), %%mm2\n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
896 + "movq 1032(%0, %%"REG_S"), %%mm3\n\t"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
897 + "pfadd 2048(%0, %%"REG_S"), %%mm0\n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
898 + "pfadd 2056(%0, %%"REG_S"), %%mm1\n\t"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
899 + "pfadd 3072(%0, %%"REG_S"), %%mm2\n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
900 + "pfadd 3080(%0, %%"REG_S"), %%mm3\n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
901 + "pfadd %%mm7, %%mm0 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
902 + "pfadd %%mm7, %%mm1 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
903 + "pfadd %%mm2, %%mm0 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
904 + "pfadd %%mm3, %%mm1 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
905 + "movq %%mm0, (%0, %%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
906 + "movq %%mm1, 8(%0, %%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
907 + "add $16, %%"REG_S" \n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
908 + " jnz 1b \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
909 + :: "r" (samples+256), "m" (bias)
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
910 + : "%"REG_S
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
911 + );
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
912 +}
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
913 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
914 +static void mix5to1_3dnow (sample_t * samples, sample_t bias)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
915 +{
27754
08d18fe9da52 Change all occurrences of asm and __asm to __asm__, same as was done for FFmpeg.
diego
parents: 27454
diff changeset
916 + __asm__ volatile(
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
917 + "movd %1, %%mm7 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
918 + "punpckldq %1, %%mm7 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
919 + "mov $-1024, %%"REG_S" \n\t"
19373
87dddfc314fd Update for changes from r19378 (ASMALIGN macro).
diego
parents: 19249
diff changeset
920 + ASMALIGN(4)
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
921 + "1: \n\t"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
922 + "movq (%0, %%"REG_S"), %%mm0 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
923 + "movq 8(%0, %%"REG_S"), %%mm1 \n\t"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
924 + "movq 1024(%0, %%"REG_S"), %%mm2\n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
925 + "movq 1032(%0, %%"REG_S"), %%mm3\n\t"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
926 + "pfadd 2048(%0, %%"REG_S"), %%mm0\n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
927 + "pfadd 2056(%0, %%"REG_S"), %%mm1\n\t"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
928 + "pfadd 3072(%0, %%"REG_S"), %%mm2\n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
929 + "pfadd 3080(%0, %%"REG_S"), %%mm3\n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
930 + "pfadd %%mm7, %%mm0 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
931 + "pfadd %%mm7, %%mm1 \n\t"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
932 + "pfadd 4096(%0, %%"REG_S"), %%mm2\n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
933 + "pfadd 4104(%0, %%"REG_S"), %%mm3\n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
934 + "pfadd %%mm2, %%mm0 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
935 + "pfadd %%mm3, %%mm1 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
936 + "movq %%mm0, (%0, %%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
937 + "movq %%mm1, 8(%0, %%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
938 + "add $16, %%"REG_S" \n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
939 + " jnz 1b \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
940 + :: "r" (samples+256), "m" (bias)
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
941 + : "%"REG_S
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
942 + );
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
943 +}
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
944 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
945 +static void mix3to2_3dnow (sample_t * samples, sample_t bias)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
946 +{
27754
08d18fe9da52 Change all occurrences of asm and __asm to __asm__, same as was done for FFmpeg.
diego
parents: 27454
diff changeset
947 + __asm__ volatile(
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
948 + "movd %1, %%mm7 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
949 + "punpckldq %1, %%mm7 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
950 + "mov $-1024, %%"REG_S" \n\t"
19373
87dddfc314fd Update for changes from r19378 (ASMALIGN macro).
diego
parents: 19249
diff changeset
951 + ASMALIGN(4)
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
952 + "1: \n\t"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
953 + "movq 1024(%0, %%"REG_S"), %%mm0\n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
954 + "movq 1032(%0, %%"REG_S"), %%mm1\n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
955 + "pfadd %%mm7, %%mm0 \n\t" //common
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
956 + "pfadd %%mm7, %%mm1 \n\t" //common
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
957 + "movq (%0, %%"REG_S"), %%mm2 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
958 + "movq 8(%0, %%"REG_S"), %%mm3 \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
959 + "movq 2048(%0, %%"REG_S"), %%mm4\n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
960 + "movq 2056(%0, %%"REG_S"), %%mm5\n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
961 + "pfadd %%mm0, %%mm2 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
962 + "pfadd %%mm1, %%mm3 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
963 + "pfadd %%mm0, %%mm4 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
964 + "pfadd %%mm1, %%mm5 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
965 + "movq %%mm2, (%0, %%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
966 + "movq %%mm3, 8(%0, %%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
967 + "movq %%mm4, 1024(%0, %%"REG_S")\n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
968 + "movq %%mm5, 1032(%0, %%"REG_S")\n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
969 + "add $16, %%"REG_S" \n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
970 + " jnz 1b \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
971 + :: "r" (samples+256), "m" (bias)
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
972 + : "%"REG_S
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
973 + );
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
974 +}
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
975 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
976 +static void mix21to2_3dnow (sample_t * left, sample_t * right, sample_t bias)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
977 +{
27754
08d18fe9da52 Change all occurrences of asm and __asm to __asm__, same as was done for FFmpeg.
diego
parents: 27454
diff changeset
978 + __asm__ volatile(
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
979 + "movd %2, %%mm7 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
980 + "punpckldq %2, %%mm7 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
981 + "mov $-1024, %%"REG_S" \n\t"
19373
87dddfc314fd Update for changes from r19378 (ASMALIGN macro).
diego
parents: 19249
diff changeset
982 + ASMALIGN(4)
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
983 + "1: \n\t"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
984 + "movq 1024(%1, %%"REG_S"), %%mm0\n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
985 + "movq 1032(%1, %%"REG_S"), %%mm1\n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
986 + "pfadd %%mm7, %%mm0 \n\t" //common
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
987 + "pfadd %%mm7, %%mm1 \n\t" //common
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
988 + "movq (%0, %%"REG_S"), %%mm2 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
989 + "movq 8(%0, %%"REG_S"), %%mm3 \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
990 + "movq (%1, %%"REG_S"), %%mm4 \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
991 + "movq 8(%1, %%"REG_S"), %%mm5 \n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
992 + "pfadd %%mm0, %%mm2 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
993 + "pfadd %%mm1, %%mm3 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
994 + "pfadd %%mm0, %%mm4 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
995 + "pfadd %%mm1, %%mm5 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
996 + "movq %%mm2, (%0, %%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
997 + "movq %%mm3, 8(%0, %%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
998 + "movq %%mm4, (%1, %%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
999 + "movq %%mm5, 8(%1, %%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1000 + "add $16, %%"REG_S" \n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1001 + " jnz 1b \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1002 + :: "r" (left+256), "r" (right+256), "m" (bias)
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1003 + : "%"REG_S
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1004 + );
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1005 +}
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1006 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1007 +static void mix21toS_3dnow (sample_t * samples, sample_t bias)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1008 +{
27754
08d18fe9da52 Change all occurrences of asm and __asm to __asm__, same as was done for FFmpeg.
diego
parents: 27454
diff changeset
1009 + __asm__ volatile(
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1010 + "movd %1, %%mm7 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1011 + "punpckldq %1, %%mm7 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1012 + "mov $-1024, %%"REG_S" \n\t"
19373
87dddfc314fd Update for changes from r19378 (ASMALIGN macro).
diego
parents: 19249
diff changeset
1013 + ASMALIGN(4)
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1014 + "1: \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1015 + "movq 2048(%0, %%"REG_S"), %%mm0\n\t" // surround
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1016 + "movq 2056(%0, %%"REG_S"), %%mm1\n\t" // surround
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1017 + "movq (%0, %%"REG_S"), %%mm2 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1018 + "movq 8(%0, %%"REG_S"), %%mm3 \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1019 + "movq 1024(%0, %%"REG_S"), %%mm4\n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1020 + "movq 1032(%0, %%"REG_S"), %%mm5\n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1021 + "pfadd %%mm7, %%mm2 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1022 + "pfadd %%mm7, %%mm3 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1023 + "pfadd %%mm7, %%mm4 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1024 + "pfadd %%mm7, %%mm5 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1025 + "pfsub %%mm0, %%mm2 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1026 + "pfsub %%mm1, %%mm3 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1027 + "pfadd %%mm0, %%mm4 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1028 + "pfadd %%mm1, %%mm5 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1029 + "movq %%mm2, (%0, %%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1030 + "movq %%mm3, 8(%0, %%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1031 + "movq %%mm4, 1024(%0, %%"REG_S")\n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1032 + "movq %%mm5, 1032(%0, %%"REG_S")\n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1033 + "add $16, %%"REG_S" \n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1034 + " jnz 1b \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1035 + :: "r" (samples+256), "m" (bias)
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1036 + : "%"REG_S
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1037 + );
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1038 +}
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1039 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1040 +static void mix31to2_3dnow (sample_t * samples, sample_t bias)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1041 +{
27754
08d18fe9da52 Change all occurrences of asm and __asm to __asm__, same as was done for FFmpeg.
diego
parents: 27454
diff changeset
1042 + __asm__ volatile(
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1043 + "movd %1, %%mm7 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1044 + "punpckldq %1, %%mm7 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1045 + "mov $-1024, %%"REG_S" \n\t"
19373
87dddfc314fd Update for changes from r19378 (ASMALIGN macro).
diego
parents: 19249
diff changeset
1046 + ASMALIGN(4)
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1047 + "1: \n\t"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1048 + "movq 1024(%0, %%"REG_S"), %%mm0\n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1049 + "movq 1032(%0, %%"REG_S"), %%mm1\n\t"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1050 + "pfadd 3072(%0, %%"REG_S"), %%mm0\n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1051 + "pfadd 3080(%0, %%"REG_S"), %%mm1\n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1052 + "pfadd %%mm7, %%mm0 \n\t" // common
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1053 + "pfadd %%mm7, %%mm1 \n\t" // common
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1054 + "movq (%0, %%"REG_S"), %%mm2 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1055 + "movq 8(%0, %%"REG_S"), %%mm3 \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1056 + "movq 2048(%0, %%"REG_S"), %%mm4\n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1057 + "movq 2056(%0, %%"REG_S"), %%mm5\n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1058 + "pfadd %%mm0, %%mm2 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1059 + "pfadd %%mm1, %%mm3 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1060 + "pfadd %%mm0, %%mm4 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1061 + "pfadd %%mm1, %%mm5 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1062 + "movq %%mm2, (%0, %%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1063 + "movq %%mm3, 8(%0, %%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1064 + "movq %%mm4, 1024(%0, %%"REG_S")\n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1065 + "movq %%mm5, 1032(%0, %%"REG_S")\n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1066 + "add $16, %%"REG_S" \n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1067 + " jnz 1b \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1068 + :: "r" (samples+256), "m" (bias)
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1069 + : "%"REG_S
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1070 + );
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1071 +}
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1072 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1073 +static void mix31toS_3dnow (sample_t * samples, sample_t bias)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1074 +{
27754
08d18fe9da52 Change all occurrences of asm and __asm to __asm__, same as was done for FFmpeg.
diego
parents: 27454
diff changeset
1075 + __asm__ volatile(
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1076 + "movd %1, %%mm7 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1077 + "punpckldq %1, %%mm7 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1078 + "mov $-1024, %%"REG_S" \n\t"
19373
87dddfc314fd Update for changes from r19378 (ASMALIGN macro).
diego
parents: 19249
diff changeset
1079 + ASMALIGN(4)
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1080 + "1: \n\t"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1081 + "movq 1024(%0, %%"REG_S"), %%mm0\n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1082 + "movq 1032(%0, %%"REG_S"), %%mm1\n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1083 + "pfadd %%mm7, %%mm0 \n\t" // common
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1084 + "pfadd %%mm7, %%mm1 \n\t" // common
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1085 + "movq (%0, %%"REG_S"), %%mm2 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1086 + "movq 8(%0, %%"REG_S"), %%mm3 \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1087 + "movq 2048(%0, %%"REG_S"), %%mm4\n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1088 + "movq 2056(%0, %%"REG_S"), %%mm5\n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1089 + "pfadd %%mm0, %%mm2 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1090 + "pfadd %%mm1, %%mm3 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1091 + "pfadd %%mm0, %%mm4 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1092 + "pfadd %%mm1, %%mm5 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1093 + "movq 3072(%0, %%"REG_S"), %%mm0\n\t" // surround
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1094 + "movq 3080(%0, %%"REG_S"), %%mm1\n\t" // surround
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1095 + "pfsub %%mm0, %%mm2 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1096 + "pfsub %%mm1, %%mm3 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1097 + "pfadd %%mm0, %%mm4 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1098 + "pfadd %%mm1, %%mm5 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1099 + "movq %%mm2, (%0, %%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1100 + "movq %%mm3, 8(%0, %%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1101 + "movq %%mm4, 1024(%0, %%"REG_S")\n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1102 + "movq %%mm5, 1032(%0, %%"REG_S")\n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1103 + "add $16, %%"REG_S" \n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1104 + " jnz 1b \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1105 + :: "r" (samples+256), "m" (bias)
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1106 + : "%"REG_S
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1107 + );
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1108 +}
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1109 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1110 +static void mix22toS_3dnow (sample_t * samples, sample_t bias)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1111 +{
27754
08d18fe9da52 Change all occurrences of asm and __asm to __asm__, same as was done for FFmpeg.
diego
parents: 27454
diff changeset
1112 + __asm__ volatile(
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1113 + "movd %1, %%mm7 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1114 + "punpckldq %1, %%mm7 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1115 + "mov $-1024, %%"REG_S" \n\t"
19373
87dddfc314fd Update for changes from r19378 (ASMALIGN macro).
diego
parents: 19249
diff changeset
1116 + ASMALIGN(4)
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1117 + "1: \n\t"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1118 + "movq 2048(%0, %%"REG_S"), %%mm0\n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1119 + "movq 2056(%0, %%"REG_S"), %%mm1\n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1120 + "pfadd 3072(%0, %%"REG_S"), %%mm0\n\t" // surround
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1121 + "pfadd 3080(%0, %%"REG_S"), %%mm1\n\t" // surround
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1122 + "movq (%0, %%"REG_S"), %%mm2 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1123 + "movq 8(%0, %%"REG_S"), %%mm3 \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1124 + "movq 1024(%0, %%"REG_S"), %%mm4\n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1125 + "movq 1032(%0, %%"REG_S"), %%mm5\n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1126 + "pfadd %%mm7, %%mm2 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1127 + "pfadd %%mm7, %%mm3 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1128 + "pfadd %%mm7, %%mm4 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1129 + "pfadd %%mm7, %%mm5 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1130 + "pfsub %%mm0, %%mm2 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1131 + "pfsub %%mm1, %%mm3 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1132 + "pfadd %%mm0, %%mm4 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1133 + "pfadd %%mm1, %%mm5 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1134 + "movq %%mm2, (%0, %%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1135 + "movq %%mm3, 8(%0, %%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1136 + "movq %%mm4, 1024(%0, %%"REG_S")\n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1137 + "movq %%mm5, 1032(%0, %%"REG_S")\n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1138 + "add $16, %%"REG_S" \n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1139 + " jnz 1b \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1140 + :: "r" (samples+256), "m" (bias)
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1141 + : "%"REG_S
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1142 + );
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1143 +}
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1144 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1145 +static void mix32to2_3dnow (sample_t * samples, sample_t bias)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1146 +{
27754
08d18fe9da52 Change all occurrences of asm and __asm to __asm__, same as was done for FFmpeg.
diego
parents: 27454
diff changeset
1147 + __asm__ volatile(
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1148 + "movd %1, %%mm7 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1149 + "punpckldq %1, %%mm7 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1150 + "mov $-1024, %%"REG_S" \n\t"
19373
87dddfc314fd Update for changes from r19378 (ASMALIGN macro).
diego
parents: 19249
diff changeset
1151 + ASMALIGN(4)
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1152 + "1: \n\t"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1153 + "movq 1024(%0, %%"REG_S"), %%mm0\n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1154 + "movq 1032(%0, %%"REG_S"), %%mm1\n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1155 + "pfadd %%mm7, %%mm0 \n\t" // common
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1156 + "pfadd %%mm7, %%mm1 \n\t" // common
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1157 + "movq %%mm0, %%mm2 \n\t" // common
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1158 + "movq %%mm1, %%mm3 \n\t" // common
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1159 + "pfadd (%0, %%"REG_S"), %%mm0 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1160 + "pfadd 8(%0, %%"REG_S"), %%mm1 \n\t"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1161 + "pfadd 2048(%0, %%"REG_S"), %%mm2\n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1162 + "pfadd 2056(%0, %%"REG_S"), %%mm3\n\t"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1163 + "pfadd 3072(%0, %%"REG_S"), %%mm0\n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1164 + "pfadd 3080(%0, %%"REG_S"), %%mm1\n\t"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1165 + "pfadd 4096(%0, %%"REG_S"), %%mm2\n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1166 + "pfadd 4104(%0, %%"REG_S"), %%mm3\n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1167 + "movq %%mm0, (%0, %%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1168 + "movq %%mm1, 8(%0, %%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1169 + "movq %%mm2, 1024(%0, %%"REG_S")\n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1170 + "movq %%mm3, 1032(%0, %%"REG_S")\n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1171 + "add $16, %%"REG_S" \n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1172 + " jnz 1b \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1173 + :: "r" (samples+256), "m" (bias)
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1174 + : "%"REG_S
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1175 + );
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1176 +}
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1177 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1178 +/* todo: should be optimized better */
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1179 +static void mix32toS_3dnow (sample_t * samples, sample_t bias)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1180 +{
27754
08d18fe9da52 Change all occurrences of asm and __asm to __asm__, same as was done for FFmpeg.
diego
parents: 27454
diff changeset
1181 + __asm__ volatile(
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1182 + "mov $-1024, %%"REG_S" \n\t"
19373
87dddfc314fd Update for changes from r19378 (ASMALIGN macro).
diego
parents: 19249
diff changeset
1183 + ASMALIGN(4)
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1184 + "1: \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1185 + "movd %1, %%mm7 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1186 + "punpckldq %1, %%mm7 \n\t"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1187 + "movq 1024(%0, %%"REG_S"), %%mm0\n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1188 + "movq 1032(%0, %%"REG_S"), %%mm1\n\t"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1189 + "movq 3072(%0, %%"REG_S"), %%mm4\n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1190 + "movq 3080(%0, %%"REG_S"), %%mm5\n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1191 + "pfadd %%mm7, %%mm0 \n\t" // common
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1192 + "pfadd %%mm7, %%mm1 \n\t" // common
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1193 + "pfadd 4096(%0, %%"REG_S"), %%mm4\n\t" // surround
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1194 + "pfadd 4104(%0, %%"REG_S"), %%mm5\n\t" // surround
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1195 + "movq (%0, %%"REG_S"), %%mm2 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1196 + "movq 8(%0, %%"REG_S"), %%mm3 \n\t"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1197 + "movq 2048(%0, %%"REG_S"), %%mm6\n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1198 + "movq 2056(%0, %%"REG_S"), %%mm7\n\t"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1199 + "pfsub %%mm4, %%mm2 \n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1200 + "pfsub %%mm5, %%mm3 \n\t"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1201 + "pfadd %%mm4, %%mm6 \n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1202 + "pfadd %%mm5, %%mm7 \n\t"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1203 + "pfadd %%mm0, %%mm2 \n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1204 + "pfadd %%mm1, %%mm3 \n\t"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1205 + "pfadd %%mm0, %%mm6 \n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1206 + "pfadd %%mm1, %%mm7 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1207 + "movq %%mm2, (%0, %%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1208 + "movq %%mm3, 8(%0, %%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1209 + "movq %%mm6, 1024(%0, %%"REG_S")\n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1210 + "movq %%mm7, 1032(%0, %%"REG_S")\n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1211 + "add $16, %%"REG_S" \n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1212 + " jnz 1b \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1213 + :: "r" (samples+256), "m" (bias)
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1214 + : "%"REG_S
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1215 + );
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1216 +}
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1217 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1218 +static void move2to1_3dnow (sample_t * src, sample_t * dest, sample_t bias)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1219 +{
27754
08d18fe9da52 Change all occurrences of asm and __asm to __asm__, same as was done for FFmpeg.
diego
parents: 27454
diff changeset
1220 + __asm__ volatile(
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1221 + "movd %2, %%mm7 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1222 + "punpckldq %2, %%mm7 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1223 + "mov $-1024, %%"REG_S" \n\t"
19373
87dddfc314fd Update for changes from r19378 (ASMALIGN macro).
diego
parents: 19249
diff changeset
1224 + ASMALIGN(4)
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1225 + "1: \n\t"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1226 + "movq (%0, %%"REG_S"), %%mm0 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1227 + "movq 8(%0, %%"REG_S"), %%mm1 \n\t"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1228 + "movq 16(%0, %%"REG_S"), %%mm2 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1229 + "movq 24(%0, %%"REG_S"), %%mm3 \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1230 + "pfadd 1024(%0, %%"REG_S"), %%mm0\n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1231 + "pfadd 1032(%0, %%"REG_S"), %%mm1\n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1232 + "pfadd 1040(%0, %%"REG_S"), %%mm2\n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1233 + "pfadd 1048(%0, %%"REG_S"), %%mm3\n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1234 + "pfadd %%mm7, %%mm0 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1235 + "pfadd %%mm7, %%mm1 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1236 + "pfadd %%mm7, %%mm2 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1237 + "pfadd %%mm7, %%mm3 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1238 + "movq %%mm0, (%1, %%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1239 + "movq %%mm1, 8(%1, %%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1240 + "movq %%mm2, 16(%1, %%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1241 + "movq %%mm3, 24(%1, %%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1242 + "add $32, %%"REG_S" \n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1243 + " jnz 1b \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1244 + :: "r" (src+256), "r" (dest+256), "m" (bias)
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1245 + : "%"REG_S
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1246 + );
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1247 +}
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1248 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1249 +static void downmix_3dnow (sample_t * samples, int acmod, int output, sample_t bias,
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1250 + sample_t clev, sample_t slev)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1251 +{
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1252 + switch (CONVERT (acmod, output & A52_CHANNEL_MASK)) {
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1253 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1254 + case CONVERT (A52_CHANNEL, A52_CHANNEL2):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1255 + memcpy (samples, samples + 256, 256 * sizeof (sample_t));
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1256 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1257 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1258 + case CONVERT (A52_CHANNEL, A52_MONO):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1259 + case CONVERT (A52_STEREO, A52_MONO):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1260 + mix_2to1_3dnow:
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1261 + mix2to1_3dnow (samples, samples + 256, bias);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1262 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1263 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1264 + case CONVERT (A52_2F1R, A52_MONO):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1265 + if (slev == 0)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1266 + goto mix_2to1_3dnow;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1267 + case CONVERT (A52_3F, A52_MONO):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1268 + mix_3to1_3dnow:
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1269 + mix3to1_3dnow (samples, bias);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1270 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1271 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1272 + case CONVERT (A52_3F1R, A52_MONO):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1273 + if (slev == 0)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1274 + goto mix_3to1_3dnow;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1275 + case CONVERT (A52_2F2R, A52_MONO):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1276 + if (slev == 0)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1277 + goto mix_2to1_3dnow;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1278 + mix4to1_3dnow (samples, bias);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1279 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1280 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1281 + case CONVERT (A52_3F2R, A52_MONO):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1282 + if (slev == 0)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1283 + goto mix_3to1_3dnow;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1284 + mix5to1_3dnow (samples, bias);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1285 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1286 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1287 + case CONVERT (A52_MONO, A52_DOLBY):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1288 + memcpy (samples + 256, samples, 256 * sizeof (sample_t));
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1289 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1290 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1291 + case CONVERT (A52_3F, A52_STEREO):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1292 + case CONVERT (A52_3F, A52_DOLBY):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1293 + mix_3to2_3dnow:
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1294 + mix3to2_3dnow (samples, bias);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1295 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1296 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1297 + case CONVERT (A52_2F1R, A52_STEREO):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1298 + if (slev == 0)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1299 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1300 + mix21to2_3dnow (samples, samples + 256, bias);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1301 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1302 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1303 + case CONVERT (A52_2F1R, A52_DOLBY):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1304 + mix21toS_3dnow (samples, bias);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1305 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1306 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1307 + case CONVERT (A52_3F1R, A52_STEREO):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1308 + if (slev == 0)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1309 + goto mix_3to2_3dnow;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1310 + mix31to2_3dnow (samples, bias);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1311 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1312 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1313 + case CONVERT (A52_3F1R, A52_DOLBY):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1314 + mix31toS_3dnow (samples, bias);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1315 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1316 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1317 + case CONVERT (A52_2F2R, A52_STEREO):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1318 + if (slev == 0)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1319 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1320 + mix2to1_3dnow (samples, samples + 512, bias);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1321 + mix2to1_3dnow (samples + 256, samples + 768, bias);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1322 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1323 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1324 + case CONVERT (A52_2F2R, A52_DOLBY):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1325 + mix22toS_3dnow (samples, bias);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1326 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1327 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1328 + case CONVERT (A52_3F2R, A52_STEREO):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1329 + if (slev == 0)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1330 + goto mix_3to2_3dnow;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1331 + mix32to2_3dnow (samples, bias);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1332 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1333 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1334 + case CONVERT (A52_3F2R, A52_DOLBY):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1335 + mix32toS_3dnow (samples, bias);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1336 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1337 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1338 + case CONVERT (A52_3F1R, A52_3F):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1339 + if (slev == 0)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1340 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1341 + mix21to2_3dnow (samples, samples + 512, bias);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1342 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1343 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1344 + case CONVERT (A52_3F2R, A52_3F):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1345 + if (slev == 0)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1346 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1347 + mix2to1_3dnow (samples, samples + 768, bias);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1348 + mix2to1_3dnow (samples + 512, samples + 1024, bias);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1349 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1350 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1351 + case CONVERT (A52_3F1R, A52_2F1R):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1352 + mix3to2_3dnow (samples, bias);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1353 + memcpy (samples + 512, samples + 768, 256 * sizeof (sample_t));
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1354 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1355 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1356 + case CONVERT (A52_2F2R, A52_2F1R):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1357 + mix2to1_3dnow (samples + 512, samples + 768, bias);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1358 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1359 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1360 + case CONVERT (A52_3F2R, A52_2F1R):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1361 + mix3to2_3dnow (samples, bias); //FIXME possible bug? (output doesnt seem to be used)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1362 + move2to1_3dnow (samples + 768, samples + 512, bias);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1363 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1364 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1365 + case CONVERT (A52_3F2R, A52_3F1R):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1366 + mix2to1_3dnow (samples + 768, samples + 1024, bias);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1367 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1368 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1369 + case CONVERT (A52_2F1R, A52_2F2R):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1370 + memcpy (samples + 768, samples + 512, 256 * sizeof (sample_t));
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1371 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1372 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1373 + case CONVERT (A52_3F1R, A52_2F2R):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1374 + mix3to2_3dnow (samples, bias);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1375 + memcpy (samples + 512, samples + 768, 256 * sizeof (sample_t));
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1376 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1377 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1378 + case CONVERT (A52_3F2R, A52_2F2R):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1379 + mix3to2_3dnow (samples, bias);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1380 + memcpy (samples + 512, samples + 768, 256 * sizeof (sample_t));
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1381 + memcpy (samples + 768, samples + 1024, 256 * sizeof (sample_t));
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1382 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1383 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1384 + case CONVERT (A52_3F1R, A52_3F2R):
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1385 + memcpy (samples + 1024, samples + 768, 256 * sizeof (sample_t));
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1386 + break;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1387 + }
27754
08d18fe9da52 Change all occurrences of asm and __asm to __asm__, same as was done for FFmpeg.
diego
parents: 27454
diff changeset
1388 + __asm__ volatile("femms":::"memory");
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1389 +}
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1390 +
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1391 +#endif // ARCH_X86 || ARCH_X86_64
25995
236ab58453f7 Refactor AltiVec macros as done for FFmpeg.
diego
parents: 25328
diff changeset
1392 --- liba52/imdct.c 2008-02-19 00:18:33.000000000 +0100
236ab58453f7 Refactor AltiVec macros as done for FFmpeg.
diego
parents: 25328
diff changeset
1393 +++ liba52/imdct.c 2008-02-19 00:16:40.000000000 +0100
28797
dcdc0c85d354 Sync local changes file with #ifdef --> #if conversion.
diego
parents: 28593
diff changeset
1394 @@ -22,6 +26,11 @@
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1395 * You should have received a copy of the GNU General Public License
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1396 * along with this program; if not, write to the Free Software
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1397 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1398 + *
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1399 + * SSE optimizations from Michael Niedermayer (michaelni@gmx.at)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1400 + * 3DNOW optimizations from Nick Kurshev <nickols_k@mail.ru>
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1401 + * michael did port them from libac3 (untested, perhaps totally broken)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1402 + * AltiVec optimizations from Romain Dolbeau (romain@dolbeau.org)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1403 */
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1404
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1405 #include "config.h"
28797
dcdc0c85d354 Sync local changes file with #ifdef --> #if conversion.
diego
parents: 28593
diff changeset
1406 @@ -39,12 +48,50 @@
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1407 #include "a52.h"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1408 #include "a52_internal.h"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1409 #include "mm_accel.h"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1410 +#include "mangle.h"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1411 +
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1412 +void (*a52_imdct_512) (sample_t * data, sample_t * delay, sample_t bias);
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1413 +
29114
06540eb5ef6a Rename RUNTIME_CPUDETECT to CONFIG_RUNTIME_CPUDETECT and always define it.
ramiro
parents: 28797
diff changeset
1414 +#if CONFIG_RUNTIME_CPUDETECT
28335
31287e75b5d8 HAVE_3DNOW --> HAVE_AMD3DNOW
diego
parents: 28326
diff changeset
1415 +#undef HAVE_AMD3DNOWEXT
28797
dcdc0c85d354 Sync local changes file with #ifdef --> #if conversion.
diego
parents: 28593
diff changeset
1416 +#define HAVE_AMD3DNOWEXT 0
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1417 +#endif
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1418
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1419 typedef struct complex_s {
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1420 sample_t real;
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1421 sample_t imag;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1422 } complex_t;
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1423
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1424 +static const int pm128[128] attribute_used __attribute__((aligned(16))) =
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1425 +{
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1426 + 0, 16, 32, 48, 64, 80, 96, 112, 8, 40, 72, 104, 24, 56, 88, 120,
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1427 + 4, 20, 36, 52, 68, 84, 100, 116, 12, 28, 44, 60, 76, 92, 108, 124,
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1428 + 2, 18, 34, 50, 66, 82, 98, 114, 10, 42, 74, 106, 26, 58, 90, 122,
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1429 + 6, 22, 38, 54, 70, 86, 102, 118, 14, 46, 78, 110, 30, 62, 94, 126,
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1430 + 1, 17, 33, 49, 65, 81, 97, 113, 9, 41, 73, 105, 25, 57, 89, 121,
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1431 + 5, 21, 37, 53, 69, 85, 101, 117, 13, 29, 45, 61, 77, 93, 109, 125,
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1432 + 3, 19, 35, 51, 67, 83, 99, 115, 11, 43, 75, 107, 27, 59, 91, 123,
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1433 + 7, 23, 39, 55, 71, 87, 103, 119, 15, 31, 47, 63, 79, 95, 111, 127
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1434 +};
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1435 +
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1436 +static uint8_t attribute_used bit_reverse_512[] = {
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1437 + 0x00, 0x40, 0x20, 0x60, 0x10, 0x50, 0x30, 0x70,
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1438 + 0x08, 0x48, 0x28, 0x68, 0x18, 0x58, 0x38, 0x78,
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1439 + 0x04, 0x44, 0x24, 0x64, 0x14, 0x54, 0x34, 0x74,
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1440 + 0x0c, 0x4c, 0x2c, 0x6c, 0x1c, 0x5c, 0x3c, 0x7c,
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1441 + 0x02, 0x42, 0x22, 0x62, 0x12, 0x52, 0x32, 0x72,
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1442 + 0x0a, 0x4a, 0x2a, 0x6a, 0x1a, 0x5a, 0x3a, 0x7a,
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1443 + 0x06, 0x46, 0x26, 0x66, 0x16, 0x56, 0x36, 0x76,
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1444 + 0x0e, 0x4e, 0x2e, 0x6e, 0x1e, 0x5e, 0x3e, 0x7e,
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1445 + 0x01, 0x41, 0x21, 0x61, 0x11, 0x51, 0x31, 0x71,
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1446 + 0x09, 0x49, 0x29, 0x69, 0x19, 0x59, 0x39, 0x79,
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1447 + 0x05, 0x45, 0x25, 0x65, 0x15, 0x55, 0x35, 0x75,
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1448 + 0x0d, 0x4d, 0x2d, 0x6d, 0x1d, 0x5d, 0x3d, 0x7d,
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1449 + 0x03, 0x43, 0x23, 0x63, 0x13, 0x53, 0x33, 0x73,
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1450 + 0x0b, 0x4b, 0x2b, 0x6b, 0x1b, 0x5b, 0x3b, 0x7b,
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1451 + 0x07, 0x47, 0x27, 0x67, 0x17, 0x57, 0x37, 0x77,
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1452 + 0x0f, 0x4f, 0x2f, 0x6f, 0x1f, 0x5f, 0x3f, 0x7f};
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1453 +
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1454 static uint8_t fftorder[] = {
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1455 0,128, 64,192, 32,160,224, 96, 16,144, 80,208,240,112, 48,176,
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1456 8,136, 72,200, 40,168,232,104,248,120, 56,184, 24,152,216, 88,
28797
dcdc0c85d354 Sync local changes file with #ifdef --> #if conversion.
diego
parents: 28593
diff changeset
1457 @@ -56,6 +103,40 @@
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1458 6,134, 70,198, 38,166,230,102,246,118, 54,182, 22,150,214, 86
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1459 };
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1460
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1461 +static complex_t __attribute__((aligned(16))) buf[128];
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1462 +
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1463 +/* Twiddle factor LUT */
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1464 +static complex_t __attribute__((aligned(16))) w_1[1];
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1465 +static complex_t __attribute__((aligned(16))) w_2[2];
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1466 +static complex_t __attribute__((aligned(16))) w_4[4];
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1467 +static complex_t __attribute__((aligned(16))) w_8[8];
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1468 +static complex_t __attribute__((aligned(16))) w_16[16];
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1469 +static complex_t __attribute__((aligned(16))) w_32[32];
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1470 +static complex_t __attribute__((aligned(16))) w_64[64];
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1471 +static complex_t __attribute__((aligned(16))) * w[7] = {w_1, w_2, w_4, w_8, w_16, w_32, w_64};
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1472 +
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1473 +/* Twiddle factors for IMDCT */
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1474 +static sample_t __attribute__((aligned(16))) xcos1[128];
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1475 +static sample_t __attribute__((aligned(16))) xsin1[128];
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1476 +
28797
dcdc0c85d354 Sync local changes file with #ifdef --> #if conversion.
diego
parents: 28593
diff changeset
1477 +#if ARCH_X86 || ARCH_X86_64
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1478 +// NOTE: SSE needs 16byte alignment or it will segfault
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1479 +//
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1480 +static float __attribute__((aligned(16))) sseSinCos1c[256];
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1481 +static float __attribute__((aligned(16))) sseSinCos1d[256];
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1482 +static float attribute_used __attribute__((aligned(16))) ps111_1[4]={1,1,1,-1};
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1483 +//static float __attribute__((aligned(16))) sseW0[4];
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1484 +static float __attribute__((aligned(16))) sseW1[8];
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1485 +static float __attribute__((aligned(16))) sseW2[16];
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1486 +static float __attribute__((aligned(16))) sseW3[32];
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1487 +static float __attribute__((aligned(16))) sseW4[64];
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1488 +static float __attribute__((aligned(16))) sseW5[128];
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1489 +static float __attribute__((aligned(16))) sseW6[256];
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1490 +static float __attribute__((aligned(16))) *sseW[7]=
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1491 + {NULL /*sseW0*/,sseW1,sseW2,sseW3,sseW4,sseW5,sseW6};
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1492 +static float __attribute__((aligned(16))) sseWindow[512];
18721
722ac20fac5f sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 18720
diff changeset
1493 +#endif
722ac20fac5f sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 18720
diff changeset
1494 +
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1495 /* Root values for IFFT */
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1496 static sample_t roots16[3];
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1497 static sample_t roots32[7];
28797
dcdc0c85d354 Sync local changes file with #ifdef --> #if conversion.
diego
parents: 28593
diff changeset
1498 @@ -241,7 +322,7 @@
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1499 ifft_pass (buf, roots128 - 32, 32);
18721
722ac20fac5f sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 18720
diff changeset
1500 }
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1501
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1502 -void a52_imdct_512 (sample_t * data, sample_t * delay, sample_t bias)
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1503 +void imdct_do_512 (sample_t * data, sample_t * delay, sample_t bias)
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1504 {
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1505 int i, k;
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1506 sample_t t_r, t_i, a_r, a_i, b_r, b_i, w_1, w_2;
29601
cd3ae709054f Disable liba52 SSE imdct for x86_64+PIC (e.g. OSX 64 bit) since it will
reimar
parents: 29401
diff changeset
1507 @@ -285,6 +366,704 @@
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1508 }
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1509 }
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1510
28797
dcdc0c85d354 Sync local changes file with #ifdef --> #if conversion.
diego
parents: 28593
diff changeset
1511 +#if HAVE_ALTIVEC
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1512 +
25328
6f0309e575e0 There is a check for altivec.h in configure so use the preprocessor directive
diego
parents: 25327
diff changeset
1513 +#ifdef HAVE_ALTIVEC_H
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1514 +#include <altivec.h>
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1515 +#endif
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1516 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1517 +// used to build registers permutation vectors (vcprm)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1518 +// the 's' are for words in the _s_econd vector
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1519 +#define WORD_0 0x00,0x01,0x02,0x03
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1520 +#define WORD_1 0x04,0x05,0x06,0x07
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1521 +#define WORD_2 0x08,0x09,0x0a,0x0b
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1522 +#define WORD_3 0x0c,0x0d,0x0e,0x0f
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1523 +#define WORD_s0 0x10,0x11,0x12,0x13
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1524 +#define WORD_s1 0x14,0x15,0x16,0x17
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1525 +#define WORD_s2 0x18,0x19,0x1a,0x1b
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1526 +#define WORD_s3 0x1c,0x1d,0x1e,0x1f
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1527 +
27318
bb5ed9aa34fc Remove AltiVec vector declaration compiler compatibility macros.
diego
parents: 26895
diff changeset
1528 +#define vcprm(a,b,c,d) (const vector unsigned char){WORD_ ## a, WORD_ ## b, WORD_ ## c, WORD_ ## d}
bb5ed9aa34fc Remove AltiVec vector declaration compiler compatibility macros.
diego
parents: 26895
diff changeset
1529 +#define vcii(a,b,c,d) (const vector float){FLOAT_ ## a, FLOAT_ ## b, FLOAT_ ## c, FLOAT_ ## d}
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1530 +
27318
bb5ed9aa34fc Remove AltiVec vector declaration compiler compatibility macros.
diego
parents: 26895
diff changeset
1531 +#define FOUROF(a) {a,a,a,a}
25995
236ab58453f7 Refactor AltiVec macros as done for FFmpeg.
diego
parents: 25328
diff changeset
1532 +
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1533 +// vcprmle is used to keep the same index as in the SSE version.
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1534 +// it's the same as vcprm, with the index inversed
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1535 +// ('le' is Little Endian)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1536 +#define vcprmle(a,b,c,d) vcprm(d,c,b,a)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1537 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1538 +// used to build inverse/identity vectors (vcii)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1539 +// n is _n_egative, p is _p_ositive
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1540 +#define FLOAT_n -1.
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1541 +#define FLOAT_p 1.
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1542 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1543 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1544 +void
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1545 +imdct_do_512_altivec(sample_t data[],sample_t delay[], sample_t bias)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1546 +{
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1547 + int i;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1548 + int k;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1549 + int p,q;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1550 + int m;
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1551 + long two_m;
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1552 + long two_m_plus_one;
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1553 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1554 + sample_t tmp_b_i;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1555 + sample_t tmp_b_r;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1556 + sample_t tmp_a_i;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1557 + sample_t tmp_a_r;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1558 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1559 + sample_t *data_ptr;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1560 + sample_t *delay_ptr;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1561 + sample_t *window_ptr;
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1562 +
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1563 + /* 512 IMDCT with source and dest data in 'data' */
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1564 +
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1565 + /* Pre IFFT complex multiply plus IFFT cmplx conjugate & reordering*/
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1566 + for( i=0; i < 128; i++) {
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1567 + /* z[i] = (X[256-2*i-1] + j * X[2*i]) * (xcos1[i] + j * xsin1[i]) ; */
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1568 + int j= bit_reverse_512[i];
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1569 + buf[i].real = (data[256-2*j-1] * xcos1[j]) - (data[2*j] * xsin1[j]);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1570 + buf[i].imag = -1.0 * ((data[2*j] * xcos1[j]) + (data[256-2*j-1] * xsin1[j]));
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1571 + }
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1572 +
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1573 + /* 1. iteration */
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1574 + for(i = 0; i < 128; i += 2) {
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1575 +#if 0
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1576 + tmp_a_r = buf[i].real;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1577 + tmp_a_i = buf[i].imag;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1578 + tmp_b_r = buf[i+1].real;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1579 + tmp_b_i = buf[i+1].imag;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1580 + buf[i].real = tmp_a_r + tmp_b_r;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1581 + buf[i].imag = tmp_a_i + tmp_b_i;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1582 + buf[i+1].real = tmp_a_r - tmp_b_r;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1583 + buf[i+1].imag = tmp_a_i - tmp_b_i;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1584 +#else
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1585 + vector float temp, bufv;
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1586 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1587 + bufv = vec_ld(i << 3, (float*)buf);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1588 + temp = vec_perm(bufv, bufv, vcprm(2,3,0,1));
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1589 + bufv = vec_madd(bufv, vcii(p,p,n,n), temp);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1590 + vec_st(bufv, i << 3, (float*)buf);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1591 +#endif
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1592 + }
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1593 +
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1594 + /* 2. iteration */
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1595 + // Note w[1]={{1,0}, {0,-1}}
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1596 + for(i = 0; i < 128; i += 4) {
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1597 +#if 0
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1598 + tmp_a_r = buf[i].real;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1599 + tmp_a_i = buf[i].imag;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1600 + tmp_b_r = buf[i+2].real;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1601 + tmp_b_i = buf[i+2].imag;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1602 + buf[i].real = tmp_a_r + tmp_b_r;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1603 + buf[i].imag = tmp_a_i + tmp_b_i;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1604 + buf[i+2].real = tmp_a_r - tmp_b_r;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1605 + buf[i+2].imag = tmp_a_i - tmp_b_i;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1606 + tmp_a_r = buf[i+1].real;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1607 + tmp_a_i = buf[i+1].imag;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1608 + /* WARNING: im <-> re here ! */
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1609 + tmp_b_r = buf[i+3].imag;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1610 + tmp_b_i = buf[i+3].real;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1611 + buf[i+1].real = tmp_a_r + tmp_b_r;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1612 + buf[i+1].imag = tmp_a_i - tmp_b_i;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1613 + buf[i+3].real = tmp_a_r - tmp_b_r;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1614 + buf[i+3].imag = tmp_a_i + tmp_b_i;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1615 +#else
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1616 + vector float buf01, buf23, temp1, temp2;
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1617 +
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1618 + buf01 = vec_ld((i + 0) << 3, (float*)buf);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1619 + buf23 = vec_ld((i + 2) << 3, (float*)buf);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1620 + buf23 = vec_perm(buf23,buf23,vcprm(0,1,3,2));
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1621 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1622 + temp1 = vec_madd(buf23, vcii(p,p,p,n), buf01);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1623 + temp2 = vec_madd(buf23, vcii(n,n,n,p), buf01);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1624 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1625 + vec_st(temp1, (i + 0) << 3, (float*)buf);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1626 + vec_st(temp2, (i + 2) << 3, (float*)buf);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1627 +#endif
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1628 + }
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1629 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1630 + /* 3. iteration */
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1631 + for(i = 0; i < 128; i += 8) {
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1632 +#if 0
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1633 + tmp_a_r = buf[i].real;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1634 + tmp_a_i = buf[i].imag;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1635 + tmp_b_r = buf[i+4].real;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1636 + tmp_b_i = buf[i+4].imag;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1637 + buf[i].real = tmp_a_r + tmp_b_r;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1638 + buf[i].imag = tmp_a_i + tmp_b_i;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1639 + buf[i+4].real = tmp_a_r - tmp_b_r;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1640 + buf[i+4].imag = tmp_a_i - tmp_b_i;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1641 + tmp_a_r = buf[1+i].real;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1642 + tmp_a_i = buf[1+i].imag;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1643 + tmp_b_r = (buf[i+5].real + buf[i+5].imag) * w[2][1].real;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1644 + tmp_b_i = (buf[i+5].imag - buf[i+5].real) * w[2][1].real;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1645 + buf[1+i].real = tmp_a_r + tmp_b_r;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1646 + buf[1+i].imag = tmp_a_i + tmp_b_i;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1647 + buf[i+5].real = tmp_a_r - tmp_b_r;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1648 + buf[i+5].imag = tmp_a_i - tmp_b_i;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1649 + tmp_a_r = buf[i+2].real;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1650 + tmp_a_i = buf[i+2].imag;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1651 + /* WARNING re <-> im & sign */
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1652 + tmp_b_r = buf[i+6].imag;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1653 + tmp_b_i = - buf[i+6].real;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1654 + buf[i+2].real = tmp_a_r + tmp_b_r;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1655 + buf[i+2].imag = tmp_a_i + tmp_b_i;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1656 + buf[i+6].real = tmp_a_r - tmp_b_r;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1657 + buf[i+6].imag = tmp_a_i - tmp_b_i;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1658 + tmp_a_r = buf[i+3].real;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1659 + tmp_a_i = buf[i+3].imag;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1660 + tmp_b_r = (buf[i+7].real - buf[i+7].imag) * w[2][3].imag;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1661 + tmp_b_i = (buf[i+7].imag + buf[i+7].real) * w[2][3].imag;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1662 + buf[i+3].real = tmp_a_r + tmp_b_r;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1663 + buf[i+3].imag = tmp_a_i + tmp_b_i;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1664 + buf[i+7].real = tmp_a_r - tmp_b_r;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1665 + buf[i+7].imag = tmp_a_i - tmp_b_i;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1666 +#else
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1667 + vector float buf01, buf23, buf45, buf67;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1668 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1669 + buf01 = vec_ld((i + 0) << 3, (float*)buf);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1670 + buf23 = vec_ld((i + 2) << 3, (float*)buf);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1671 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1672 + tmp_b_r = (buf[i+5].real + buf[i+5].imag) * w[2][1].real;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1673 + tmp_b_i = (buf[i+5].imag - buf[i+5].real) * w[2][1].real;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1674 + buf[i+5].real = tmp_b_r;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1675 + buf[i+5].imag = tmp_b_i;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1676 + tmp_b_r = (buf[i+7].real - buf[i+7].imag) * w[2][3].imag;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1677 + tmp_b_i = (buf[i+7].imag + buf[i+7].real) * w[2][3].imag;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1678 + buf[i+7].real = tmp_b_r;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1679 + buf[i+7].imag = tmp_b_i;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1680 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1681 + buf23 = vec_ld((i + 2) << 3, (float*)buf);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1682 + buf45 = vec_ld((i + 4) << 3, (float*)buf);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1683 + buf67 = vec_ld((i + 6) << 3, (float*)buf);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1684 + buf67 = vec_perm(buf67, buf67, vcprm(1,0,2,3));
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1685 +
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1686 + vec_st(vec_add(buf01, buf45), (i + 0) << 3, (float*)buf);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1687 + vec_st(vec_madd(buf67, vcii(p,n,p,p), buf23), (i + 2) << 3, (float*)buf);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1688 + vec_st(vec_sub(buf01, buf45), (i + 4) << 3, (float*)buf);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1689 + vec_st(vec_nmsub(buf67, vcii(p,n,p,p), buf23), (i + 6) << 3, (float*)buf);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1690 +#endif
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1691 + }
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1692 +
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1693 + /* 4-7. iterations */
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1694 + for (m=3; m < 7; m++) {
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1695 + two_m = (1 << m);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1696 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1697 + two_m_plus_one = two_m<<1;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1698 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1699 + for(i = 0; i < 128; i += two_m_plus_one) {
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1700 + for(k = 0; k < two_m; k+=2) {
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1701 +#if 0
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1702 + int p = k + i;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1703 + int q = p + two_m;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1704 + tmp_a_r = buf[p].real;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1705 + tmp_a_i = buf[p].imag;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1706 + tmp_b_r =
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1707 + buf[q].real * w[m][k].real -
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1708 + buf[q].imag * w[m][k].imag;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1709 + tmp_b_i =
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1710 + buf[q].imag * w[m][k].real +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1711 + buf[q].real * w[m][k].imag;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1712 + buf[p].real = tmp_a_r + tmp_b_r;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1713 + buf[p].imag = tmp_a_i + tmp_b_i;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1714 + buf[q].real = tmp_a_r - tmp_b_r;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1715 + buf[q].imag = tmp_a_i - tmp_b_i;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1716 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1717 + tmp_a_r = buf[(p + 1)].real;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1718 + tmp_a_i = buf[(p + 1)].imag;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1719 + tmp_b_r =
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1720 + buf[(q + 1)].real * w[m][(k + 1)].real -
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1721 + buf[(q + 1)].imag * w[m][(k + 1)].imag;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1722 + tmp_b_i =
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1723 + buf[(q + 1)].imag * w[m][(k + 1)].real +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1724 + buf[(q + 1)].real * w[m][(k + 1)].imag;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1725 + buf[(p + 1)].real = tmp_a_r + tmp_b_r;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1726 + buf[(p + 1)].imag = tmp_a_i + tmp_b_i;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1727 + buf[(q + 1)].real = tmp_a_r - tmp_b_r;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1728 + buf[(q + 1)].imag = tmp_a_i - tmp_b_i;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1729 +#else
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1730 + int p = k + i;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1731 + int q = p + two_m;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1732 + vector float vecp, vecq, vecw, temp1, temp2, temp3, temp4;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1733 + const vector float vczero = (const vector float)FOUROF(0.);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1734 + // first compute buf[q] and buf[q+1]
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1735 + vecq = vec_ld(q << 3, (float*)buf);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1736 + vecw = vec_ld(0, (float*)&(w[m][k]));
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1737 + temp1 = vec_madd(vecq, vecw, vczero);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1738 + temp2 = vec_perm(vecq, vecq, vcprm(1,0,3,2));
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1739 + temp2 = vec_madd(temp2, vecw, vczero);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1740 + temp3 = vec_perm(temp1, temp2, vcprm(0,s0,2,s2));
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1741 + temp4 = vec_perm(temp1, temp2, vcprm(1,s1,3,s3));
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1742 + vecq = vec_madd(temp4, vcii(n,p,n,p), temp3);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1743 + // then butterfly with buf[p] and buf[p+1]
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1744 + vecp = vec_ld(p << 3, (float*)buf);
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1745 +
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1746 + temp1 = vec_add(vecp, vecq);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1747 + temp2 = vec_sub(vecp, vecq);
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1748 +
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1749 + vec_st(temp1, p << 3, (float*)buf);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1750 + vec_st(temp2, q << 3, (float*)buf);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1751 +#endif
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1752 + }
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1753 + }
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1754 + }
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1755 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1756 + /* Post IFFT complex multiply plus IFFT complex conjugate*/
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1757 + for( i=0; i < 128; i+=4) {
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1758 + /* y[n] = z[n] * (xcos1[n] + j * xsin1[n]) ; */
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1759 +#if 0
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1760 + tmp_a_r = buf[(i + 0)].real;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1761 + tmp_a_i = -1.0 * buf[(i + 0)].imag;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1762 + buf[(i + 0)].real =
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1763 + (tmp_a_r * xcos1[(i + 0)]) - (tmp_a_i * xsin1[(i + 0)]);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1764 + buf[(i + 0)].imag =
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1765 + (tmp_a_r * xsin1[(i + 0)]) + (tmp_a_i * xcos1[(i + 0)]);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1766 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1767 + tmp_a_r = buf[(i + 1)].real;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1768 + tmp_a_i = -1.0 * buf[(i + 1)].imag;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1769 + buf[(i + 1)].real =
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1770 + (tmp_a_r * xcos1[(i + 1)]) - (tmp_a_i * xsin1[(i + 1)]);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1771 + buf[(i + 1)].imag =
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1772 + (tmp_a_r * xsin1[(i + 1)]) + (tmp_a_i * xcos1[(i + 1)]);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1773 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1774 + tmp_a_r = buf[(i + 2)].real;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1775 + tmp_a_i = -1.0 * buf[(i + 2)].imag;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1776 + buf[(i + 2)].real =
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1777 + (tmp_a_r * xcos1[(i + 2)]) - (tmp_a_i * xsin1[(i + 2)]);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1778 + buf[(i + 2)].imag =
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1779 + (tmp_a_r * xsin1[(i + 2)]) + (tmp_a_i * xcos1[(i + 2)]);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1780 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1781 + tmp_a_r = buf[(i + 3)].real;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1782 + tmp_a_i = -1.0 * buf[(i + 3)].imag;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1783 + buf[(i + 3)].real =
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1784 + (tmp_a_r * xcos1[(i + 3)]) - (tmp_a_i * xsin1[(i + 3)]);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1785 + buf[(i + 3)].imag =
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1786 + (tmp_a_r * xsin1[(i + 3)]) + (tmp_a_i * xcos1[(i + 3)]);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1787 +#else
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1788 + vector float bufv_0, bufv_2, cosv, sinv, temp1, temp2;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1789 + vector float temp0022, temp1133, tempCS01;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1790 + const vector float vczero = (const vector float)FOUROF(0.);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1791 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1792 + bufv_0 = vec_ld((i + 0) << 3, (float*)buf);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1793 + bufv_2 = vec_ld((i + 2) << 3, (float*)buf);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1794 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1795 + cosv = vec_ld(i << 2, xcos1);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1796 + sinv = vec_ld(i << 2, xsin1);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1797 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1798 + temp0022 = vec_perm(bufv_0, bufv_0, vcprm(0,0,2,2));
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1799 + temp1133 = vec_perm(bufv_0, bufv_0, vcprm(1,1,3,3));
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1800 + tempCS01 = vec_perm(cosv, sinv, vcprm(0,s0,1,s1));
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1801 + temp1 = vec_madd(temp0022, tempCS01, vczero);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1802 + tempCS01 = vec_perm(cosv, sinv, vcprm(s0,0,s1,1));
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1803 + temp2 = vec_madd(temp1133, tempCS01, vczero);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1804 + bufv_0 = vec_madd(temp2, vcii(p,n,p,n), temp1);
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1805 +
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1806 + vec_st(bufv_0, (i + 0) << 3, (float*)buf);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1807 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1808 + /* idem with bufv_2 and high-order cosv/sinv */
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1809 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1810 + temp0022 = vec_perm(bufv_2, bufv_2, vcprm(0,0,2,2));
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1811 + temp1133 = vec_perm(bufv_2, bufv_2, vcprm(1,1,3,3));
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1812 + tempCS01 = vec_perm(cosv, sinv, vcprm(2,s2,3,s3));
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1813 + temp1 = vec_madd(temp0022, tempCS01, vczero);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1814 + tempCS01 = vec_perm(cosv, sinv, vcprm(s2,2,s3,3));
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1815 + temp2 = vec_madd(temp1133, tempCS01, vczero);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1816 + bufv_2 = vec_madd(temp2, vcii(p,n,p,n), temp1);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1817 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1818 + vec_st(bufv_2, (i + 2) << 3, (float*)buf);
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1819 +
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1820 +#endif
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1821 + }
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1822 +
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1823 + data_ptr = data;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1824 + delay_ptr = delay;
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1825 + window_ptr = a52_imdct_window;
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1826 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1827 + /* Window and convert to real valued signal */
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1828 + for(i=0; i< 64; i++) {
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1829 + *data_ptr++ = -buf[64+i].imag * *window_ptr++ + *delay_ptr++ + bias;
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1830 + *data_ptr++ = buf[64-i-1].real * *window_ptr++ + *delay_ptr++ + bias;
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1831 + }
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1832 +
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1833 + for(i=0; i< 64; i++) {
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1834 + *data_ptr++ = -buf[i].real * *window_ptr++ + *delay_ptr++ + bias;
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1835 + *data_ptr++ = buf[128-i-1].imag * *window_ptr++ + *delay_ptr++ + bias;
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1836 + }
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1837 +
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1838 + /* The trailing edge of the window goes into the delay line */
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1839 + delay_ptr = delay;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1840 +
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1841 + for(i=0; i< 64; i++) {
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1842 + *delay_ptr++ = -buf[64+i].real * *--window_ptr;
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1843 + *delay_ptr++ = buf[64-i-1].imag * *--window_ptr;
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1844 + }
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1845 +
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1846 + for(i=0; i<64; i++) {
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1847 + *delay_ptr++ = buf[i].imag * *--window_ptr;
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1848 + *delay_ptr++ = -buf[128-i-1].real * *--window_ptr;
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1849 + }
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1850 +}
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1851 +#endif
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1852 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1853 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1854 +// Stuff below this line is borrowed from libac3
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1855 +#include "srfftp.h"
28797
dcdc0c85d354 Sync local changes file with #ifdef --> #if conversion.
diego
parents: 28593
diff changeset
1856 +#if ARCH_X86 || ARCH_X86_64
dcdc0c85d354 Sync local changes file with #ifdef --> #if conversion.
diego
parents: 28593
diff changeset
1857 +#undef HAVE_AMD3DNOW
28335
31287e75b5d8 HAVE_3DNOW --> HAVE_AMD3DNOW
diego
parents: 28326
diff changeset
1858 +#define HAVE_AMD3DNOW 1
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1859 +#include "srfftp_3dnow.h"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1860 +
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1861 +const i_cmplx_t x_plus_minus_3dnow __attribute__ ((aligned (8))) = {{ 0x00000000UL, 0x80000000UL }};
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1862 +const i_cmplx_t x_minus_plus_3dnow __attribute__ ((aligned (8))) = {{ 0x80000000UL, 0x00000000UL }};
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1863 +const complex_t HSQRT2_3DNOW __attribute__ ((aligned (8))) = { 0.707106781188, 0.707106781188 };
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1864 +
28335
31287e75b5d8 HAVE_3DNOW --> HAVE_AMD3DNOW
diego
parents: 28326
diff changeset
1865 +#undef HAVE_AMD3DNOWEXT
28797
dcdc0c85d354 Sync local changes file with #ifdef --> #if conversion.
diego
parents: 28593
diff changeset
1866 +#define HAVE_AMD3DNOWEXT 0
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1867 +#include "imdct_3dnow.h"
28797
dcdc0c85d354 Sync local changes file with #ifdef --> #if conversion.
diego
parents: 28593
diff changeset
1868 +#undef HAVE_AMD3DNOWEXT
dcdc0c85d354 Sync local changes file with #ifdef --> #if conversion.
diego
parents: 28593
diff changeset
1869 +#define HAVE_AMD3DNOWEXT 1
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1870 +#include "imdct_3dnow.h"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1871 +
29601
cd3ae709054f Disable liba52 SSE imdct for x86_64+PIC (e.g. OSX 64 bit) since it will
reimar
parents: 29401
diff changeset
1872 +#if !ARCH_X86_64 || !defined(PIC)
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1873 +void
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1874 +imdct_do_512_sse(sample_t data[],sample_t delay[], sample_t bias)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1875 +{
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1876 +/* int i,k;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1877 + int p,q;*/
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1878 + int m;
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1879 + long two_m;
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1880 + long two_m_plus_one;
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1881 + long two_m_plus_one_shl3;
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1882 + complex_t *buf_offset;
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1883 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1884 +/* sample_t tmp_a_i;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1885 + sample_t tmp_a_r;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1886 + sample_t tmp_b_i;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1887 + sample_t tmp_b_r;*/
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1888 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1889 + sample_t *data_ptr;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1890 + sample_t *delay_ptr;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1891 + sample_t *window_ptr;
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1892 +
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1893 + /* 512 IMDCT with source and dest data in 'data' */
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1894 + /* see the c version (dct_do_512()), its allmost identical, just in C */
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1895 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1896 + /* Pre IFFT complex multiply plus IFFT cmplx conjugate */
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1897 + /* Bit reversed shuffling */
27754
08d18fe9da52 Change all occurrences of asm and __asm to __asm__, same as was done for FFmpeg.
diego
parents: 27454
diff changeset
1898 + __asm__ volatile(
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1899 + "xor %%"REG_S", %%"REG_S" \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1900 + "lea "MANGLE(bit_reverse_512)", %%"REG_a"\n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1901 + "mov $1008, %%"REG_D" \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1902 + "push %%"REG_BP" \n\t" //use ebp without telling gcc
19373
87dddfc314fd Update for changes from r19378 (ASMALIGN macro).
diego
parents: 19249
diff changeset
1903 + ASMALIGN(4)
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1904 + "1: \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1905 + "movlps (%0, %%"REG_S"), %%xmm0 \n\t" // XXXI
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1906 + "movhps 8(%0, %%"REG_D"), %%xmm0 \n\t" // RXXI
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1907 + "movlps 8(%0, %%"REG_S"), %%xmm1 \n\t" // XXXi
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1908 + "movhps (%0, %%"REG_D"), %%xmm1 \n\t" // rXXi
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1909 + "shufps $0x33, %%xmm1, %%xmm0 \n\t" // irIR
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1910 + "movaps "MANGLE(sseSinCos1c)"(%%"REG_S"), %%xmm2\n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1911 + "mulps %%xmm0, %%xmm2 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1912 + "shufps $0xB1, %%xmm0, %%xmm0 \n\t" // riRI
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1913 + "mulps "MANGLE(sseSinCos1d)"(%%"REG_S"), %%xmm0\n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1914 + "subps %%xmm0, %%xmm2 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1915 + "movzb (%%"REG_a"), %%"REG_d" \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1916 + "movzb 1(%%"REG_a"), %%"REG_BP" \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1917 + "movlps %%xmm2, (%1, %%"REG_d", 8) \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1918 + "movhps %%xmm2, (%1, %%"REG_BP", 8) \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1919 + "add $16, %%"REG_S" \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1920 + "add $2, %%"REG_a" \n\t" // avoid complex addressing for P4 crap
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1921 + "sub $16, %%"REG_D" \n\t"
18721
722ac20fac5f sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 18720
diff changeset
1922 + "jnc 1b \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1923 + "pop %%"REG_BP" \n\t"//no we didnt touch ebp *g*
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1924 + :: "b" (data), "c" (buf)
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1925 + : "%"REG_S, "%"REG_D, "%"REG_a, "%"REG_d
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1926 + );
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1927 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1928 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1929 + /* FFT Merge */
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1930 +/* unoptimized variant
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1931 + for (m=1; m < 7; m++) {
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1932 + if(m)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1933 + two_m = (1 << m);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1934 + else
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1935 + two_m = 1;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1936 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1937 + two_m_plus_one = (1 << (m+1));
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1938 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1939 + for(i = 0; i < 128; i += two_m_plus_one) {
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1940 + for(k = 0; k < two_m; k++) {
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1941 + p = k + i;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1942 + q = p + two_m;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1943 + tmp_a_r = buf[p].real;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1944 + tmp_a_i = buf[p].imag;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1945 + tmp_b_r = buf[q].real * w[m][k].real - buf[q].imag * w[m][k].imag;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1946 + tmp_b_i = buf[q].imag * w[m][k].real + buf[q].real * w[m][k].imag;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1947 + buf[p].real = tmp_a_r + tmp_b_r;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1948 + buf[p].imag = tmp_a_i + tmp_b_i;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1949 + buf[q].real = tmp_a_r - tmp_b_r;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1950 + buf[q].imag = tmp_a_i - tmp_b_i;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1951 + }
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1952 + }
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1953 + }
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1954 +*/
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1955 +
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1956 + /* 1. iteration */
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1957 + // Note w[0][0]={1,0}
27754
08d18fe9da52 Change all occurrences of asm and __asm to __asm__, same as was done for FFmpeg.
diego
parents: 27454
diff changeset
1958 + __asm__ volatile(
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1959 + "xorps %%xmm1, %%xmm1 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1960 + "xorps %%xmm2, %%xmm2 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1961 + "mov %0, %%"REG_S" \n\t"
19373
87dddfc314fd Update for changes from r19378 (ASMALIGN macro).
diego
parents: 19249
diff changeset
1962 + ASMALIGN(4)
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1963 + "1: \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1964 + "movlps (%%"REG_S"), %%xmm0\n\t" //buf[p]
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1965 + "movlps 8(%%"REG_S"), %%xmm1\n\t" //buf[q]
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1966 + "movhps (%%"REG_S"), %%xmm0\n\t" //buf[p]
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1967 + "movhps 8(%%"REG_S"), %%xmm2\n\t" //buf[q]
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1968 + "addps %%xmm1, %%xmm0 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1969 + "subps %%xmm2, %%xmm0 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1970 + "movaps %%xmm0, (%%"REG_S")\n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1971 + "add $16, %%"REG_S" \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1972 + "cmp %1, %%"REG_S" \n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1973 + " jb 1b \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1974 + :: "g" (buf), "r" (buf + 128)
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1975 + : "%"REG_S
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1976 + );
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
1977 +
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1978 + /* 2. iteration */
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1979 + // Note w[1]={{1,0}, {0,-1}}
27754
08d18fe9da52 Change all occurrences of asm and __asm to __asm__, same as was done for FFmpeg.
diego
parents: 27454
diff changeset
1980 + __asm__ volatile(
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1981 + "movaps "MANGLE(ps111_1)", %%xmm7\n\t" // 1,1,1,-1
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1982 + "mov %0, %%"REG_S" \n\t"
19373
87dddfc314fd Update for changes from r19378 (ASMALIGN macro).
diego
parents: 19249
diff changeset
1983 + ASMALIGN(4)
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1984 + "1: \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1985 + "movaps 16(%%"REG_S"), %%xmm2 \n\t" //r2,i2,r3,i3
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1986 + "shufps $0xB4, %%xmm2, %%xmm2 \n\t" //r2,i2,i3,r3
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1987 + "mulps %%xmm7, %%xmm2 \n\t" //r2,i2,i3,-r3
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1988 + "movaps (%%"REG_S"), %%xmm0 \n\t" //r0,i0,r1,i1
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1989 + "movaps (%%"REG_S"), %%xmm1 \n\t" //r0,i0,r1,i1
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1990 + "addps %%xmm2, %%xmm0 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1991 + "subps %%xmm2, %%xmm1 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1992 + "movaps %%xmm0, (%%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1993 + "movaps %%xmm1, 16(%%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1994 + "add $32, %%"REG_S" \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1995 + "cmp %1, %%"REG_S" \n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1996 + " jb 1b \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1997 + :: "g" (buf), "r" (buf + 128)
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
1998 + : "%"REG_S
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
1999 + );
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2000 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2001 + /* 3. iteration */
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2002 +/*
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2003 + Note sseW2+0={1,1,sqrt(2),sqrt(2))
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2004 + Note sseW2+16={0,0,sqrt(2),-sqrt(2))
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2005 + Note sseW2+32={0,0,-sqrt(2),-sqrt(2))
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2006 + Note sseW2+48={1,-1,sqrt(2),-sqrt(2))
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2007 +*/
27754
08d18fe9da52 Change all occurrences of asm and __asm to __asm__, same as was done for FFmpeg.
diego
parents: 27454
diff changeset
2008 + __asm__ volatile(
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
2009 + "movaps 48+"MANGLE(sseW2)", %%xmm6\n\t"
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
2010 + "movaps 16+"MANGLE(sseW2)", %%xmm7\n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2011 + "xorps %%xmm5, %%xmm5 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2012 + "xorps %%xmm2, %%xmm2 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2013 + "mov %0, %%"REG_S" \n\t"
19373
87dddfc314fd Update for changes from r19378 (ASMALIGN macro).
diego
parents: 19249
diff changeset
2014 + ASMALIGN(4)
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2015 + "1: \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2016 + "movaps 32(%%"REG_S"), %%xmm2 \n\t" //r4,i4,r5,i5
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2017 + "movaps 48(%%"REG_S"), %%xmm3 \n\t" //r6,i6,r7,i7
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2018 + "movaps "MANGLE(sseW2)", %%xmm4 \n\t" //r4,i4,r5,i5
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2019 + "movaps 32+"MANGLE(sseW2)", %%xmm5\n\t" //r6,i6,r7,i7
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2020 + "mulps %%xmm2, %%xmm4 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2021 + "mulps %%xmm3, %%xmm5 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2022 + "shufps $0xB1, %%xmm2, %%xmm2 \n\t" //i4,r4,i5,r5
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2023 + "shufps $0xB1, %%xmm3, %%xmm3 \n\t" //i6,r6,i7,r7
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2024 + "mulps %%xmm6, %%xmm3 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2025 + "mulps %%xmm7, %%xmm2 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2026 + "movaps (%%"REG_S"), %%xmm0 \n\t" //r0,i0,r1,i1
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2027 + "movaps 16(%%"REG_S"), %%xmm1 \n\t" //r2,i2,r3,i3
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2028 + "addps %%xmm4, %%xmm2 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2029 + "addps %%xmm5, %%xmm3 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2030 + "movaps %%xmm2, %%xmm4 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2031 + "movaps %%xmm3, %%xmm5 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2032 + "addps %%xmm0, %%xmm2 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2033 + "addps %%xmm1, %%xmm3 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2034 + "subps %%xmm4, %%xmm0 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2035 + "subps %%xmm5, %%xmm1 \n\t"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
2036 + "movaps %%xmm2, (%%"REG_S") \n\t"
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
2037 + "movaps %%xmm3, 16(%%"REG_S") \n\t"
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
2038 + "movaps %%xmm0, 32(%%"REG_S") \n\t"
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
2039 + "movaps %%xmm1, 48(%%"REG_S") \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2040 + "add $64, %%"REG_S" \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2041 + "cmp %1, %%"REG_S" \n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2042 + " jb 1b \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2043 + :: "g" (buf), "r" (buf + 128)
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2044 + : "%"REG_S
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2045 + );
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2046 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2047 + /* 4-7. iterations */
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2048 + for (m=3; m < 7; m++) {
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2049 + two_m = (1 << m);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2050 + two_m_plus_one = two_m<<1;
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2051 + two_m_plus_one_shl3 = (two_m_plus_one<<3);
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2052 + buf_offset = buf+128;
27754
08d18fe9da52 Change all occurrences of asm and __asm to __asm__, same as was done for FFmpeg.
diego
parents: 27454
diff changeset
2053 + __asm__ volatile(
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2054 + "mov %0, %%"REG_S" \n\t"
19373
87dddfc314fd Update for changes from r19378 (ASMALIGN macro).
diego
parents: 19249
diff changeset
2055 + ASMALIGN(4)
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2056 + "1: \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2057 + "xor %%"REG_D", %%"REG_D" \n\t" // k
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2058 + "lea (%%"REG_S", %3), %%"REG_d" \n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2059 + "2: \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2060 + "movaps (%%"REG_d", %%"REG_D"), %%xmm1 \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2061 + "movaps (%4, %%"REG_D", 2), %%xmm2 \n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2062 + "mulps %%xmm1, %%xmm2 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2063 + "shufps $0xB1, %%xmm1, %%xmm1 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2064 + "mulps 16(%4, %%"REG_D", 2), %%xmm1 \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2065 + "movaps (%%"REG_S", %%"REG_D"), %%xmm0 \n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2066 + "addps %%xmm2, %%xmm1 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2067 + "movaps %%xmm1, %%xmm2 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2068 + "addps %%xmm0, %%xmm1 \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2069 + "subps %%xmm2, %%xmm0 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2070 + "movaps %%xmm1, (%%"REG_S", %%"REG_D") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2071 + "movaps %%xmm0, (%%"REG_d", %%"REG_D") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2072 + "add $16, %%"REG_D" \n\t"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
2073 + "cmp %3, %%"REG_D" \n\t" //FIXME (opt) count against 0
18721
722ac20fac5f sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 18720
diff changeset
2074 + "jb 2b \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2075 + "add %2, %%"REG_S" \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2076 + "cmp %1, %%"REG_S" \n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2077 + " jb 1b \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2078 + :: "g" (buf), "m" (buf_offset), "m" (two_m_plus_one_shl3), "r" (two_m<<3),
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2079 + "r" (sseW[m])
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2080 + : "%"REG_S, "%"REG_D, "%"REG_d
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2081 + );
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2082 + }
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2083 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2084 + /* Post IFFT complex multiply plus IFFT complex conjugate*/
27754
08d18fe9da52 Change all occurrences of asm and __asm to __asm__, same as was done for FFmpeg.
diego
parents: 27454
diff changeset
2085 + __asm__ volatile(
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2086 + "mov $-1024, %%"REG_S" \n\t"
19373
87dddfc314fd Update for changes from r19378 (ASMALIGN macro).
diego
parents: 19249
diff changeset
2087 + ASMALIGN(4)
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2088 + "1: \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2089 + "movaps (%0, %%"REG_S"), %%xmm0 \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2090 + "movaps (%0, %%"REG_S"), %%xmm1 \n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2091 + "shufps $0xB1, %%xmm0, %%xmm0 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2092 + "mulps 1024+"MANGLE(sseSinCos1c)"(%%"REG_S"), %%xmm1\n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2093 + "mulps 1024+"MANGLE(sseSinCos1d)"(%%"REG_S"), %%xmm0\n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2094 + "addps %%xmm1, %%xmm0 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2095 + "movaps %%xmm0, (%0, %%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2096 + "add $16, %%"REG_S" \n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2097 + " jnz 1b \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2098 + :: "r" (buf+128)
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2099 + : "%"REG_S
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
2100 + );
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2101 +
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
2102 +
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2103 + data_ptr = data;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2104 + delay_ptr = delay;
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2105 + window_ptr = a52_imdct_window;
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2106 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2107 + /* Window and convert to real valued signal */
27754
08d18fe9da52 Change all occurrences of asm and __asm to __asm__, same as was done for FFmpeg.
diego
parents: 27454
diff changeset
2108 + __asm__ volatile(
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2109 + "xor %%"REG_D", %%"REG_D" \n\t" // 0
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2110 + "xor %%"REG_S", %%"REG_S" \n\t" // 0
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2111 + "movss %3, %%xmm2 \n\t" // bias
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2112 + "shufps $0x00, %%xmm2, %%xmm2 \n\t" // bias, bias, ...
19373
87dddfc314fd Update for changes from r19378 (ASMALIGN macro).
diego
parents: 19249
diff changeset
2113 + ASMALIGN(4)
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2114 + "1: \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2115 + "movlps (%0, %%"REG_S"), %%xmm0 \n\t" // ? ? A ?
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2116 + "movlps 8(%0, %%"REG_S"), %%xmm1 \n\t" // ? ? C ?
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2117 + "movhps -16(%0, %%"REG_D"), %%xmm1 \n\t" // ? D C ?
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2118 + "movhps -8(%0, %%"REG_D"), %%xmm0 \n\t" // ? B A ?
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2119 + "shufps $0x99, %%xmm1, %%xmm0 \n\t" // D C B A
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2120 + "mulps "MANGLE(sseWindow)"(%%"REG_S"), %%xmm0\n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2121 + "addps (%2, %%"REG_S"), %%xmm0 \n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2122 + "addps %%xmm2, %%xmm0 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2123 + "movaps %%xmm0, (%1, %%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2124 + "add $16, %%"REG_S" \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2125 + "sub $16, %%"REG_D" \n\t"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
2126 + "cmp $512, %%"REG_S" \n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2127 + " jb 1b \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2128 + :: "r" (buf+64), "r" (data_ptr), "r" (delay_ptr), "m" (bias)
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2129 + : "%"REG_S, "%"REG_D
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2130 + );
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2131 + data_ptr+=128;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2132 + delay_ptr+=128;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2133 +// window_ptr+=128;
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
2134 +
27754
08d18fe9da52 Change all occurrences of asm and __asm to __asm__, same as was done for FFmpeg.
diego
parents: 27454
diff changeset
2135 + __asm__ volatile(
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2136 + "mov $1024, %%"REG_D" \n\t" // 512
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2137 + "xor %%"REG_S", %%"REG_S" \n\t" // 0
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2138 + "movss %3, %%xmm2 \n\t" // bias
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2139 + "shufps $0x00, %%xmm2, %%xmm2 \n\t" // bias, bias, ...
19373
87dddfc314fd Update for changes from r19378 (ASMALIGN macro).
diego
parents: 19249
diff changeset
2140 + ASMALIGN(4)
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2141 + "1: \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2142 + "movlps (%0, %%"REG_S"), %%xmm0 \n\t" // ? ? ? A
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2143 + "movlps 8(%0, %%"REG_S"), %%xmm1 \n\t" // ? ? ? C
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2144 + "movhps -16(%0, %%"REG_D"), %%xmm1 \n\t" // D ? ? C
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2145 + "movhps -8(%0, %%"REG_D"), %%xmm0 \n\t" // B ? ? A
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2146 + "shufps $0xCC, %%xmm1, %%xmm0 \n\t" // D C B A
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2147 + "mulps 512+"MANGLE(sseWindow)"(%%"REG_S"), %%xmm0\n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2148 + "addps (%2, %%"REG_S"), %%xmm0 \n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2149 + "addps %%xmm2, %%xmm0 \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2150 + "movaps %%xmm0, (%1, %%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2151 + "add $16, %%"REG_S" \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2152 + "sub $16, %%"REG_D" \n\t"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
2153 + "cmp $512, %%"REG_S" \n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2154 + " jb 1b \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2155 + :: "r" (buf), "r" (data_ptr), "r" (delay_ptr), "m" (bias)
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2156 + : "%"REG_S, "%"REG_D
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2157 + );
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2158 + data_ptr+=128;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2159 +// window_ptr+=128;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2160 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2161 + /* The trailing edge of the window goes into the delay line */
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2162 + delay_ptr = delay;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2163 +
27754
08d18fe9da52 Change all occurrences of asm and __asm to __asm__, same as was done for FFmpeg.
diego
parents: 27454
diff changeset
2164 + __asm__ volatile(
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2165 + "xor %%"REG_D", %%"REG_D" \n\t" // 0
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2166 + "xor %%"REG_S", %%"REG_S" \n\t" // 0
19373
87dddfc314fd Update for changes from r19378 (ASMALIGN macro).
diego
parents: 19249
diff changeset
2167 + ASMALIGN(4)
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2168 + "1: \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2169 + "movlps (%0, %%"REG_S"), %%xmm0 \n\t" // ? ? ? A
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2170 + "movlps 8(%0, %%"REG_S"), %%xmm1 \n\t" // ? ? ? C
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
2171 + "movhps -16(%0, %%"REG_D"), %%xmm1 \n\t" // D ? ? C
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
2172 + "movhps -8(%0, %%"REG_D"), %%xmm0 \n\t" // B ? ? A
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2173 + "shufps $0xCC, %%xmm1, %%xmm0 \n\t" // D C B A
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2174 + "mulps 1024+"MANGLE(sseWindow)"(%%"REG_S"), %%xmm0\n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2175 + "movaps %%xmm0, (%1, %%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2176 + "add $16, %%"REG_S" \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2177 + "sub $16, %%"REG_D" \n\t"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
2178 + "cmp $512, %%"REG_S" \n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2179 + " jb 1b \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2180 + :: "r" (buf+64), "r" (delay_ptr)
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2181 + : "%"REG_S, "%"REG_D
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2182 + );
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2183 + delay_ptr+=128;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2184 +// window_ptr-=128;
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
2185 +
27754
08d18fe9da52 Change all occurrences of asm and __asm to __asm__, same as was done for FFmpeg.
diego
parents: 27454
diff changeset
2186 + __asm__ volatile(
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2187 + "mov $1024, %%"REG_D" \n\t" // 1024
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2188 + "xor %%"REG_S", %%"REG_S" \n\t" // 0
19373
87dddfc314fd Update for changes from r19378 (ASMALIGN macro).
diego
parents: 19249
diff changeset
2189 + ASMALIGN(4)
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2190 + "1: \n\t"
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2191 + "movlps (%0, %%"REG_S"), %%xmm0 \n\t" // ? ? A ?
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2192 + "movlps 8(%0, %%"REG_S"), %%xmm1 \n\t" // ? ? C ?
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
2193 + "movhps -16(%0, %%"REG_D"), %%xmm1 \n\t" // ? D C ?
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
2194 + "movhps -8(%0, %%"REG_D"), %%xmm0 \n\t" // ? B A ?
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2195 + "shufps $0x99, %%xmm1, %%xmm0 \n\t" // D C B A
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2196 + "mulps 1536+"MANGLE(sseWindow)"(%%"REG_S"), %%xmm0\n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2197 + "movaps %%xmm0, (%1, %%"REG_S") \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2198 + "add $16, %%"REG_S" \n\t"
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2199 + "sub $16, %%"REG_D" \n\t"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
2200 + "cmp $512, %%"REG_S" \n\t"
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2201 + " jb 1b \n\t"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2202 + :: "r" (buf), "r" (delay_ptr)
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2203 + : "%"REG_S, "%"REG_D
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2204 + );
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2205 +}
29601
cd3ae709054f Disable liba52 SSE imdct for x86_64+PIC (e.g. OSX 64 bit) since it will
reimar
parents: 29401
diff changeset
2206 +#endif
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2207 +#endif // ARCH_X86 || ARCH_X86_64
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2208 +
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2209 void a52_imdct_256(sample_t * data, sample_t * delay, sample_t bias)
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2210 {
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2211 int i, k;
29601
cd3ae709054f Disable liba52 SSE imdct for x86_64+PIC (e.g. OSX 64 bit) since it will
reimar
parents: 29401
diff changeset
2212 @@ -364,7 +1143,7 @@
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
2213
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2214 void a52_imdct_init (uint32_t mm_accel)
18721
722ac20fac5f sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 18720
diff changeset
2215 {
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2216 - int i, k;
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2217 + int i, j, k;
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2218 double sum;
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
2219
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2220 /* compute imdct window - kaiser-bessel derived window, alpha = 5.0 */
29601
cd3ae709054f Disable liba52 SSE imdct for x86_64+PIC (e.g. OSX 64 bit) since it will
reimar
parents: 29401
diff changeset
2221 @@ -416,6 +1195,101 @@
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2222 post2[i].real = cos ((M_PI / 128) * (i + 0.5));
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2223 post2[i].imag = sin ((M_PI / 128) * (i + 0.5));
18721
722ac20fac5f sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 18720
diff changeset
2224 }
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2225 + for (i = 0; i < 128; i++) {
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2226 + xcos1[i] = -cos ((M_PI / 2048) * (8 * i + 1));
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2227 + xsin1[i] = -sin ((M_PI / 2048) * (8 * i + 1));
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2228 + }
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2229 + for (i = 0; i < 7; i++) {
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2230 + j = 1 << i;
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2231 + for (k = 0; k < j; k++) {
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2232 + w[i][k].real = cos (-M_PI * k / j);
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2233 + w[i][k].imag = sin (-M_PI * k / j);
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2234 + }
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2235 + }
28797
dcdc0c85d354 Sync local changes file with #ifdef --> #if conversion.
diego
parents: 28593
diff changeset
2236 +#if ARCH_X86 || ARCH_X86_64
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2237 + for (i = 0; i < 128; i++) {
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2238 + sseSinCos1c[2*i+0]= xcos1[i];
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2239 + sseSinCos1c[2*i+1]= -xcos1[i];
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2240 + sseSinCos1d[2*i+0]= xsin1[i];
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
2241 + sseSinCos1d[2*i+1]= xsin1[i];
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2242 + }
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2243 + for (i = 1; i < 7; i++) {
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2244 + j = 1 << i;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2245 + for (k = 0; k < j; k+=2) {
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
2246 +
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2247 + sseW[i][4*k + 0] = w[i][k+0].real;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2248 + sseW[i][4*k + 1] = w[i][k+0].real;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2249 + sseW[i][4*k + 2] = w[i][k+1].real;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2250 + sseW[i][4*k + 3] = w[i][k+1].real;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2251 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2252 + sseW[i][4*k + 4] = -w[i][k+0].imag;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2253 + sseW[i][4*k + 5] = w[i][k+0].imag;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2254 + sseW[i][4*k + 6] = -w[i][k+1].imag;
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
2255 + sseW[i][4*k + 7] = w[i][k+1].imag;
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
2256 +
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2257 + //we multiply more or less uninitalized numbers so we need to use exactly 0.0
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2258 + if(k==0)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2259 + {
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2260 +// sseW[i][4*k + 0]= sseW[i][4*k + 1]= 1.0;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2261 + sseW[i][4*k + 4]= sseW[i][4*k + 5]= 0.0;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2262 + }
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
2263 +
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2264 + if(2*k == j)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2265 + {
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2266 + sseW[i][4*k + 0]= sseW[i][4*k + 1]= 0.0;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2267 +// sseW[i][4*k + 4]= -(sseW[i][4*k + 5]= -1.0);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2268 + }
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2269 + }
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2270 + }
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2271 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2272 + for(i=0; i<128; i++)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2273 + {
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2274 + sseWindow[2*i+0]= -a52_imdct_window[2*i+0];
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
2275 + sseWindow[2*i+1]= a52_imdct_window[2*i+1];
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2276 + }
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
2277 +
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2278 + for(i=0; i<64; i++)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2279 + {
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2280 + sseWindow[256 + 2*i+0]= -a52_imdct_window[254 - 2*i+1];
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2281 + sseWindow[256 + 2*i+1]= a52_imdct_window[254 - 2*i+0];
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2282 + sseWindow[384 + 2*i+0]= a52_imdct_window[126 - 2*i+1];
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2283 + sseWindow[384 + 2*i+1]= -a52_imdct_window[126 - 2*i+0];
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2284 + }
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2285 +#endif
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2286 + a52_imdct_512 = imdct_do_512;
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2287 + ifft128 = ifft128_c;
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2288 + ifft64 = ifft64_c;
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2289 +
28797
dcdc0c85d354 Sync local changes file with #ifdef --> #if conversion.
diego
parents: 28593
diff changeset
2290 +#if ARCH_X86 || ARCH_X86_64
29601
cd3ae709054f Disable liba52 SSE imdct for x86_64+PIC (e.g. OSX 64 bit) since it will
reimar
parents: 29401
diff changeset
2291 +#if !ARCH_X86_64 || !defined(PIC)
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2292 + if(mm_accel & MM_ACCEL_X86_SSE)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2293 + {
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2294 + fprintf (stderr, "Using SSE optimized IMDCT transform\n");
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2295 + a52_imdct_512 = imdct_do_512_sse;
18721
722ac20fac5f sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 18720
diff changeset
2296 + }
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2297 + else
29601
cd3ae709054f Disable liba52 SSE imdct for x86_64+PIC (e.g. OSX 64 bit) since it will
reimar
parents: 29401
diff changeset
2298 +#endif
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2299 + if(mm_accel & MM_ACCEL_X86_3DNOWEXT)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2300 + {
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2301 + fprintf (stderr, "Using 3DNowEx optimized IMDCT transform\n");
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2302 + a52_imdct_512 = imdct_do_512_3dnowex;
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2303 + }
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2304 + else
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2305 + if(mm_accel & MM_ACCEL_X86_3DNOW)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2306 + {
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2307 + fprintf (stderr, "Using 3DNow optimized IMDCT transform\n");
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2308 + a52_imdct_512 = imdct_do_512_3dnow;
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2309 + }
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2310 + else
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2311 +#endif // ARCH_X86 || ARCH_X86_64
28797
dcdc0c85d354 Sync local changes file with #ifdef --> #if conversion.
diego
parents: 28593
diff changeset
2312 +#if HAVE_ALTIVEC
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2313 + if (mm_accel & MM_ACCEL_PPC_ALTIVEC)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2314 + {
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2315 + fprintf(stderr, "Using AltiVec optimized IMDCT transform\n");
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2316 + a52_imdct_512 = imdct_do_512_altivec;
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2317 + }
18721
722ac20fac5f sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 18720
diff changeset
2318 + else
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2319 +#endif
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
2320
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2321 #ifdef LIBA52_DJBFFT
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2322 if (mm_accel & MM_ACCEL_DJBFFT) {
29601
cd3ae709054f Disable liba52 SSE imdct for x86_64+PIC (e.g. OSX 64 bit) since it will
reimar
parents: 29401
diff changeset
2323 @@ -426,7 +1300,5 @@
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2324 #endif
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2325 {
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2326 fprintf (stderr, "No accelerated IMDCT transform found\n");
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2327 - ifft128 = ifft128_c;
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2328 - ifft64 = ifft64_c;
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2329 }
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2330 }
19249
9960f9ef96fd cosmetics: Make patch apply cleanly.
diego
parents: 18721
diff changeset
2331 --- include/mm_accel.h 2006-06-12 15:05:00.000000000 +0200
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2332 +++ liba52/mm_accel.h 2006-06-05 02:23:04.000000000 +0200
28797
dcdc0c85d354 Sync local changes file with #ifdef --> #if conversion.
diego
parents: 28593
diff changeset
2333 @@ -30,7 +34,12 @@
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2334 /* x86 accelerations */
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2335 #define MM_ACCEL_X86_MMX 0x80000000
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2336 #define MM_ACCEL_X86_3DNOW 0x40000000
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2337 +#define MM_ACCEL_X86_3DNOWEXT 0x08000000
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2338 #define MM_ACCEL_X86_MMXEXT 0x20000000
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2339 +#define MM_ACCEL_X86_SSE 0x10000000
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2340 +
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2341 +/* PPC accelerations */
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2342 +#define MM_ACCEL_PPC_ALTIVEC 0x00010000
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
2343
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2344 uint32_t mm_accel (void);
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
2345
21491
212cf6625a47 update local diff after r20779
gpoirier
parents: 19373
diff changeset
2346 --- liba52/parse.c 2006-12-05 08:08:01.000000000 +0100
212cf6625a47 update local diff after r20779
gpoirier
parents: 19373
diff changeset
2347 +++ liba52/parse.c 2006-12-05 08:08:44.000000000 +0100
28797
dcdc0c85d354 Sync local changes file with #ifdef --> #if conversion.
diego
parents: 28593
diff changeset
2348 @@ -24,6 +28,7 @@
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2349 #include "config.h"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
2350
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2351 #include <stdlib.h>
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2352 +#include <stdio.h>
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2353 #include <string.h>
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2354 #include <inttypes.h>
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
2355
28797
dcdc0c85d354 Sync local changes file with #ifdef --> #if conversion.
diego
parents: 28593
diff changeset
2356 @@ -31,13 +36,12 @@
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2357 #include "a52_internal.h"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2358 #include "bitstream.h"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2359 #include "tables.h"
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2360 +#include "mm_accel.h"
21491
212cf6625a47 update local diff after r20779
gpoirier
parents: 19373
diff changeset
2361 +#include "libavutil/avutil.h"
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
2362
28593
94d9e6403ee4 Convert HAVE_MEMALIGN into a 0/1 definition, fixes the warning:
diego
parents: 28335
diff changeset
2363 -#ifdef HAVE_MEMALIGN
94d9e6403ee4 Convert HAVE_MEMALIGN into a 0/1 definition, fixes the warning:
diego
parents: 28335
diff changeset
2364 +#if HAVE_MEMALIGN
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2365 /* some systems have memalign() but no declaration for it */
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2366 void * memalign (size_t align, size_t size);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2367 -#else
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2368 -/* assume malloc alignment is sufficient */
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2369 -#define memalign(align,size) malloc (size)
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2370 #endif
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
2371
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2372 typedef struct {
28797
dcdc0c85d354 Sync local changes file with #ifdef --> #if conversion.
diego
parents: 28593
diff changeset
2373 @@ -60,7 +64,16 @@
21491
212cf6625a47 update local diff after r20779
gpoirier
parents: 19373
diff changeset
2374 if (state == NULL)
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2375 return NULL;
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
2376
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
2377 +#if defined(__MINGW32__) && defined(HAVE_SSE)
21491
212cf6625a47 update local diff after r20779
gpoirier
parents: 19373
diff changeset
2378 + state->samples = av_malloc(256 * 12 * sizeof (sample_t));
212cf6625a47 update local diff after r20779
gpoirier
parents: 19373
diff changeset
2379 +#else
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2380 state->samples = memalign (16, 256 * 12 * sizeof (sample_t));
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2381 +#endif
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2382 + if(((int)state->samples%16) && (mm_accel&MM_ACCEL_X86_SSE)){
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2383 + mm_accel &=~MM_ACCEL_X86_SSE;
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2384 + fprintf(stderr, "liba52: unable to get 16 byte aligned memory disabling usage of SSE instructions\n");
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
2385 + }
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
2386 +
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2387 if (state->samples == NULL) {
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2388 free (state);
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2389 return NULL;
28797
dcdc0c85d354 Sync local changes file with #ifdef --> #if conversion.
diego
parents: 28593
diff changeset
2390 @@ -74,6 +87,7 @@
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2391 state->lfsr_state = 1;
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
2392
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2393 a52_imdct_init (mm_accel);
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2394 + downmix_accel_init(mm_accel);
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
2395
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2396 return state;
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2397 }
28797
dcdc0c85d354 Sync local changes file with #ifdef --> #if conversion.
diego
parents: 28593
diff changeset
2398 @@ -141,7 +155,7 @@
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2399 state->acmod = acmod = buf[6] >> 5;
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
2400
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2401 a52_bitstream_set_ptr (state, buf + 6);
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2402 - bitstream_get (state, 3); /* skip acmod we already parsed */
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2403 + bitstream_skip (state, 3); /* skip acmod we already parsed */
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
2404
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2405 if ((acmod == 2) && (bitstream_get (state, 2) == 2)) /* dsurmod */
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2406 acmod = A52_DOLBY;
28797
dcdc0c85d354 Sync local changes file with #ifdef --> #if conversion.
diego
parents: 28593
diff changeset
2407 @@ -172,28 +186,28 @@
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
2408
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2409 chaninfo = !acmod;
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2410 do {
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2411 - bitstream_get (state, 5); /* dialnorm */
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2412 + bitstream_skip (state, 5); /* dialnorm */
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2413 if (bitstream_get (state, 1)) /* compre */
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2414 - bitstream_get (state, 8); /* compr */
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2415 + bitstream_skip (state, 8); /* compr */
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2416 if (bitstream_get (state, 1)) /* langcode */
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2417 - bitstream_get (state, 8); /* langcod */
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2418 + bitstream_skip (state, 8); /* langcod */
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2419 if (bitstream_get (state, 1)) /* audprodie */
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2420 - bitstream_get (state, 7); /* mixlevel + roomtyp */
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2421 + bitstream_skip (state, 7); /* mixlevel + roomtyp */
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2422 } while (chaninfo--);
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
2423
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2424 - bitstream_get (state, 2); /* copyrightb + origbs */
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2425 + bitstream_skip (state, 2); /* copyrightb + origbs */
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
2426
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2427 if (bitstream_get (state, 1)) /* timecod1e */
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2428 - bitstream_get (state, 14); /* timecod1 */
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2429 + bitstream_skip (state, 14); /* timecod1 */
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2430 if (bitstream_get (state, 1)) /* timecod2e */
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2431 - bitstream_get (state, 14); /* timecod2 */
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2432 + bitstream_skip (state, 14); /* timecod2 */
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
2433
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2434 if (bitstream_get (state, 1)) { /* addbsie */
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2435 int addbsil;
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
2436
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2437 addbsil = bitstream_get (state, 6);
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2438 do {
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2439 - bitstream_get (state, 8); /* addbsi */
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2440 + bitstream_skip (state, 8); /* addbsi */
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2441 } while (addbsil--);
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2442 }
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
2443
28797
dcdc0c85d354 Sync local changes file with #ifdef --> #if conversion.
diego
parents: 28593
diff changeset
2444 @@ -680,7 +694,7 @@
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2445 state->fbw_expbap[i].exp[0],
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2446 state->fbw_expbap[i].exp + 1))
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2447 return 1;
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2448 - bitstream_get (state, 2); /* gainrng */
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2449 + bitstream_skip (state, 2); /* gainrng */
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2450 }
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2451 if (lfeexpstr != EXP_REUSE) {
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2452 do_bit_alloc |= 32;
28797
dcdc0c85d354 Sync local changes file with #ifdef --> #if conversion.
diego
parents: 28593
diff changeset
2453 @@ -755,7 +769,7 @@
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2454 if (bitstream_get (state, 1)) { /* skiple */
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2455 i = bitstream_get (state, 9); /* skipl */
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2456 while (i--)
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2457 - bitstream_get (state, 8);
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2458 + bitstream_skip (state, 8);
14990
9de84a73f6d0 MPlayer-specific changes to liba52
diego
parents:
diff changeset
2459 }
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
2460
18720
4bad7f00556e sync with liba52 0.7.4, patch by Emanuele Giaquinta >emanuele.giaquinta ! gmail * com<
rathann
parents: 14990
diff changeset
2461 samples = state->samples;
28797
dcdc0c85d354 Sync local changes file with #ifdef --> #if conversion.
diego
parents: 28593
diff changeset
2462 @@ -896,6 +910,10 @@
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 29114
diff changeset
2463
21491
212cf6625a47 update local diff after r20779
gpoirier
parents: 19373
diff changeset
2464 void a52_free (a52_state_t * state)
212cf6625a47 update local diff after r20779
gpoirier
parents: 19373
diff changeset
2465 {
212cf6625a47 update local diff after r20779
gpoirier
parents: 19373
diff changeset
2466 - free (state->samples);
212cf6625a47 update local diff after r20779
gpoirier
parents: 19373
diff changeset
2467 +#if defined(__MINGW32__) && defined(HAVE_SSE)
212cf6625a47 update local diff after r20779
gpoirier
parents: 19373
diff changeset
2468 + av_free (state->samples);
212cf6625a47 update local diff after r20779
gpoirier
parents: 19373
diff changeset
2469 +#else
212cf6625a47 update local diff after r20779
gpoirier
parents: 19373
diff changeset
2470 + free (state->samples);
212cf6625a47 update local diff after r20779
gpoirier
parents: 19373
diff changeset
2471 +#endif
212cf6625a47 update local diff after r20779
gpoirier
parents: 19373
diff changeset
2472 free (state);
212cf6625a47 update local diff after r20779
gpoirier
parents: 19373
diff changeset
2473 }