FFmpeg
Functions | Variables
adxdec.c File Reference
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
#include "adx.h"
#include "get_bits.h"
#include "internal.h"

Go to the source code of this file.

Functions

static av_cold int adx_decode_init (AVCodecContext *avctx)
 
static int adx_decode (ADXContext *c, int16_t *out, int offset, const uint8_t *in, int ch)
 Decode 32 samples from 18 bytes. More...
 
static int adx_decode_frame (AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
 
static void adx_decode_flush (AVCodecContext *avctx)
 

Variables

AVCodec ff_adpcm_adx_decoder
 

Detailed Description

SEGA CRI adx codecs.

Reference documents: http://ku-www.ss.titech.ac.jp/~yatsushi/adx.html adx2wav & wav2adx http://www.geocities.co.jp/Playtown/2004/

Definition in file adxdec.c.

Function Documentation

◆ adx_decode_init()

static av_cold int adx_decode_init ( AVCodecContext avctx)
static

Definition at line 37 of file adxdec.c.

◆ adx_decode()

static int adx_decode ( ADXContext c,
int16_t *  out,
int  offset,
const uint8_t in,
int  ch 
)
static

Decode 32 samples from 18 bytes.

A 16-bit scalar value is applied to 32 residuals, which then have a 2nd-order LPC filter applied to it to form the output signal for a single channel.

Definition at line 65 of file adxdec.c.

Referenced by adx_decode_frame().

◆ adx_decode_frame()

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

Definition at line 95 of file adxdec.c.

◆ adx_decode_flush()

static void adx_decode_flush ( AVCodecContext avctx)
static

Definition at line 170 of file adxdec.c.

Variable Documentation

◆ ff_adpcm_adx_decoder

AVCodec ff_adpcm_adx_decoder
Initial value:
= {
.name = "adpcm_adx",
.long_name = NULL_IF_CONFIG_SMALL("SEGA CRI ADX ADPCM"),
.priv_data_size = sizeof(ADXContext),
.capabilities = AV_CODEC_CAP_DR1,
}

Definition at line 177 of file adxdec.c.

init
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
adx_decode_flush
static void adx_decode_flush(AVCodecContext *avctx)
Definition: adxdec.c:170
sample_fmts
static enum AVSampleFormat sample_fmts[]
Definition: adpcmenc.c:686
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
adx_decode_init
static av_cold int adx_decode_init(AVCodecContext *avctx)
Definition: adxdec.c:37
AV_CODEC_CAP_DR1
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:981
AV_CODEC_ID_ADPCM_ADX
@ AV_CODEC_ID_ADPCM_ADX
Definition: avcodec.h:511
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_SAMPLE_FMT_S16P
@ AV_SAMPLE_FMT_S16P
signed 16 bits, planar
Definition: samplefmt.h:67
AVSampleFormat
AVSampleFormat
Audio sample formats.
Definition: samplefmt.h:58
ADXContext
Definition: adx.h:42
adx_decode_frame
static int adx_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
Definition: adxdec.c:95