Advertisement
Guest User

Untitled

a guest
Jul 2nd, 2016
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.52 KB | None | 0 0
  1.     double log_truncated_nb_frames = floor(log2(2*nb_frames));
  2.     int truncated_nb_frames = (int)ceil(pow(2,log_truncated_nb_frames));
  3.  
  4.     band_sum = calloc(truncated_nb_frames, sizeof(FFTSample));
  5.     for(int j = 0; j < truncated_nb_frames - 1; ++j) {
  6.         for(int i = 0; i < 36; ++i) {
  7.             band_sum[j] += weighted_average[i][j];
  8.         }
  9.     }
  10.  
  11.     fft = av_rdft_init((int)log_truncated_nb_frames, DFT_R2C);
  12.     final_fft = calloc(truncated_nb_frames, sizeof(FFTSample));
  13.  
  14.     av_rdft_calc(fft, band_sum);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement