FFmpeg
Data Structures | Macros | Functions | Variables
ra288.c File Reference
#include "libavutil/channel_layout.h"
#include "libavutil/float_dsp.h"
#include "libavutil/internal.h"
#include "libavutil/mem.h"
#include "libavutil/mem_internal.h"
#include "avcodec.h"
#include "celp_filters.h"
#include "codec_internal.h"
#include "decode.h"
#include "get_bits.h"
#include "lpc_functions.h"
#include "ra288.h"
#include "g728_template.c"

Go to the source code of this file.

Data Structures

struct  RA288Context
 

Macros

#define BITSTREAM_READER_LE
 
#define MAX_BACKWARD_FILTER_ORDER   36
 
#define MAX_BACKWARD_FILTER_LEN   40
 
#define MAX_BACKWARD_FILTER_NONREC   35
 
#define ATTEN   0.5625
 
#define RA288_BLOCK_SIZE   5
 
#define RA288_BLOCKS_PER_FRAME   32
 

Functions

static av_cold int ra288_decode_init (AVCodecContext *avctx)
 
static void decode (RA288Context *ractx, float gain, int cb_coef)
 
static void backward_filter (RA288Context *ractx, float *hist, float *rec, const float *window, float *lpc, const float *tab, int order, int n, int non_rec, int move_size)
 Backward synthesis filter, find the LPC coefficients from past speech data. More...
 
static int ra288_decode_frame (AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, AVPacket *avpkt)
 

Variables

const FFCodec ff_ra_288_decoder
 

Macro Definition Documentation

◆ BITSTREAM_READER_LE

#define BITSTREAM_READER_LE

Definition at line 28 of file ra288.c.

◆ MAX_BACKWARD_FILTER_ORDER

#define MAX_BACKWARD_FILTER_ORDER   36

Definition at line 37 of file ra288.c.

◆ MAX_BACKWARD_FILTER_LEN

#define MAX_BACKWARD_FILTER_LEN   40

Definition at line 38 of file ra288.c.

◆ MAX_BACKWARD_FILTER_NONREC

#define MAX_BACKWARD_FILTER_NONREC   35

Definition at line 39 of file ra288.c.

◆ ATTEN

#define ATTEN   0.5625

Definition at line 40 of file ra288.c.

◆ RA288_BLOCK_SIZE

#define RA288_BLOCK_SIZE   5

Definition at line 43 of file ra288.c.

◆ RA288_BLOCKS_PER_FRAME

#define RA288_BLOCKS_PER_FRAME   32

Definition at line 44 of file ra288.c.

Function Documentation

◆ ra288_decode_init()

static av_cold int ra288_decode_init ( AVCodecContext avctx)
static

Definition at line 69 of file ra288.c.

◆ decode()

static void decode ( RA288Context ractx,
float  gain,
int  cb_coef 
)
static

Definition at line 92 of file ra288.c.

Referenced by ra288_decode_frame().

◆ backward_filter()

static void backward_filter ( RA288Context ractx,
float hist,
float rec,
const float window,
float lpc,
const float tab,
int  order,
int  n,
int  non_rec,
int  move_size 
)
static

Backward synthesis filter, find the LPC coefficients from past speech data.

Definition at line 132 of file ra288.c.

Referenced by ra288_decode_frame().

◆ ra288_decode_frame()

static int ra288_decode_frame ( AVCodecContext avctx,
AVFrame frame,
int *  got_frame_ptr,
AVPacket avpkt 
)
static

Definition at line 147 of file ra288.c.

Variable Documentation

◆ ff_ra_288_decoder

const FFCodec ff_ra_288_decoder
Initial value:
= {
.p.name = "real_288",
CODEC_LONG_NAME("RealAudio 2.0 (28.8K)"),
.p.type = AVMEDIA_TYPE_AUDIO,
.priv_data_size = sizeof(RA288Context),
}

Definition at line 197 of file ra288.c.

FF_CODEC_DECODE_CB
#define FF_CODEC_DECODE_CB(func)
Definition: codec_internal.h:341
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:201
CODEC_LONG_NAME
#define CODEC_LONG_NAME(str)
Definition: codec_internal.h:326
ra288_decode_init
static av_cold int ra288_decode_init(AVCodecContext *avctx)
Definition: ra288.c:69
AV_CODEC_CAP_CHANNEL_CONF
#define AV_CODEC_CAP_CHANNEL_CONF
Codec should fill in channel configuration and samplerate instead of container.
Definition: codec.h:91
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts.c:368
AV_CODEC_CAP_DR1
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
Definition: codec.h:52
RA288Context
Definition: ra288.c:46
AV_CODEC_ID_RA_288
@ AV_CODEC_ID_RA_288
Definition: codec_id.h:435
ra288_decode_frame
static int ra288_decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, AVPacket *avpkt)
Definition: ra288.c:147