for (i=0;i<st->frameSize;i++)
for (i=0;i<st->subframeSize;i++)
void encode(EncState *st, float *in, int *outSize, void *bits){   int i, j, sub, roots;   float error;   /* Copy new data in input buffer */   memmove(st->inBuf, st->inBuf+st->frameSize, (st->bufSize-st->frameSize)*sizeof(float));   for (i=0;i<st->frameSize;i++)      st->inBuf[st->bufSize-st->frameSize+i] = in[i];   memmove(st->wBuf, st->wBuf+st->frameSize, (st->bufSize-st->frameSize)*sizeof(float));   /* Window for analysis */   for (i=0;i<st->windowSize;i++)      st->buf2[i] = st->frame[i] * st->window[i];   /* Compute auto-correlation */   autocorr(st->buf2, st->autocorr, st->lpcSize+1, st->windowSize);   st->autocorr[0] += 1;        /* prevents NANs */   st->autocorr[0] *= 1.0001;   /* 40 dB noise floor */   /* Perform lag windowing here, equivalent to filtering in the power-spectrum domain */   for (i=0;i<st->lpcSize+1;i++)      st->autocorr[i] *= st->lagWindow[i];   /* Levinson-Durbin */   /*for (i=0;i<st->lpcSize+1;i++)      printf("%f ", st->autocorr[i]);   printf ("\n");   */   error = wld(st->lpc+1, st->autocorr, st->rc, st->lpcSize);   st->lpc[0]=1;   /*for (i=0;i<st->lpcSize+1;i++)     printf("%f ", st->lpc[i]);   printf ("\n");*/   printf ("prediction error = %f, R[0] = %f, gain = %f\n", error, st->autocorr[0], st->autocorr[0]/error);   /* LPC to LSPs (x-domain) transform */   roots=lpc_to_lsp (st->lpc, st->lpcSize, st->lsp, 6, 0.02);   if (roots!=st->lpcSize)   {      fprintf (stderr, "roots!=st->lpcSize\n");      exit(1);   }   /*for (i=0;i<roots;i++)      printf("%f ", st->lsp[i]);      printf ("\n\n");*/   /* Quantize LSPs */   for (sub=0;sub<st->nbSubframes;sub++)   {      float tmp;      /* LSP interpolation */      tmp = (.5 + sub)/st->nbSubframes;      for (i=0;i<st->lpcSize;i++)         st->interp_lsp[i] = (1-tmp)*st->old_lsp[i] + tmp*st->lsp[i];      /* Compute interpolated LPCs */      lsp_to_lpc(st->interp_lsp, st->interp_lpc, st->lpcSize);      /*for (i=0;i<st->lpcSize+1;i++)         printf("%f ", st->interp_lpc[i]);      printf ("\n");      */      /* Compute bandwidth-expanded LPCs for perceptual weighting*/      tmp=1;      for (i=0;i<st->lpcSize+1;i++)      {         st->bw_lpc[i] = tmp * st->interp_lpc[i];         tmp *= st->gamma;      }      /*for (i=0;i<st->lpcSize+1;i++)         printf("%f ", st->bw_lpc[i]);         printf ("\n");*/      /* Compute perceptualy weighted residue */            for (i=0;i<st->frameSize;i++)      {         st->wframe[i]=st->frame[i];         for (j=1;j<st->lpcSize+1;j++)            st->wframe[i] += st->frame[i-j]*st->bw_lpc[j];      }      /* Find pitch gain and delay */   }   printf ("\n");   for (i=0;i<st->lpcSize;i++)      st->old_lsp[i] = st->lsp[i];   st->first = 0;}