common_audio: Made input signal const in WebRtcSplFilterMAFastQ12()
BUG=3353, 1133 TESTED=locally on Mac and trybots R=henrik.lundin@webrtc.org, kwiberg@webrtc.org Review URL: https://webrtc-codereview.appspot.com/37499004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@8037 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
19e4e8d751
commit
c14e3572c6
@ -17,9 +17,9 @@
|
||||
|
||||
#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
|
||||
|
||||
void WebRtcSpl_FilterMAFastQ12(int16_t* in_ptr,
|
||||
void WebRtcSpl_FilterMAFastQ12(const int16_t* in_ptr,
|
||||
int16_t* out_ptr,
|
||||
int16_t* B,
|
||||
const int16_t* B,
|
||||
int16_t B_length,
|
||||
int16_t length)
|
||||
{
|
||||
|
||||
@ -650,9 +650,23 @@ int WebRtcSpl_FilterAR(const int16_t* ar_coef,
|
||||
int16_t* out_vector_low,
|
||||
int out_vector_low_length);
|
||||
|
||||
void WebRtcSpl_FilterMAFastQ12(int16_t* in_vector,
|
||||
// WebRtcSpl_FilterMAFastQ12(...)
|
||||
//
|
||||
// Performs a MA filtering on a vector in Q12
|
||||
//
|
||||
// Input:
|
||||
// - in_vector : Input samples (state in positions
|
||||
// in_vector[-order] .. in_vector[-1])
|
||||
// - ma_coef : Filter coefficients (in Q12)
|
||||
// - ma_coef_length : Number of B coefficients (order+1)
|
||||
// - vector_length : Number of samples to be filtered
|
||||
//
|
||||
// Output:
|
||||
// - out_vector : Filtered samples
|
||||
//
|
||||
void WebRtcSpl_FilterMAFastQ12(const int16_t* in_vector,
|
||||
int16_t* out_vector,
|
||||
int16_t* ma_coef,
|
||||
const int16_t* ma_coef,
|
||||
int16_t ma_coef_length,
|
||||
int16_t vector_length);
|
||||
|
||||
@ -1499,22 +1513,6 @@ void WebRtcSpl_SynthesisQMF(const int16_t* low_band,
|
||||
// Return value : Number of samples in the |out_vector|.
|
||||
//
|
||||
|
||||
//
|
||||
// WebRtcSpl_FilterMAFastQ12(...)
|
||||
//
|
||||
// Performs a MA filtering on a vector in Q12
|
||||
//
|
||||
// Input:
|
||||
// - in_vector : Input samples (state in positions
|
||||
// in_vector[-order] .. in_vector[-1])
|
||||
// - ma_coef : Filter coefficients (in Q12)
|
||||
// - ma_coef_length : Number of B coefficients (order+1)
|
||||
// - vector_length : Number of samples to be filtered
|
||||
//
|
||||
// Output:
|
||||
// - out_vector : Filtered samples
|
||||
//
|
||||
|
||||
//
|
||||
// WebRtcSpl_ComplexIFFT(...)
|
||||
//
|
||||
|
||||
@ -618,9 +618,11 @@ void Expand::AnalyzeSignal(int16_t* random_vector) {
|
||||
memcpy(unvoiced_vector - kUnvoicedLpcOrder,
|
||||
&(audio_history[signal_length - 128 - kUnvoicedLpcOrder]),
|
||||
sizeof(int16_t) * kUnvoicedLpcOrder);
|
||||
WebRtcSpl_FilterMAFastQ12(
|
||||
const_cast<int16_t*>(&audio_history[signal_length - 128]),
|
||||
unvoiced_vector, parameters.ar_filter, kUnvoicedLpcOrder + 1, 128);
|
||||
WebRtcSpl_FilterMAFastQ12(&audio_history[signal_length - 128],
|
||||
unvoiced_vector,
|
||||
parameters.ar_filter,
|
||||
kUnvoicedLpcOrder + 1,
|
||||
128);
|
||||
int16_t unvoiced_prescale;
|
||||
if (WebRtcSpl_MaxAbsValueW16(unvoiced_vector, 128) > 4000) {
|
||||
unvoiced_prescale = 4;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user