Commit 2e04704e authored by Monty's avatar Monty
Browse files

Two fixes:
	s/sizeof(double)/sizeof(float)/ in floor0.c
	forgot to free tab and tabl in decode book.

Also, convert all free() to _ogg_free() (duh)

Monty

svn path=/trunk/vorbis/; revision=1054
parent d60b7519
......@@ -12,7 +12,7 @@
********************************************************************
function: single-block PCM analysis mode dispatch
last mod: $Id: analysis.c,v 1.37 2000/11/08 13:16:27 xiphmont Exp $
last mod: $Id: analysis.c,v 1.38 2000/11/14 00:05:30 xiphmont Exp $
********************************************************************/
......@@ -55,9 +55,9 @@ int vorbis_analysis(vorbis_block *vb,ogg_packet *op){
if(vb->W){
oggpack_write(&vb->opb,vb->lW,1);
oggpack_write(&vb->opb,vb->nW,1);
/*fprintf(stderr,"*");
fprintf(stderr,"*");
}else{
fprintf(stderr,".");*/
fprintf(stderr,".");
}
if((ret=_mapping_P[type]->forward(vb,b->mode[mode])))
......
......@@ -12,7 +12,7 @@
********************************************************************
function: PCM data vector blocking, windowing and dis/reassembly
last mod: $Id: block.c,v 1.40 2000/11/06 00:07:00 xiphmont Exp $
last mod: $Id: block.c,v 1.41 2000/11/14 00:05:30 xiphmont Exp $
Handle windowing, overlap-add, etc of the PCM vectors. This is made
more amusing by Vorbis' current two allowed block sizes.
......@@ -131,9 +131,9 @@ void _vorbis_block_ripcord(vorbis_block *vb){
struct alloc_chain *reap=vb->reap;
while(reap){
struct alloc_chain *next=reap->next;
free(reap->ptr);
_ogg_free(reap->ptr);
memset(reap,0,sizeof(struct alloc_chain));
free(reap);
_ogg_free(reap);
reap=next;
}
/* consolidate storage */
......@@ -153,7 +153,7 @@ int vorbis_block_clear(vorbis_block *vb){
if(vb->vd->analysisp)
oggpack_writeclear(&vb->opb);
_vorbis_block_ripcord(vb);
if(vb->localstore)free(vb->localstore);
if(vb->localstore)_ogg_free(vb->localstore);
memset(vb,0,sizeof(vorbis_block));
return(0);
......@@ -279,40 +279,40 @@ void vorbis_dsp_clear(vorbis_dsp_state *v){
if(b){
if(b->window[0][0][0]){
for(i=0;i<VI_WINDOWB;i++)
if(b->window[0][0][0][i])free(b->window[0][0][0][i]);
free(b->window[0][0][0]);
if(b->window[0][0][0][i])_ogg_free(b->window[0][0][0][i]);
_ogg_free(b->window[0][0][0]);
for(j=0;j<2;j++)
for(k=0;k<2;k++){
for(i=0;i<VI_WINDOWB;i++)
if(b->window[1][j][k][i])free(b->window[1][j][k][i]);
free(b->window[1][j][k]);
if(b->window[1][j][k][i])_ogg_free(b->window[1][j][k][i]);
_ogg_free(b->window[1][j][k]);
}
}
if(b->ve){
_ve_envelope_clear(b->ve);
free(b->ve);
_ogg_free(b->ve);
}
if(b->transform[0]){
mdct_clear(b->transform[0][0]);
free(b->transform[0][0]);
free(b->transform[0]);
_ogg_free(b->transform[0][0]);
_ogg_free(b->transform[0]);
}
if(b->transform[1]){
mdct_clear(b->transform[1][0]);
free(b->transform[1][0]);
free(b->transform[1]);
_ogg_free(b->transform[1][0]);
_ogg_free(b->transform[1]);
}
}
if(v->pcm){
for(i=0;i<vi->channels;i++)
if(v->pcm[i])free(v->pcm[i]);
free(v->pcm);
if(v->pcmret)free(v->pcmret);
if(v->pcm[i])_ogg_free(v->pcm[i]);
_ogg_free(v->pcm);
if(v->pcmret)_ogg_free(v->pcmret);
}
/* free mode lookups; these are actually vorbis_look_mapping structs */
......@@ -328,14 +328,14 @@ void vorbis_dsp_clear(vorbis_dsp_state *v){
}
if(b){
if(b->mode)free(b->mode);
if(b->fullbooks)free(b->fullbooks);
if(b->mode)_ogg_free(b->mode);
if(b->fullbooks)_ogg_free(b->fullbooks);
/* free header, header1, header2 */
if(b->header)free(b->header);
if(b->header1)free(b->header1);
if(b->header2)free(b->header2);
free(b);
if(b->header)_ogg_free(b->header);
if(b->header1)_ogg_free(b->header1);
if(b->header2)_ogg_free(b->header2);
_ogg_free(b);
}
memset(v,0,sizeof(vorbis_dsp_state));
......@@ -348,9 +348,9 @@ float **vorbis_analysis_buffer(vorbis_dsp_state *v, int vals){
backend_lookup_state *b=v->backend_state;
/* free header, header1, header2 */
if(b->header)free(b->header);b->header=NULL;
if(b->header1)free(b->header1);b->header1=NULL;
if(b->header2)free(b->header2);b->header2=NULL;
if(b->header)_ogg_free(b->header);b->header=NULL;
if(b->header1)_ogg_free(b->header1);b->header1=NULL;
if(b->header2)_ogg_free(b->header2);b->header2=NULL;
/* Do we have enough storage space for the requested buffer? If not,
expand the PCM (and envelope) storage */
......
......@@ -12,7 +12,7 @@
********************************************************************
function: PCM data envelope analysis and manipulation
last mod: $Id: envelope.c,v 1.25 2000/11/07 09:51:42 xiphmont Exp $
last mod: $Id: envelope.c,v 1.26 2000/11/14 00:05:30 xiphmont Exp $
Preecho calculation.
......@@ -100,11 +100,11 @@ void _ve_envelope_clear(envelope_lookup *e){
int i;
for(i=0;i<e->ch;i++){
IIR_clear((e->iir+i));
free(e->filtered[i]);
_ogg_free(e->filtered[i]);
}
drft_clear(&e->drft);
free(e->window);
free(e->filtered);
_ogg_free(e->window);
_ogg_free(e->filtered);
memset(e,0,sizeof(envelope_lookup));
}
......
......@@ -12,7 +12,7 @@
********************************************************************
function: floor backend 0 implementation
last mod: $Id: floor0.c,v 1.27 2000/11/07 09:51:42 xiphmont Exp $
last mod: $Id: floor0.c,v 1.28 2000/11/14 00:05:31 xiphmont Exp $
********************************************************************/
......@@ -80,18 +80,18 @@ static vorbis_info_floor *floor0_copy_info (vorbis_info_floor *i){
static void floor0_free_info(vorbis_info_floor *i){
if(i){
memset(i,0,sizeof(vorbis_info_floor0));
free(i);
_ogg_free(i);
}
}
static void floor0_free_look(vorbis_look_floor *i){
vorbis_look_floor0 *look=(vorbis_look_floor0 *)i;
if(i){
if(look->linearmap)free(look->linearmap);
if(look->lsp_look)free(look->lsp_look);
if(look->linearmap)_ogg_free(look->linearmap);
if(look->lsp_look)_ogg_free(look->lsp_look);
lpc_clear(&look->lpclook);
memset(look,0,sizeof(vorbis_look_floor0));
free(look);
_ogg_free(look);
}
}
......@@ -385,7 +385,7 @@ static int floor0_inverse(vorbis_block *vb,vorbis_look_floor *i,float *out){
codebook *b=be->fullbooks+info->books[booknum];
float last=0.;
memset(out,0,sizeof(double)*look->m);
memset(out,0,sizeof(float)*look->m);
for(j=0;j<look->m;j+=b->dim)
if(vorbis_book_decodevs(b,lsp+j,&vb->opb,1,-1)==-1)goto eop;
......
......@@ -12,7 +12,7 @@
********************************************************************
function: Direct Form I, II IIR filters, plus some specializations
last mod: $Id: iir.c,v 1.4 2000/11/07 09:51:43 xiphmont Exp $
last mod: $Id: iir.c,v 1.5 2000/11/14 00:05:31 xiphmont Exp $
********************************************************************/
......@@ -39,9 +39,9 @@ void IIR_init(IIR_state *s,int stages,float gain, float *A, float *B){
void IIR_clear(IIR_state *s){
if(s){
free(s->coeff_A);
free(s->coeff_B);
free(s->z_A);
_ogg_free(s->coeff_A);
_ogg_free(s->coeff_B);
_ogg_free(s->z_A);
memset(s,0,sizeof(IIR_state));
}
}
......
......@@ -12,7 +12,7 @@
********************************************************************
function: maintain the info structure, info <-> header packets
last mod: $Id: info.c,v 1.32 2000/11/06 00:07:00 xiphmont Exp $
last mod: $Id: info.c,v 1.33 2000/11/14 00:05:31 xiphmont Exp $
********************************************************************/
......@@ -130,10 +130,10 @@ void vorbis_comment_clear(vorbis_comment *vc){
if(vc){
long i;
for(i=0;i<vc->comments;i++)
if(vc->user_comments[i])free(vc->user_comments[i]);
if(vc->user_comments)free(vc->user_comments);
if(vc->comment_lengths)free(vc->comment_lengths);
if(vc->vendor)free(vc->vendor);
if(vc->user_comments[i])_ogg_free(vc->user_comments[i]);
if(vc->user_comments)_ogg_free(vc->user_comments);
if(vc->comment_lengths)_ogg_free(vc->comment_lengths);
if(vc->vendor)_ogg_free(vc->vendor);
}
memset(vc,0,sizeof(vorbis_comment));
}
......@@ -151,7 +151,7 @@ void vorbis_info_clear(vorbis_info *vi){
if(ci){
for(i=0;i<ci->modes;i++)
if(ci->mode_param[i])free(ci->mode_param[i]);
if(ci->mode_param[i])_ogg_free(ci->mode_param[i]);
for(i=0;i<ci->maps;i++) /* unpack does the range checking */
_mapping_P[ci->map_type[i]]->free_info(ci->map_param[i]);
......@@ -175,7 +175,7 @@ void vorbis_info_clear(vorbis_info *vi){
for(i=0;i<ci->psys;i++)
_vi_psy_free(ci->psy_param[i]);
free(ci);
_ogg_free(ci);
}
memset(vi,0,sizeof(vorbis_info));
......@@ -515,7 +515,7 @@ int vorbis_analysis_headerout(vorbis_dsp_state *v,
if(_vorbis_pack_info(&opb,vi))goto err_out;
/* build the packet */
if(b->header)free(b->header);
if(b->header)_ogg_free(b->header);
b->header=_ogg_malloc(oggpack_bytes(&opb));
memcpy(b->header,opb.buffer,oggpack_bytes(&opb));
op->packet=b->header;
......@@ -529,7 +529,7 @@ int vorbis_analysis_headerout(vorbis_dsp_state *v,
oggpack_reset(&opb);
if(_vorbis_pack_comment(&opb,vc))goto err_out;
if(b->header1)free(b->header1);
if(b->header1)_ogg_free(b->header1);
b->header1=_ogg_malloc(oggpack_bytes(&opb));
memcpy(b->header1,opb.buffer,oggpack_bytes(&opb));
op_comm->packet=b->header1;
......@@ -543,7 +543,7 @@ int vorbis_analysis_headerout(vorbis_dsp_state *v,
oggpack_reset(&opb);
if(_vorbis_pack_books(&opb,vi))goto err_out;
if(b->header2)free(b->header2);
if(b->header2)_ogg_free(b->header2);
b->header2=_ogg_malloc(oggpack_bytes(&opb));
memcpy(b->header2,opb.buffer,oggpack_bytes(&opb));
op_code->packet=b->header2;
......@@ -560,9 +560,9 @@ int vorbis_analysis_headerout(vorbis_dsp_state *v,
memset(op_comm,0,sizeof(ogg_packet));
memset(op_code,0,sizeof(ogg_packet));
if(b->header)free(b->header);
if(b->header1)free(b->header1);
if(b->header2)free(b->header2);
if(b->header)_ogg_free(b->header);
if(b->header1)_ogg_free(b->header1);
if(b->header2)_ogg_free(b->header2);
b->header=NULL;
b->header1=NULL;
b->header2=NULL;
......
......@@ -12,7 +12,7 @@
********************************************************************
function: channel mapping 0 implementation
last mod: $Id: mapping0.c,v 1.18 2000/11/07 09:51:43 xiphmont Exp $
last mod: $Id: mapping0.c,v 1.19 2000/11/14 00:05:31 xiphmont Exp $
********************************************************************/
......@@ -67,7 +67,7 @@ static vorbis_info_mapping *mapping0_copy_info(vorbis_info_mapping *vm){
static void mapping0_free_info(vorbis_info_mapping *i){
if(i){
memset(i,0,sizeof(vorbis_info_mapping0));
free(i);
_ogg_free(i);
}
}
......@@ -84,20 +84,20 @@ static void mapping0_free_look(vorbis_look_mapping *look){
if(l->decay){
for(i=0;i<l->ch;i++){
if(l->decay[i])free(l->decay[i]);
if(l->decay[i])_ogg_free(l->decay[i]);
}
free(l->decay);
_ogg_free(l->decay);
}
free(l->time_func);
free(l->floor_func);
free(l->residue_func);
free(l->time_look);
free(l->floor_look);
free(l->residue_look);
if(l->psy_look)free(l->psy_look);
_ogg_free(l->time_func);
_ogg_free(l->floor_func);
_ogg_free(l->residue_func);
_ogg_free(l->time_look);
_ogg_free(l->floor_look);
_ogg_free(l->residue_look);
if(l->psy_look)_ogg_free(l->psy_look);
memset(l,0,sizeof(vorbis_look_mapping0));
free(l);
_ogg_free(l);
}
}
......
......@@ -13,7 +13,7 @@
function: normalized modified discrete cosine transform
power of two length transform only [16 <= n ]
last mod: $Id: mdct.c,v 1.18 2000/11/06 00:07:01 xiphmont Exp $
last mod: $Id: mdct.c,v 1.19 2000/11/14 00:05:31 xiphmont Exp $
Algorithm adapted from _The use of multirate filter banks for coding
of high quality digital audio_, by T. Sporer, K. Brandenburg and
......@@ -90,8 +90,8 @@ void mdct_init(mdct_lookup *lookup,int n){
void mdct_clear(mdct_lookup *l){
if(l){
if(l->trig)free(l->trig);
if(l->bitrev)free(l->bitrev);
if(l->trig)_ogg_free(l->trig);
if(l->bitrev)_ogg_free(l->bitrev);
memset(l,0,sizeof(mdct_lookup));
}
}
......
......@@ -42,11 +42,11 @@ static void *_insert(void *ptr,char *file,long line){
if(pinsert>=palloced){
palloced+=64;
if(pointers){
pointers=(void **)_ogg_realloc(pointers,sizeof(void **)*palloced);
insertlist=(long *)_ogg_realloc(insertlist,sizeof(long *)*palloced);
pointers=(void **)realloc(pointers,sizeof(void **)*palloced);
insertlist=(long *)realloc(insertlist,sizeof(long *)*palloced);
}else{
pointers=(void **)_ogg_malloc(sizeof(void **)*palloced);
insertlist=(long *)_ogg_malloc(sizeof(long *)*palloced);
pointers=(void **)malloc(sizeof(void **)*palloced);
insertlist=(long *)malloc(sizeof(long *)*palloced);
}
}
......@@ -84,14 +84,14 @@ void _VDBG_dump(void){
pthread_mutex_unlock(&memlock);
}
extern void *_VDBG__ogg_malloc(void *ptr,long bytes,char *file,long line){
extern void *_VDBG_malloc(void *ptr,long bytes,char *file,long line){
bytes+=HEAD_ALIGN;
if(ptr){
ptr-=HEAD_ALIGN;
_ripremove(ptr);
ptr=_ogg_realloc(ptr,bytes);
ptr=realloc(ptr,bytes);
}else{
ptr=_ogg_malloc(bytes);
ptr=malloc(bytes);
memset(ptr,0,bytes);
}
return _insert(ptr,file,line);
......
......@@ -12,7 +12,7 @@
********************************************************************
function: miscellaneous prototypes
last mod: $Id: misc.h,v 1.6 2000/11/06 00:07:01 xiphmont Exp $
last mod: $Id: misc.h,v 1.7 2000/11/14 00:05:31 xiphmont Exp $
********************************************************************/
......@@ -25,19 +25,19 @@ extern void _vorbis_block_ripcord(vorbis_block *vb);
extern void _analysis_output(char *base,int i,float *v,int n,int bark,int dB);
#ifdef DEBUG_LEAKS
extern void *_VDBG__ogg_malloc(void *ptr,long bytes,char *file,long line);
extern void *_VDBG_malloc(void *ptr,long bytes,char *file,long line);
extern void _VDBG_free(void *ptr,char *file,long line);
#ifndef MISC_C
#undef _ogg_malloc
#undef _ogg_calloc
#undef _ogg_realloc
#undef free
#undef _ogg_free
#define _ogg_malloc(x) _VDBG__ogg_malloc(NULL,(x),__FILE__,__LINE__)
#define _ogg_calloc(x,y) _VDBG__ogg_malloc(NULL,(x)*(y),__FILE__,__LINE__)
#define _ogg_realloc(x,y) _VDBG__ogg_malloc((x),(y),__FILE__,__LINE__)
#define free(x) _VDBG_free((x),__FILE__,__LINE__)
#define _ogg_free(x) _VDBG__ogg_free((x),__FILE__,__LINE__)
#endif
#endif
......
......@@ -12,7 +12,7 @@
********************************************************************
function: predefined encoding modes
last mod: $Id: mode_A.h,v 1.3 2000/11/08 06:08:16 xiphmont Exp $
last mod: $Id: mode_A.h,v 1.4 2000/11/14 00:05:35 xiphmont Exp $
********************************************************************/
......@@ -129,7 +129,7 @@ static vorbis_info_psy _psy_set_A={
/* with GNUisms, this could be short and readable. Oh well */
static vorbis_info_time0 _time_set0A={0};
static vorbis_info_floor0 _floor_set0A={12, 44100, 64, 12,150, 1, {0} };
static vorbis_info_floor0 _floor_set0A={30, 44100, 256, 12,150, 1, {1} };
static vorbis_info_floor0 _floor_set1A={30, 44100, 256, 12,150, 1, {1} };
static vorbis_info_residue0 _residue_set0A={0,128, 32,6,2,
{0,1,1,1,1,1},
......
......@@ -12,7 +12,7 @@
********************************************************************
function: predefined encoding modes
last mod: $Id: mode_D.h,v 1.3 2000/11/08 13:16:33 xiphmont Exp $
last mod: $Id: mode_D.h,v 1.4 2000/11/14 00:05:35 xiphmont Exp $
********************************************************************/
......@@ -107,7 +107,7 @@ static vorbis_info_psy _psy_set_256 ={
/* with GNUisms, this could be short and readable. Oh well */
static vorbis_info_time0 _time_set0_256={0};
static vorbis_info_floor0 _floor_set0_256={12, 44100, 64, 12,150, 1, {0} };
static vorbis_info_floor0 _floor_set0_256={30, 44100, 256, 12,150, 1, {1} };
static vorbis_info_floor0 _floor_set1_256={30, 44100, 256, 12,150, 1, {1} };
static vorbis_info_residue0 _residue_set0_256={0,128, 32,6,2,
{0,1,1,1,1,1},
......@@ -172,7 +172,7 @@ codec_setup_info info_D={
/* psy */
{&_psy_set_256},
/* thresh sample period, preecho clamp trigger threshhold, range, minenergy */
256, 24, 6, -96.
256, 0, 6, -96.
};
#define PREDEF_INFO_MAX 0
......
......@@ -12,7 +12,7 @@
********************************************************************
function: psychoacoustics not including preecho
last mod: $Id: psy.c,v 1.31 2000/11/08 06:08:11 xiphmont Exp $
last mod: $Id: psy.c,v 1.32 2000/11/14 00:05:31 xiphmont Exp $
********************************************************************/
......@@ -37,7 +37,7 @@
void _vi_psy_free(vorbis_info_psy *i){
if(i){
memset(i,0,sizeof(vorbis_info_psy));
free(i);
_ogg_free(i);
}
}
......@@ -290,20 +290,20 @@ void _vp_psy_init(vorbis_look_psy *p,vorbis_info_psy *vi,int n,long rate){
void _vp_psy_clear(vorbis_look_psy *p){
int i,j;
if(p){
if(p->ath)free(p->ath);
if(p->octave)free(p->octave);
if(p->ath)_ogg_free(p->ath);
if(p->octave)_ogg_free(p->octave);
if(p->tonecurves){
for(i=0;i<P_BANDS;i++){
for(j=0;j<P_LEVELS;j++){
free(p->tonecurves[i][j]);
_ogg_free(p->tonecurves[i][j]);
}
free(p->noiseatt[i]);
free(p->tonecurves[i]);
free(p->peakatt[i]);
_ogg_free(p->noiseatt[i]);
_ogg_free(p->tonecurves[i]);
_ogg_free(p->peakatt[i]);
}
free(p->tonecurves);
free(p->noiseatt);
free(p->peakatt);
_ogg_free(p->tonecurves);
_ogg_free(p->noiseatt);
_ogg_free(p->peakatt);
}
memset(p,0,sizeof(vorbis_look_psy));
}
......
......@@ -13,7 +13,7 @@
function: simple utility that runs audio through the psychoacoustics
without encoding
last mod: $Id: psytune.c,v 1.9 2000/11/08 06:08:12 xiphmont Exp $
last mod: $Id: psytune.c,v 1.10 2000/11/14 00:05:31 xiphmont Exp $
********************************************************************/
......@@ -44,7 +44,7 @@ static vorbis_info_psy _psy_set0={
/* x: 63 88 125 175 250 350 500 700 1k 1.4k 2k 2.8k 4k 5.6k 8k 11.5k 16k Hz */
/* y: 0 10 20 30 40 50 60 70 80 90 100 dB */
1,/* tonemaskp */
0,/* tonemaskp */
/* 0 10 20 30 40 50 60 70 80 90 100 */
{{-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*63*/
{-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*88*/
......@@ -65,7 +65,7 @@ static vorbis_info_psy _psy_set0={
{-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*16000*/
},
0,/* peakattp */
1,/* peakattp */
{{-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*63*/
{-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*88*/
{-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*125*/
......
......@@ -12,7 +12,7 @@
********************************************************************
function: residue backend 0 implementation
last mod: $Id: res0.c,v 1.20 2000/11/08 13:16:27 xiphmont Exp $
last mod: $Id: res0.c,v 1.21 2000/11/14 00:05:31 xiphmont Exp $
********************************************************************/
......@@ -55,7 +55,7 @@ vorbis_info_residue *res0_copy_info(vorbis_info_residue *vr){
void res0_free_info(vorbis_info_residue *i){
if(i){
memset(i,0,sizeof(vorbis_info_residue0));
free(i);
_ogg_free(i);
}
}
......@@ -64,13 +64,13 @@ void res0_free_look(vorbis_look_residue *i){
if(i){
vorbis_look_residue0 *look=(vorbis_look_residue0 *)i;
for(j=0;j<look->parts;j++)
if(look->partbooks[j])free(look->partbooks[j]);
free(look->partbooks);
if(look->partbooks[j])_ogg_free(look->partbooks[j]);
_ogg_free(look->partbooks);
for(j=0;j<look->partvals;j++)
free(look->decodemap[j]);
free(look->decodemap);
_ogg_free(look->decodemap[j]);
_ogg_free(look->decodemap);
memset(i,0,sizeof(vorbis_look_residue0));
free(i);
_ogg_free(i);
}
}
......
......@@ -12,7 +12,7 @@
********************************************************************
function: basic shared codebook operations
last mod: $Id: sharedbook.c,v 1.11 2000/11/08 13:16:27 xiphmont Exp $
last mod: $Id: sharedbook.c,v 1.12 2000/11/14 00:05:31 xiphmont Exp $
********************************************************************/
......@@ -89,7 +89,7 @@ long *_make_words(long *l,long n){
/* update ourself */
if(length<32 && (entry>>length)){
/* error condition; the lengths must specify an overpopulated tree */
free(r);
_ogg_free(r);
return(NULL);
}
r[i]=entry;
......@@ -171,7 +171,7 @@ decode_aux *_make_decode_tree(codebook *c){
ptr1[ptr]=-i;
}
}