summaryrefslogtreecommitdiff
path: root/libavcodec/adpcm_data.c
diff options
context:
space:
mode:
authorZane van Iperen <zane@zanevaniperen.com>2020-04-18 00:20:39 +0000
committerMichael Niedermayer <michael@niedermayer.cc>2020-04-24 19:43:04 +0200
commit3e22e738c0c3be96d234a55d36a01c14ce592961 (patch)
tree54803f4b47a19c5f9a679bfe952b827a076de06b /libavcodec/adpcm_data.c
parentf4d8fad802b59d3099eb453dcafb08219ecfa22c (diff)
avcodec: add support for Cunning Developments' ADPCM
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/adpcm_data.c')
-rw-r--r--libavcodec/adpcm_data.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/libavcodec/adpcm_data.c b/libavcodec/adpcm_data.c
index 4cce0a5857..cb9d20948e 100644
--- a/libavcodec/adpcm_data.c
+++ b/libavcodec/adpcm_data.c
@@ -177,3 +177,16 @@ const int16_t ff_adpcm_mtaf_stepsize[32][16] = {
{ 424, 1273, 2121, 2970, 3819, 4668, 5516, 6365,
-424, -1273, -2121, -2970, -3819, -4668, -5516, -6365, },
};
+
+const int8_t ff_adpcm_ima_cunning_index_table[8] = {
+ -1, -1, -1, -1, 1, 2, 3, 4,
+};
+
+const int16_t ff_adpcm_ima_cunning_step_table[61] = {
+ 1, 1, 1, 1, 2, 2, 3, 3, 4, 5,
+ 6, 7, 8, 10, 12, 14, 16, 20, 24, 28,
+ 32, 40, 48, 56, 64, 80, 96, 112, 128, 160,
+ 192, 224, 256, 320, 384, 448, 512, 640, 768, 896,
+ 1024, 1280, 1536, 1792, 2048, 2560, 3072, 3584, 4096, 5120,
+ 6144, 7168, 8192, 10240, 12288, 14336, 16384, 20480, 24576, 28672, 0
+};