Commit 4958368b authored by Rafaël Carré's avatar Rafaël Carré

pow(x, 2) => x * x

parent b70701e3
......@@ -167,7 +167,7 @@ static block_t *DoWork( filter_t *p_filter, block_t *p_in_buf )
max = ch;
}
}
max = powf( max, 2 );
max *= max;
if (p_sys->silence) {
/* 2 - store the new value */
......
......@@ -156,8 +156,7 @@ static block_t *DoWork( filter_t *p_filter, block_t *p_in_buf )
for( i_chan = 0; i_chan < i_channels; i_chan++ )
{
float f_sample = p_in[i_chan];
float f_square = pow( f_sample, 2 );
pf_sum[i_chan] += f_square;
pf_sum[i_chan] += f_sample * f_sample;
}
p_in += i_channels;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment