summaryrefslogtreecommitdiff
path: root/libavfilter/af_sofalizer.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2020-10-12 12:15:27 +0200
committerPaul B Mahol <onemda@gmail.com>2020-10-12 12:21:35 +0200
commitf7fd205f11d5299d6a16b0ff0ae85fddb32772f2 (patch)
treee98c9ab42d4cedc827711b55f9c7f711de04c90e /libavfilter/af_sofalizer.c
parentaa125fd06ac0237c1374809888a9db9c350874af (diff)
downloadffmpeg-f7fd205f11d5299d6a16b0ff0ae85fddb32772f2.tar.gz
avfilter/af_sofalizer: allow up to 64 channels
Diffstat (limited to 'libavfilter/af_sofalizer.c')
-rw-r--r--libavfilter/af_sofalizer.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavfilter/af_sofalizer.c b/libavfilter/af_sofalizer.c
index 5a2e0c7caa..8a0397f54e 100644
--- a/libavfilter/af_sofalizer.c
+++ b/libavfilter/af_sofalizer.c
@@ -255,11 +255,11 @@ static int get_speaker_pos(AVFilterContext *ctx,
{
struct SOFAlizerContext *s = ctx->priv;
uint64_t channels_layout = ctx->inputs[0]->channel_layout;
- float azim[16] = { 0 };
- float elev[16] = { 0 };
+ float azim[64] = { 0 };
+ float elev[64] = { 0 };
int m, ch, n_conv = ctx->inputs[0]->channels; /* get no. input channels */
- if (n_conv > 16)
+ if (n_conv < 0 || n_conv > 64)
return AVERROR(EINVAL);
s->lfe_channel = -1;
@@ -360,7 +360,7 @@ static int sofalizer_convolute(AVFilterContext *ctx, void *arg, int jobnr, int n
const int buffer_length = s->buffer_length;
/* -1 for AND instead of MODULO (applied to powers of 2): */
const uint32_t modulo = (uint32_t)buffer_length - 1;
- float *buffer[16]; /* holds ringbuffer for each input channel */
+ float *buffer[64]; /* holds ringbuffer for each input channel */
int wr = *write;
int read;
int i, l;