Skip to main content

Topic: which size of gmdct massive in coder function mapping0_forward(vorbis_ (Read 1647 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • ID23cat
  • [*]
which size of gmdct massive in coder function mapping0_forward(vorbis_
Can anybody answer me which size of gmdct* massive in encoder function mapping0_forward(vorbis_block *vb) in file mapping0.c

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

here code of allocatig function:
Code: [Select]
void *_vorbis_block_alloc(vorbis_block *vb,long bytes){
  bytes=(bytes+(WORD_ALIGN-1)) & ~(WORD_ALIGN-1);
    /* can't just _ogg_realloc... there are outstanding pointers */
      struct alloc_chain *link=_ogg_malloc(sizeof(*link));
    /* highly conservative */
    void *ret=(void *)(((char *)vb->localstore)+vb->localtop);
    return ret;

After making mdct
Code: [Select]
I try to print all of the result coefficients to file for analyse in cycle:
Code: [Select]
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
  • Last Edit: 14 September, 2009, 09:51:48 AM by ID23cat