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 "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, void *data, int *got_frame_ptr, AVPacket *avpkt)
 

Variables

AVCodec ff_comfortnoise_decoder
 

Function Documentation

◆ cng_decode_close()

static av_cold int cng_decode_close ( AVCodecContext avctx)
static

Definition at line 43 of file cngdec.c.

◆ cng_decode_init()

static av_cold int cng_decode_init ( AVCodecContext avctx)
static

Definition at line 54 of file cngdec.c.

◆ make_lpc_coefs()

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

Definition at line 80 of file cngdec.c.

Referenced by cng_decode_frame().

◆ cng_decode_flush()

static void cng_decode_flush ( AVCodecContext avctx)
static

Definition at line 97 of file cngdec.c.

◆ cng_decode_frame()

static int cng_decode_frame ( AVCodecContext avctx,
void *  data,
int got_frame_ptr,
AVPacket avpkt 
)
static

Definition at line 103 of file cngdec.c.

Variable Documentation

◆ ff_comfortnoise_decoder

AVCodec ff_comfortnoise_decoder
Initial value:
= {
.name = "comfortnoise",
.long_name = NULL_IF_CONFIG_SMALL("RFC 3389 comfort noise generator"),
.priv_data_size = sizeof(CNGContext),
.close = cng_decode_close,
.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
}

Definition at line 164 of file cngdec.c.

FF_CODEC_CAP_INIT_THREADSAFE
#define FF_CODEC_CAP_INIT_THREADSAFE
The codec does not modify any global variables in the init function, allowing to call the init functi...
Definition: internal.h:40
init
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
sample_fmts
static enum AVSampleFormat sample_fmts[]
Definition: adpcmenc.c:686
cng_decode_frame
static int cng_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
Definition: cngdec.c:103
decode
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
Definition: decode_audio.c:42
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
flush
static void flush(AVCodecContext *avctx)
Definition: aacdec_template.c:500
CNGContext
Definition: cngdec.c:32
cng_decode_close
static av_cold int cng_decode_close(AVCodecContext *avctx)
Definition: cngdec.c:43
cng_decode_flush
static void cng_decode_flush(AVCodecContext *avctx)
Definition: cngdec.c:97
AV_CODEC_CAP_DR1
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:981
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:188
AV_SAMPLE_FMT_NONE
@ AV_SAMPLE_FMT_NONE
Definition: samplefmt.h:59
AV_CODEC_ID_COMFORT_NOISE
@ AV_CODEC_ID_COMFORT_NOISE
Definition: avcodec.h:625
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: internal.h:48
AVSampleFormat
AVSampleFormat
Audio sample formats.
Definition: samplefmt.h:58
AV_SAMPLE_FMT_S16
@ AV_SAMPLE_FMT_S16
signed 16 bits
Definition: samplefmt.h:61
cng_decode_init
static av_cold int cng_decode_init(AVCodecContext *avctx)
Definition: cngdec.c:54