diff options
author | Rostislav Pehlivanov <atomnuker@gmail.com> | 2017-07-12 04:49:21 +0100 |
---|---|---|
committer | Rostislav Pehlivanov <atomnuker@gmail.com> | 2017-07-13 19:53:52 +0100 |
commit | 035c755b4ef3b25daadc9e5a81a845dde6b3930c (patch) | |
tree | 96b2198f723e1fa7ce86a009bcca3b2d7ea06365 /libavcodec/opusenc.c | |
parent | 264f6c6f9537b68327d68357046fb1d732f01526 (diff) | |
download | ffmpeg-035c755b4ef3b25daadc9e5a81a845dde6b3930c.tar.gz |
opusenc: use float_dsp for transient mdcts
vector_fmul_reverse requires padding the window at the front
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Diffstat (limited to 'libavcodec/opusenc.c')
-rw-r--r-- | libavcodec/opusenc.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/libavcodec/opusenc.c b/libavcodec/opusenc.c index 8aba291e7e..6cefd33884 100644 --- a/libavcodec/opusenc.c +++ b/libavcodec/opusenc.c @@ -210,17 +210,15 @@ static void celt_frame_mdct(OpusEncContext *s, CeltFrame *f) int i, t, ch; float *win = s->scratch; - /* I think I can use s->dsp->vector_fmul_window for transients at least */ if (f->transient) { for (ch = 0; ch < f->channels; ch++) { CeltBlock *b = &f->block[ch]; float *src1 = b->overlap; for (t = 0; t < f->blocks; t++) { float *src2 = &b->samples[CELT_OVERLAP*t]; - for (i = 0; i < CELT_OVERLAP; i++) { - win[ i] = src1[i]*ff_celt_window[i]; - win[CELT_OVERLAP + i] = src2[i]*ff_celt_window[CELT_OVERLAP - i - 1]; - } + s->dsp->vector_fmul(win, src1, ff_celt_window, CELT_OVERLAP); + s->dsp->vector_fmul_reverse(&win[CELT_OVERLAP], src2, + ff_celt_window - 8, CELT_OVERLAP + 8); src1 = src2; s->mdct[0]->mdct(s->mdct[0], b->coeffs + t, win, f->blocks); } |