FFmpeg
|
#include "libavutil/avassert.h"
#include "libavutil/float_dsp.h"
#include "avcodec.h"
#include "bytestream.h"
#include "codec_internal.h"
#include "decode.h"
#include "get_bits.h"
#include "speexdata.h"
Go to the source code of this file.
Data Structures | |
struct | LtpParams |
struct | SplitCodebookParams |
struct | SpeexSubmode |
struct | SpeexMode |
struct | DecoderState |
struct | StereoState |
struct | SpeexContext |
Macros | |
#define | SPEEX_NB_MODES 3 |
#define | SPEEX_INBAND_STEREO 9 |
#define | QMF_ORDER 64 |
#define | NB_ORDER 10 |
#define | NB_FRAME_SIZE 160 |
#define | NB_SUBMODES 9 |
#define | NB_SUBMODE_BITS 4 |
#define | SB_SUBMODE_BITS 3 |
#define | NB_SUBFRAME_SIZE 40 |
#define | NB_NB_SUBFRAMES 4 |
#define | NB_PITCH_START 17 |
#define | NB_PITCH_END 144 |
#define | NB_DEC_BUFFER (NB_FRAME_SIZE + 2 * NB_PITCH_END + NB_SUBFRAME_SIZE + 12) |
#define | SPEEX_MEMSET(dst, c, n) (memset((dst), (c), (n) * sizeof(*(dst)))) |
#define | SPEEX_COPY(dst, src, n) (memcpy((dst), (src), (n) * sizeof(*(dst)))) |
#define | LSP_LINEAR(i) (.25f * (i) + .25f) |
#define | LSP_LINEAR_HIGH(i) (.3125f * (i) + .75f) |
#define | LSP_DIV_256(x) (0.00390625f * (x)) |
#define | LSP_DIV_512(x) (0.001953125f * (x)) |
#define | LSP_DIV_1024(x) (0.0009765625f * (x)) |
#define | SUBMODE(x) st->submodes[st->submodeID]->x |
#define | gain_3tap_to_1tap(g) (FFABS(g[1]) + (g[0] > 0.f ? g[0] : -.5f * g[0]) + (g[2] > 0.f ? g[2] : -.5f * g[2])) |
#define | median3(a, b, c) |
Typedefs | |
typedef void(* | lsp_quant_func) (float *, float *, int, GetBitContext *) |
Quantizes LSPs. More... | |
typedef void(* | lsp_unquant_func) (float *, int, GetBitContext *) |
Decodes quantized LSPs. More... | |
typedef int(* | ltp_quant_func) (float *, float *, float *, float *, float *, float *, const void *, int, int, float, int, int, GetBitContext *, char *, float *, float *, int, int, int, float *) |
Long-term predictor quantization. More... | |
typedef void(* | ltp_unquant_func) (float *, float *, int, int, float, const void *, int, int *, float *, GetBitContext *, int, int, float, int) |
Long-term un-quantize. More... | |
typedef void(* | innovation_quant_func) (float *, float *, float *, float *, const void *, int, int, float *, float *, GetBitContext *, char *, int, int) |
Innovation quantization function. More... | |
typedef void(* | innovation_unquant_func) (float *, const void *, int, GetBitContext *, uint32_t *) |
Innovation unquantization function. More... | |
Functions | |
static int | speex_default_user_handler (GetBitContext *gb, void *state, void *data) |
static void | lsp_unquant_lbr (float *lsp, int order, GetBitContext *gb) |
static void | forced_pitch_unquant (float *exc, float *exc_out, int start, int end, float pitch_coef, const void *par, int nsf, int *pitch_val, float *gain_val, GetBitContext *gb, int count_lost, int subframe_offset, float last_pitch_gain, int cdbk_offset) |
static float | speex_rand (float std, uint32_t *seed) |
static void | noise_codebook_unquant (float *exc, const void *par, int nsf, GetBitContext *gb, uint32_t *seed) |
static void | split_cb_shape_sign_unquant (float *exc, const void *par, int nsf, GetBitContext *gb, uint32_t *seed) |
static void | pitch_unquant_3tap (float *exc, float *exc_out, int start, int end, float pitch_coef, const void *par, int nsf, int *pitch_val, float *gain_val, GetBitContext *gb, int count_lost, int subframe_offset, float last_pitch_gain, int cdbk_offset) |
static void | lsp_unquant_nb (float *lsp, int order, GetBitContext *gb) |
static void | lsp_unquant_high (float *lsp, int order, GetBitContext *gb) |
static int | nb_decode (AVCodecContext *, void *, GetBitContext *, float *) |
static int | sb_decode (AVCodecContext *, void *, GetBitContext *, float *) |
static float | compute_rms (const float *x, int len) |
static void | bw_lpc (float gamma, const float *lpc_in, float *lpc_out, int order) |
static void | iir_mem (const float *x, const float *den, float *y, int N, int ord, float *mem) |
static void | highpass (const float *x, float *y, int len, float *mem, int wide) |
static int | speex_std_stereo (GetBitContext *gb, void *state, void *data) |
static int | speex_inband_handler (GetBitContext *gb, void *state, StereoState *stereo) |
static void | sanitize_values (float *vec, float min_val, float max_val, int len) |
static void | signal_mul (const float *x, float *y, float scale, int len) |
static float | inner_prod (const float *x, const float *y, int len) |
static int | interp_pitch (const float *exc, float *interp, int pitch, int len) |
static void | multicomb (const float *exc, float *new_exc, float *ak, int p, int nsf, int pitch, int max_pitch, float comb_gain) |
static void | lsp_interpolate (const float *old_lsp, const float *new_lsp, float *lsp, int len, int subframe, int nb_subframes, float margin) |
static void | lsp_to_lpc (const float *freq, float *ak, int lpcrdr) |
static void | qmf_synth (const float *x1, const float *x2, const float *a, float *y, int N, int M, float *mem1, float *mem2) |
static int | decoder_init (SpeexContext *s, DecoderState *st, const SpeexMode *mode) |
static int | parse_speex_extradata (AVCodecContext *avctx, const uint8_t *extradata, int extradata_size) |
static av_cold int | speex_decode_init (AVCodecContext *avctx) |
static void | speex_decode_stereo (float *data, int frame_size, StereoState *stereo) |
static int | speex_decode_frame (AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, AVPacket *avpkt) |
static av_cold int | speex_decode_close (AVCodecContext *avctx) |
#define SPEEX_NB_MODES 3 |
Definition at line 63 of file speexdec.c.
#define SPEEX_INBAND_STEREO 9 |
Definition at line 64 of file speexdec.c.
#define QMF_ORDER 64 |
Definition at line 66 of file speexdec.c.
#define NB_ORDER 10 |
Definition at line 67 of file speexdec.c.
#define NB_FRAME_SIZE 160 |
Definition at line 68 of file speexdec.c.
#define NB_SUBMODES 9 |
Definition at line 69 of file speexdec.c.
#define NB_SUBMODE_BITS 4 |
Definition at line 70 of file speexdec.c.
#define SB_SUBMODE_BITS 3 |
Definition at line 71 of file speexdec.c.
#define NB_SUBFRAME_SIZE 40 |
Definition at line 73 of file speexdec.c.
#define NB_NB_SUBFRAMES 4 |
Definition at line 74 of file speexdec.c.
#define NB_PITCH_START 17 |
Definition at line 75 of file speexdec.c.
#define NB_PITCH_END 144 |
Definition at line 76 of file speexdec.c.
#define NB_DEC_BUFFER (NB_FRAME_SIZE + 2 * NB_PITCH_END + NB_SUBFRAME_SIZE + 12) |
Definition at line 78 of file speexdec.c.
Definition at line 80 of file speexdec.c.
Definition at line 81 of file speexdec.c.
#define LSP_DIV_256 | ( | x | ) | (0.00390625f * (x)) |
Definition at line 85 of file speexdec.c.
#define LSP_DIV_512 | ( | x | ) | (0.001953125f * (x)) |
Definition at line 86 of file speexdec.c.
#define LSP_DIV_1024 | ( | x | ) | (0.0009765625f * (x)) |
Definition at line 87 of file speexdec.c.
#define SUBMODE | ( | x | ) | st->submodes[st->submodeID]->x |
Definition at line 348 of file speexdec.c.
#define gain_3tap_to_1tap | ( | g | ) | (FFABS(g[1]) + (g[0] > 0.f ? g[0] : -.5f * g[0]) + (g[2] > 0.f ? g[2] : -.5f * g[2])) |
Definition at line 350 of file speexdec.c.
typedef void(* lsp_quant_func) (float *, float *, int, GetBitContext *) |
Quantizes LSPs.
Definition at line 118 of file speexdec.c.
typedef void(* lsp_unquant_func) (float *, int, GetBitContext *) |
Decodes quantized LSPs.
Definition at line 121 of file speexdec.c.
typedef int(* ltp_quant_func) (float *, float *, float *, float *, float *, float *, const void *, int, int, float, int, int, GetBitContext *, char *, float *, float *, int, int, int, float *) |
Long-term predictor quantization.
Definition at line 124 of file speexdec.c.
typedef void(* ltp_unquant_func) (float *, float *, int, int, float, const void *, int, int *, float *, GetBitContext *, int, int, float, int) |
Long-term un-quantize.
Definition at line 131 of file speexdec.c.
typedef void(* innovation_quant_func) (float *, float *, float *, float *, const void *, int, int, float *, float *, GetBitContext *, char *, int, int) |
Innovation quantization function.
Definition at line 137 of file speexdec.c.
typedef void(* innovation_unquant_func) (float *, const void *, int, GetBitContext *, uint32_t *) |
Innovation unquantization function.
Definition at line 143 of file speexdec.c.
|
static |
Definition at line 224 of file speexdec.c.
Referenced by nb_decode().
|
static |
Definition at line 261 of file speexdec.c.
|
static |
Definition at line 281 of file speexdec.c.
Definition at line 297 of file speexdec.c.
Referenced by nb_decode(), and noise_codebook_unquant().
|
static |
Definition at line 311 of file speexdec.c.
|
static |
Definition at line 318 of file speexdec.c.
|
static |
Definition at line 353 of file speexdec.c.
|
static |
Definition at line 409 of file speexdec.c.
|
static |
Definition at line 437 of file speexdec.c.
|
static |
Definition at line 866 of file speexdec.c.
|
static |
Definition at line 1217 of file speexdec.c.
Definition at line 563 of file speexdec.c.
Referenced by multicomb(), nb_decode(), and sb_decode().
Definition at line 574 of file speexdec.c.
Referenced by nb_decode().
|
static |
Definition at line 585 of file speexdec.c.
Referenced by nb_decode(), postfilter(), and sb_decode().
Definition at line 598 of file speexdec.c.
Referenced by nb_decode().
|
static |
Definition at line 618 of file speexdec.c.
Referenced by speex_inband_handler().
|
static |
Definition at line 629 of file speexdec.c.
Referenced by nb_decode().
Definition at line 655 of file speexdec.c.
Referenced by nb_decode().
Definition at line 665 of file speexdec.c.
Referenced by nb_decode(), and sb_decode().
Definition at line 671 of file speexdec.c.
Referenced by interp_pitch(), and multicomb().
Definition at line 691 of file speexdec.c.
Referenced by multicomb().
|
static |
Definition at line 738 of file speexdec.c.
Referenced by nb_decode().
|
static |
Definition at line 805 of file speexdec.c.
Referenced by nb_decode(), and sb_decode().
Definition at line 822 of file speexdec.c.
Referenced by nb_decode(), and sb_decode().
|
static |
Definition at line 1160 of file speexdec.c.
Referenced by sb_decode().
|
static |
Definition at line 1363 of file speexdec.c.
Referenced by speex_decode_init().
|
static |
Definition at line 1396 of file speexdec.c.
Referenced by speex_decode_init().
|
static |
Definition at line 1436 of file speexdec.c.
|
static |
Definition at line 1516 of file speexdec.c.
Referenced by speex_decode_frame().
|
static |
Definition at line 1536 of file speexdec.c.
|
static |
Definition at line 1578 of file speexdec.c.
|
static |
Definition at line 95 of file speexdec.c.
|
static |
Definition at line 96 of file speexdec.c.
|
static |
Definition at line 97 of file speexdec.c.
|
static |
Definition at line 98 of file speexdec.c.
|
static |
Definition at line 108 of file speexdec.c.
|
static |
Definition at line 109 of file speexdec.c.
|
static |
Definition at line 110 of file speexdec.c.
|
static |
Definition at line 111 of file speexdec.c.
|
static |
Definition at line 112 of file speexdec.c.
|
static |
Definition at line 113 of file speexdec.c.
|
static |
Definition at line 114 of file speexdec.c.
|
static |
Definition at line 115 of file speexdec.c.
|
static |
Definition at line 454 of file speexdec.c.
|
static |
Definition at line 460 of file speexdec.c.
|
static |
Definition at line 466 of file speexdec.c.
|
static |
Definition at line 472 of file speexdec.c.
|
static |
Definition at line 478 of file speexdec.c.
|
static |
Definition at line 484 of file speexdec.c.
|
static |
Definition at line 490 of file speexdec.c.
|
static |
Definition at line 496 of file speexdec.c.
|
static |
Definition at line 501 of file speexdec.c.
|
static |
Definition at line 506 of file speexdec.c.
|
static |
Definition at line 511 of file speexdec.c.
|
static |
Definition at line 516 of file speexdec.c.
|
static |
Definition at line 524 of file speexdec.c.
Referenced by sb_decode(), speex_decode_frame(), and speex_decode_init().
const FFCodec ff_speex_decoder |
Definition at line 1585 of file speexdec.c.