Go to the documentation of this file.
36 for (
i = 0;
i < 13;
i++) {
44 return (
int)(
a * (
SUINT)
b + (1 << 14)) >> 15;
50 const int16_t *
src =
dst - lag;
52 for (
i = 0;
i < 40;
i++)
66 if (
abs < 11059)
abs <<= 1;
67 else if (
abs < 20070)
abs += 11059;
68 else abs = (
abs >> 2) + 26112;
69 return filtered < 0 ? -
abs :
abs;
75 for (
i = 7;
i >= 0;
i--) {
87 int *lar =
ctx->lar[
ctx->lar_idx];
88 int *lar_prev =
ctx->lar[
ctx->lar_idx ^ 1];
89 for (
i = 0;
i < 8;
i++)
90 rrp[
i] =
get_rrp((lar_prev[
i] >> 2) + (lar_prev[
i] >> 1) + (lar[
i] >> 2));
91 for (
i = 0;
i < 13;
i++)
94 for (
i = 0;
i < 8;
i++)
95 rrp[
i] =
get_rrp((lar_prev[
i] >> 1) + (lar [
i] >> 1));
96 for (
i = 13;
i < 27;
i++)
99 for (
i = 0;
i < 8;
i++)
100 rrp[
i] =
get_rrp((lar_prev[
i] >> 2) + (lar [
i] >> 1) + (lar[
i] >> 2));
101 for (
i = 27;
i < 40;
i++)
104 for (
i = 0;
i < 8;
i++)
106 for (
i = 40;
i < 160;
i++)
115 for (
i = 0;
i < 160;
i++) {
127 int16_t *ref_dst =
ctx->ref_buf + 120;
128 int *lar =
ctx->lar[
ctx->lar_idx];
138 for (
i = 0;
i < 4;
i++) {
147 memcpy(
ctx->ref_buf,
ctx->ref_buf + 160, 120 *
sizeof(*
ctx->ref_buf));
static void short_term_synth(GSMContext *ctx, int16_t *dst, const int16_t *src)
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
static const struct twinvq_data tab
static double val(void *priv, double ch)
static av_noinline int get_rrp(int filtered)
static int gsm_mult(int a, int b)
const int *const ff_gsm_apcm_bits[][4]
#define FFABS(a)
Absolute value, Note, INT_MIN / INT64_MIN result in undefined behavior as they are not representable ...
const uint8_t ff_gsm_requant_tab[4][8]
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
static int filter_value(int in, int rrp[8], int v[9])
const uint16_t ff_gsm_long_term_gain_tab[4]
The reader does not expect b to be semantically here and if the code is changed by maybe adding a a division or other the signedness will almost certainly be mistaken To avoid this confusion a new type was SUINT is the C unsigned type but it holds a signed int to use the same example SUINT a
static int postprocess(int16_t *data, int msr)
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf offset
#define i(width, name, range_min, range_max)
static int gsm_decode_block(AVCodecContext *avctx, int16_t *samples, GetBitContext *gb, int mode)
const int16_t ff_gsm_dequant_tab[64][8]
static void apcm_dequant_add(GetBitContext *gb, int16_t *dst, const int *frame_bits)
main external API structure.
Filter the word “frame” indicates either a video frame or a group of audio samples
static const int factor[16]
static int decode_log_area(int coded, int factor, int offset)
static void long_term_synth(int16_t *dst, int lag, int gain_idx)