FFmpeg
Data Structures | Functions | Variables
cngdec.c File Reference
#include <math.h>
#include "libavutil/common.h"
#include "libavutil/ffmath.h"
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
#include "celp_filters.h"
#include "codec_internal.h"
#include "internal.h"
#include "libavutil/lfg.h"

Go to the source code of this file.

Data Structures

struct  CNGContext
 

Functions

static av_cold int cng_decode_close (AVCodecContext *avctx)
 
static av_cold int cng_decode_init (AVCodecContext *avctx)
 
static void make_lpc_coefs (float *lpc, const float *refl, int order)
 
static void cng_decode_flush (AVCodecContext *avctx)
 
static int cng_decode_frame (AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, AVPacket *avpkt)
 

Variables

const FFCodec ff_comfortnoise_decoder
 

Function Documentation

◆ cng_decode_close()

static av_cold int cng_decode_close ( AVCodecContext avctx)
static

Definition at line 44 of file cngdec.c.

◆ cng_decode_init()

static av_cold int cng_decode_init ( AVCodecContext avctx)
static

Definition at line 55 of file cngdec.c.

◆ make_lpc_coefs()

static void make_lpc_coefs ( float lpc,
const float refl,
int  order 
)
static

Definition at line 82 of file cngdec.c.

Referenced by cng_decode_frame().

◆ cng_decode_flush()

static void cng_decode_flush ( AVCodecContext avctx)
static

Definition at line 99 of file cngdec.c.

◆ cng_decode_frame()

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

Definition at line 105 of file cngdec.c.

Variable Documentation

◆ ff_comfortnoise_decoder

const FFCodec ff_comfortnoise_decoder
Initial value:
= {
.p.name = "comfortnoise",
.p.long_name = NULL_IF_CONFIG_SMALL("RFC 3389 comfort noise generator"),
.p.type = AVMEDIA_TYPE_AUDIO,
.priv_data_size = sizeof(CNGContext),
.flush = cng_decode_flush,
.close = cng_decode_close,
.p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
}

Definition at line 165 of file cngdec.c.

FF_CODEC_CAP_INIT_CLEANUP
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
Definition: codec_internal.h:41
init
static int init
Definition: av_tx.c:47
FF_CODEC_DECODE_CB
#define FF_CODEC_DECODE_CB(func)
Definition: codec_internal.h:260
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
cng_decode_frame
static int cng_decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, AVPacket *avpkt)
Definition: cngdec.c:105
CNGContext
Definition: cngdec.c:33
cng_decode_close
static av_cold int cng_decode_close(AVCodecContext *avctx)
Definition: cngdec.c:44
cng_decode_flush
static void cng_decode_flush(AVCodecContext *avctx)
Definition: cngdec.c:99
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:109
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
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:117
AV_SAMPLE_FMT_NONE
@ AV_SAMPLE_FMT_NONE
Definition: samplefmt.h:56
AV_CODEC_ID_COMFORT_NOISE
@ AV_CODEC_ID_COMFORT_NOISE
Definition: codec_id.h:490
AVSampleFormat
AVSampleFormat
Audio sample formats.
Definition: samplefmt.h:55
AV_SAMPLE_FMT_S16
@ AV_SAMPLE_FMT_S16
signed 16 bits
Definition: samplefmt.h:58
cng_decode_init
static av_cold int cng_decode_init(AVCodecContext *avctx)
Definition: cngdec.c:55