#include <stdlib.h>
#include <inttypes.h>
#include <limits.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <assert.h>
#include "avcodec.h"
#include "libavutil/avutil.h"
#include "get_bits.h"
#include "lsp.h"
#include "celp_math.h"
#include "acelp_filters.h"
#include "acelp_pitch_delay.h"
#include "acelp_vectors.h"
#include "g729data.h"
Go to the source code of this file.
Data Structures | |
struct | G729FormatDescription |
struct | G729Context |
Defines | |
#define | LSFQ_MIN 40 |
minimum quantized LSF value (3.2.4) 0.005 in Q13 | |
#define | LSFQ_MAX 25681 |
maximum quantized LSF value (3.2.4) 3.135 in Q13 | |
#define | LSFQ_DIFF_MIN 321 |
minimum LSF distance (3.2.4) 0.0391 in Q13 | |
#define | SHARP_MIN 3277 |
minimum gain pitch value (3.8, Equation 47) 0.2 in (1.14) | |
#define | SHARP_MAX 13017 |
maximum gain pitch value (3.8, Equation 47) (EE) This does not comply with the specification. | |
#define | SUBFRAME_SIZE 40 |
subframe size | |
Functions | |
static uint16_t | g729_prng (uint16_t value) |
pseudo random number generator | |
static int | get_parity (uint8_t value) |
Get parity bit of bit 2. | |
static void | lsf_decode (int16_t *lsfq, int16_t *past_quantizer_outputs[MA_NP+1], int16_t ma_predictor, int16_t vq_1st, int16_t vq_2nd_low, int16_t vq_2nd_high) |
static av_cold int | decoder_init (AVCodecContext *avctx) |
static int | decode_frame (AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) |
Variables | |
static const G729FormatDescription | format_g729_8k |
static const G729FormatDescription | format_g729d_6k4 |
#define LSFQ_DIFF_MIN 321 |
minimum LSF distance (3.2.4) 0.0391 in Q13
Definition at line 56 of file g729dec.c.
Referenced by ff_sipr_decode_frame_16k(), lsf_decode(), and lsf_decode_fp().
#define LSFQ_MAX 25681 |
maximum quantized LSF value (3.2.4) 3.135 in Q13
Definition at line 50 of file g729dec.c.
Referenced by lsf_decode().
#define LSFQ_MIN 40 |
minimum quantized LSF value (3.2.4) 0.005 in Q13
Definition at line 44 of file g729dec.c.
Referenced by lsf_decode().
#define SHARP_MAX 13017 |
#define SHARP_MIN 3277 |
minimum gain pitch value (3.8, Equation 47) 0.2 in (1.14)
Definition at line 62 of file g729dec.c.
Referenced by decode_frame().
#define SUBFRAME_SIZE 40 |
subframe size
Definition at line 76 of file g729dec.c.
Referenced by decode_frame(), and decoder_init().
static int decode_frame | ( | AVCodecContext * | avctx, | |
void * | data, | |||
int * | data_size, | |||
AVPacket * | avpkt | |||
) | [static] |
< frame erasure detected during decoding
< parity check failed
< switched MA predictor of LSP quantizer
< first stage vector of quantizer
< second stage lower vector of quantizer (size in bits)
< second stage higher vector of quantizer (size in bits)
< adaptive codebook index
< fixed-codebook vector pulse signs
< fixed-codebook indexes
< gain codebook (first stage) index
< gain codebook (second stage) index
static av_cold int decoder_init | ( | AVCodecContext * | avctx | ) | [static] |
static uint16_t g729_prng | ( | uint16_t | value | ) | [inline, static] |
static int get_parity | ( | uint8_t | value | ) | [inline, static] |
static void lsf_decode | ( | int16_t * | lsfq, | |
int16_t * | past_quantizer_outputs[MA_NP+1], | |||
int16_t | ma_predictor, | |||
int16_t | vq_1st, | |||
int16_t | vq_2nd_low, | |||
int16_t | vq_2nd_high | |||
) | [static] |
const G729FormatDescription format_g729_8k [static] |
Initial value:
{ .ac_index_bits = {8,5}, .parity_bit = 1, .gc_1st_index_bits = GC_1ST_IDX_BITS_8K, .gc_2nd_index_bits = GC_2ND_IDX_BITS_8K, .fc_signs_bits = 4, .fc_indexes_bits = 13, }
const G729FormatDescription format_g729d_6k4 [static] |
Initial value:
{ .ac_index_bits = {8,4}, .parity_bit = 0, .gc_1st_index_bits = GC_1ST_IDX_BITS_6K4, .gc_2nd_index_bits = GC_2ND_IDX_BITS_6K4, .fc_signs_bits = 2, .fc_indexes_bits = 9, }