---
patch against my tree still based on v1 of the patch. so fuzz is expected.
Unsure if I should replace the (N + 4) in the malloc with FFMAX(N, 19),
reasoning for the '+ 4' was that it allows over reads but contrary to my
initial thinking it's not required for the NEON version.
libavcodec/opus_imdct.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/libavcodec/opus_imdct.c b/libavcodec/opus_imdct.c
index 04e19a0..0dc469c 100644
--- a/libavcodec/opus_imdct.c
+++ b/libavcodec/opus_imdct.c
@@ -112,9 +112,8 @@ static void fft15(FFTComplex *out, const FFTComplex *in,
out[k].re = tmp[k].re + t1.re + t2.re;
out[k].im = tmp[k].im + t1.im + t2.im;
- // FIXME
CMUL(t1, tmp1[k], exptab[k + 5]);
- CMUL(t2, tmp2[k], k < 3 ? exptab[2 * (k + 5)] : exptab[2 * (k + 5) -
15]);
+ CMUL(t2, tmp2[k], exptab[2 * (k + 5)];
out[k + 5].re = tmp[k].re + t1.re + t2.re;
out[k + 5].im = tmp[k].im + t1.im + t2.im;
@@ -235,7 +234,7 @@ av_cold int ff_celt_imdct_init(CeltIMDCTContext **ps, int N)
for (i = 0; i < FF_ARRAY_ELEMS(s->exptab); i++) {
int N = 15 * (1 << i);
- s->exptab[i] = av_malloc(sizeof(*s->exptab[i]) * N);
+ s->exptab[i] = av_malloc(sizeof(*s->exptab[i]) * (N + 4));
if (!s->exptab[i])
goto fail;
@@ -245,6 +244,10 @@ av_cold int ff_celt_imdct_init(CeltIMDCTContext **ps, int
N)
}
}
+ // wrap around to simplify fft15
+ for (j = 15; j < 19; j++)
+ s->exptab[0][j] = s->exptab[0][j - 15];
+
s->fft5 = fft5;
s->fft15 = fft15;
--
1.9.2
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel