From e8482f0e9ff1e9733719f58b4dd6c5d6d776a93a Mon Sep 17 00:00:00 2001 From: "kma@webrtc.org" Date: Thu, 24 Jan 2013 23:57:56 +0000 Subject: [PATCH] Revert 3406 > Moved all function pointer declarations in iSAC to a single place. > Review URL: https://webrtc-codereview.appspot.com/1057006 TBR=kma@webrtc.org Review URL: https://webrtc-codereview.appspot.com/1074005 git-svn-id: http://webrtc.googlecode.com/svn/trunk@3408 4adac7df-926f-26a2-2b94-8c16560cd09d --- .../audio_coding/codecs/isac/fix/source/filterbanks.c | 3 +++ .../modules/audio_coding/codecs/isac/fix/source/isacfix.c | 7 ------- .../modules/audio_coding/codecs/isac/fix/source/lattice.c | 3 +++ .../codecs/isac/fix/source/lpc_masking_model.c | 5 +++++ .../audio_coding/codecs/isac/fix/source/transform.c | 4 ++++ 5 files changed, 15 insertions(+), 7 deletions(-) diff --git a/webrtc/modules/audio_coding/codecs/isac/fix/source/filterbanks.c b/webrtc/modules/audio_coding/codecs/isac/fix/source/filterbanks.c index f76b403f3..c7eb59091 100644 --- a/webrtc/modules/audio_coding/codecs/isac/fix/source/filterbanks.c +++ b/webrtc/modules/audio_coding/codecs/isac/fix/source/filterbanks.c @@ -26,6 +26,9 @@ #include "filterbank_tables.h" #include "settings.h" +// Declare a function pointer. +AllpassFilter2FixDec16 WebRtcIsacfix_AllpassFilter2FixDec16; + void WebRtcIsacfix_AllpassFilter2FixDec16C( int16_t *data_ch1, // Input and output in channel 1, in Q0 int16_t *data_ch2, // Input and output in channel 2, in Q0 diff --git a/webrtc/modules/audio_coding/codecs/isac/fix/source/isacfix.c b/webrtc/modules/audio_coding/codecs/isac/fix/source/isacfix.c index 946f3841e..fa4d8d176 100644 --- a/webrtc/modules/audio_coding/codecs/isac/fix/source/isacfix.c +++ b/webrtc/modules/audio_coding/codecs/isac/fix/source/isacfix.c @@ -27,13 +27,6 @@ #include "modules/audio_coding/codecs/isac/fix/source/structs.h" #include "system_wrappers/interface/cpu_features_wrapper.h" -// Declare function pointers. -AllpassFilter2FixDec16 WebRtcIsacfix_AllpassFilter2FixDec16; -AutocorrFix WebRtcIsacfix_AutocorrFix; -CalculateResidualEnergy WebRtcIsacfix_CalculateResidualEnergy; -FilterMaLoopFix WebRtcIsacfix_FilterMaLoopFix; -Spec2Time WebRtcIsacfix_Spec2Time; -Time2Spec WebRtcIsacfix_Time2Spec; /************************************************************************** * WebRtcIsacfix_AssignSize(...) diff --git a/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice.c b/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice.c index bbc5993b5..14588d0f0 100644 --- a/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice.c +++ b/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice.c @@ -84,6 +84,9 @@ void WebRtcIsacfix_FilterMaLoopC(int16_t input0, // Filter coefficient } } +// Declare a function pointer. +FilterMaLoopFix WebRtcIsacfix_FilterMaLoopFix; + /* filter the signal using normalized lattice filter */ /* MA filter */ void WebRtcIsacfix_NormLatticeFilterMa(WebRtc_Word16 orderCoef, diff --git a/webrtc/modules/audio_coding/codecs/isac/fix/source/lpc_masking_model.c b/webrtc/modules/audio_coding/codecs/isac/fix/source/lpc_masking_model.c index 8e5292086..4be438eb5 100644 --- a/webrtc/modules/audio_coding/codecs/isac/fix/source/lpc_masking_model.c +++ b/webrtc/modules/audio_coding/codecs/isac/fix/source/lpc_masking_model.c @@ -463,6 +463,11 @@ static __inline WebRtc_Word16 exp2_Q10_T(WebRtc_Word16 x) { // Both in and out } + +// Declare function pointers. +AutocorrFix WebRtcIsacfix_AutocorrFix; +CalculateResidualEnergy WebRtcIsacfix_CalculateResidualEnergy; + /* This routine calculates the residual energy for LPC. * Formula as shown in comments inside. */ diff --git a/webrtc/modules/audio_coding/codecs/isac/fix/source/transform.c b/webrtc/modules/audio_coding/codecs/isac/fix/source/transform.c index c3deebb10..f2ad16459 100644 --- a/webrtc/modules/audio_coding/codecs/isac/fix/source/transform.c +++ b/webrtc/modules/audio_coding/codecs/isac/fix/source/transform.c @@ -95,6 +95,10 @@ const WebRtc_Word16 kSinTab2[FRAMESAMPLES/4] = { 2032, -1819, 1606, -1392, 1179, -965, 750, -536, 322, -107 }; +// Declare function pointers. +Spec2Time WebRtcIsacfix_Spec2Time; +Time2Spec WebRtcIsacfix_Time2Spec; + void WebRtcIsacfix_Time2SpecC(WebRtc_Word16 *inre1Q9, WebRtc_Word16 *inre2Q9, WebRtc_Word16 *outreQ7,