FFmpeg
Macros | Functions | Variables
adxenc.c File Reference
#include "avcodec.h"
#include "adx.h"
#include "bytestream.h"
#include "encode.h"
#include "internal.h"
#include "put_bits.h"

Go to the source code of this file.

Macros

#define HEADER_SIZE   36
 

Functions

static void adx_encode (ADXContext *c, uint8_t *adx, const int16_t *wav, ADXChannelState *prev, int channels)
 
static int adx_encode_header (AVCodecContext *avctx, uint8_t *buf, int bufsize)
 
static av_cold int adx_encode_init (AVCodecContext *avctx)
 
static int adx_encode_frame (AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
 

Variables

const AVCodec ff_adpcm_adx_encoder
 

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 adxenc.c.

Macro Definition Documentation

◆ HEADER_SIZE

#define HEADER_SIZE   36

Definition at line 99 of file adxenc.c.

Function Documentation

◆ adx_encode()

static void adx_encode ( ADXContext c,
uint8_t *  adx,
const int16_t *  wav,
ADXChannelState prev,
int  channels 
)
static

Definition at line 38 of file adxenc.c.

Referenced by adx_encode_frame().

◆ adx_encode_header()

static int adx_encode_header ( AVCodecContext avctx,
uint8_t *  buf,
int  bufsize 
)
static

Definition at line 101 of file adxenc.c.

Referenced by adx_encode_frame().

◆ adx_encode_init()

static av_cold int adx_encode_init ( AVCodecContext avctx)
static

Definition at line 124 of file adxenc.c.

◆ adx_encode_frame()

static int adx_encode_frame ( AVCodecContext avctx,
AVPacket avpkt,
const AVFrame frame,
int got_packet_ptr 
)
static

Definition at line 141 of file adxenc.c.

Variable Documentation

◆ ff_adpcm_adx_encoder

const AVCodec ff_adpcm_adx_encoder
Initial value:
= {
.name = "adpcm_adx",
.long_name = NULL_IF_CONFIG_SMALL("SEGA CRI ADX ADPCM"),
.priv_data_size = sizeof(ADXContext),
.encode2 = adx_encode_frame,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}

Definition at line 191 of file adxenc.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:42
sample_fmts
static enum AVSampleFormat sample_fmts[]
Definition: adpcmenc.c:948
init
static int init
Definition: av_tx.c:47
adx_encode_frame
static int adx_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
Definition: adxenc.c:141
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
adx_encode_init
static av_cold int adx_encode_init(AVCodecContext *avctx)
Definition: adxenc.c:124
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
AV_CODEC_ID_ADPCM_ADX
@ AV_CODEC_ID_ADPCM_ADX
Definition: codec_id.h:362
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:59
AVSampleFormat
AVSampleFormat
Audio sample formats.
Definition: samplefmt.h:58
AV_SAMPLE_FMT_S16
@ AV_SAMPLE_FMT_S16
signed 16 bits
Definition: samplefmt.h:61
AV_CODEC_CAP_DELAY
#define AV_CODEC_CAP_DELAY
Encoder or decoder requires flushing with NULL input at the end in order to give the complete and cor...
Definition: codec.h:82
ADXContext
Definition: adx.h:42