diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-09-30 03:02:02 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-09-30 03:02:02 +0200 |
commit | c3299726874829e8eb7a937c247956ab3c2ccae6 (patch) | |
tree | 2f46e524e3087fa090ebdae48a9c548af3677954 /libavcodec/g729dec.c | |
parent | 8045af65d47430046b8f883cba9eb0f1b3def7d9 (diff) | |
download | ffmpeg-c3299726874829e8eb7a937c247956ab3c2ccae6.tar.gz |
g729: dont force all cpu optims to off but override just the one that doesnt work.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/g729dec.c')
-rw-r--r-- | libavcodec/g729dec.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/libavcodec/g729dec.c b/libavcodec/g729dec.c index cd2eec880b..e818b463a8 100644 --- a/libavcodec/g729dec.c +++ b/libavcodec/g729dec.c @@ -332,6 +332,16 @@ static int16_t g729d_voice_decision(int onset, int prev_voice_decision, const in return voice_decision; } +static int32_t scalarproduct_int16_c(const int16_t * v1, const int16_t * v2, int order, int shift) +{ + int res = 0; + + while (order--) + res += (*v1++ * *v2++) >> shift; + + return res; +} + static av_cold int decoder_init(AVCodecContext * avctx) { G729Context* ctx = avctx->priv_data; @@ -367,8 +377,8 @@ static av_cold int decoder_init(AVCodecContext * avctx) for(i=0; i<4; i++) ctx->quant_energy[i] = -14336; // -14 in (5.10) - avctx->dsp_mask= ~AV_CPU_FLAG_FORCE; dsputil_init(&ctx->dsp, avctx); + ctx->dsp.scalarproduct_int16 = scalarproduct_int16_c; return 0; } |