diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2021-02-18 21:24:51 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2021-02-24 08:56:12 +0100 |
commit | 790be3125ddcd5973d070cb05467fdf8843c7edc (patch) | |
tree | 397c6de3810fa370d23a7276c636d83019d56fd0 /libavcodec/acelp_pitch_delay.c | |
parent | bce9c5e276be3da2cc44f6ff04673c7f1e8bfb2f (diff) |
avcodec/acelp_pitch_delay: Inline small functions only used once
ff_acelp_decode_8bit_to_1st_delay3, ff_acelp_decode_4bit_to_2nd_delay3
and ff_acelp_decode_5_6_bit_to_2nd_delay3 are all only used once (by
g729dec) whereas ff_acelp_decode_9bit_to_1st_delay6 and
ff_acelp_decode_6bit_to_2nd_delay6 are completely unused; with the
possible exception of ff_acelp_decode_4bit_to_2nd_delay3, these
functions are so small that inlining them is appropriate; and as long as
ff_acelp_decode_4bit_to_2nd_delay3 is only called once, this is also
true for it.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/acelp_pitch_delay.c')
-rw-r--r-- | libavcodec/acelp_pitch_delay.c | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/libavcodec/acelp_pitch_delay.c b/libavcodec/acelp_pitch_delay.c index a070d1b25d..1eca97ec69 100644 --- a/libavcodec/acelp_pitch_delay.c +++ b/libavcodec/acelp_pitch_delay.c @@ -29,47 +29,6 @@ #include "celp_math.h" #include "audiodsp.h" -int ff_acelp_decode_8bit_to_1st_delay3(int ac_index) -{ - ac_index += 58; - if(ac_index > 254) - ac_index = 3 * ac_index - 510; - return ac_index; -} - -int ff_acelp_decode_4bit_to_2nd_delay3( - int ac_index, - int pitch_delay_min) -{ - if(ac_index < 4) - return 3 * (ac_index + pitch_delay_min); - else if(ac_index < 12) - return 3 * pitch_delay_min + ac_index + 6; - else - return 3 * (ac_index + pitch_delay_min) - 18; -} - -int ff_acelp_decode_5_6_bit_to_2nd_delay3( - int ac_index, - int pitch_delay_min) -{ - return 3 * pitch_delay_min + ac_index - 2; -} - -int ff_acelp_decode_9bit_to_1st_delay6(int ac_index) -{ - if(ac_index < 463) - return ac_index + 105; - else - return 6 * (ac_index - 368); -} -int ff_acelp_decode_6bit_to_2nd_delay6( - int ac_index, - int pitch_delay_min) -{ - return 6 * pitch_delay_min + ac_index - 3; -} - void ff_acelp_update_past_gain( int16_t* quant_energy, int gain_corr_factor, |