Lines Matching refs:filt_len
126 spx_uint32_t filt_len;
335 const int N = st->filt_len;
393 const int N = st->filt_len;
442 const int N = st->filt_len;
505 const int N = st->filt_len;
609 spx_uint32_t old_length = st->filt_len;
618 st->filt_len = quality_map[st->quality].base_length;
624 if (multiply_frac(&st->filt_len,st->filt_len,st->num_rate,st->den_rate) != RESAMPLER_ERR_SUCCESS)
627 st->filt_len = ((st->filt_len-1)&(~0x7))+8;
645 if (INT_MAX/sizeof(spx_word16_t)/st->den_rate < st->filt_len)
649 use_direct = st->filt_len*st->den_rate <= st->filt_len*st->oversample+8
650 && INT_MAX/sizeof(spx_word16_t)/st->den_rate >= st->filt_len;
654 min_sinc_table_length = st->filt_len*st->den_rate;
656 if ((INT_MAX/sizeof(spx_word16_t)-8)/st->oversample < st->filt_len)
659 min_sinc_table_length = st->filt_len*st->oversample+8;
676 for (j=0;j<st->filt_len;j++)
678 st->sinc_table[i*st->filt_len+j] = sinc(st->cutoff,((j-(spx_int32_t)st->filt_len/2+1)-((float)i)/st->den_rate), st->filt_len, quality_map[st->quality].window_func);
692 for (i=-4;i<(spx_int32_t)(st->oversample*st->filt_len+4);i++)
693 st->sinc_table[i+4] = sinc(st->cutoff,(i/(float)st->oversample - st->filt_len/2), st->filt_len, quality_map[st->quality].window_func);
709 /* Adding buffer_size to filt_len won't overflow here because filt_len
711 min_alloc_size = st->filt_len-1 + st->buffer_size;
729 } else if (st->filt_len > old_length)
750 if (st->filt_len > olen)
755 st->mem[i*st->mem_alloc_size+(st->filt_len-2-j)] = st->mem[i*st->mem_alloc_size+(olen-2-j)];
757 for (;j<st->filt_len-1;j++)
758 st->mem[i*st->mem_alloc_size+(st->filt_len-2-j)] = 0;
760 st->last_sample[i] += (st->filt_len - olen)/2;
763 st->magic_samples[i] = (olen - st->filt_len)/2;
764 for (j=0;j<st->filt_len-1+st->magic_samples[i];j++)
768 } else if (st->filt_len < old_length)
777 st->magic_samples[i] = (old_length - st->filt_len)/2;
780 for (j=0;j<st->filt_len-1+st->magic_samples[i]+old_magic;j++)
790 Restore filt_len so that filt_len - 1 still points to the position after
792 st->filt_len = old_length;
828 st->filt_len = 0;
883 const int N = st->filt_len;
909 const int N = st->filt_len;
936 const int filt_offs = st->filt_len - 1;
979 const spx_uint32_t xlen = st->mem_alloc_size - (st->filt_len - 1);
1005 x[j+st->filt_len-1]=WORD2INT(in[j*istride_save]);
1007 x[j+st->filt_len-1]=in[j*istride_save];
1011 x[j+st->filt_len-1]=0;
1194 return st->filt_len / 2;
1199 return ((st->filt_len / 2) * st->den_rate + (st->num_rate >> 1)) / st->num_rate;
1206 st->last_sample[i] = st->filt_len/2;