mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-04-24 06:46:37 -04:00
convolver: small cleanups
Remove unused field. We can also remove the ifft and reuse the fft.
This commit is contained in:
parent
aabcbf1261
commit
3e7e61dcb7
1 changed files with 1 additions and 9 deletions
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
#include "convolver.h"
|
||||
|
||||
#include <math.h>
|
||||
#include <math.h>
|
||||
#include <pthread.h>
|
||||
#include <semaphore.h>
|
||||
|
|
@ -27,7 +26,6 @@ struct partition {
|
|||
int time_size;
|
||||
int freq_size;
|
||||
void *fft;
|
||||
void *ifft;
|
||||
float *freq;
|
||||
|
||||
int n_segments;
|
||||
|
|
@ -44,7 +42,6 @@ struct partition {
|
|||
struct convolver
|
||||
{
|
||||
struct spa_fga_dsp *dsp;
|
||||
struct convolver *conv;
|
||||
|
||||
int min_size;
|
||||
int max_size;
|
||||
|
|
@ -114,8 +111,6 @@ static void partition_free(struct spa_fga_dsp *dsp, struct partition *part)
|
|||
}
|
||||
if (part->fft)
|
||||
spa_fga_dsp_fft_free(dsp, part->fft);
|
||||
if (part->ifft)
|
||||
spa_fga_dsp_fft_free(dsp, part->ifft);
|
||||
free(part->segments);
|
||||
free(part->ir);
|
||||
spa_fga_dsp_fft_memfree(dsp, part->freq);
|
||||
|
|
@ -147,9 +142,6 @@ static struct partition *partition_new(struct convolver *conv, int block,
|
|||
part->fft = spa_fga_dsp_fft_new(dsp, part->time_size, true);
|
||||
if (part->fft == NULL)
|
||||
goto error;
|
||||
part->ifft = spa_fga_dsp_fft_new(dsp, part->time_size, true);
|
||||
if (part->ifft == NULL)
|
||||
goto error;
|
||||
|
||||
part->segments = calloc(part->n_segments, sizeof(float*));
|
||||
part->freq = spa_fga_dsp_fft_memalloc(dsp, part->freq_size, false);
|
||||
|
|
@ -228,7 +220,7 @@ static int partition_run(struct spa_fga_dsp *dsp, struct partition *part, const
|
|||
r->segments[j],
|
||||
part->freq_size);
|
||||
}
|
||||
spa_fga_dsp_fft_run(dsp, part->ifft, -1, part->freq, r->time_buffer[idx]);
|
||||
spa_fga_dsp_fft_run(dsp, part->fft, -1, part->freq, r->time_buffer[idx]);
|
||||
|
||||
dst = output ? output[i]: r->precalc[pc_idx];
|
||||
if (dst)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue