Reformatting ACM. All changes are bit-exact in this CL.

TEST=VoE auto-test, audio_coding_module_test; 

only 15 ms of teststereo_out_1.pcm is not bit-exact with output file of the head revision
Review URL: https://webrtc-codereview.appspot.com/937035

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3287 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
turaj@webrtc.org
2012-12-13 22:46:43 +00:00
parent ddebc17bee
commit c454fab03b
57 changed files with 5276 additions and 5241 deletions

View File

@ -11,7 +11,7 @@
#ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_SOURCE_ACM_SPEEX_H_
#define WEBRTC_MODULES_AUDIO_CODING_MAIN_SOURCE_ACM_SPEEX_H_
#include "acm_generic_codec.h"
#include "webrtc/modules/audio_coding/main/source/acm_generic_codec.h"
// forward declaration
struct SPEEX_encinst_t_;
@ -21,27 +21,28 @@ namespace webrtc {
class ACMSPEEX : public ACMGenericCodec {
public:
ACMSPEEX(WebRtc_Word16 codecID);
explicit ACMSPEEX(WebRtc_Word16 codec_id);
~ACMSPEEX();
// for FEC
ACMGenericCodec* CreateInstance(void);
WebRtc_Word16 InternalEncode(WebRtc_UWord8* bitstream,
WebRtc_Word16* bitStreamLenByte);
WebRtc_Word16* bitstream_len_byte);
WebRtc_Word16 InternalInitEncoder(WebRtcACMCodecParams *codecParams);
WebRtc_Word16 InternalInitEncoder(WebRtcACMCodecParams *codec_params);
WebRtc_Word16 InternalInitDecoder(WebRtcACMCodecParams *codecParams);
WebRtc_Word16 InternalInitDecoder(WebRtcACMCodecParams *codec_params);
protected:
WebRtc_Word16 DecodeSafe(WebRtc_UWord8* bitStream,
WebRtc_Word16 bitStreamLenByte,
WebRtc_Word16 DecodeSafe(WebRtc_UWord8* bitstream,
WebRtc_Word16 bitstream_len_byte,
WebRtc_Word16* audio,
WebRtc_Word16* audioSamples,
WebRtc_Word8* speechType);
WebRtc_Word16* audio_samples,
WebRtc_Word8* speech_type);
WebRtc_Word32 CodecDef(WebRtcNetEQ_CodecDef& codecDef,
const CodecInst& codecInst);
WebRtc_Word32 CodecDef(WebRtcNetEQ_CodecDef& codec_def,
const CodecInst& codec_inst);
void DestructEncoderSafe();
@ -51,7 +52,7 @@ class ACMSPEEX : public ACMGenericCodec {
WebRtc_Word16 InternalCreateDecoder();
void InternalDestructEncoderInst(void* ptrInst);
void InternalDestructEncoderInst(void* ptr_inst);
WebRtc_Word16 SetBitRateSafe(const WebRtc_Word32 rate);
@ -67,13 +68,13 @@ class ACMSPEEX : public ACMGenericCodec {
WebRtc_Word16 SetComplMode(WebRtc_Word16 mode);
#endif
SPEEX_encinst_t_* _encoderInstPtr;
SPEEX_decinst_t_* _decoderInstPtr;
WebRtc_Word16 _complMode;
bool _vbrEnabled;
WebRtc_Word32 _encodingRate;
WebRtc_Word16 _samplingFrequency;
WebRtc_UWord16 _samplesIn20MsAudio;
SPEEX_encinst_t_* encoder_inst_ptr_;
SPEEX_decinst_t_* decoder_inst_ptr_;
WebRtc_Word16 compl_mode_;
bool vbr_enabled_;
WebRtc_Word32 encoding_rate_;
WebRtc_Word16 sampling_frequency_;
WebRtc_UWord16 samples_in_20ms_audio_;
};
} // namespace webrtc