Module: libav Branch: master Commit: f0c07be6491c850f948e2029f27f06437d128f3a
Author: Mans Rullgard <[email protected]> Committer: Mans Rullgard <[email protected]> Date: Thu Oct 18 17:59:13 2012 +0100 celp_math: rename ff_log2 to ff_log2_q15 This name is more descriptive as the function returns a fixed-point value with 15 fraction bits. Signed-off-by: Mans Rullgard <[email protected]> --- libavcodec/acelp_pitch_delay.c | 2 +- libavcodec/celp_math.c | 2 +- libavcodec/celp_math.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/acelp_pitch_delay.c b/libavcodec/acelp_pitch_delay.c index c091301..a9668fa 100644 --- a/libavcodec/acelp_pitch_delay.c +++ b/libavcodec/acelp_pitch_delay.c @@ -86,7 +86,7 @@ void ff_acelp_update_past_gain( if(erasure) quant_energy[0] = FFMAX(avg_gain >> log2_ma_pred_order, -10240) - 4096; // -10 and -4 in (5.10) else - quant_energy[0] = (6165 * ((ff_log2(gain_corr_factor) >> 2) - (13 << 13))) >> 13; + quant_energy[0] = (6165 * ((ff_log2_q15(gain_corr_factor) >> 2) - (13 << 13))) >> 13; } int16_t ff_acelp_decode_gain_code( diff --git a/libavcodec/celp_math.c b/libavcodec/celp_math.c index c3d12e9..a9ebef6 100644 --- a/libavcodec/celp_math.c +++ b/libavcodec/celp_math.c @@ -67,7 +67,7 @@ static const uint16_t tab_log2[33] = 26457, 27294, 28116, 28924, 29719, 30500, 31269, 32025, 32769, }; -int ff_log2(uint32_t value) +int ff_log2_q15(uint32_t value) { uint8_t power_int; uint8_t frac_x0; diff --git a/libavcodec/celp_math.h b/libavcodec/celp_math.h index 2fad312..ed3f8c0 100644 --- a/libavcodec/celp_math.h +++ b/libavcodec/celp_math.h @@ -40,7 +40,7 @@ int ff_exp2(uint16_t power); * * @return value of (1<<15) * log2(value) */ -int ff_log2(uint32_t value); +int ff_log2_q15(uint32_t value); /** * Shift value left or right depending on sign of offset parameter. _______________________________________________ libav-commits mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-commits
