changeset 5853:286738ef0a4e libavcodec

EA IMA SEAD decoder original patch by Peter Ross
author aurel
date Tue, 30 Oct 2007 23:12:18 +0000
parents 66317285d195
children 29b36106bc9c
files Makefile adpcm.c allcodecs.c avcodec.h
diffstat 4 files changed, 13 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Sat Oct 27 13:39:19 2007 +0000
+++ b/Makefile	Tue Oct 30 23:12:18 2007 +0000
@@ -276,6 +276,7 @@
 OBJS-$(CONFIG_ADPCM_IMA_DK3_ENCODER)   += adpcm.o
 OBJS-$(CONFIG_ADPCM_IMA_DK4_DECODER)   += adpcm.o
 OBJS-$(CONFIG_ADPCM_IMA_DK4_ENCODER)   += adpcm.o
+OBJS-$(CONFIG_ADPCM_IMA_EA_SEAD_DECODER) += adpcm.o
 OBJS-$(CONFIG_ADPCM_IMA_QT_DECODER)    += adpcm.o
 OBJS-$(CONFIG_ADPCM_IMA_QT_ENCODER)    += adpcm.o
 OBJS-$(CONFIG_ADPCM_IMA_SMJPEG_DECODER) += adpcm.o
--- a/adpcm.c	Sat Oct 27 13:39:19 2007 +0000
+++ b/adpcm.c	Tue Oct 30 23:12:18 2007 +0000
@@ -31,6 +31,7 @@
  * 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 SEAD decoder by Peter Ross (pross@xvid.org)
  * THP ADPCM decoder by Marco Gerards (mgerards@xs4all.nl)
  *
  * Features and limitations:
@@ -1137,6 +1138,12 @@
             buf_size -= 128;
         }
         break;
+    case CODEC_ID_ADPCM_IMA_EA_SEAD:
+        for (; src < buf+buf_size; src++) {
+            *samples++ = adpcm_ima_expand_nibble(&c->status[0], src[0] >> 4, 6);
+            *samples++ = adpcm_ima_expand_nibble(&c->status[st],src[0]&0x0F, 6);
+        }
+        break;
     case CODEC_ID_ADPCM_EA:
         samples_in_chunk = AV_RL32(src);
         if (samples_in_chunk >= ((buf_size - 12) * 2)) {
@@ -1535,6 +1542,7 @@
 ADPCM_CODEC(CODEC_ID_ADPCM_IMA_AMV, adpcm_ima_amv);
 ADPCM_CODEC(CODEC_ID_ADPCM_IMA_DK3, adpcm_ima_dk3);
 ADPCM_CODEC(CODEC_ID_ADPCM_IMA_DK4, adpcm_ima_dk4);
+ADPCM_CODEC(CODEC_ID_ADPCM_IMA_EA_SEAD, adpcm_ima_ea_sead);
 ADPCM_CODEC(CODEC_ID_ADPCM_IMA_QT, adpcm_ima_qt);
 ADPCM_CODEC(CODEC_ID_ADPCM_IMA_SMJPEG, adpcm_ima_smjpeg);
 ADPCM_CODEC(CODEC_ID_ADPCM_IMA_WAV, adpcm_ima_wav);
--- a/allcodecs.c	Sat Oct 27 13:39:19 2007 +0000
+++ b/allcodecs.c	Tue Oct 30 23:12:18 2007 +0000
@@ -254,6 +254,7 @@
     REGISTER_DECODER (ADPCM_IMA_AMV, adpcm_ima_amv);
     REGISTER_ENCDEC  (ADPCM_IMA_DK3, adpcm_ima_dk3);
     REGISTER_ENCDEC  (ADPCM_IMA_DK4, adpcm_ima_dk4);
+    REGISTER_DECODER (ADPCM_IMA_EA_SEAD, adpcm_ima_ea_sead);
     REGISTER_ENCDEC  (ADPCM_IMA_QT, adpcm_ima_qt);
     REGISTER_ENCDEC  (ADPCM_IMA_SMJPEG, adpcm_ima_smjpeg);
     REGISTER_ENCDEC  (ADPCM_IMA_WAV, adpcm_ima_wav);
--- a/avcodec.h	Sat Oct 27 13:39:19 2007 +0000
+++ b/avcodec.h	Tue Oct 30 23:12:18 2007 +0000
@@ -33,8 +33,8 @@
 #define AV_STRINGIFY(s)         AV_TOSTRING(s)
 #define AV_TOSTRING(s) #s
 
-#define LIBAVCODEC_VERSION_INT  ((51<<16)+(47<<8)+1)
-#define LIBAVCODEC_VERSION      51.47.1
+#define LIBAVCODEC_VERSION_INT  ((51<<16)+(47<<8)+2)
+#define LIBAVCODEC_VERSION      51.47.2
 #define LIBAVCODEC_BUILD        LIBAVCODEC_VERSION_INT
 
 #define LIBAVCODEC_IDENT        "Lavc" AV_STRINGIFY(LIBAVCODEC_VERSION)
@@ -214,6 +214,7 @@
     CODEC_ID_ADPCM_EA_R1,
     CODEC_ID_ADPCM_EA_R3,
     CODEC_ID_ADPCM_EA_R2,
+    CODEC_ID_ADPCM_IMA_EA_SEAD,
 
     /* AMR */
     CODEC_ID_AMR_NB= 0x12000,