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

Go to the source code of this file.

Data Structures

struct  G728Context
 

Macros

#define MAX_BACKWARD_FILTER_ORDER   LPC
 
#define MAX_BACKWARD_FILTER_LEN   NFRSZ
 
#define MAX_BACKWARD_FILTER_NONREC   NONR
 
#define ATTEN   0.75f
 
#define LPCW   10 /* Perceptual weighting filter order */
 
#define GOFF   32.0f /* Log-gain offset value */
 
#define SAMPLES_PER_FRAME   20
 

Functions

static av_cold void g728_init_static_data (void)
 
static av_cold int g728_decode_init (AVCodecContext *avctx)
 
static av_cold int g728_decode_close (AVCodecContext *avctx)
 
static int hybrid_window (AVFloatDSPContext *fdsp, int order, int n, int non_rec, float *out, const float *hist, float *out2, const float *window)
 
static void decode_frame (G728Context *s, GetBitContext *gb, float *dst)
 
static int g728_decode_frame (AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, AVPacket *avpkt)
 

Variables

static float g728_gq_db [8]
 
static float g728_y_db [128]
 
static float g728_wnr_r [FFALIGN(NSBSZ, 16)]
 
static float g728_wnrg_r [FFALIGN(NSBGSZ, 16)]
 
static float g728_facv_f [FFALIGN(LPC, 16)]
 
const FFCodec ff_g728_decoder
 

Macro Definition Documentation

◆ MAX_BACKWARD_FILTER_ORDER

#define MAX_BACKWARD_FILTER_ORDER   LPC

Definition at line 36 of file g728dec.c.

◆ MAX_BACKWARD_FILTER_LEN

#define MAX_BACKWARD_FILTER_LEN   NFRSZ

Definition at line 37 of file g728dec.c.

◆ MAX_BACKWARD_FILTER_NONREC

#define MAX_BACKWARD_FILTER_NONREC   NONR

Definition at line 38 of file g728dec.c.

◆ ATTEN

#define ATTEN   0.75f

Definition at line 39 of file g728dec.c.

◆ LPCW

#define LPCW   10 /* Perceptual weighting filter order */

Definition at line 42 of file g728dec.c.

◆ GOFF

#define GOFF   32.0f /* Log-gain offset value */

Definition at line 43 of file g728dec.c.

◆ SAMPLES_PER_FRAME

#define SAMPLES_PER_FRAME   20

Function Documentation

◆ g728_init_static_data()

static av_cold void g728_init_static_data ( void  )
static

Definition at line 51 of file g728dec.c.

Referenced by g728_decode_init().

◆ g728_decode_init()

static av_cold int g728_decode_init ( AVCodecContext avctx)
static

Definition at line 85 of file g728dec.c.

◆ g728_decode_close()

static av_cold int g728_decode_close ( AVCodecContext avctx)
static

Definition at line 107 of file g728dec.c.

◆ hybrid_window()

static int hybrid_window ( AVFloatDSPContext fdsp,
int  order,
int  n,
int  non_rec,
float out,
const float hist,
float out2,
const float window 
)
static

Definition at line 114 of file g728dec.c.

Referenced by decode_frame().

◆ decode_frame()

static void decode_frame ( G728Context s,
GetBitContext gb,
float dst 
)
static

Definition at line 122 of file g728dec.c.

Referenced by g728_decode_frame().

◆ g728_decode_frame()

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

Definition at line 179 of file g728dec.c.

Variable Documentation

◆ g728_gq_db

float g728_gq_db[8]
static

Definition at line 45 of file g728dec.c.

Referenced by decode_frame(), and g728_init_static_data().

◆ g728_y_db

float g728_y_db[128]
static

Definition at line 46 of file g728dec.c.

Referenced by decode_frame(), and g728_init_static_data().

◆ g728_wnr_r

float g728_wnr_r[FFALIGN(NSBSZ, 16)]
static

Definition at line 47 of file g728dec.c.

Referenced by decode_frame(), and g728_init_static_data().

◆ g728_wnrg_r

float g728_wnrg_r[FFALIGN(NSBGSZ, 16)]
static

Definition at line 48 of file g728dec.c.

Referenced by decode_frame(), and g728_init_static_data().

◆ g728_facv_f

float g728_facv_f[FFALIGN(LPC, 16)]
static

Definition at line 49 of file g728dec.c.

Referenced by decode_frame(), and g728_init_static_data().

◆ ff_g728_decoder

const FFCodec ff_g728_decoder
Initial value:
= {
.p.name = "g728",
CODEC_LONG_NAME("G.728)"),
.p.type = AVMEDIA_TYPE_AUDIO,
.priv_data_size = sizeof(G728Context),
.p.capabilities = AV_CODEC_CAP_CHANNEL_CONF |
}

Definition at line 207 of file g728dec.c.

g728_decode_frame
static int g728_decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, AVPacket *avpkt)
Definition: g728dec.c:179
g728_decode_close
static av_cold int g728_decode_close(AVCodecContext *avctx)
Definition: g728dec.c:107
close
static av_cold void close(AVCodecParserContext *s)
Definition: apv_parser.c:135
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
AV_CODEC_ID_G728
@ AV_CODEC_ID_G728
Definition: codec_id.h:556
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
g728_decode_init
static av_cold int g728_decode_init(AVCodecContext *avctx)
Definition: g728dec.c:85
G728Context
Definition: g728dec.c:71