On 10 November 2016 at 03:13, Rostislav Pehlivanov <atomnu...@gmail.com> wrote:
> A huge amount can be reused by the encoder, as the only thing > which needs to be done would be to add a 10 line celt_icwrsi, > a wrapper around it (celt_alg_quant) and templating the > ff_celt_decode_band to replace entropy decoding functions > with entropy encoding. > > There is no performance loss but in fact a performance gain of > nearly 6% which is caused by the compiler being able to optimize > the decoding more efficiently. > > This commit also removes a redundant declaration (ff_celt_window2 > was already defined in opus.h but was not removed with the commit > which split the tables away to opustab.h). > > Signed-off-by: Rostislav Pehlivanov <atomnu...@gmail.com> > --- > libavcodec/Makefile | 2 +- > libavcodec/opus.h | 12 - > libavcodec/opus_celt.c | 828 +----------------------------- > ------------------- > libavcodec/opus_celt.h | 103 ++++++ > libavcodec/opus_pvq.c | 729 +++++++++++++++++++++++++++++++++++++++++++ > libavcodec/opus_pvq.h | 65 ++++ > libavcodec/opusdec.c | 1 + > 7 files changed, 910 insertions(+), 830 deletions(-) > create mode 100644 libavcodec/opus_celt.h > create mode 100644 libavcodec/opus_pvq.c > create mode 100644 libavcodec/opus_pvq.h Actually, I don't like how the CELT decoder now has an exposed state. I think the names the CELT decoder uses for/in its contexts are confusing. So I'll remove opus_celt.h and instead give ff_celt_decode_band a pointer to the remaining bits, the TF change and the IS flag manually rather than as a context. That way it would be less painful to template the function for the encoder. Changed that locally. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel