]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commit
Remove unnecessary memory reallocation in fft (#2080)
authorgoldwaving <redacted>
Sun, 28 Apr 2024 17:36:12 +0000 (15:06 -0230)
committerGitHub <redacted>
Sun, 28 Apr 2024 17:36:12 +0000 (18:36 +0100)
commit22b6598cc9f1454567efa0d816fdc57637243999
tree36ad0c9e4ca870a61ec3a168bd2ead0dfa2f60dc
parent858452d58dba3acdc3431c9bced2bb8cfd9bf418
Remove unnecessary memory reallocation in fft (#2080)

fft_out needs to be twice the frame_size, not the frame_step.  It is resized in fft() anyway, but this change prevents an unnecessary reallocation.

n_fft must match the mel filter size, so it is best not to calculate it from the framesize.

We only need to get the magnitudes for half the spectrum since the other half is a mirror and not used in the mel filter loop later.
whisper.cpp