summaryrefslogtreecommitdiff
path: root/common_audio
diff options
context:
space:
mode:
authorpbos@webrtc.org <pbos@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>2013-04-10 18:06:57 +0000
committerpbos@webrtc.org <pbos@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>2013-04-10 18:06:57 +0000
commit45a3434299d78b2084a2d765c51c76c165b410ce (patch)
treef0a8d1f0160fa8bce5cd79b376e0b579136934c0 /common_audio
parent0486a10044b3af7e612e7e5c26051cc23bea12b1 (diff)
downloadwebrtc-45a3434299d78b2084a2d765c51c76c165b410ce.tar.gz
Replace legacy G_CONST with const.
BUG=1608 Review URL: https://webrtc-codereview.appspot.com/1310005 git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@3814 4adac7df-926f-26a2-2b94-8c16560cd09d
Diffstat (limited to 'common_audio')
-rw-r--r--common_audio/signal_processing/auto_corr_to_refl_coef.c4
-rw-r--r--common_audio/signal_processing/copy_set_operations.c2
-rw-r--r--common_audio/signal_processing/filter_ar.c8
-rw-r--r--common_audio/signal_processing/filter_ma_fast_q12.c4
-rw-r--r--common_audio/signal_processing/ilbc_specific_functions.c24
-rw-r--r--common_audio/signal_processing/include/signal_processing_library.h34
-rw-r--r--common_audio/signal_processing/refl_coef_to_lpc.c4
-rw-r--r--common_audio/signal_processing/vector_scaling_operations.c20
8 files changed, 50 insertions, 50 deletions
diff --git a/common_audio/signal_processing/auto_corr_to_refl_coef.c b/common_audio/signal_processing/auto_corr_to_refl_coef.c
index 6062b8ee..53957b5f 100644
--- a/common_audio/signal_processing/auto_corr_to_refl_coef.c
+++ b/common_audio/signal_processing/auto_corr_to_refl_coef.c
@@ -17,11 +17,11 @@
#include "signal_processing_library.h"
-void WebRtcSpl_AutoCorrToReflCoef(G_CONST int32_t *R, int use_order, int16_t *K)
+void WebRtcSpl_AutoCorrToReflCoef(const int32_t *R, int use_order, int16_t *K)
{
int i, n;
int16_t tmp;
- G_CONST int32_t *rptr;
+ const int32_t *rptr;
int32_t L_num, L_den;
int16_t *acfptr, *pptr, *wptr, *p1ptr, *w1ptr, ACF[WEBRTC_SPL_MAX_LPC_ORDER],
P[WEBRTC_SPL_MAX_LPC_ORDER], W[WEBRTC_SPL_MAX_LPC_ORDER];
diff --git a/common_audio/signal_processing/copy_set_operations.c b/common_audio/signal_processing/copy_set_operations.c
index dd81e972..aedb5d0b 100644
--- a/common_audio/signal_processing/copy_set_operations.c
+++ b/common_audio/signal_processing/copy_set_operations.c
@@ -62,7 +62,7 @@ void WebRtcSpl_MemCpyReversedOrder(int16_t* dest, int16_t* source, int length)
}
}
-int16_t WebRtcSpl_CopyFromEndW16(G_CONST int16_t *vector_in,
+int16_t WebRtcSpl_CopyFromEndW16(const int16_t *vector_in,
int16_t length,
int16_t samples,
int16_t *vector_out)
diff --git a/common_audio/signal_processing/filter_ar.c b/common_audio/signal_processing/filter_ar.c
index b18a9c95..44822e2e 100644
--- a/common_audio/signal_processing/filter_ar.c
+++ b/common_audio/signal_processing/filter_ar.c
@@ -17,9 +17,9 @@
#include "signal_processing_library.h"
-int WebRtcSpl_FilterAR(G_CONST int16_t* a,
+int WebRtcSpl_FilterAR(const int16_t* a,
int a_length,
- G_CONST int16_t* x,
+ const int16_t* x,
int x_length,
int16_t* state,
int state_length,
@@ -32,14 +32,14 @@ int WebRtcSpl_FilterAR(G_CONST int16_t* a,
int32_t o;
int32_t oLOW;
int i, j, stop;
- G_CONST int16_t* x_ptr = &x[0];
+ const int16_t* x_ptr = &x[0];
int16_t* filteredFINAL_ptr = filtered;
int16_t* filteredFINAL_LOW_ptr = filtered_low;
for (i = 0; i < x_length; i++)
{
// Calculate filtered[i] and filtered_low[i]
- G_CONST int16_t* a_ptr = &a[1];
+ const int16_t* a_ptr = &a[1];
int16_t* filtered_ptr = &filtered[i - 1];
int16_t* filtered_low_ptr = &filtered_low[i - 1];
int16_t* state_ptr = &state[state_length - 1];
diff --git a/common_audio/signal_processing/filter_ma_fast_q12.c b/common_audio/signal_processing/filter_ma_fast_q12.c
index 01c360cf..013ec5da 100644
--- a/common_audio/signal_processing/filter_ma_fast_q12.c
+++ b/common_audio/signal_processing/filter_ma_fast_q12.c
@@ -27,8 +27,8 @@ void WebRtcSpl_FilterMAFastQ12(int16_t* in_ptr,
int i, j;
for (i = 0; i < length; i++)
{
- G_CONST int16_t* b_ptr = &B[0];
- G_CONST int16_t* x_ptr = &in_ptr[i];
+ const int16_t* b_ptr = &B[0];
+ const int16_t* x_ptr = &in_ptr[i];
o = (int32_t)0;
diff --git a/common_audio/signal_processing/ilbc_specific_functions.c b/common_audio/signal_processing/ilbc_specific_functions.c
index dcf1db14..3699429a 100644
--- a/common_audio/signal_processing/ilbc_specific_functions.c
+++ b/common_audio/signal_processing/ilbc_specific_functions.c
@@ -21,15 +21,15 @@
#include "signal_processing_library.h"
-void WebRtcSpl_ReverseOrderMultArrayElements(int16_t *out, G_CONST int16_t *in,
- G_CONST int16_t *win,
+void WebRtcSpl_ReverseOrderMultArrayElements(int16_t *out, const int16_t *in,
+ const int16_t *win,
int16_t vector_length,
int16_t right_shifts)
{
int i;
int16_t *outptr = out;
- G_CONST int16_t *inptr = in;
- G_CONST int16_t *winptr = win;
+ const int16_t *inptr = in;
+ const int16_t *winptr = win;
for (i = 0; i < vector_length; i++)
{
(*outptr++) = (int16_t)WEBRTC_SPL_MUL_16_16_RSFT(*inptr++,
@@ -37,14 +37,14 @@ void WebRtcSpl_ReverseOrderMultArrayElements(int16_t *out, G_CONST int16_t *in,
}
}
-void WebRtcSpl_ElementwiseVectorMult(int16_t *out, G_CONST int16_t *in,
- G_CONST int16_t *win, int16_t vector_length,
+void WebRtcSpl_ElementwiseVectorMult(int16_t *out, const int16_t *in,
+ const int16_t *win, int16_t vector_length,
int16_t right_shifts)
{
int i;
int16_t *outptr = out;
- G_CONST int16_t *inptr = in;
- G_CONST int16_t *winptr = win;
+ const int16_t *inptr = in;
+ const int16_t *winptr = win;
for (i = 0; i < vector_length; i++)
{
(*outptr++) = (int16_t)WEBRTC_SPL_MUL_16_16_RSFT(*inptr++,
@@ -52,14 +52,14 @@ void WebRtcSpl_ElementwiseVectorMult(int16_t *out, G_CONST int16_t *in,
}
}
-void WebRtcSpl_AddVectorsAndShift(int16_t *out, G_CONST int16_t *in1,
- G_CONST int16_t *in2, int16_t vector_length,
+void WebRtcSpl_AddVectorsAndShift(int16_t *out, const int16_t *in1,
+ const int16_t *in2, int16_t vector_length,
int16_t right_shifts)
{
int i;
int16_t *outptr = out;
- G_CONST int16_t *in1ptr = in1;
- G_CONST int16_t *in2ptr = in2;
+ const int16_t *in1ptr = in1;
+ const int16_t *in2ptr = in2;
for (i = vector_length; i > 0; i--)
{
(*outptr++) = (int16_t)(((*in1ptr++) + (*in2ptr++)) >> right_shifts);
diff --git a/common_audio/signal_processing/include/signal_processing_library.h b/common_audio/signal_processing/include/signal_processing_library.h
index 8a4c35d8..3905fb41 100644
--- a/common_audio/signal_processing/include/signal_processing_library.h
+++ b/common_audio/signal_processing/include/signal_processing_library.h
@@ -189,7 +189,7 @@ void WebRtcSpl_MemSetW32(int32_t* vector,
void WebRtcSpl_MemCpyReversedOrder(int16_t* out_vector,
int16_t* in_vector,
int vector_length);
-int16_t WebRtcSpl_CopyFromEndW16(G_CONST int16_t* in_vector,
+int16_t WebRtcSpl_CopyFromEndW16(const int16_t* in_vector,
int16_t in_vector_length,
int16_t samples,
int16_t* out_vector);
@@ -387,29 +387,29 @@ int WebRtcSpl_MinIndexW32(const int32_t* vector, int length);
// Description at bottom of file.
void WebRtcSpl_VectorBitShiftW16(int16_t* out_vector,
int16_t vector_length,
- G_CONST int16_t* in_vector,
+ const int16_t* in_vector,
int16_t right_shifts);
void WebRtcSpl_VectorBitShiftW32(int32_t* out_vector,
int16_t vector_length,
- G_CONST int32_t* in_vector,
+ const int32_t* in_vector,
int16_t right_shifts);
void WebRtcSpl_VectorBitShiftW32ToW16(int16_t* out_vector,
int vector_length,
const int32_t* in_vector,
int right_shifts);
-void WebRtcSpl_ScaleVector(G_CONST int16_t* in_vector,
+void WebRtcSpl_ScaleVector(const int16_t* in_vector,
int16_t* out_vector,
int16_t gain,
int16_t vector_length,
int16_t right_shifts);
-void WebRtcSpl_ScaleVectorWithSat(G_CONST int16_t* in_vector,
+void WebRtcSpl_ScaleVectorWithSat(const int16_t* in_vector,
int16_t* out_vector,
int16_t gain,
int16_t vector_length,
int16_t right_shifts);
-void WebRtcSpl_ScaleAndAddVectors(G_CONST int16_t* in_vector1,
+void WebRtcSpl_ScaleAndAddVectors(const int16_t* in_vector1,
int16_t gain1, int right_shifts1,
- G_CONST int16_t* in_vector2,
+ const int16_t* in_vector2,
int16_t gain2, int right_shifts2,
int16_t* out_vector,
int vector_length);
@@ -461,18 +461,18 @@ int WebRtcSpl_ScaleAndAddVectorsWithRoundNeon(const int16_t* in_vector1,
// iLBC specific functions. Implementations in ilbc_specific_functions.c.
// Description at bottom of file.
void WebRtcSpl_ReverseOrderMultArrayElements(int16_t* out_vector,
- G_CONST int16_t* in_vector,
- G_CONST int16_t* window,
+ const int16_t* in_vector,
+ const int16_t* window,
int16_t vector_length,
int16_t right_shifts);
void WebRtcSpl_ElementwiseVectorMult(int16_t* out_vector,
- G_CONST int16_t* in_vector,
- G_CONST int16_t* window,
+ const int16_t* in_vector,
+ const int16_t* window,
int16_t vector_length,
int16_t right_shifts);
void WebRtcSpl_AddVectorsAndShift(int16_t* out_vector,
- G_CONST int16_t* in_vector1,
- G_CONST int16_t* in_vector2,
+ const int16_t* in_vector1,
+ const int16_t* in_vector2,
int16_t vector_length,
int16_t right_shifts);
void WebRtcSpl_AddAffineVectorToVector(int16_t* out_vector,
@@ -549,7 +549,7 @@ int16_t WebRtcSpl_LevinsonDurbin(int32_t* auto_corr,
//
// Output:
// - lpc_coef : LPC coefficients in Q12
-void WebRtcSpl_ReflCoefToLpc(G_CONST int16_t* refl_coef,
+void WebRtcSpl_ReflCoefToLpc(const int16_t* refl_coef,
int use_order,
int16_t* lpc_coef);
@@ -576,7 +576,7 @@ void WebRtcSpl_LpcToReflCoef(int16_t* lpc_coef,
//
// Output:
// - refl_coef : Reflection coefficients in Q15.
-void WebRtcSpl_AutoCorrToReflCoef(G_CONST int32_t* auto_corr,
+void WebRtcSpl_AutoCorrToReflCoef(const int32_t* auto_corr,
int use_order,
int16_t* refl_coef);
@@ -694,9 +694,9 @@ int32_t WebRtcSpl_DotProductWithScale(const int16_t* vector1,
int scaling);
// Filter operations.
-int WebRtcSpl_FilterAR(G_CONST int16_t* ar_coef,
+int WebRtcSpl_FilterAR(const int16_t* ar_coef,
int ar_coef_length,
- G_CONST int16_t* in_vector,
+ const int16_t* in_vector,
int in_vector_length,
int16_t* filter_state,
int filter_state_length,
diff --git a/common_audio/signal_processing/refl_coef_to_lpc.c b/common_audio/signal_processing/refl_coef_to_lpc.c
index 5ceb6050..1cc4e63e 100644
--- a/common_audio/signal_processing/refl_coef_to_lpc.c
+++ b/common_audio/signal_processing/refl_coef_to_lpc.c
@@ -17,11 +17,11 @@
#include "signal_processing_library.h"
-void WebRtcSpl_ReflCoefToLpc(G_CONST int16_t *k, int use_order, int16_t *a)
+void WebRtcSpl_ReflCoefToLpc(const int16_t *k, int use_order, int16_t *a)
{
int16_t any[WEBRTC_SPL_MAX_LPC_ORDER + 1];
int16_t *aptr, *aptr2, *anyptr;
- G_CONST int16_t *kptr;
+ const int16_t *kptr;
int m, i;
kptr = k;
diff --git a/common_audio/signal_processing/vector_scaling_operations.c b/common_audio/signal_processing/vector_scaling_operations.c
index effb705a..5c3b8865 100644
--- a/common_audio/signal_processing/vector_scaling_operations.c
+++ b/common_audio/signal_processing/vector_scaling_operations.c
@@ -23,7 +23,7 @@
#include "signal_processing_library.h"
void WebRtcSpl_VectorBitShiftW16(int16_t *res, int16_t length,
- G_CONST int16_t *in, int16_t right_shifts)
+ const int16_t *in, int16_t right_shifts)
{
int i;
@@ -44,7 +44,7 @@ void WebRtcSpl_VectorBitShiftW16(int16_t *res, int16_t length,
void WebRtcSpl_VectorBitShiftW32(int32_t *out_vector,
int16_t vector_length,
- G_CONST int32_t *in_vector,
+ const int32_t *in_vector,
int16_t right_shifts)
{
int i;
@@ -83,13 +83,13 @@ void WebRtcSpl_VectorBitShiftW32ToW16(int16_t* out, int length,
}
}
-void WebRtcSpl_ScaleVector(G_CONST int16_t *in_vector, int16_t *out_vector,
+void WebRtcSpl_ScaleVector(const int16_t *in_vector, int16_t *out_vector,
int16_t gain, int16_t in_vector_length,
int16_t right_shifts)
{
// Performs vector operation: out_vector = (gain*in_vector)>>right_shifts
int i;
- G_CONST int16_t *inptr;
+ const int16_t *inptr;
int16_t *outptr;
inptr = in_vector;
@@ -101,14 +101,14 @@ void WebRtcSpl_ScaleVector(G_CONST int16_t *in_vector, int16_t *out_vector,
}
}
-void WebRtcSpl_ScaleVectorWithSat(G_CONST int16_t *in_vector, int16_t *out_vector,
+void WebRtcSpl_ScaleVectorWithSat(const int16_t *in_vector, int16_t *out_vector,
int16_t gain, int16_t in_vector_length,
int16_t right_shifts)
{
// Performs vector operation: out_vector = (gain*in_vector)>>right_shifts
int i;
int32_t tmpW32;
- G_CONST int16_t *inptr;
+ const int16_t *inptr;
int16_t *outptr;
inptr = in_vector;
@@ -121,14 +121,14 @@ void WebRtcSpl_ScaleVectorWithSat(G_CONST int16_t *in_vector, int16_t *out_vecto
}
}
-void WebRtcSpl_ScaleAndAddVectors(G_CONST int16_t *in1, int16_t gain1, int shift1,
- G_CONST int16_t *in2, int16_t gain2, int shift2,
+void WebRtcSpl_ScaleAndAddVectors(const int16_t *in1, int16_t gain1, int shift1,
+ const int16_t *in2, int16_t gain2, int shift2,
int16_t *out, int vector_length)
{
// Performs vector operation: out = (gain1*in1)>>shift1 + (gain2*in2)>>shift2
int i;
- G_CONST int16_t *in1ptr;
- G_CONST int16_t *in2ptr;
+ const int16_t *in1ptr;
+ const int16_t *in2ptr;
int16_t *outptr;
in1ptr = in1;