1 /* 2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. 3 * 4 * Use of this source code is governed by a BSD-style license 5 * that can be found in the LICENSE file in the root of the source 6 * tree. An additional intellectual property rights grant can be found 7 * in the file PATENTS. All contributing project authors may 8 * be found in the AUTHORS file in the root of the source tree. 9 */ 10 11 12 /* 13 * This header file includes the description of the internal VAD call 14 * WebRtcVad_GaussianProbability. 15 */ 16 17 #ifndef WEBRTC_VAD_GMM_H_ 18 #define WEBRTC_VAD_GMM_H_ 19 20 #include "typedefs.h" 21 22 /**************************************************************************** 23 * WebRtcVad_GaussianProbability(...) 24 * 25 * This function calculates the probability for the value 'in_sample', given that in_sample 26 * comes from a normal distribution with mean 'mean' and standard deviation 'std'. 27 * 28 * Input: 29 * - in_sample : Input sample in Q4 30 * - mean : mean value in the statistical model, Q7 31 * - std : standard deviation, Q7 32 * 33 * Output: 34 * 35 * - delta : Value used when updating the model, Q11 36 * 37 * Return: 38 * - out : out = 1/std * exp(-(x-m)^2/(2*std^2)); 39 * Probability for x. 40 * 41 */ 42 WebRtc_Word32 WebRtcVad_GaussianProbability(WebRtc_Word16 in_sample, 43 WebRtc_Word16 mean, 44 WebRtc_Word16 std, 45 WebRtc_Word16 *delta); 46 47 #endif // WEBRTC_VAD_GMM_H_ 48