[FFmpeg-devel] [PATCH v3] aacenc: add SIMD optimizations for abs_pow34 and quantization

Rostislav Pehlivanov atomnuker at gmail.com
Tue Oct 18 11:02:19 EEST 2016


On 17 October 2016 at 23:43, Michael Niedermayer <michael at niedermayer.cc>
wrote:

> On Mon, Oct 17, 2016 at 10:24:48PM +0100, Rostislav Pehlivanov wrote:
> > Should fix segfaults on x86-32
> >
> > Performance improvements:
> >
> > quant_bands:
> > with:     681 decicycles in quant_bands, 8388453 runs,    155 skips
> > without: 1190 decicycles in quant_bands, 8388386 runs,    222 skips
> > Around 42% for the function
> >
> > Twoloop coder:
> >
> > abs_pow34:
> > with/without: 7.82s/8.17s
> > Around 4% for the entire encoder
> >
> > Both:
> > with/without: 7.15s/8.17s
> > Around 12% for the entire encoder
> >
> > Fast coder:
> >
> > abs_pow34:
> > with/without: 3.40s/3.77s
> > Around 10% for the entire encoder
> >
> > Both:
> > with/without: 3.02s/3.77s
> > Around 20% faster for the entire encoder
> >
> > Signed-off-by: Rostislav Pehlivanov <atomnuker at gmail.com>
> > ---
> >  libavcodec/aaccoder.c            | 27 +++++++------
> >  libavcodec/aaccoder_trellis.h    |  2 +-
> >  libavcodec/aaccoder_twoloop.h    |  2 +-
> >  libavcodec/aacenc.c              |  4 ++
> >  libavcodec/aacenc.h              |  6 +++
> >  libavcodec/aacenc_is.c           |  6 +--
> >  libavcodec/aacenc_ltp.c          |  4 +-
> >  libavcodec/aacenc_pred.c         |  6 +--
> >  libavcodec/aacenc_quantization.h |  4 +-
> >  libavcodec/aacenc_utils.h        |  4 +-
> >  libavcodec/x86/Makefile          |  2 +
> >  libavcodec/x86/aacencdsp.asm     | 87 ++++++++++++++++++++++++++++++
> ++++++++++
> >  libavcodec/x86/aacencdsp_init.c  | 43 ++++++++++++++++++++
> >  13 files changed, 170 insertions(+), 27 deletions(-)
> >  create mode 100644 libavcodec/x86/aacencdsp.asm
> >  create mode 100644 libavcodec/x86/aacencdsp_init.c
>
> fate passes on linux32/64 x86, mingw32/64 x86
>
> build fails on arm:
>
> libavcodec/libavcodec.a(aacenc.o): In function `aac_encode_init':
> ffmpeg/arm/src/libavcodec/aacenc.c:1038: undefined reference to
> `ff_aac_dsp_init_x86'
> collect2: ld returned 1 exit status
> make: *** [ffserver_g] Error 1
> make: *** Waiting for unfinished jobs....
> libavcodec/libavcodec.a(aacenc.o): In function `aac_encode_init':
> ffmpeg/arm/src/libavcodec/aacenc.c:1038: undefined reference to
> `ff_aac_dsp_init_x86'
> collect2: ld returned 1 exit status
> make: *** [ffprobe_g] Error 1
> libavcodec/libavcodec.a(aacenc.o): In function `aac_encode_init':
> ffmpeg/arm/src/libavcodec/aacenc.c:1038: undefined reference to
> `ff_aac_dsp_init_x86'
> collect2: ld returned 1 exit status
> make: *** [ffmpeg_g] Error 1
>
> [...]
> --
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> While the State exists there can be no freedom; when there is freedom there
> will be no State. -- Vladimir Lenin
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
>
Attaching a new version with the fixes from James Almer which should also
fix non-x86 compilation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-aacenc-add-SIMD-optimizations-for-abs_pow34-and-quan.patch
Type: text/x-patch
Size: 19951 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20161018/e7cba8be/attachment.bin>


More information about the ffmpeg-devel mailing list