FFmpeg
Classes | Macros | Typedefs | Functions
dpcm.c File Reference

Assorted DPCM (differential pulse code modulation) audio codecs by Mike Melanson (melan.nosp@m.son@.nosp@m.pcisy.nosp@m.s.ne.nosp@m.t) Xan DPCM decoder by Mario Brito (mbrit.nosp@m.o@st.nosp@m.udent.nosp@m..dei.nosp@m..uc.p.nosp@m.t) for more information on the specific data formats, visit: http://www.pcisys.net/~melanson/codecs/simpleaudio.html SOL DPCMs implemented by Konstantin Shishkov. More...

#include "libavutil/intreadwrite.h"
#include "avcodec.h"
#include "bytestream.h"
#include "internal.h"
#include "mathops.h"

Classes

struct  DPCMContext
 

Macros

#define DPCM_DECODER(id_, name_, long_name_)
 

Typedefs

typedef struct DPCMContext DPCMContext
 

Functions

 DPCM_DECODER (AV_CODEC_ID_GREMLIN_DPCM, gremlin_dpcm, "DPCM Gremlin")
 
 DPCM_DECODER (AV_CODEC_ID_INTERPLAY_DPCM, interplay_dpcm, "DPCM Interplay")
 
 DPCM_DECODER (AV_CODEC_ID_ROQ_DPCM, roq_dpcm, "DPCM id RoQ")
 
 DPCM_DECODER (AV_CODEC_ID_SDX2_DPCM, sdx2_dpcm, "DPCM Squareroot-Delta-Exact")
 
 DPCM_DECODER (AV_CODEC_ID_SOL_DPCM, sol_dpcm, "DPCM Sol")
 
 DPCM_DECODER (AV_CODEC_ID_XAN_DPCM, xan_dpcm, "DPCM Xan")
 

Detailed Description

Assorted DPCM (differential pulse code modulation) audio codecs by Mike Melanson (melan.nosp@m.son@.nosp@m.pcisy.nosp@m.s.ne.nosp@m.t) Xan DPCM decoder by Mario Brito (mbrit.nosp@m.o@st.nosp@m.udent.nosp@m..dei.nosp@m..uc.p.nosp@m.t) for more information on the specific data formats, visit: http://www.pcisys.net/~melanson/codecs/simpleaudio.html SOL DPCMs implemented by Konstantin Shishkov.

Note about using the Xan DPCM decoder: Xan DPCM is used in AVI files found in the Wing Commander IV computer game. These AVI files contain WAVEFORMAT headers which report the audio format as 0x01: raw PCM. Clearly incorrect. To detect Xan DPCM, you will probably have to special-case your AVI demuxer to use Xan DPCM if the file uses 'Xxan' (Xan video) for its video codec. Alternately, such AVI files also contain the fourcc 'Axan' in the 'auds' chunk of the AVI header.

Macro Definition Documentation

§ DPCM_DECODER

#define DPCM_DECODER (   id_,
  name_,
  long_name_ 
)
Value:
AVCodec ff_ ## name_ ## _decoder = { \
.name = #name_, \
.long_name = NULL_IF_CONFIG_SMALL(long_name_), \
.type = AVMEDIA_TYPE_AUDIO, \
.id = id_, \
.priv_data_size = sizeof(DPCMContext), \
.init = dpcm_decode_init, \
.decode = dpcm_decode_frame, \
.capabilities = AV_CODEC_CAP_DR1, \
}
AVCodec.
Definition: avcodec.h:3408
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
const char * name
Name of the codec implementation.
Definition: avcodec.h:3415
Definition: dpcm.c:46
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:959