Home | History | Annotate | Download | only in libspeex

Lines Matching refs:frame_size

133    int frame_size;           /**< Number of samples processed each time */
402 EXPORT SpeexEchoState *speex_echo_state_init(int frame_size, int filter_length)
404 return speex_echo_state_init_mc(frame_size, filter_length, 1, 1);
407 EXPORT SpeexEchoState *speex_echo_state_init_mc(int frame_size, int filter_length, int nb_mic, int nb_speakers)
424 st->frame_size = frame_size;
425 st->window_size = 2*frame_size;
427 M = st->M = (filter_length+st->frame_size-1)/frame_size;
434 st->spec_average = DIV32_16(SHL32(EXTEND32(st->frame_size), 15), st->sampling_rate);
436 st->beta0 = DIV32_16(SHL32(EXTEND32(st->frame_size), 16), st->sampling_rate);
437 st->beta_max = DIV32_16(SHL32(EXTEND32(st->frame_size), 14), st->sampling_rate);
439 st->beta0 = (2.0f*st->frame_size)/st->sampling_rate;
440 st->beta_max = (.5f*st->frame_size)/st->sampling_rate;
448 st->input = (spx_word16_t*)speex_alloc(C*st->frame_size*sizeof(spx_word16_t));
451 st->Yf = (spx_word32_t*)speex_alloc((st->frame_size+1)*sizeof(spx_word32_t));
452 st->Rf = (spx_word32_t*)speex_alloc((st->frame_size+1)*sizeof(spx_word32_t));
453 st->Xf = (spx_word32_t*)speex_alloc((st->frame_size+1)*sizeof(spx_word32_t));
454 st->Yh = (spx_word32_t*)speex_alloc((st->frame_size+1)*sizeof(spx_word32_t));
455 st->Eh = (spx_word32_t*)speex_alloc((st->frame_size+1)*sizeof(spx_word32_t));
465 st->power = (spx_word32_t*)speex_alloc((frame_size+1)*sizeof(spx_word32_t));
466 st->power_1 = (spx_float_t*)speex_alloc((frame_size+1)*sizeof(spx_float_t));
481 for (i=0;i<=st->frame_size;i++)
522 st->play_buf = (spx_int16_t*)speex_alloc(K*(PLAYBACK_DELAY+1)*st->frame_size*sizeof(spx_int16_t));
523 st->play_buf_pos = PLAYBACK_DELAY*st->frame_size;
547 for (i=0;i<=st->frame_size;i++)
554 for (i=0;i<st->frame_size;i++)
581 for (i=0;i<3*st->frame_size;i++)
583 st->play_buf_pos = PLAYBACK_DELAY*st->frame_size;
639 /*speex_warning_int("capture with fill level ", st->play_buf_pos/st->frame_size);*/
641 if (st->play_buf_pos>=st->frame_size)
644 st->play_buf_pos -= st->frame_size;
646 st->play_buf[i] = st->play_buf[i+st->frame_size];
654 for (i=0;i<st->frame_size;i++)
661 /*speex_warning_int("playback with fill level ", st->play_buf_pos/st->frame_size);*/
667 if (st->play_buf_pos<=PLAYBACK_DELAY*st->frame_size)
670 for (i=0;i<st->frame_size;i++)
672 st->play_buf_pos += st->frame_size;
673 if (st->play_buf_pos <= (PLAYBACK_DELAY-1)*st->frame_size)
676 for (i=0;i<st->frame_size;i++)
678 st->play_buf_pos += st->frame_size;
725 filter_dc_notch16(in+chan, st->notch_radius, st->input+chan*st->frame_size, st->frame_size, st->notch_mem+2*chan, C);
728 for (i=0;i<st->frame_size;i++)
732 tmp32 = SUB32(EXTEND32(st->input[chan*st->frame_size+i]), EXTEND32(MULT16_16_P15(st->preemph, st->memD[chan])));
747 st->memD[chan] = st->input[chan*st->frame_size+i];
748 st->input[chan*st->frame_size+i] = EXTRACT16(tmp32);
754 for (i=0;i<st->frame_size;i++)
757 st->x[speak*N+i] = st->x[speak*N+i+st->frame_size];
772 st->x[speak*N+i+st->frame_size] = EXTRACT16(tmp32);
792 Sxx += mdf_inner_prod(st->x+speak*N+st->frame_size, st->x+speak*N+st->frame_size, st->frame_size);
803 for (i=0;i<st->frame_size;i++)
804 st->e[chan*N+i] = SUB16(st->input[chan*st->frame_size+i], st->e[chan*N+i+st->frame_size]);
805 Sff += mdf_inner_prod(st->e+chan*N, st->e+chan*N, st->frame_size);
848 for (i=0;i<st->frame_size;i++)
852 for (i=st->frame_size;i<N;i++)
862 for (i=st->frame_size;i<N;i++)
874 for (i=0;i<=st->frame_size;i++)
885 for (i=0;i<st->frame_size;i++)
886 st->e[chan*N+i] = SUB16(st->e[chan*N+i+st->frame_size], st->y[chan*N+i+st->frame_size]);
887 Dbf += 10+mdf_inner_prod(st->e+chan*N, st->e+chan*N, st->frame_size);
888 for (i=0;i<st->frame_size;i++)
889 st->e[chan*N+i] = SUB16(st->input[chan*st->frame_size+i], st->y[chan*N+i+st->frame_size]);
890 See += mdf_inner_prod(st->e+chan*N, st->e+chan*N, st->frame_size);
934 for (i=0;i<st->frame_size;i++)
935 st->e[chan*N+i+st->frame_size] = MULT16_16_Q15(st->window[i+st->frame_size],st->e[chan*N+i+st->frame_size]) + MULT16_16_Q15(st->window[i],st->y[chan*N+i+st->frame_size]);
953 for (i=0;i<st->frame_size;i++)
954 st->y[chan*N+i+st->frame_size] = st->e[chan*N+i+st->frame_size];
955 for (i=0;i<st->frame_size;i++)
956 st->e[chan*N+i] = SUB16(st->input[chan*st->frame_size+i], st->y[chan*N+i+st->frame_size]);
969 for (i=0;i<st->frame_size;i++)
973 tmp_out = SUB32(EXTEND32(st->input[chan*st->frame_size+i]), EXTEND32(st->e[chan*N+i+st->frame_size]));
975 tmp_out = SUB32(EXTEND32(st->input[chan*st->frame_size+i]), EXTEND32(st->y[chan*N+i+st->frame_size]));
989 dump_audio(in, far_end, out, st->frame_size);
993 for (i=0;i<st->frame_size;i++)
995 st->e[chan*N+i+st->frame_size] = st->e[chan*N+i];
1001 Sey += mdf_inner_prod(st->e+chan*N+st->frame_size, st->y+chan*N+st->frame_size, st->frame_size);
1002 Syy += mdf_inner_prod(st->y+chan*N+st->frame_size, st->y+chan*N+st->frame_size, st->frame_size);
1003 Sdd += mdf_inner_prod(st->input+chan*st->frame_size, st->input+chan*st->frame_size, st->frame_size);
1007 for (i=0;i<st->frame_size;i++)
1028 for (i=0;i<st->frame_size*C;i++)
1050 Sxx += mdf_inner_prod(st->x+speak*N+st->frame_size, st->x+speak*N+st->frame_size, st->frame_size);
1056 for (j=0;j<=st->frame_size;j++)
1060 for (j=st->frame_size;j>=0;j--)
1138 for (i=0;i<=st->frame_size;i++)
1171 for (i=0;i<=st->frame_size;i++)
1180 for (i=0;i<st->frame_size;i++)
1181 st->last_y[i] = st->last_y[st->frame_size+i];
1185 for (i=0;i<st->frame_size;i++)
1186 st->last_y[st->frame_size+i] = in[i]-out[i];
1224 for (i=0;i<=st->frame_size;i++)
1235 (*(int*)ptr) = st->frame_size;
1239 st->spec_average = DIV32_16(SHL32(EXTEND32(st->frame_size), 15), st->sampling_rate);
1241 st->beta0 = DIV32_16(SHL32(EXTEND32(st->frame_size), 16), st->sampling_rate);
1242 st->beta_max = DIV32_16(SHL32(EXTEND32(st->frame_size), 14), st->sampling_rate);
1244 st->beta0 = (2.0f*st->frame_size)/st->sampling_rate;
1245 st->beta_max = (.5f*st->frame_size)/st->sampling_rate;
1259 *((spx_int32_t *)ptr) = st->M * st->frame_size;
1263 int M = st->M, N = st->window_size, n = st->frame_size, i, j;