remap: Make resampler's remap structure more self-contained

Initialization of the remap structure now happens in one place

Rename calc_map_table() to setup_remap(), copy sample format and
channel specs; the remap structure is initialized when we know the
work sample format of the resampler

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
This commit is contained in:
Peter Meerwald 2014-04-16 11:25:58 +02:00 committed by Peter Meerwald
parent 937b4175c2
commit 9362bdc8a1
6 changed files with 32 additions and 41 deletions

View file

@ -104,7 +104,7 @@
static void remap_mono_to_stereo_sse2(pa_remap_t *m, void *dst, const void *src, unsigned n) {
pa_reg_x86 temp, temp2;
switch (*m->format) {
switch (m->format) {
case PA_SAMPLE_FLOAT32NE:
{
__asm__ __volatile__ (
@ -134,8 +134,8 @@ static void remap_mono_to_stereo_sse2(pa_remap_t *m, void *dst, const void *src,
static void init_remap_sse2(pa_remap_t *m) {
unsigned n_oc, n_ic;
n_oc = m->o_ss->channels;
n_ic = m->i_ss->channels;
n_oc = m->o_ss.channels;
n_ic = m->i_ss.channels;
/* find some common channel remappings, fall back to full matrix operation. */
if (n_ic == 1 && n_oc == 2 &&