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@3814 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@@ -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];
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -52,8 +52,8 @@ static int16_t plc_filterma_Fast(
|
||||
|
||||
for (i = 0; i < len; i++)
|
||||
{
|
||||
G_CONST int16_t *b_ptr = &B[0];
|
||||
G_CONST int16_t *x_ptr = &In[i];
|
||||
const int16_t *b_ptr = &B[0];
|
||||
const int16_t *x_ptr = &In[i];
|
||||
|
||||
o = (int32_t)0;
|
||||
|
||||
|
||||
@@ -301,7 +301,7 @@ int WebRtcNetEQ_RecInInternal(MCUInst_t *MCU_inst, RTPPacket_t *RTPpacketInput,
|
||||
|
||||
MCU_inst->codec_DB_inst.funcUpdBWEst[codecPos](
|
||||
MCU_inst->codec_DB_inst.codec_state[codecPos],
|
||||
(G_CONST uint16_t *) RTPpacket[0].payload,
|
||||
(const uint16_t *) RTPpacket[0].payload,
|
||||
(int32_t) RTPpacket[0].payloadLen, RTPpacket[0].seqNumber,
|
||||
(uint32_t) RTPpacket[0].timeStamp, (uint32_t) uw32_timeRec);
|
||||
}
|
||||
|
||||
@@ -14,10 +14,6 @@
|
||||
#ifndef WEBRTC_TYPEDEFS_H_
|
||||
#define WEBRTC_TYPEDEFS_H_
|
||||
|
||||
// Reserved words definitions
|
||||
// TODO(andrew): Remove this.
|
||||
#define G_CONST const
|
||||
|
||||
// For access to standard POSIXish features, use WEBRTC_POSIX instead of a
|
||||
// more specific macro.
|
||||
#if defined(WEBRTC_MAC) || defined(WEBRTC_LINUX) || \
|
||||
|
||||
Reference in New Issue
Block a user