comparison aac.c @ 11358:a1376a6f9af1 libavcodec

AAC: Mark predictor functions av_always_inline. This results in a 50% speedup on main profile with no increase in binary size.
author alexc
date Thu, 04 Mar 2010 04:58:43 +0000
parents 11fb96e94573
children 1682a19a0881
comparison
equal deleted inserted replaced
11357:3b06c3d9e72d 11358:a1376a6f9af1
476 static av_always_inline int lcg_random(int previous_val) 476 static av_always_inline int lcg_random(int previous_val)
477 { 477 {
478 return previous_val * 1664525 + 1013904223; 478 return previous_val * 1664525 + 1013904223;
479 } 479 }
480 480
481 static void reset_predict_state(PredictorState *ps) 481 static av_always_inline void reset_predict_state(PredictorState *ps)
482 { 482 {
483 ps->r0 = 0.0f; 483 ps->r0 = 0.0f;
484 ps->r1 = 0.0f; 484 ps->r1 = 0.0f;
485 ps->cor0 = 0.0f; 485 ps->cor0 = 0.0f;
486 ps->cor1 = 0.0f; 486 ps->cor1 = 0.0f;
1245 pun.f = pf; 1245 pun.f = pf;
1246 pun.i &= 0xFFFF0000U; 1246 pun.i &= 0xFFFF0000U;
1247 return pun.f; 1247 return pun.f;
1248 } 1248 }
1249 1249
1250 static void predict(AACContext *ac, PredictorState *ps, float *coef, 1250 static av_always_inline void predict(AACContext *ac, PredictorState *ps, float *coef,
1251 int output_enable) 1251 int output_enable)
1252 { 1252 {
1253 const float a = 0.953125; // 61.0 / 64 1253 const float a = 0.953125; // 61.0 / 64
1254 const float alpha = 0.90625; // 29.0 / 32 1254 const float alpha = 0.90625; // 29.0 / 32
1255 float e0, e1; 1255 float e0, e1;