Lines Matching refs:vd
208 int vorbis_dsp_synthesis(vorbis_dsp_state *vd,ogg_packet *op,int decodep){ in vorbis_dsp_synthesis() argument
209 vorbis_info *vi=vd->vi; in vorbis_dsp_synthesis()
213 oggpack_readinit(&vd->opb,op->packet); in vorbis_dsp_synthesis()
216 if(oggpack_read(&vd->opb,1)!=0){ in vorbis_dsp_synthesis()
222 mode=oggpack_read(&vd->opb,ilog(ci->modes)); in vorbis_dsp_synthesis()
226 vd->lW=vd->W; in vorbis_dsp_synthesis()
227 vd->W=ci->mode_param[mode].blockflag; in vorbis_dsp_synthesis()
229 mdct_shift_right(ci->blocksizes[vd->lW],vd->work[i],vd->mdctright[i]); in vorbis_dsp_synthesis()
231 if(vd->W){ in vorbis_dsp_synthesis()
233 oggpack_read(&vd->opb,1); in vorbis_dsp_synthesis()
234 temp=oggpack_read(&vd->opb,1); in vorbis_dsp_synthesis()
240 mapping_inverse(vd,ci->map_param+ci->mode_param[mode].mapping); in vorbis_dsp_synthesis()
242 if(vd->out_begin==-1){ in vorbis_dsp_synthesis()
243 vd->out_begin=0; in vorbis_dsp_synthesis()
244 vd->out_end=0; in vorbis_dsp_synthesis()
246 vd->out_begin=0; in vorbis_dsp_synthesis()
247 vd->out_end=ci->blocksizes[vd->lW]/4+ci->blocksizes[vd->W]/4; in vorbis_dsp_synthesis()
261 if(vd->sequence==-1 || vd->sequence+1 != op->packetno-3){ in vorbis_dsp_synthesis()
263 vd->granulepos=-1; in vorbis_dsp_synthesis()
264 vd->sample_count=-1; in vorbis_dsp_synthesis()
267 vd->sequence=op->packetno; in vorbis_dsp_synthesis()
268 vd->sequence=vd->sequence-3; in vorbis_dsp_synthesis()
270 if(vd->sample_count==-1){ in vorbis_dsp_synthesis()
271 vd->sample_count=0; in vorbis_dsp_synthesis()
273 vd->sample_count+= in vorbis_dsp_synthesis()
274 ci->blocksizes[vd->lW]/4+ci->blocksizes[vd->W]/4; in vorbis_dsp_synthesis()
277 if(vd->granulepos==-1){ in vorbis_dsp_synthesis()
281 vd->granulepos=op->granulepos; in vorbis_dsp_synthesis()
284 if(vd->sample_count>vd->granulepos){ in vorbis_dsp_synthesis()
294 vd->out_end-=(int)(vd->sample_count-vd->granulepos); in vorbis_dsp_synthesis()
297 vd->out_begin+=(int)(vd->sample_count-vd->granulepos); in vorbis_dsp_synthesis()
298 if(vd->out_begin>vd->out_end) in vorbis_dsp_synthesis()
299 vd->out_begin=vd->out_end; in vorbis_dsp_synthesis()
306 vd->granulepos+= in vorbis_dsp_synthesis()
307 ci->blocksizes[vd->lW]/4+ci->blocksizes[vd->W]/4; in vorbis_dsp_synthesis()
308 if(op->granulepos!=-1 && vd->granulepos!=op->granulepos){ in vorbis_dsp_synthesis()
310 if(vd->granulepos>op->granulepos){ in vorbis_dsp_synthesis()
311 long extra=(long)(vd->granulepos-op->granulepos); in vorbis_dsp_synthesis()
316 vd->out_end-=extra; in vorbis_dsp_synthesis()
321 vd->granulepos=op->granulepos; in vorbis_dsp_synthesis()