[MPlayer-dev-eng] [PATCH] af_scaletempo

JustFillBug mozbugbox at yahoo.com.au
Wed Sep 26 04:42:19 CEST 2007


On 2007-09-24, Robert Juliano <juliano.1 at osu.edu> wrote:
> +
> +int _best_overlap_offset_float(af_scaletempo_t* s) {
> +  float *pw, *po, *ppc, *search_start;
> +  float best_corr = INT_MIN;
> +  int best_off = 0;
> +  int i, off;
> +
> +  pw  = (float*)s->table_window;
> +  po  = (float*)s->buf_overlap;
> +  ppc = (float*)s->buf_pre_corr;
> +  for (i=0; i<s->samples_overlap; i++) {
> +    *ppc++ = *pw++ * *po++;
> +  }

It seems that the correlation of the overlap point was used to find the
best fit. Maybe using a standard deviation for all the overlapped sample
is a better way to find a best fit?

       int pww = pw++;
       int poo = po++;
       for (j=0; j < s->samples_overlap - i; j++) {
           *ppc+= *pww++ * *poo++;
       }
       ppc++

Though, speed is a concern.




More information about the MPlayer-dev-eng mailing list