From 01ad75888abbaf7eff09c3715156766114f62efb Mon Sep 17 00:00:00 2001 From: "turaj@webrtc.org" Date: Tue, 3 Jul 2012 21:35:46 +0000 Subject: [PATCH] ilbc: Mark untouched input arrays as const Review URL: https://webrtc-codereview.appspot.com/662004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@2490 4adac7df-926f-26a2-2b94-8c16560cd09d --- AUTHORS | 1 + src/modules/audio_coding/codecs/ilbc/encode.c | 4 ++-- src/modules/audio_coding/codecs/ilbc/encode.h | 4 ++-- src/modules/audio_coding/codecs/ilbc/ilbc.c | 2 +- src/modules/audio_coding/codecs/ilbc/interface/ilbc.h | 6 +++--- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/AUTHORS b/AUTHORS index 2ce0f1c58d..30d7be8203 100644 --- a/AUTHORS +++ b/AUTHORS @@ -5,3 +5,4 @@ Google Inc. Mozilla Foundation Ben Strong Petar Jovanovic +Martin Storsjo diff --git a/src/modules/audio_coding/codecs/ilbc/encode.c b/src/modules/audio_coding/codecs/ilbc/encode.c index 64e9eab3dc..8135426390 100644 --- a/src/modules/audio_coding/codecs/ilbc/encode.c +++ b/src/modules/audio_coding/codecs/ilbc/encode.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -42,7 +42,7 @@ void WebRtcIlbcfix_EncodeImpl( WebRtc_UWord16 *bytes, /* (o) encoded data bits iLBC */ - WebRtc_Word16 *block, /* (i) speech vector to encode */ + const WebRtc_Word16 *block, /* (i) speech vector to encode */ iLBC_Enc_Inst_t *iLBCenc_inst /* (i/o) the general encoder state */ ){ diff --git a/src/modules/audio_coding/codecs/ilbc/encode.h b/src/modules/audio_coding/codecs/ilbc/encode.h index b553f0ce02..b7d93d7347 100644 --- a/src/modules/audio_coding/codecs/ilbc/encode.h +++ b/src/modules/audio_coding/codecs/ilbc/encode.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -27,7 +27,7 @@ void WebRtcIlbcfix_EncodeImpl( WebRtc_UWord16 *bytes, /* (o) encoded data bits iLBC */ - WebRtc_Word16 *block, /* (i) speech vector to encode */ + const WebRtc_Word16 *block, /* (i) speech vector to encode */ iLBC_Enc_Inst_t *iLBCenc_inst /* (i/o) the general encoder state */ ); diff --git a/src/modules/audio_coding/codecs/ilbc/ilbc.c b/src/modules/audio_coding/codecs/ilbc/ilbc.c index 75b64c42c2..adf251bbcb 100644 --- a/src/modules/audio_coding/codecs/ilbc/ilbc.c +++ b/src/modules/audio_coding/codecs/ilbc/ilbc.c @@ -84,7 +84,7 @@ WebRtc_Word16 WebRtcIlbcfix_EncoderInit(iLBC_encinst_t *iLBCenc_inst, WebRtc_Wor } } -WebRtc_Word16 WebRtcIlbcfix_Encode(iLBC_encinst_t *iLBCenc_inst, WebRtc_Word16 *speechIn, WebRtc_Word16 len, WebRtc_Word16 *encoded) { +WebRtc_Word16 WebRtcIlbcfix_Encode(iLBC_encinst_t *iLBCenc_inst, const WebRtc_Word16 *speechIn, WebRtc_Word16 len, WebRtc_Word16 *encoded) { WebRtc_Word16 pos = 0; WebRtc_Word16 encpos = 0; diff --git a/src/modules/audio_coding/codecs/ilbc/interface/ilbc.h b/src/modules/audio_coding/codecs/ilbc/interface/ilbc.h index ca1d39ecaf..090d370c3d 100644 --- a/src/modules/audio_coding/codecs/ilbc/interface/ilbc.h +++ b/src/modules/audio_coding/codecs/ilbc/interface/ilbc.h @@ -136,9 +136,9 @@ extern "C" { */ WebRtc_Word16 WebRtcIlbcfix_Encode(iLBC_encinst_t *iLBCenc_inst, - WebRtc_Word16 *speechIn, - WebRtc_Word16 len, - WebRtc_Word16 *encoded); + const WebRtc_Word16 *speechIn, + WebRtc_Word16 len, + WebRtc_Word16 *encoded); /**************************************************************************** * WebRtcIlbcfix_DecoderInit(...)