Home | History | Annotate | Download | only in lib

Lines Matching full:framesize

239   int framesize=2048;
269 framesize=atoi(argv[0]);
276 pcm[0]=_ogg_malloc(framesize*sizeof(float));
277 pcm[1]=_ogg_malloc(framesize*sizeof(float));
278 out[0]=_ogg_calloc(framesize/2,sizeof(float));
279 out[1]=_ogg_calloc(framesize/2,sizeof(float));
280 work[0]=_ogg_calloc(framesize,sizeof(float));
281 work[1]=_ogg_calloc(framesize,sizeof(float));
282 flr[0]=_ogg_calloc(framesize/2,sizeof(float));
283 flr[1]=_ogg_calloc(framesize/2,sizeof(float));
284 buffer=_ogg_malloc(framesize*4);
285 buffer2=buffer+framesize*2;
286 window=_vorbis_window_create(0,framesize,framesize/2,framesize/2);
287 mdct_init(&m_look,framesize);
288 drft_init(&f_look,framesize);
289 _vp_psy_init(&p_look,&_psy_set0,&_psy_set0G,framesize/2,44100);
298 memset(buffer,0,framesize*2);
300 analysis("window",0,window,framesize,0,0);
302 fprintf(stderr,"Processing for frame size %d...\n",framesize);
305 long bytes=fread(buffer2,1,framesize*2,stdin);
306 if(bytes<framesize*2)
307 memset(buffer2+bytes,0,framesize*2-bytes);
313 for(i=0;i<framesize;i++){
321 float secs=framesize/44100.;
328 float scale=4.f/framesize;
331 float *logmdct=mdct+framesize/2;
333 analysis("pre",frameno+i,pcm[i],framesize,0,0);
336 for(j=0;j<framesize;j++)
344 for(j=1;j<framesize-1;j+=2){
352 for(j=0;j<framesize/2;j++)
355 analysis("mdct",frameno+i,logmdct,framesize/2,1,0);
356 analysis("fft",frameno+i,fft,framesize/2,1,0);
364 float *logmdct=mdct+framesize/2;
365 float *mask=fft+framesize/2;
376 framesize/2);
378 analysis("mask",frameno+i,mask,framesize/2,1,0);
386 vb.pcmend=framesize;
406 for(j=0;j<framesize/2;j++)
410 analysis("res",frameno+i,pcm[i],framesize/2,1,0);
411 analysis("codedflr",frameno+i,flr[i],framesize/2,1,1);
421 analysis("quant",frameno+i,pcm[i],framesize/2,1,0);
431 analysis("coupled",frameno+i,pcm[i],framesize/2,1,0);
438 for(j=0;j<framesize/2;j++){
462 analysis("decoupled",frameno+i,pcm[i],framesize/2,1,0);
467 for(j=0;j<framesize/2;j++)
470 analysis("final",frameno+i,pcm[i],framesize/2,1,1);
475 for(j=0;j<framesize/2;j++)
478 analysis("out",frameno+i,out[i],framesize/2,0,0);
488 for(j=0;j<framesize/2;j++){
508 fwrite(buffer,1,framesize*2,stdout);
509 memmove(buffer,buffer2,framesize*2);
512 for(j=0,k=framesize/2;j<framesize/2;j++,k++)
520 fprintf(stderr,"average nonzero samples: %.03g/%d\n",nonz/tot*framesize/2,
521 framesize/2);