Commit 71a84590 authored by Jean-Marc Valin's avatar Jean-Marc Valin
Browse files

Removed unnecessary header inclusions

parent a82dfdd2
......@@ -2,8 +2,7 @@
#include "config.h"
#endif
#include <stdlib.h>
#include <string.h>
#include "os_support.h"
#include "entenc.h"
......@@ -11,7 +10,7 @@
#define EC_BUFFER_INCREMENT (256)
void ec_byte_writeinit(ec_byte_buffer *_b){
_b->ptr=_b->buf=malloc(EC_BUFFER_INCREMENT*sizeof(char));
_b->ptr=_b->buf=celt_alloc(EC_BUFFER_INCREMENT*sizeof(char));
_b->storage=EC_BUFFER_INCREMENT;
}
......@@ -23,7 +22,7 @@ void ec_byte_write1(ec_byte_buffer *_b,unsigned _value){
ptrdiff_t endbyte;
endbyte=_b->ptr-_b->buf;
if(endbyte>=_b->storage){
_b->buf=realloc(_b->buf,(_b->storage+EC_BUFFER_INCREMENT)*sizeof(char));
_b->buf=celt_realloc(_b->buf,(_b->storage+EC_BUFFER_INCREMENT)*sizeof(char));
_b->storage+=EC_BUFFER_INCREMENT;
_b->ptr=_b->buf+endbyte;
}
......@@ -34,7 +33,7 @@ void ec_byte_write4(ec_byte_buffer *_b,ec_uint32 _value){
ptrdiff_t endbyte;
endbyte=_b->ptr-_b->buf;
if(endbyte+4>_b->storage){
_b->buf=realloc(_b->buf,(_b->storage+EC_BUFFER_INCREMENT)*sizeof(char));
_b->buf=celt_realloc(_b->buf,(_b->storage+EC_BUFFER_INCREMENT)*sizeof(char));
_b->storage+=EC_BUFFER_INCREMENT;
_b->ptr=_b->buf+endbyte;
}
......@@ -52,7 +51,7 @@ void ec_byte_writecopy(ec_byte_buffer *_b,void *_source,long _bytes){
endbyte=_b->ptr-_b->buf;
if(endbyte+_bytes>_b->storage){
_b->storage=endbyte+_bytes+EC_BUFFER_INCREMENT;
_b->buf=realloc(_b->buf,_b->storage*sizeof(char));
_b->buf=celt_realloc(_b->buf,_b->storage*sizeof(char));
_b->ptr=_b->buf+endbyte;
}
memmove(_b->ptr,_source,_bytes);
......
......@@ -43,8 +43,6 @@
#include "kiss_fftr.h"*/
#include "kfft_single.h"
#include <stdio.h>
#include <math.h>
#include "pitch.h"
#include "psy.h"
#include "os_support.h"
......
......@@ -2,7 +2,6 @@
#include "config.h"
#endif
#include <stddef.h>
#include "entdec.h"
#include "mfrngcod.h"
......@@ -114,8 +113,6 @@
}*/
#include <stdio.h>
/*Gets the next byte of input.
After all the bytes in the current packet have been consumed, and the extra
end code returned if needed, this function will continue to return zero each
......
......@@ -2,7 +2,6 @@
#include "config.h"
#endif
#include <stddef.h>
#include "entenc.h"
#include "mfrngcod.h"
......
......@@ -33,8 +33,6 @@
#include "config.h"
#endif
#include <math.h>
#include <stdlib.h>
#include "mathops.h"
#include "cwrs.h"
#include "vq.h"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment