libavcodec/sipr.c File Reference

#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 *datap, int *data_size, AVPacket *avpkt)

Variables

static const SiprModeParam modes [MODE_COUNT]
const float ff_pow_0_5 []
AVCodec ff_sipr_decoder


Define Documentation

#define ALT_BITSTREAM_READER_LE

Definition at line 30 of file sipr.c.

#define MAX_SUBFRAME_COUNT   5

Definition at line 41 of file sipr.c.

Referenced by decode_frame().


Function Documentation

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_fixed_sparse ( AMRFixed fixed_sparse,
const int16_t *  pulses,
SiprMode  mode,
int  low_gain 
) [static]

Definition at line 307 of file sipr.c.

static void decode_frame ( SiprContext ctx,
SiprParameters params,
float *  out_data 
) [static]

Definition at line 363 of file sipr.c.

static void decode_parameters ( SiprParameters parms,
GetBitContext pgb,
const SiprModeParam p 
) [static]

Extract decoding parameters from the input bitstream.

Parameters:
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]

Definition at line 141 of file sipr.c.

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]

Definition at line 152 of file sipr.c.

Referenced by decode_frame().

static void pitch_sharpening ( int  pitch_lag_int,
float  beta,
float *  fixed_vector 
) [static]

Apply pitch lag to the fixed vector (AMR section 6.1.2).

Definition at line 178 of file sipr.c.

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 *  datap,
int *  data_size,
AVPacket avpkt 
) [static]

Definition at line 504 of file sipr.c.

static void sipr_decode_lp ( float *  lsfnew,
const float *  lsfold,
float *  Az,
int  num_subfr 
) [static]

Definition at line 215 of file sipr.c.

Referenced by decode_frame().

static av_cold int sipr_decoder_init ( AVCodecContext avctx  )  [static]

Definition at line 478 of file sipr.c.


Variable Documentation

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:

 {
    "sipr",
    AVMEDIA_TYPE_AUDIO,
    CODEC_ID_SIPR,
    sizeof(SiprContext),
    sipr_decoder_init,
    NULL,
    NULL,
    sipr_decode_frame,
    .long_name = NULL_IF_CONFIG_SMALL("RealAudio SIPR / ACELP.NET"),
}

Definition at line 556 of file sipr.c.

const SiprModeParam modes[MODE_COUNT] [static]

Definition at line 68 of file sipr.c.

Referenced by decode_mb_mode().


Generated on Fri Oct 26 02:38:18 2012 for FFmpeg by  doxygen 1.5.8