The step of pitch filtering
Closed this issue · 3 comments
aaronhsueh0506 commented
Hi Noah,
I have been working on the PercepNet project recently, and I read the code in denoise.cpp.
I am not sure the code about "comb filtering" below:
for (k=-COMB_M;k<COMB_M+1; k++){
for (i=0;i<WINDOW_SIZE;i++)
p[i] += st->comb_buf[COMB_BUF_SIZE-FRAME_SIZE*(FRAME_LOOKAHEAD)-WINDOW_SIZE-pitch_index*k+i]*common.comb_hann_window[k+COMB_M]; }
I was wondering that the pitch needs to compute with the previous frames and how it works?
Thank you!
jzi040941 commented
there is code buffering input to comb_buf on denoise.cpp L350~L351
RNN_MOVE(st->comb_buf, &st->comb_buf[FRAME_SIZE], COMB_BUF_SIZE-FRAME_SIZE);
RNN_COPY(&st->comb_buf[COMB_BUF_SIZE-FRAME_SIZE], in, FRAME_SIZE);
so comb_buf will have previous and forward both frame
Thanks
aaronhsueh0506 commented
jzi040941 commented