diff options
| author | Tim Redfern <tim@eclectronics.org> | 2013-12-29 12:19:38 +0000 |
|---|---|---|
| committer | Tim Redfern <tim@eclectronics.org> | 2013-12-29 12:19:38 +0000 |
| commit | f7813a5324be39d13ab536c245d15dfc602a7849 (patch) | |
| tree | fad99148b88823d34a5df2f0a25881a002eb291b /ffmpeg/libavcodec/adpcm_data.c | |
| parent | b7a5a477b8ff4d4e3028b9dfb9a9df0a41463f92 (diff) | |
basic type mechanism working
Diffstat (limited to 'ffmpeg/libavcodec/adpcm_data.c')
| -rw-r--r-- | ffmpeg/libavcodec/adpcm_data.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/ffmpeg/libavcodec/adpcm_data.c b/ffmpeg/libavcodec/adpcm_data.c index 0625fc9..1d3e579 100644 --- a/ffmpeg/libavcodec/adpcm_data.c +++ b/ffmpeg/libavcodec/adpcm_data.c @@ -27,12 +27,33 @@ /* ff_adpcm_step_table[] and ff_adpcm_index_table[] are from the ADPCM reference source */ -/* This is the index table: */ +static const int8_t adpcm_index_table2[4] = { + -1, 2, + -1, 2, +}; + +static const int8_t adpcm_index_table3[8] = { + -1, -1, 1, 2, + -1, -1, 1, 2, +}; + const int8_t ff_adpcm_index_table[16] = { -1, -1, -1, -1, 2, 4, 6, 8, -1, -1, -1, -1, 2, 4, 6, 8, }; +static const int8_t adpcm_index_table5[32] = { + -1, -1, -1, -1, -1, -1, -1, -1, 1, 2, 4, 6, 8, 10, 13, 16, + -1, -1, -1, -1, -1, -1, -1, -1, 1, 2, 4, 6, 8, 10, 13, 16, +}; + +const int8_t const *ff_adpcm_index_tables[4] = { + &adpcm_index_table2[0], + &adpcm_index_table3[0], + &ff_adpcm_index_table[0], + &adpcm_index_table5[0], +}; + /** * This is the step table. Note that many programs use slight deviations from * this table, but such deviations are negligible: |
