float dist;
spx_word32_t dist;
static int lsp_weight_quant(spx_word16_t *x, spx_word16_t *weight, signed char *cdbk, int nbVec, int nbDim){   int i,j;   float dist;   spx_word16_t tmp;   float best_dist=0;   int best_id=0;   signed char *ptr=cdbk;   for (i=0;i<nbVec;i++)   {      dist=0;      for (j=0;j<nbDim;j++)      {         tmp=(x[j]-SHL((spx_word16_t)*ptr++,5));         dist+=MULT16_32_Q15(weight[j],MULT16_16(tmp,tmp));      }      if (dist<best_dist || i==0)      {         best_dist=dist;         best_id=i;      }   }      for (j=0;j<nbDim;j++)      x[j] -= SHL((spx_word16_t)cdbk[best_id*nbDim+j],5);   return best_id;}