Re: [LAD] A more efficient way to detect INF and/or NAN in a block of samples

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Robin Gareus <robin@...>
Cc: <linux-audio-dev@...>
Date: Sunday, October 6, 2013 - 7:07 pm

On Sun, Oct 6, 2013 at 5:01 PM, Robin Gareus wrote:

I didn't know that. Thank you.

>> if it was a nan or inf, since INFs and NANs don't behave normally.

Yeah, it would probably make a lot more sense time-vice to spend
my time making the DSP graph run on several CPUs, rather than on this
optimization.

>

Thank you, guess there are some opportunities there.
To be honest though, I hoped that someone had some read-made
code I could use. :-)

But brainstorming further, it probably works to combine the peak finding routine
(which is run on all signals) with the nan/inf-detection:

static float RT_get_max_val(float *array, int num_elements){
float ret=0.0f;
float minus_ret = 0.0f;

for(int i=0;iret){
ret=val;
minus_ret = -val;
}else if (valLinux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[LAD] A more efficient way to detect INF and/or NAN in a blo..., Kjetil Matheussen, (Sun Oct 6, 11:34 am)
Re: [LAD] A more efficient way to detect INF and/or NAN in a..., Kjetil Matheussen, (Sun Oct 6, 7:07 pm)
Re: [LAD] A more efficient way to detect INF and/or NAN in a..., Kjetil Matheussen, (Tue Oct 8, 11:30 am)