Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: webrtc/modules/audio_processing/ns/noise_suppression_x.h

Issue 1821443003: Fix normalization of noise estimate in NoiseSuppressor (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Disable noise suppressor bit-exactness unittests Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 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 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 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 void WebRtcNsx_Process(NsxHandle* nsxInst, 81 void WebRtcNsx_Process(NsxHandle* nsxInst,
82 const short* const* speechFrame, 82 const short* const* speechFrame,
83 int num_bands, 83 int num_bands,
84 short* const* outFrame); 84 short* const* outFrame);
85 85
86 /* Returns a pointer to the noise estimate per frequency bin. The number of 86 /* Returns a pointer to the noise estimate per frequency bin. The number of
87 * frequency bins can be provided using WebRtcNsx_num_freq(). 87 * frequency bins can be provided using WebRtcNsx_num_freq().
88 * 88 *
89 * Input 89 * Input
90 * - nsxInst : NSx instance. Needs to be initiated before call. 90 * - nsxInst : NSx instance. Needs to be initiated before call.
91 * - q_noise : Q value of the noise estimate, which is the number of
92 * bits that it needs to be right-shifted to be
93 * normalized.
91 * 94 *
92 * Return value : Pointer to the noise estimate per frequency bin. 95 * Return value : Pointer to the noise estimate per frequency bin.
93 * Returns NULL if the input is a NULL pointer or an 96 * Returns NULL if the input is a NULL pointer or an
94 * uninitialized instance. 97 * uninitialized instance.
95 */ 98 */
96 const uint32_t* WebRtcNsx_noise_estimate(const NsxHandle* nsxInst); 99 const uint32_t* WebRtcNsx_noise_estimate(const NsxHandle* nsxInst,
100 int* q_noise);
97 101
98 /* Returns the number of frequency bins, which is the length of the noise 102 /* Returns the number of frequency bins, which is the length of the noise
99 * estimate for example. 103 * estimate for example.
100 * 104 *
101 * Return value : Number of frequency bins. 105 * Return value : Number of frequency bins.
102 */ 106 */
103 size_t WebRtcNsx_num_freq(); 107 size_t WebRtcNsx_num_freq();
104 108
105 #ifdef __cplusplus 109 #ifdef __cplusplus
106 } 110 }
107 #endif 111 #endif
108 112
109 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_NS_NOISE_SUPPRESSION_X_H_ 113 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_NS_NOISE_SUPPRESSION_X_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698