diff options
author | Loren Merritt <lorenm@u.washington.edu> | 2007-09-29 22:31:18 +0000 |
---|---|---|
committer | Loren Merritt <lorenm@u.washington.edu> | 2007-09-29 22:31:18 +0000 |
commit | 6810b93a81a8c0e845dc2bb90f9e2d35eac17cd1 (patch) | |
tree | 5727ef05fe765c427001d23f416c23c7bafc0867 /libavcodec/dsputil.c | |
parent | fdf885983c878e6976a72311c56a0efefa725d11 (diff) | |
download | ffmpeg-streaming-6810b93a81a8c0e845dc2bb90f9e2d35eac17cd1.zip ffmpeg-streaming-6810b93a81a8c0e845dc2bb90f9e2d35eac17cd1.tar.gz |
sse2 version of compute_autocorr().
4x faster than c (somehow, even though doubles only allow 2x simd).
overal flac encoding: 15-50% faster on core2, 4-11% on k8, 3-13% on p4.
Originally committed as revision 10621 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/dsputil.c')
-rw-r--r-- | libavcodec/dsputil.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c index 88fe5e0..ce83096 100644 --- a/libavcodec/dsputil.c +++ b/libavcodec/dsputil.c @@ -41,6 +41,9 @@ void ff_spatial_dwt(int *buffer, int width, int height, int stride, int type, in /* vorbis.c */ void vorbis_inverse_coupling(float *mag, float *ang, int blocksize); +/* flacenc.c */ +void ff_flac_compute_autocorr(const int32_t *data, int len, int lag, double *autoc); + uint8_t ff_cropTbl[256 + 2 * MAX_NEG_CROP] = {0, }; uint32_t ff_squareTbl[512] = {0, }; @@ -4132,6 +4135,9 @@ void dsputil_init(DSPContext* c, AVCodecContext *avctx) #ifdef CONFIG_VORBIS_DECODER c->vorbis_inverse_coupling = vorbis_inverse_coupling; #endif +#ifdef CONFIG_FLAC_ENCODER + c->flac_compute_autocorr = ff_flac_compute_autocorr; +#endif c->vector_fmul = vector_fmul_c; c->vector_fmul_reverse = vector_fmul_reverse_c; c->vector_fmul_add_add = ff_vector_fmul_add_add_c; |