To remove all calls involving scratch-memory
Review URL: http://webrtc-codereview.appspot.com/129001 git-svn-id: http://webrtc.googlecode.com/svn/trunk@462 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
ac55f7b33c
commit
7f2bbbbefd
@ -38,12 +38,6 @@
|
||||
|
||||
#define BLOCKL_MAX 240
|
||||
#define ILBCNOOFWORDS_MAX 25
|
||||
#define ILBCSCRATCHMEMSIZE 2156
|
||||
|
||||
#ifdef __ILBC_WITH_SCRATCHMEM
|
||||
WebRtc_Word16 iLBC_ScratchMem[ILBCSCRATCHMEMSIZE];
|
||||
WebRtc_Word16 size;
|
||||
#endif
|
||||
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
@ -152,13 +146,6 @@ int main(int argc, char* argv[])
|
||||
WebRtcIlbcfix_EncoderCreate(&Enc_Inst);
|
||||
WebRtcIlbcfix_DecoderCreate(&Dec_Inst);
|
||||
|
||||
#ifdef __ILBC_WITH_SCRATCHMEM
|
||||
/* Assign scratch memory. Note that Enc and Dec can use the same area */
|
||||
WebRtcIlbcfix_EncoderAssignScratchMem(Enc_Inst, iLBC_ScratchMem, &size);
|
||||
if (size>ILBCSCRATCHMEMSIZE) { fprintf(stderr,"Error: Scratch not big enough"); exit(0); }
|
||||
WebRtcIlbcfix_DecoderAssignScratchMem(Dec_Inst, iLBC_ScratchMem, &size);
|
||||
if (size>ILBCSCRATCHMEMSIZE) { fprintf(stderr,"Error: Scratch not big enough"); exit(0); }
|
||||
#endif
|
||||
|
||||
/* Initialization */
|
||||
|
||||
@ -236,4 +223,3 @@ int main(int argc, char* argv[])
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
@ -195,12 +195,6 @@ int main(int argc, char* argv[])
|
||||
WebRtcIlbcfix_EncoderInit(&Enc_Inst, mode);
|
||||
WebRtcIlbcfix_DecoderInit(&Dec_Inst, mode, 1);
|
||||
|
||||
#if __ILBC_WITH_SCRATCHMEM
|
||||
// we can use the same scratch space for both encoder and decoder.
|
||||
WebRtcIlbcfix_EncoderAssignScratchMem((iLBC_encinst_t*)&Enc_Inst, scratchBlock, &size);
|
||||
WebRtcIlbcfix_DecoderAssignScratchMem((iLBC_decinst_t*)&Dec_Inst, scratchBlock, &size);
|
||||
#endif
|
||||
|
||||
/* extract the input file and channel file */
|
||||
|
||||
#ifdef SPLIT_10MS
|
||||
@ -258,7 +252,8 @@ int main(int argc, char* argv[])
|
||||
while( count < blockcount * (Enc_Inst.blockl/frameLen) ) {
|
||||
|
||||
encode(&Enc_Inst, &encodeddata[Enc_Inst.no_of_words *
|
||||
(count/(Enc_Inst.nsub/2))], &inputdata[frameLen * count] );
|
||||
(count/(Enc_Inst.nsub/2))],
|
||||
&inputdata[frameLen * count] );
|
||||
#else
|
||||
while (count < noOfBlocks) {
|
||||
encode( &Enc_Inst, &encodeddata[Enc_Inst.no_of_words * count],
|
||||
|
Loading…
x
Reference in New Issue
Block a user