#include <stdint.h>
#include "lpc.h"
Go to the source code of this file.
Data Structures | |
struct | RA144Context |
Defines | |
#define | NBLOCKS 4 |
number of subblocks within a block | |
#define | BLOCKSIZE 40 |
subblock size in 16-bit words | |
#define | BUFFERSIZE 146 |
the size of the adaptive codebook | |
#define | FIXED_CB_SIZE 128 |
size of fixed codebooks | |
#define | FRAMESIZE 20 |
size of encoded frame | |
#define | LPC_ORDER 10 |
order of LPC filter | |
Functions | |
void | ff_copy_and_dup (int16_t *target, const int16_t *source, int offset) |
Copy the last offset values of *source to *target. | |
int | ff_eval_refl (int *refl, const int16_t *coefs, AVCodecContext *avctx) |
Evaluate the reflection coefficients from the filter coefficients. | |
void | ff_eval_coefs (int *coefs, const int *refl) |
Evaluate the LPC filter coefficients from the reflection coefficients. | |
void | ff_int_to_int16 (int16_t *out, const int *inp) |
int | ff_t_sqrt (unsigned int x) |
Evaluate sqrt(x << 24). | |
unsigned int | ff_rms (const int *data) |
int | ff_interp (RA144Context *ractx, int16_t *out, int a, int copyold, int energy) |
unsigned int | ff_rescale_rms (unsigned int rms, unsigned int energy) |
int | ff_irms (const int16_t *data) |
inverse root mean square | |
void | ff_subblock_synthesis (RA144Context *ractx, const uint16_t *lpc_coefs, int cba_idx, int cb1_idx, int cb2_idx, int gval, int gain) |
Variables | |
const int16_t | ff_gain_val_tab [256][3] |
const uint8_t | ff_gain_exp_tab [256] |
const int8_t | ff_cb1_vects [128][40] |
const int8_t | ff_cb2_vects [128][40] |
const uint16_t | ff_cb1_base [128] |
const uint16_t | ff_cb2_base [128] |
const int16_t | ff_energy_tab [32] |
const int16_t *const | ff_lpc_refl_cb [10] |
#define BLOCKSIZE 40 |
subblock size in 16-bit words
Definition at line 29 of file ra144.h.
Referenced by adaptive_cb_search(), create_adapt_vect(), crypto_open(), crypto_read(), ff_add_wav(), ff_copy_and_dup(), ff_irms(), ff_subblock_synthesis(), fixed_cb_search(), get_match_score(), orthogonalize(), ra144_decode_frame(), ra144_encode_frame(), ra144_encode_init(), and ra144_encode_subblock().
#define BUFFERSIZE 146 |
the size of the adaptive codebook
Definition at line 30 of file ra144.h.
Referenced by adaptive_cb_search(), create_adapt_vect(), ff_copy_and_dup(), and ff_subblock_synthesis().
#define FIXED_CB_SIZE 128 |
#define FRAMESIZE 20 |
size of encoded frame
Definition at line 32 of file ra144.h.
Referenced by ra144_decode_frame(), and ra144_encode_frame().
#define NBLOCKS 4 |
number of subblocks within a block
Definition at line 28 of file ra144.h.
Referenced by ff_interp(), ra144_decode_frame(), ra144_encode_frame(), and ra144_encode_init().
Copy the last offset values of *source to *target.
If those values are not enough to fill the target buffer, fill it with another copy of those values.
Definition at line 1529 of file ra144.c.
Referenced by ff_subblock_synthesis(), and ra144_encode_subblock().
void ff_eval_coefs | ( | int * | coefs, | |
const int * | refl | |||
) |
Evaluate the LPC filter coefficients from the reflection coefficients.
Does the inverse of the ff_eval_refl() function.
Definition at line 1585 of file ra144.c.
Referenced by ra144_decode_frame(), and ra144_encode_frame().
int ff_eval_refl | ( | int * | refl, | |
const int16_t * | coefs, | |||
AVCodecContext * | avctx | |||
) |
Evaluate the reflection coefficients from the filter coefficients.
Definition at line 1544 of file ra144.c.
Referenced by ff_interp(), and ra144_encode_frame().
void ff_int_to_int16 | ( | int16_t * | out, | |
const int * | inp | |||
) |
Definition at line 1605 of file ra144.c.
Referenced by ff_interp(), ra144_decode_frame(), and ra144_encode_frame().
int ff_interp | ( | RA144Context * | ractx, | |
int16_t * | out, | |||
int | a, | |||
int | copyold, | |||
int | energy | |||
) |
Definition at line 1649 of file ra144.c.
Referenced by ra144_decode_frame(), and ra144_encode_frame().
int ff_irms | ( | const int16_t * | data | ) |
inverse root mean square
Definition at line 1676 of file ra144.c.
Referenced by ff_subblock_synthesis(), and ra144_encode_subblock().
unsigned int ff_rescale_rms | ( | unsigned int | rms, | |
unsigned int | energy | |||
) |
Definition at line 1670 of file ra144.c.
Referenced by ff_interp(), ra144_decode_frame(), and ra144_encode_frame().
unsigned int ff_rms | ( | const int * | data | ) |
Definition at line 1628 of file ra144.c.
Referenced by ff_interp(), ra144_decode_frame(), and ra144_encode_frame().
void ff_subblock_synthesis | ( | RA144Context * | ractx, | |
const uint16_t * | lpc_coefs, | |||
int | cba_idx, | |||
int | cb1_idx, | |||
int | cb2_idx, | |||
int | gval, | |||
int | gain | |||
) |
Definition at line 1689 of file ra144.c.
Referenced by do_output_subblock(), and ra144_encode_subblock().
int ff_t_sqrt | ( | unsigned int | x | ) |
Evaluate sqrt(x << 24).
x must fit in 20 bits. This value is evaluated in an odd way to make the output identical to the binary decoder.
Definition at line 1617 of file ra144.c.
Referenced by ff_irms(), ff_rms(), ra144_decode_frame(), and ra144_encode_frame().
const uint16_t ff_cb1_base[128] |
Definition at line 1401 of file ra144.c.
Referenced by ff_subblock_synthesis(), and ra144_encode_subblock().
const int8_t ff_cb1_vects[128][40] |
Definition at line 113 of file ra144.c.
Referenced by ff_subblock_synthesis(), fixed_cb_search(), and ra144_encode_subblock().
const uint16_t ff_cb2_base[128] |
Definition at line 1420 of file ra144.c.
Referenced by ff_subblock_synthesis(), and ra144_encode_subblock().
const int8_t ff_cb2_vects[128][40] |
Definition at line 757 of file ra144.c.
Referenced by ff_subblock_synthesis(), fixed_cb_search(), and ra144_encode_subblock().
const int16_t ff_energy_tab[32] |
Definition at line 1439 of file ra144.c.
Referenced by ra144_decode_frame(), and ra144_encode_frame().
const uint8_t ff_gain_exp_tab[256] |
const int16_t ff_gain_val_tab[256][3] |
const int16_t* const ff_lpc_refl_cb[10] |
Definition at line 1501 of file ra144.c.
Referenced by ra144_decode_frame(), and ra144_encode_frame().