IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
which size of gmdct massive in coder function mapping0_forward(vorbis_
ID23cat
post Sep 14 2009, 14:35
Post #1





Group: Members
Posts: 1
Joined: 14-September 09
Member No.: 73183



Can anybody answer me which size of gmdct[i]* massive in encoder function mapping0_forward(vorbis_block *vb) in file mapping0.c

here in the mapping0_forward function allocation memory for gmdct: gmdct[i]=_vorbis_block_alloc(vb,n/2*sizeof(**gmdct));

here code of allocatig function:
CODE
void *_vorbis_block_alloc(vorbis_block *vb,long bytes){
  bytes=(bytes+(WORD_ALIGN-1)) & ~(WORD_ALIGN-1);
  if(bytes+vb->localtop>vb->localalloc){
    /* can't just _ogg_realloc... there are outstanding pointers */
    if(vb->localstore){
      struct alloc_chain *link=_ogg_malloc(sizeof(*link));
      vb->totaluse+=vb->localtop;
      link->next=vb->reap;
      link->ptr=vb->localstore;
      vb->reap=link;
    }
    /* highly conservative */
    vb->localalloc=bytes;
    vb->localstore=_ogg_malloc(vb->localalloc);
    vb->localtop=0;
  }
  {
    void *ret=(void *)(((char *)vb->localstore)+vb->localtop);
    vb->localtop+=bytes;
    return ret;
  }
}

After making mdct
CODE
mdct_forward(b->transform[vb->W][0],pcm,gmdct[i]);
I try to print all of the result coefficients to file for analyse in cycle:
CODE
for(l=0; l<vb->localalloc; l++)

for small windows with vb->localalloc=512 it works corectly, but for big window (4096) it breaks out with exception in the 1286 iteration

This post has been edited by ID23cat: Sep 14 2009, 14:51
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 27th December 2014 - 19:52