ADPCM decoders First version by Francois Revol (revol@free.fr) Fringe ADPCM codecs (e.g., DK3, DK4, Westwood) by Mike Melanson (melanson@pcisys.net) CD-ROM XA ADPCM codec by BERO EA ADPCM decoder by Robin Kay (komadori@myrealbox.com) EA ADPCM R1/R2/R3 decoder by Peter Ross (pross@xvid.org) EA IMA EACS decoder by Peter Ross (pross@xvid.org) EA IMA SEAD decoder by Peter Ross (pross@xvid.org) EA ADPCM XAS decoder by Peter Ross (pross@xvid.org) MAXIS EA ADPCM decoder by Robert Marston (rmarston@gmail.com) THP ADPCM decoder by Marco Gerards (mgerards@xs4all.nl) More...
#include "avcodec.h"#include "internal.h"#include "get_bits.h"#include "put_bits.h"#include "bytestream.h"#include "adpcm.h"#include "adpcm_data.h"Go to the source code of this file.
Data Structures | |
| struct | ADPCMDecodeContext |
Macros | |
| #define | DK3_GET_NEXT_NIBBLE() |
| #define | ADPCM_DECODER(id_, name_, long_name_) |
Typedefs | |
| typedef struct ADPCMDecodeContext | ADPCMDecodeContext |
Functions | |
| static av_cold int | adpcm_decode_init (AVCodecContext *avctx) |
| static short | adpcm_ima_expand_nibble (ADPCMChannelStatus *c, char nibble, int shift) |
| static int | adpcm_ima_qt_expand_nibble (ADPCMChannelStatus *c, int nibble, int shift) |
| static short | adpcm_ms_expand_nibble (ADPCMChannelStatus *c, char nibble) |
| static short | adpcm_ct_expand_nibble (ADPCMChannelStatus *c, char nibble) |
| static short | adpcm_sbpro_expand_nibble (ADPCMChannelStatus *c, char nibble, int size, int shift) |
| static short | adpcm_yamaha_expand_nibble (ADPCMChannelStatus *c, unsigned char nibble) |
| static int | xa_decode (AVCodecContext *avctx, short *out, const unsigned char *in, ADPCMChannelStatus *left, ADPCMChannelStatus *right, int inc) |
| static int | get_nb_samples (AVCodecContext *avctx, const uint8_t *buf, int buf_size, int *coded_samples) |
| Get the number of samples that will be decoded from the packet. | |
| static int | adpcm_decode_frame (AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt) |
| ADPCM_DECODER (CODEC_ID_ADPCM_4XM, adpcm_4xm,"ADPCM 4X Movie") | |
| ADPCM_DECODER (CODEC_ID_ADPCM_CT, adpcm_ct,"ADPCM Creative Technology") | |
| ADPCM_DECODER (CODEC_ID_ADPCM_EA, adpcm_ea,"ADPCM Electronic Arts") | |
| ADPCM_DECODER (CODEC_ID_ADPCM_EA_MAXIS_XA, adpcm_ea_maxis_xa,"ADPCM Electronic Arts Maxis CDROM XA") | |
| ADPCM_DECODER (CODEC_ID_ADPCM_EA_R1, adpcm_ea_r1,"ADPCM Electronic Arts R1") | |
| ADPCM_DECODER (CODEC_ID_ADPCM_EA_R2, adpcm_ea_r2,"ADPCM Electronic Arts R2") | |
| ADPCM_DECODER (CODEC_ID_ADPCM_EA_R3, adpcm_ea_r3,"ADPCM Electronic Arts R3") | |
| ADPCM_DECODER (CODEC_ID_ADPCM_EA_XAS, adpcm_ea_xas,"ADPCM Electronic Arts XAS") | |
| ADPCM_DECODER (CODEC_ID_ADPCM_IMA_AMV, adpcm_ima_amv,"ADPCM IMA AMV") | |
| ADPCM_DECODER (CODEC_ID_ADPCM_IMA_DK3, adpcm_ima_dk3,"ADPCM IMA Duck DK3") | |
| ADPCM_DECODER (CODEC_ID_ADPCM_IMA_DK4, adpcm_ima_dk4,"ADPCM IMA Duck DK4") | |
| ADPCM_DECODER (CODEC_ID_ADPCM_IMA_EA_EACS, adpcm_ima_ea_eacs,"ADPCM IMA Electronic Arts EACS") | |
| ADPCM_DECODER (CODEC_ID_ADPCM_IMA_EA_SEAD, adpcm_ima_ea_sead,"ADPCM IMA Electronic Arts SEAD") | |
| ADPCM_DECODER (CODEC_ID_ADPCM_IMA_ISS, adpcm_ima_iss,"ADPCM IMA Funcom ISS") | |
| ADPCM_DECODER (CODEC_ID_ADPCM_IMA_QT, adpcm_ima_qt,"ADPCM IMA QuickTime") | |
| ADPCM_DECODER (CODEC_ID_ADPCM_IMA_SMJPEG, adpcm_ima_smjpeg,"ADPCM IMA Loki SDL MJPEG") | |
| ADPCM_DECODER (CODEC_ID_ADPCM_IMA_WAV, adpcm_ima_wav,"ADPCM IMA WAV") | |
| ADPCM_DECODER (CODEC_ID_ADPCM_IMA_WS, adpcm_ima_ws,"ADPCM IMA Westwood") | |
| ADPCM_DECODER (CODEC_ID_ADPCM_MS, adpcm_ms,"ADPCM Microsoft") | |
| ADPCM_DECODER (CODEC_ID_ADPCM_SBPRO_2, adpcm_sbpro_2,"ADPCM Sound Blaster Pro 2-bit") | |
| ADPCM_DECODER (CODEC_ID_ADPCM_SBPRO_3, adpcm_sbpro_3,"ADPCM Sound Blaster Pro 2.6-bit") | |
| ADPCM_DECODER (CODEC_ID_ADPCM_SBPRO_4, adpcm_sbpro_4,"ADPCM Sound Blaster Pro 4-bit") | |
| ADPCM_DECODER (CODEC_ID_ADPCM_SWF, adpcm_swf,"ADPCM Shockwave Flash") | |
| ADPCM_DECODER (CODEC_ID_ADPCM_THP, adpcm_thp,"ADPCM Nintendo Gamecube THP") | |
| ADPCM_DECODER (CODEC_ID_ADPCM_XA, adpcm_xa,"ADPCM CDROM XA") | |
| ADPCM_DECODER (CODEC_ID_ADPCM_YAMAHA, adpcm_yamaha,"ADPCM Yamaha") | |
Variables | |
| static const int | xa_adpcm_table [5][2] |
| static const int | ea_adpcm_table [] |
| static const int | swf_index_tables [4][16] |
ADPCM decoders First version by Francois Revol (revol@free.fr) Fringe ADPCM codecs (e.g., DK3, DK4, Westwood) by Mike Melanson (melanson@pcisys.net) CD-ROM XA ADPCM codec by BERO EA ADPCM decoder by Robin Kay (komadori@myrealbox.com) EA ADPCM R1/R2/R3 decoder by Peter Ross (pross@xvid.org) EA IMA EACS decoder by Peter Ross (pross@xvid.org) EA IMA SEAD decoder by Peter Ross (pross@xvid.org) EA ADPCM XAS decoder by Peter Ross (pross@xvid.org) MAXIS EA ADPCM decoder by Robert Marston (rmarston@gmail.com) THP ADPCM decoder by Marco Gerards (mgerards@xs4all.nl)
Features and limitations:
Reference documents: http://wiki.multimedia.cx/index.php?title=Category:ADPCM_Audio_Codecs http://www.pcisys.net/~melanson/codecs/simpleaudio.html [dead] http://www.geocities.com/SiliconValley/8682/aud3.txt [dead] http://openquicktime.sourceforge.net/ XAnim sources (xa_codec.c) http://xanim.polter.net/ http://www.cs.ucla.edu/~leec/mediabench/applications.html [dead] SoX source code http://sox.sourceforge.net/
CD-ROM XA: http://ku-www.ss.titech.ac.jp/~yatsushi/xaadpcm.html [dead] vagpack & depack http://homepages.compuserve.de/bITmASTER32/psx-index.html [dead] readstr http://www.geocities.co.jp/Playtown/2004/
Definition in file adpcm.c.
| #define ADPCM_DECODER | ( | id_, | |
| name_, | |||
| long_name_ | |||
| ) |
| #define DK3_GET_NEXT_NIBBLE | ( | ) |
Definition at line 512 of file adpcm.c.
Referenced by adpcm_decode_frame().
| typedef struct ADPCMDecodeContext ADPCMDecodeContext |
|
inlinestatic |
Definition at line 209 of file adpcm.c.
Referenced by adpcm_decode_frame().
|
static |
|
static |
| ADPCM_DECODER | ( | CODEC_ID_ADPCM_4XM | , |
| adpcm_4xm | , | ||
| "ADPCM 4X Movie" | |||
| ) |
| ADPCM_DECODER | ( | CODEC_ID_ADPCM_CT | , |
| adpcm_ct | , | ||
| "ADPCM Creative Technology" | |||
| ) |
| ADPCM_DECODER | ( | CODEC_ID_ADPCM_EA | , |
| adpcm_ea | , | ||
| "ADPCM Electronic Arts" | |||
| ) |
| ADPCM_DECODER | ( | CODEC_ID_ADPCM_EA_MAXIS_XA | , |
| adpcm_ea_maxis_xa | , | ||
| "ADPCM Electronic Arts Maxis CDROM XA" | |||
| ) |
| ADPCM_DECODER | ( | CODEC_ID_ADPCM_EA_R1 | , |
| adpcm_ea_r1 | , | ||
| "ADPCM Electronic Arts R1" | |||
| ) |
| ADPCM_DECODER | ( | CODEC_ID_ADPCM_EA_R2 | , |
| adpcm_ea_r2 | , | ||
| "ADPCM Electronic Arts R2" | |||
| ) |
| ADPCM_DECODER | ( | CODEC_ID_ADPCM_EA_R3 | , |
| adpcm_ea_r3 | , | ||
| "ADPCM Electronic Arts R3" | |||
| ) |
| ADPCM_DECODER | ( | CODEC_ID_ADPCM_EA_XAS | , |
| adpcm_ea_xas | , | ||
| "ADPCM Electronic Arts XAS" | |||
| ) |
| ADPCM_DECODER | ( | CODEC_ID_ADPCM_IMA_AMV | , |
| adpcm_ima_amv | , | ||
| "ADPCM IMA AMV" | |||
| ) |
| ADPCM_DECODER | ( | CODEC_ID_ADPCM_IMA_DK3 | , |
| adpcm_ima_dk3 | , | ||
| "ADPCM IMA Duck DK3" | |||
| ) |
| ADPCM_DECODER | ( | CODEC_ID_ADPCM_IMA_DK4 | , |
| adpcm_ima_dk4 | , | ||
| "ADPCM IMA Duck DK4" | |||
| ) |
| ADPCM_DECODER | ( | CODEC_ID_ADPCM_IMA_EA_EACS | , |
| adpcm_ima_ea_eacs | , | ||
| "ADPCM IMA Electronic Arts EACS" | |||
| ) |
| ADPCM_DECODER | ( | CODEC_ID_ADPCM_IMA_EA_SEAD | , |
| adpcm_ima_ea_sead | , | ||
| "ADPCM IMA Electronic Arts SEAD" | |||
| ) |
| ADPCM_DECODER | ( | CODEC_ID_ADPCM_IMA_ISS | , |
| adpcm_ima_iss | , | ||
| "ADPCM IMA Funcom ISS" | |||
| ) |
| ADPCM_DECODER | ( | CODEC_ID_ADPCM_IMA_QT | , |
| adpcm_ima_qt | , | ||
| "ADPCM IMA QuickTime" | |||
| ) |
| ADPCM_DECODER | ( | CODEC_ID_ADPCM_IMA_SMJPEG | , |
| adpcm_ima_smjpeg | , | ||
| "ADPCM IMA Loki SDL MJPEG" | |||
| ) |
| ADPCM_DECODER | ( | CODEC_ID_ADPCM_IMA_WAV | , |
| adpcm_ima_wav | , | ||
| "ADPCM IMA WAV" | |||
| ) |
| ADPCM_DECODER | ( | CODEC_ID_ADPCM_IMA_WS | , |
| adpcm_ima_ws | , | ||
| "ADPCM IMA Westwood" | |||
| ) |
| ADPCM_DECODER | ( | CODEC_ID_ADPCM_MS | , |
| adpcm_ms | , | ||
| "ADPCM Microsoft" | |||
| ) |
| ADPCM_DECODER | ( | CODEC_ID_ADPCM_SBPRO_2 | , |
| adpcm_sbpro_2 | , | ||
| "ADPCM Sound Blaster Pro 2-bit" | |||
| ) |
| ADPCM_DECODER | ( | CODEC_ID_ADPCM_SBPRO_3 | , |
| adpcm_sbpro_3 | , | ||
| "ADPCM Sound Blaster Pro 2.6-bit" | |||
| ) |
| ADPCM_DECODER | ( | CODEC_ID_ADPCM_SBPRO_4 | , |
| adpcm_sbpro_4 | , | ||
| "ADPCM Sound Blaster Pro 4-bit" | |||
| ) |
| ADPCM_DECODER | ( | CODEC_ID_ADPCM_SWF | , |
| adpcm_swf | , | ||
| "ADPCM Shockwave Flash" | |||
| ) |
| ADPCM_DECODER | ( | CODEC_ID_ADPCM_THP | , |
| adpcm_thp | , | ||
| "ADPCM Nintendo Gamecube THP" | |||
| ) |
| ADPCM_DECODER | ( | CODEC_ID_ADPCM_XA | , |
| adpcm_xa | , | ||
| "ADPCM CDROM XA" | |||
| ) |
| ADPCM_DECODER | ( | CODEC_ID_ADPCM_YAMAHA | , |
| adpcm_yamaha | , | ||
| "ADPCM Yamaha" | |||
| ) |
|
inlinestatic |
Definition at line 141 of file adpcm.c.
Referenced by adpcm_decode_frame().
|
inlinestatic |
Definition at line 168 of file adpcm.c.
Referenced by adpcm_decode_frame().
|
inlinestatic |
Definition at line 194 of file adpcm.c.
Referenced by adpcm_decode_frame().
|
inlinestatic |
Definition at line 230 of file adpcm.c.
Referenced by adpcm_decode_frame().
|
inlinestatic |
Definition at line 250 of file adpcm.c.
Referenced by adpcm_decode_frame().
|
static |
Get the number of samples that will be decoded from the packet.
In one case, this is actually the maximum number of samples possible to decode with the given buf_size.
| [out] | coded_samples | set to the number of samples as coded in the packet, or 0 if the codec does not encode the number of samples in each frame. |
Definition at line 352 of file adpcm.c.
Referenced by adpcm_decode_frame().
|
static |
Definition at line 264 of file adpcm.c.
Referenced by adpcm_decode_frame().
|
static |
Definition at line 69 of file adpcm.c.
Referenced by adpcm_decode_frame().
|
static |
Definition at line 78 of file adpcm.c.
Referenced by adpcm_decode_frame().
|
static |
Definition at line 61 of file adpcm.c.
Referenced by xa_decode().