[pulseaudio-discuss] [PATCH 5/6] tests: Add remap test code to cpu-test

Peter Meerwald pmeerw at pmeerw.net
Sat Jan 5 09:17:27 PST 2013


> Could you please explain the test in more detail. What it actually does,
> why the sample constants were chosen this way and on what system you ran
> them? That would be great as otherwise at least I do not know if the
> code does what it wants to do.

the idea is to compare the output of the C (reference) implementation 
against the output of the optimized code path; currently, there are MMX 
and SSE implementation for the mono-to-stereo remapper for s16 and float 
sample formats

regarding constants: SAMPLES, TIMES, TIMES2 just match other tests

samples are indeed chosen in a weird way
mono[i] = rand() / (float) RAND_MAX - 0.5f;
mono[i] = rand() - RAND_MAX/2;
this should be corrected so that samples are in -1..1 and -0x8000..0x7fff

mono-to-stereo remapping is just duplicating the mono samples, but samples 
will matter more for other remappings (e.g. stereo-to-mono)

regards, p.


Peter Meerwald
+43-664-2444418 (mobile)

More information about the pulseaudio-discuss mailing list