You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
g729: dont force all cpu optims to off but override just the one that doesnt work.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -332,6 +332,16 @@ static int16_t g729d_voice_decision(int onset, int prev_voice_decision, const in
|
|||||||
return voice_decision;
|
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)
|
static av_cold int decoder_init(AVCodecContext * avctx)
|
||||||
{
|
{
|
||||||
G729Context* ctx = avctx->priv_data;
|
G729Context* ctx = avctx->priv_data;
|
||||||
@@ -367,8 +377,8 @@ static av_cold int decoder_init(AVCodecContext * avctx)
|
|||||||
for(i=0; i<4; i++)
|
for(i=0; i<4; i++)
|
||||||
ctx->quant_energy[i] = -14336; // -14 in (5.10)
|
ctx->quant_energy[i] = -14336; // -14 in (5.10)
|
||||||
|
|
||||||
avctx->dsp_mask= ~AV_CPU_FLAG_FORCE;
|
|
||||||
dsputil_init(&ctx->dsp, avctx);
|
dsputil_init(&ctx->dsp, avctx);
|
||||||
|
ctx->dsp.scalarproduct_int16 = scalarproduct_int16_c;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user