diff options
author | Stefan Gehrer <stefan.gehrer@gmx.de> | 2009-01-17 23:08:43 +0300 |
---|---|---|
committer | Stefan Gehrer <stefan.gehrer@gmx.de> | 2009-01-17 23:08:43 +0300 |
commit | 055dc116fcf75f7f38c64b689ebda7480a7da8c2 (patch) | |
tree | c6b232602cbfb4b536f0f46b194fa21e3bdc80a1 /libavcodec | |
parent | 8a569fee99eba28d3e993182c89a797c455a3bd6 (diff) |
added demuxer for FunCom ISS audio files,
extended ADPCM decoder by ISS specific IMA variant
Originally committed as revision 16658 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/adpcm.c | 28 | ||||
-rw-r--r-- | libavcodec/allcodecs.c | 1 | ||||
-rw-r--r-- | libavcodec/avcodec.h | 3 |
3 files changed, 31 insertions, 1 deletions
diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c index b13a376ea3..883b723c6f 100644 --- a/libavcodec/adpcm.c +++ b/libavcodec/adpcm.c @@ -1131,6 +1131,33 @@ static int adpcm_decode_frame(AVCodecContext *avctx, *samples++ = c->status[0].predictor - c->status[1].predictor; } break; + case CODEC_ID_ADPCM_IMA_ISS: + c->status[0].predictor = (int16_t)AV_RL16(src + 0); + c->status[0].step_index = src[2]; + src += 4; + if(st) { + c->status[1].predictor = (int16_t)AV_RL16(src + 0); + c->status[1].step_index = src[2]; + src += 4; + } + + while (src < buf + buf_size) { + + if (st) { + *samples++ = adpcm_ima_expand_nibble(&c->status[0], + src[0] >> 4 , 3); + *samples++ = adpcm_ima_expand_nibble(&c->status[1], + src[0] & 0x0F, 3); + } else { + *samples++ = adpcm_ima_expand_nibble(&c->status[0], + src[0] & 0x0F, 3); + *samples++ = adpcm_ima_expand_nibble(&c->status[0], + src[0] >> 4 , 3); + } + + src++; + } + break; case CODEC_ID_ADPCM_IMA_WS: /* no per-block initialization; just start decoding the data */ while (src < buf + buf_size) { @@ -1641,6 +1668,7 @@ ADPCM_DECODER(CODEC_ID_ADPCM_IMA_DK3, adpcm_ima_dk3, "IMA Duck DK3 ADPCM"); ADPCM_DECODER(CODEC_ID_ADPCM_IMA_DK4, adpcm_ima_dk4, "IMA Duck DK4 ADPCM"); ADPCM_DECODER(CODEC_ID_ADPCM_IMA_EA_EACS, adpcm_ima_ea_eacs, "IMA Electronic Arts EACS ADPCM"); ADPCM_DECODER(CODEC_ID_ADPCM_IMA_EA_SEAD, adpcm_ima_ea_sead, "IMA Electronic Arts SEAD ADPCM"); +ADPCM_DECODER(CODEC_ID_ADPCM_IMA_ISS, adpcm_ima_iss, "IMA Funcom ISS ADPCM"); ADPCM_CODEC (CODEC_ID_ADPCM_IMA_QT, adpcm_ima_qt, "IMA QuickTime ADPCM"); ADPCM_DECODER(CODEC_ID_ADPCM_IMA_SMJPEG, adpcm_ima_smjpeg, "IMA Loki SDL MJPEG ADPCM"); ADPCM_CODEC (CODEC_ID_ADPCM_IMA_WAV, adpcm_ima_wav, "IMA Wav ADPCM"); diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c index 8c3133e735..6c61d44463 100644 --- a/libavcodec/allcodecs.c +++ b/libavcodec/allcodecs.c @@ -264,6 +264,7 @@ void avcodec_register_all(void) REGISTER_DECODER (ADPCM_IMA_DK4, adpcm_ima_dk4); REGISTER_DECODER (ADPCM_IMA_EA_EACS, adpcm_ima_ea_eacs); REGISTER_DECODER (ADPCM_IMA_EA_SEAD, adpcm_ima_ea_sead); + REGISTER_DECODER (ADPCM_IMA_ISS, adpcm_ima_iss); REGISTER_ENCDEC (ADPCM_IMA_QT, adpcm_ima_qt); REGISTER_DECODER (ADPCM_IMA_SMJPEG, adpcm_ima_smjpeg); REGISTER_ENCDEC (ADPCM_IMA_WAV, adpcm_ima_wav); diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 4fa2f1ee14..958ba8c30d 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -30,7 +30,7 @@ #include "libavutil/avutil.h" #define LIBAVCODEC_VERSION_MAJOR 52 -#define LIBAVCODEC_VERSION_MINOR 10 +#define LIBAVCODEC_VERSION_MINOR 11 #define LIBAVCODEC_VERSION_MICRO 0 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ @@ -245,6 +245,7 @@ enum CodecID { CODEC_ID_ADPCM_IMA_EA_EACS, CODEC_ID_ADPCM_EA_XAS, CODEC_ID_ADPCM_EA_MAXIS_XA, + CODEC_ID_ADPCM_IMA_ISS, /* AMR */ CODEC_ID_AMR_NB= 0x12000, |