#include <inttypes.h>
#include <limits.h>
#include <assert.h>
#include "avcodec.h"
#include "celp_math.h"
Go to the source code of this file.
Functions | |
int16_t | ff_cos (uint16_t arg) |
fixed-point implementation of cosine in [0; PI) domain. | |
int | ff_exp2 (uint16_t power) |
fixed-point implementation of exp2(x) in [0; 1] domain. | |
int | ff_log2 (uint32_t value) |
Calculate log2(x). | |
float | ff_dot_productf (const float *a, const float *b, int length) |
Return the dot product. |
Variables | |
static const int16_t | tab_cos [65] |
Cosine table: base_cos[i] = (1<<15) * cos(i*PI/64) | |
static const uint16_t | exp2a [] |
static const uint16_t | exp2b [] |
static const uint16_t | tab_log2 [33] |
Table used to compute log2(x) |
int16_t ff_cos | ( | uint16_t | arg | ) |
fixed-point implementation of cosine in [0; PI) domain.
arg | fixed-point cosine argument, 0 <= arg < 0x4000 |
Definition at line 61 of file celp_math.c.
Referenced by ff_acelp_lsf2lsp().
float ff_dot_productf | ( | const float * | a, |
const float * | b, | ||
int | length | ||
) |
Return the dot product.
a | input data array |
b | input data array |
length | number of elements |
Definition at line 114 of file celp_math.c.
Referenced by acelp_decode_gain_codef(), amrnb_decode_frame(), amrwb_decode_frame(), apply_gain_ctrl(), calc_input_response(), convolve(), decode(), decode_frame(), ff_adaptive_gain_control(), ff_amr_set_fixed_gain(), ff_scale_vector_to_given_sum_of_squares(), find_hb_gain(), kalman_smoothen(), postfilter(), scaled_hb_excitation(), synth_block_fcb_acb(), synthesis(), tilt_factor(), upsample_5_4(), and voice_factor().
int ff_exp2 | ( | uint16_t | power | ) |
fixed-point implementation of exp2(x) in [0; 1] domain.
power | argument to exp2, 0 <= power <= 0x7fff |
Definition at line 71 of file celp_math.c.
int ff_log2 | ( | uint32_t | value | ) |
Calculate log2(x).
value | function argument, 0 < value <= 7fff ffff |
Definition at line 94 of file celp_math.c.
Referenced by ff_acelp_update_past_gain().
|
static |
Definition at line 45 of file celp_math.c.
Referenced by ff_exp2().
|
static |
Definition at line 53 of file celp_math.c.
|
static |
Cosine table: base_cos[i] = (1<<15) * cos(i*PI/64)
Definition at line 33 of file celp_math.c.
Referenced by ff_cos().
|
static |
Table used to compute log2(x)
tab_log2[i] = (1<<15) * log2(1 + i/32), i=0..32
Definition at line 86 of file celp_math.c.
Referenced by ff_log2().