<html><head></head><body>Even if it is not a power of two, you shouldn't use double precision for integral square rooting. You can use clz().<br><br><div class="gmail_quote">Le 28 mai 2018 16:54:31 GMT+02:00, Pierre Lamot <pierre@videolabs.io> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">On lundi 28 mai 2018 16:43:12 CEST Francois Cartegnie wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"> Le 28/05/2018 à 16:29, Pierre Lamot a écrit :<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;"> ---<br> <br>  modules/audio_filter/channel_mixer/spatialaudio.cpp | 19<br>  ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-)<br> <br> diff --git a/modules/audio_filter/channel_mixer/spatialaudio.cpp<br> b/modules/audio_filter/channel_mixer/spatialaudio.cpp index<br> 6448585e37..f12350333d 100644<br> --- a/modules/audio_filter/channel_mixer/spatialaudio.cpp<br> +++ b/modules/audio_filter/channel_mixer/spatialaudio.cpp<br> @@ -123,6 +123,7 @@ struct filter_spatialaudio<br> <br>      }<br></blockquote> <br> if that's only pow(2) values, that can be simplified without roundings.<br></blockquote><br>No, allowed number of channels are in the form (1 + n)^2 + 2j with j = 0..1<br>for order 2, you have 9 channels, and 11 for order 2 with non-diegetic.<br><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"> if( popcount(channels) > 1 )<br>  error;<br> order = ctz(channels);<br> <br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;"> -    p_sys->i_order = sqrt(infmt->i_channels) - 1;<br> +    p_sys->i_order = floor(sqrt(infmt->i_channels)) - 1;<br> +    p_sys->i_nondiegetic = infmt->i_channels - ( (p_sys->i_order + 1) *<br> (p_sys->i_order + 1) );--<br></blockquote> Francois Cartegnie<br> VideoLAN - VLC Developer<br><hr><br> vlc-devel mailing list<br> To unsubscribe or modify your subscription options:<br> <a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a><br></blockquote><br></pre></blockquote></div><br>
-- <br>
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>