Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- double log_truncated_nb_frames = floor(log2(2*nb_frames));
- int truncated_nb_frames = (int)ceil(pow(2,log_truncated_nb_frames));
- band_sum = calloc(truncated_nb_frames, sizeof(FFTSample));
- for(int j = 0; j < truncated_nb_frames - 1; ++j) {
- for(int i = 0; i < 36; ++i) {
- band_sum[j] += weighted_average[i][j];
- }
- }
- fft = av_rdft_init((int)log_truncated_nb_frames, DFT_R2C);
- final_fft = calloc(truncated_nb_frames, sizeof(FFTSample));
- av_rdft_calc(fft, band_sum);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement