FFmpeg
Loading...
Searching...
No Matches
adxenc.c File Reference

SEGA CRI adx codecs. More...

#include "avcodec.h"
#include "adx.h"
#include "bytestream.h"
#include "codec_internal.h"
#include "encode.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 FFCodec 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

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 FFCodec ff_adpcm_adx_encoder
Initial value:
= {
.p.name = "adpcm_adx",
CODEC_LONG_NAME("SEGA CRI ADX ADPCM"),
.p.type = AVMEDIA_TYPE_AUDIO,
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY |
.priv_data_size = sizeof(ADXContext),
.caps_internal = FF_CODEC_CAP_EOF_FLUSH,
}
static av_cold int adx_encode_init(AVCodecContext *avctx)
Definition adxenc.c:124
static int adx_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
Definition adxenc.c:141
#define FF_CODEC_CAP_EOF_FLUSH
The encoder has AV_CODEC_CAP_DELAY set, but does not actually have delay - it only wants to be flushe...
#define FF_CODEC_ENCODE_CB(func)
#define CODEC_LONG_NAME(str)
#define CODEC_SAMPLEFMTS(...)
int(* init)(AVBSFContext *ctx)
Definition dts2pts.c:608
#define AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE
This encoder can reorder user opaque values from input AVFrames and return them with corresponding ou...
Definition codec.h:147
#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:79
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
Definition codec.h:49
@ AV_CODEC_ID_ADPCM_ADX
Definition codec_id.h:379
@ AVMEDIA_TYPE_AUDIO
Definition avutil.h:201
@ AV_SAMPLE_FMT_S16
signed 16 bits
Definition samplefmt.h:58

Definition at line 190 of file adxenc.c.