summaryrefslogtreecommitdiff
path: root/lib/rbcodec/dsp/dsp_cf.S
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rbcodec/dsp/dsp_cf.S')
-rw-r--r--lib/rbcodec/dsp/dsp_cf.S47
1 files changed, 46 insertions, 1 deletions
diff --git a/lib/rbcodec/dsp/dsp_cf.S b/lib/rbcodec/dsp/dsp_cf.S
index c710df5177..7d193e0957 100644
--- a/lib/rbcodec/dsp/dsp_cf.S
+++ b/lib/rbcodec/dsp/dsp_cf.S
@@ -8,7 +8,8 @@
8 * $Id$ 8 * $Id$
9 * 9 *
10 * Copyright (C) 2006 Thom Johansen 10 * Copyright (C) 2006 Thom Johansen
11 * Portions Copyright (C) 2007 Michael Sevakis 11 * Copyright (C) 2007, 2012 Michael Sevakis
12 * Copyright (C) 2010 Bertrik Sikken
12 * 13 *
13 * This program is free software; you can redistribute it and/or 14 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License 15 * modify it under the terms of the GNU General Public License
@@ -134,6 +135,50 @@ crossfeed_process:
134 .size crossfeed_process,.-crossfeed_process 135 .size crossfeed_process,.-crossfeed_process
135 136
136/**************************************************************************** 137/****************************************************************************
138 * void crossfeed_meier_process(struct dsp_proc_entry *this,
139 * struct dsp_buffer **buf_p)
140 */
141 .section .text
142 .global crossfeed_meier_process
143crossfeed_meier_process:
144 | input: 4(sp) = this, 8(sp) = buf_p
145 movem.l 4(%sp), %a0-%a1 | %a0 = this, %a1 = buf_p
146 lea.l -24(%sp), %sp | save non-volatiles
147 movem.l %d2-%d6/%a2, (%sp) | .
148 move.l (%a0), %a0 | %a0 = &this->data = &crossfeed_state
149 move.l (%a1), %a1 | %a1 = buf = *buf_p
150 movem.l 16(%a0), %d1-%d5 | %d1 = vcl, %d2 = vcr, %d3 = vdiff,
151 | %d4 = coef1, %d5 = coef2
152 movem.l (%a1), %d0/%a1-%a2 | %d0 = count = buf->remcount
153 | %a1 = p32[0], %a2 = p32[1]
154 | Register usage in loop:
155 | %d0 = count, %d1 = vcl, %d2 = vcr, %d3 = vdiff/lout,
156 | %d4 = coef1, %d5 = coef2, %d6 = rout/scratch
157 | %a1 = p32[0], %a2 = p32[1]
15810: | loop
159 mac.l %d5, %d3, %acc0 | %acc0 = common = coef2*vdiff
160 move.l %acc0, %acc1 | copy common
161 mac.l %d4, %d1, (%a1), %d3, %acc0 | %acc0 += coef1*vcl, %d3 = lout
162 msac.l %d4, %d2, (%a2), %d6, %acc1 | %acc1 -= coef1*vcr, %d6 = rout
163 add.l %d1, %d3 | lout += vcl
164 add.l %d2, %d6 | rout += vcr
165 move.l %d3, (%a1)+ | store left channel, pos inc
166 move.l %d6, (%a2)+ | store right channel, pos inc
167 sub.l %d6, %d3 | vdiff = lout - rout
168 movclr.l %acc0, %d6 | %d4 = fetch res1 in s0.31
169 sub.l %d6, %d1 | vcl -= res1
170 movclr.l %acc1, %d6 | %d5 = fetch -res2 in s0.31
171 add.l %d6, %d2 | vcr += -res2
172 subq.l #1, %d0 | count--
173 bgt 10b | loop | more samples?
174 |
175 movem.l %d1-%d3, 16(%a0) | save vcl, vcr, vdiff
176 movem.l (%sp), %d2-%d6/%a2 | restore non-volatiles
177 lea.l 24(%sp), %sp | .
178 rts |
179 .size crossfeed_meier_process, .-crossfeed_meier_process
180
181/****************************************************************************
137 * int lin_resample_resample(struct resample_data *data, 182 * int lin_resample_resample(struct resample_data *data,
138 * struct dsp_buffer *src, 183 * struct dsp_buffer *src,
139 * struct dsp_buffer *dst) 184 * struct dsp_buffer *dst)