FFmpeg
|
#include <inttypes.h>
#include <limits.h>
#include "libavutil/avassert.h"
#include "avcodec.h"
#include "mathops.h"
#include "celp_math.h"
#include "libavutil/common.h"
Go to the source code of this file.
Functions | |
int | ff_exp2 (uint16_t power) |
fixed-point implementation of exp2(x) in [0; 1] domain. More... | |
int | ff_log2_q15 (uint32_t value) |
Calculate log2(x). More... | |
int64_t | ff_dot_product (const int16_t *a, const int16_t *b, int length) |
Calculate the dot product of 2 int16_t vectors. More... | |
float | ff_dot_productf (const float *a, const float *b, int length) |
Return the dot product. More... | |
void | ff_celp_math_init (CELPMContext *c) |
Initialize CELPMContext. More... | |
Variables | |
static const uint16_t | exp2a [] |
static const uint16_t | exp2b [] |
static const uint16_t | tab_log2 [33] |
Table used to compute log2(x) More... | |
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 48 of file celp_math.c.
Referenced by ff_acelp_decode_gain_code().
int ff_log2_q15 | ( | uint32_t | value | ) |
Calculate log2(x).
value | function argument, 0 < value <= 7fff ffff |
Definition at line 78 of file celp_math.c.
Referenced by ff_acelp_update_past_gain(), and main().
int64_t ff_dot_product | ( | const int16_t * | a, |
const int16_t * | b, | ||
int | length | ||
) |
Calculate the dot product of 2 int16_t vectors.
a | input data array |
b | input data array |
length | number of elements |
Definition at line 98 of file celp_math.c.
Referenced by acb_search(), comp_autocorr(), comp_harmonic_coeff(), estimate_pitch(), ff_g723_1_dot_product(), ff_g723_1_gen_acb_excitation(), and main().
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 109 of file celp_math.c.
Referenced by ff_celp_math_init(), and main().
void ff_celp_math_init | ( | CELPMContext * | c | ) |
Initialize CELPMContext.
Definition at line 120 of file celp_math.c.
Referenced by amrnb_decode_init(), and amrwb_decode_init().
|
static |
Definition at line 32 of file celp_math.c.
Referenced by ff_exp2().
|
static |
Definition at line 40 of file celp_math.c.
Referenced by ff_exp2().
|
static |
tab_log2[i] = (1<<15) * log2(1 + i/32), i=0..32
Definition at line 63 of file celp_math.c.
Referenced by ff_log2_q15().