• Home
  • Raw
  • Download

Lines Matching refs:vb

88 int vorbis_block_init(vorbis_dsp_state *v, vorbis_block *vb){  in vorbis_block_init()  argument
90 memset(vb,0,sizeof(*vb)); in vorbis_block_init()
91 vb->vd=v; in vorbis_block_init()
92 vb->localalloc=0; in vorbis_block_init()
93 vb->localstore=NULL; in vorbis_block_init()
96 vb->internal=_ogg_calloc(1,sizeof(vorbis_block_internal)); in vorbis_block_init()
101 vbi->packetblob[i]=&vb->opb; in vorbis_block_init()
113 void *_vorbis_block_alloc(vorbis_block *vb,long bytes){ in _vorbis_block_alloc() argument
115 if(bytes+vb->localtop>vb->localalloc){ in _vorbis_block_alloc()
117 if(vb->localstore){ in _vorbis_block_alloc()
119 vb->totaluse+=vb->localtop; in _vorbis_block_alloc()
120 link->next=vb->reap; in _vorbis_block_alloc()
121 link->ptr=vb->localstore; in _vorbis_block_alloc()
122 vb->reap=link; in _vorbis_block_alloc()
125 vb->localalloc=bytes; in _vorbis_block_alloc()
126 vb->localstore=_ogg_malloc(vb->localalloc); in _vorbis_block_alloc()
127 vb->localtop=0; in _vorbis_block_alloc()
130 void *ret=(void *)(((char *)vb->localstore)+vb->localtop); in _vorbis_block_alloc()
131 vb->localtop+=bytes; in _vorbis_block_alloc()
137 void _vorbis_block_ripcord(vorbis_block *vb){ in _vorbis_block_ripcord() argument
139 struct alloc_chain *reap=vb->reap; in _vorbis_block_ripcord()
148 if(vb->totaluse){ in _vorbis_block_ripcord()
149 vb->localstore=_ogg_realloc(vb->localstore,vb->totaluse+vb->localalloc); in _vorbis_block_ripcord()
150 vb->localalloc+=vb->totaluse; in _vorbis_block_ripcord()
151 vb->totaluse=0; in _vorbis_block_ripcord()
155 vb->localtop=0; in _vorbis_block_ripcord()
156 vb->reap=NULL; in _vorbis_block_ripcord()
159 int vorbis_block_clear(vorbis_block *vb){ in vorbis_block_clear() argument
161 vorbis_block_internal *vbi=vb->internal; in vorbis_block_clear()
163 _vorbis_block_ripcord(vb); in vorbis_block_clear()
164 if(vb->localstore)_ogg_free(vb->localstore); in vorbis_block_clear()
173 memset(vb,0,sizeof(*vb)); in vorbis_block_clear()
523 int vorbis_analysis_blockout(vorbis_dsp_state *v,vorbis_block *vb){ in vorbis_analysis_blockout() argument
530 vorbis_block_internal *vbi=(vorbis_block_internal *)vb->internal; in vorbis_analysis_blockout()
581 _vorbis_block_ripcord(vb); in vorbis_analysis_blockout()
582 vb->lW=v->lW; in vorbis_analysis_blockout()
583 vb->W=v->W; in vorbis_analysis_blockout()
584 vb->nW=v->nW; in vorbis_analysis_blockout()
606 vb->vd=v; in vorbis_analysis_blockout()
607 vb->sequence=v->sequence++; in vorbis_analysis_blockout()
608 vb->granulepos=v->granulepos; in vorbis_analysis_blockout()
609 vb->pcmend=ci->blocksizes[v->W]; in vorbis_analysis_blockout()
619 vb->pcm=_vorbis_block_alloc(vb,sizeof(*vb->pcm)*vi->channels); in vorbis_analysis_blockout()
620 vbi->pcmdelay=_vorbis_block_alloc(vb,sizeof(*vbi->pcmdelay)*vi->channels); in vorbis_analysis_blockout()
623 _vorbis_block_alloc(vb,(vb->pcmend+beginW)*sizeof(*vbi->pcmdelay[i])); in vorbis_analysis_blockout()
624 memcpy(vbi->pcmdelay[i],v->pcm[i],(vb->pcmend+beginW)*sizeof(*vbi->pcmdelay[i])); in vorbis_analysis_blockout()
625 vb->pcm[i]=vbi->pcmdelay[i]+beginW; in vorbis_analysis_blockout()
641 vb->eofflag=1; in vorbis_analysis_blockout()
720 int vorbis_synthesis_blockin(vorbis_dsp_state *v,vorbis_block *vb){ in vorbis_synthesis_blockin() argument
727 if(!vb)return(OV_EINVAL); in vorbis_synthesis_blockin()
731 v->W=vb->W; in vorbis_synthesis_blockin()
735 (v->sequence+1 != vb->sequence)){ in vorbis_synthesis_blockin()
740 v->sequence=vb->sequence; in vorbis_synthesis_blockin()
742 if(vb->pcm){ /* no pcm to process if vorbis_synthesis_trackonly in vorbis_synthesis_blockin()
751 v->glue_bits+=vb->glue_bits; in vorbis_synthesis_blockin()
752 v->time_bits+=vb->time_bits; in vorbis_synthesis_blockin()
753 v->floor_bits+=vb->floor_bits; in vorbis_synthesis_blockin()
754 v->res_bits+=vb->res_bits; in vorbis_synthesis_blockin()
775 float *p=vb->pcm[j]; in vorbis_synthesis_blockin()
782 float *p=vb->pcm[j]; in vorbis_synthesis_blockin()
791 float *p=vb->pcm[j]+n1/2-n0/2; in vorbis_synthesis_blockin()
800 float *p=vb->pcm[j]; in vorbis_synthesis_blockin()
809 float *p=vb->pcm[j]+n; in vorbis_synthesis_blockin()
854 if(vb->granulepos!=-1){ /* only set if we have a position to set to */ in vorbis_synthesis_blockin()
856 v->granulepos=vb->granulepos; in vorbis_synthesis_blockin()
862 if(vb->eofflag){ in vorbis_synthesis_blockin()
882 if(vb->granulepos!=-1 && v->granulepos!=vb->granulepos){ in vorbis_synthesis_blockin()
884 if(v->granulepos>vb->granulepos){ in vorbis_synthesis_blockin()
885 long extra=v->granulepos-vb->granulepos; in vorbis_synthesis_blockin()
888 if(vb->eofflag){ in vorbis_synthesis_blockin()
895 v->granulepos=vb->granulepos; in vorbis_synthesis_blockin()
901 if(vb->eofflag)v->eofflag=1; in vorbis_synthesis_blockin()