shithub: opus

Download patch

ref: eee689824288c905eadffe9aef04bfc0c4753485
parent: 46560534fcb5710a894a341c2f9526db58fd7087
author: Jean-Marc Valin <jmvalin@jmvalin.ca>
date: Thu Nov 16 12:21:03 EST 2017

fix float constants

--- a/src/analysis.c
+++ b/src/analysis.c
@@ -867,7 +867,7 @@
     info->activity_probability = frame_probs[1];
     /* It seems like the RNN tends to have a bias towards speech and this
        warping of the probabilities compensates for it. */
-    info->music_prob = MAX16(1-10*(1-frame_probs[0]), MIN16(10*frame_probs[0], .12+.69*frame_probs[0]*(2-frame_probs[0])));
+    info->music_prob = MAX16(1.f-10.f*(1.f-frame_probs[0]), MIN16(10.f*frame_probs[0], .12f+.69f*frame_probs[0]*(2.f-frame_probs[0])));
 
     /*printf("%f %f %f\n", frame_probs[0], frame_probs[1], info->music_prob);*/
 #ifdef MLP_TRAINING