#include <limits.h>#include "avcodec.h"#include "common.h"#include "bitstream.h"

Go to the source code of this file.
Data Structures | |
| struct | Float11 |
| struct | G726Tables |
| struct | G726Context |
| struct | AVG726Context |
Functions | |
| static Float11 * | i2f (int16_t i, Float11 *f) |
| static int16_t | mult (Float11 *f1, Float11 *f2) |
| static int | sgn (int value) |
| static uint8_t | quant (G726Context *c, int d) |
| static int16_t | inverse_quant (G726Context *c, int i) |
| static int16_t | g726_iterate (G726Context *c, int16_t I) |
| static int | g726_reset (G726Context *c, int bit_rate) |
| static int16_t | g726_decode (G726Context *c, int16_t i) |
| static int16_t | g726_encode (G726Context *c, int16_t sig) |
| static int | g726_init (AVCodecContext *avctx) |
| static int | g726_close (AVCodecContext *avctx) |
| static int | g726_encode_frame (AVCodecContext *avctx, uint8_t *dst, int buf_size, void *data) |
| static int | g726_decode_frame (AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size) |
Variables | |
| static int | quant_tbl16 [] |
| static int | iquant_tbl16 [] |
| static int | W_tbl16 [] |
| static int | F_tbl16 [] |
| static int | quant_tbl24 [] |
| static int | iquant_tbl24 [] |
| static int | W_tbl24 [] |
| static int | F_tbl24 [] |
| static int | quant_tbl32 [] |
| static int | iquant_tbl32 [] |
| static int | W_tbl32 [] |
| static int | F_tbl32 [] |
| static int | quant_tbl40 [] |
| static int | iquant_tbl40 [] |
| static int | W_tbl40 [] |
| static int | F_tbl40 [] |
| static G726Tables | G726Tables_pool [] |
| AVCodec | adpcm_g726_decoder |
| static int g726_close | ( | AVCodecContext * | avctx | ) | [static] |
Definition at line 347 of file g726.c.
References av_freep(), and AVCodecContext::coded_frame.

| static int16_t g726_decode | ( | G726Context * | c, | |
| int16_t | i | |||
| ) | [static] |
Definition at line 297 of file g726.c.
References g726_iterate().
Referenced by g726_decode_frame().

| static int g726_decode_frame | ( | AVCodecContext * | avctx, | |
| void * | data, | |||
| int * | data_size, | |||
| uint8_t * | buf, | |||
| int | buf_size | |||
| ) | [static] |
Definition at line 370 of file g726.c.
References AVG726Context::bit_buffer, AVG726Context::bits_left, AVG726Context::c, c, AVG726Context::code_size, g726_decode(), get_bits(), get_bits_count(), init_get_bits(), AVCodecContext::priv_data, s, and samples.

| static int16_t g726_encode | ( | G726Context * | c, | |
| int16_t | sig | |||
| ) | [static] |
Definition at line 302 of file g726.c.
References G726Tables::bits, g726_iterate(), quant(), G726Context::se, and G726Context::tbls.
Referenced by g726_encode_frame().

| static int g726_encode_frame | ( | AVCodecContext * | avctx, | |
| uint8_t * | dst, | |||
| int | buf_size, | |||
| void * | data | |||
| ) | [static] |
Definition at line 353 of file g726.c.
References AVG726Context::c, c, AVG726Context::code_size, flush_put_bits(), g726_encode(), init_put_bits(), AVCodecContext::priv_data, put_bits(), put_bits_count(), and samples.

| static int g726_init | ( | AVCodecContext * | avctx | ) | [static] |
Definition at line 320 of file g726.c.
References av_log(), AV_LOG_ERROR, avcodec_alloc_frame(), AVG726Context::bit_buffer, AVCodecContext::bit_rate, G726Tables::bits, AVG726Context::bits_left, AVG726Context::c, c, AVCodecContext::channels, AVG726Context::code_size, AVCodecContext::coded_frame, ENOMEM, FF_COMPLIANCE_INOFFICIAL, g726_reset(), AVCodecContext::priv_data, AVCodecContext::sample_rate, AVCodecContext::strict_std_compliance, and G726Context::tbls.

| static int16_t g726_iterate | ( | G726Context * | c, | |
| int16_t | I | |||
| ) | [inline, static] |
Definition at line 186 of file g726.c.
References G726Context::a, G726Context::ap, G726Context::b, G726Tables::bits, G726Context::dml, G726Context::dms, G726Context::dq, G726Tables::F, i2f(), inverse_quant(), mult(), G726Context::pk, G726Context::se, G726Context::sez, sgn(), Float11::sign, G726Context::sr, G726Context::tbls, G726Context::td, G726Tables::W, G726Context::y, G726Context::yl, and G726Context::yu.
Referenced by g726_decode(), and g726_encode().

| static int g726_reset | ( | G726Context * | c, | |
| int | bit_rate | |||
| ) | [static] |
Definition at line 269 of file g726.c.
References G726Context::a, G726Context::ap, G726Context::b, G726Context::dml, G726Context::dms, G726Context::dq, i2f(), G726Context::pk, G726Context::se, G726Context::sez, G726Context::sr, G726Context::tbls, G726Context::td, G726Context::y, G726Context::yl, and G726Context::yu.
Referenced by g726_init().

Definition at line 39 of file g726.c.
References Float11::exp, Float11::mant, and Float11::sign.
Referenced by g726_iterate(), and g726_reset().
| static int16_t inverse_quant | ( | G726Context * | c, | |
| int | i | |||
| ) | [inline, static] |
Para 4.2.3 page 22: Inverse adaptive quantizer.
Definition at line 176 of file g726.c.
References G726Tables::iquant, G726Context::tbls, and G726Context::y.
Referenced by g726_iterate().
Definition at line 50 of file g726.c.
References Float11::exp, Float11::mant, and Float11::sign.
Referenced by encode_frame(), g726_iterate(), and wma_decode_block().
| static uint8_t quant | ( | G726Context * | c, | |
| int | d | |||
| ) | [inline, static] |
Para 4.2.2 page 18: Adaptive quantizer.
Definition at line 150 of file g726.c.
References G726Tables::bits, G726Tables::quant, G726Context::tbls, and G726Context::y.
Referenced by a52_block(), dv_decode_video_segment(), g726_encode(), and RateCtlGetQ().
| static int sgn | ( | int | value | ) | [inline, static] |
Initial value:
{
"g726",
CODEC_TYPE_AUDIO,
CODEC_ID_ADPCM_G726,
sizeof(AVG726Context),
g726_init,
NULL,
g726_close,
g726_decode_frame,
}
int F_tbl24[] [static] |
int F_tbl32[] [static] |
int F_tbl40[] [static] |
G726Tables G726Tables_pool[] [static] |
Initial value:
{{ 2, quant_tbl16, iquant_tbl16, W_tbl16, F_tbl16 },
{ 3, quant_tbl24, iquant_tbl24, W_tbl24, F_tbl24 },
{ 4, quant_tbl32, iquant_tbl32, W_tbl32, F_tbl32 },
{ 5, quant_tbl40, iquant_tbl40, W_tbl40, F_tbl40 }}
int iquant_tbl16[] [static] |
int iquant_tbl24[] [static] |
int iquant_tbl32[] [static] |
int iquant_tbl40[] [static] |
int quant_tbl16[] [static] |
int quant_tbl24[] [static] |
int quant_tbl32[] [static] |
int quant_tbl40[] [static] |
int W_tbl24[] [static] |
int W_tbl32[] [static] |
int W_tbl40[] [static] |
1.5.5