#include <math.h>#include <stdint.h>#include <string.h>#include "libavutil/mathematics.h"#include "avcodec.h"#include "get_bits.h"#include "dsputil.h"#include "lsp.h"#include "celp_math.h"#include "acelp_vectors.h"#include "acelp_pitch_delay.h"#include "acelp_filters.h"#include "celp_filters.h"#include "sipr.h"#include "siprdata.h"Go to the source code of this file.
Data Structures | |
| struct | SiprModeParam |
Defines | |
| #define | ALT_BITSTREAM_READER_LE |
| #define | MAX_SUBFRAME_COUNT 5 |
Functions | |
| static void | dequant (float *out, const int *idx, const float *cbs[]) |
| static void | lsf_decode_fp (float *lsfnew, float *lsf_history, const SiprParameters *parm) |
| static void | pitch_sharpening (int pitch_lag_int, float beta, float *fixed_vector) |
| Apply pitch lag to the fixed vector (AMR section 6.1.2). | |
| static void | decode_parameters (SiprParameters *parms, GetBitContext *pgb, const SiprModeParam *p) |
| Extract decoding parameters from the input bitstream. | |
| static void | sipr_decode_lp (float *lsfnew, const float *lsfold, float *Az, int num_subfr) |
| static void | eval_ir (const float *Az, int pitch_lag, float *freq, float pitch_sharp_factor) |
| Evaluate the adaptive impulse response. | |
| static void | convolute_with_sparse (float *out, const AMRFixed *pulses, const float *shape, int length) |
| Evaluate the convolution of a vector with a sparse vector. | |
| static void | postfilter_5k0 (SiprContext *ctx, const float *lpc, float *samples) |
| Apply postfilter, very similar to AMR one. | |
| static void | decode_fixed_sparse (AMRFixed *fixed_sparse, const int16_t *pulses, SiprMode mode, int low_gain) |
| static void | decode_frame (SiprContext *ctx, SiprParameters *params, float *out_data) |
| static av_cold int | sipr_decoder_init (AVCodecContext *avctx) |
| static int | sipr_decode_frame (AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt) |
Variables | |
| static const SiprModeParam | modes [MODE_COUNT] |
| const float | ff_pow_0_5 [] |
| AVCodec | ff_sipr_decoder |
| #define MAX_SUBFRAME_COUNT 5 |
| static void convolute_with_sparse | ( | float * | out, | |
| const AMRFixed * | pulses, | |||
| const float * | shape, | |||
| int | length | |||
| ) | [static] |
Evaluate the convolution of a vector with a sparse vector.
Definition at line 258 of file sipr.c.
Referenced by decode_frame().
| static void decode_frame | ( | SiprContext * | ctx, | |
| SiprParameters * | params, | |||
| float * | out_data | |||
| ) | [static] |
| static void decode_parameters | ( | SiprParameters * | parms, | |
| GetBitContext * | pgb, | |||
| const SiprModeParam * | p | |||
| ) | [static] |
Extract decoding parameters from the input bitstream.
| parms | parameters structure | |
| pgb | pointer to initialized GetBitContext structure |
Definition at line 192 of file sipr.c.
Referenced by sipr_decode_frame().
| static void dequant | ( | float * | out, | |
| const int * | idx, | |||
| const float * | cbs[] | |||
| ) | [static] |
| static void eval_ir | ( | const float * | Az, | |
| int | pitch_lag, | |||
| float * | freq, | |||
| float | pitch_sharp_factor | |||
| ) | [static] |
Evaluate the adaptive impulse response.
Definition at line 236 of file sipr.c.
Referenced by decode_frame().
| static void lsf_decode_fp | ( | float * | lsfnew, | |
| float * | lsf_history, | |||
| const SiprParameters * | parm | |||
| ) | [static] |
| static void pitch_sharpening | ( | int | pitch_lag_int, | |
| float | beta, | |||
| float * | fixed_vector | |||
| ) | [static] |
| static void postfilter_5k0 | ( | SiprContext * | ctx, | |
| const float * | lpc, | |||
| float * | samples | |||
| ) | [static] |
Apply postfilter, very similar to AMR one.
Definition at line 272 of file sipr.c.
Referenced by decode_frame().
| static int sipr_decode_frame | ( | AVCodecContext * | avctx, | |
| void * | data, | |||
| int * | got_frame_ptr, | |||
| AVPacket * | avpkt | |||
| ) | [static] |
| static void sipr_decode_lp | ( | float * | lsfnew, | |
| const float * | lsfold, | |||
| float * | Az, | |||
| int | num_subfr | |||
| ) | [static] |
| static av_cold int sipr_decoder_init | ( | AVCodecContext * | avctx | ) | [static] |
| const float ff_pow_0_5[] |
Initial value:
{
1.0/(1 << 1), 1.0/(1 << 2), 1.0/(1 << 3), 1.0/(1 << 4),
1.0/(1 << 5), 1.0/(1 << 6), 1.0/(1 << 7), 1.0/(1 << 8),
1.0/(1 << 9), 1.0/(1 << 10), 1.0/(1 << 11), 1.0/(1 << 12),
1.0/(1 << 13), 1.0/(1 << 14), 1.0/(1 << 15), 1.0/(1 << 16)
}
Definition at line 134 of file sipr.c.
Referenced by postfilter(), and postfilter_5k0().
Initial value:
{
.name = "sipr",
.type = AVMEDIA_TYPE_AUDIO,
.id = CODEC_ID_SIPR,
.priv_data_size = sizeof(SiprContext),
.init = sipr_decoder_init,
.decode = sipr_decode_frame,
.capabilities = CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("RealAudio SIPR / ACELP.NET"),
}
const SiprModeParam modes[MODE_COUNT] [static] |
1.5.8