eas_ima_tables.c 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*----------------------------------------------------------------------------
  2. *
  3. * File:
  4. * eas_ima_tables.c
  5. *
  6. * Contents and purpose:
  7. * Contains the constant tables for IMA encode/decode
  8. *
  9. * Copyright (c) 2005 Sonic Network Inc.
  10. * Licensed under the Apache License, Version 2.0 (the "License");
  11. * you may not use this file except in compliance with the License.
  12. * You may obtain a copy of the License at
  13. *
  14. * http://www.apache.org/licenses/LICENSE-2.0
  15. *
  16. * Unless required by applicable law or agreed to in writing, software
  17. * distributed under the License is distributed on an "AS IS" BASIS,
  18. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  19. * See the License for the specific language governing permissions and
  20. * limitations under the License.
  21. *
  22. *----------------------------------------------------------------------------
  23. * Revision Control:
  24. * $Revision: 760 $
  25. * $Date: 2007-07-17 23:09:36 -0700 (Tue, 17 Jul 2007) $
  26. *----------------------------------------------------------------------------
  27. */
  28. #include "eas_types.h"
  29. /*----------------------------------------------------------------------------
  30. * ADPCM decode tables
  31. *----------------------------------------------------------------------------
  32. */
  33. const EAS_I16 imaIndexTable[16] =
  34. {
  35. -1, -1, -1, -1, 2, 4, 6, 8,
  36. -1, -1, -1, -1, 2, 4, 6, 8
  37. };
  38. const EAS_I16 imaStepSizeTable[89] =
  39. {
  40. 7, 8, 9, 10, 11, 12, 13, 14, 16, 17,
  41. 19, 21, 23, 25, 28, 31, 34, 37, 41, 45,
  42. 50, 55, 60, 66, 73, 80, 88, 97, 107, 118,
  43. 130, 143, 157, 173, 190, 209, 230, 253, 279, 307,
  44. 337, 371, 408, 449, 494, 544, 598, 658, 724, 796,
  45. 876, 963, 1060, 1166, 1282, 1411, 1552, 1707, 1878, 2066,
  46. 2272, 2499, 2749, 3024, 3327, 3660, 4026, 4428, 4871, 5358,
  47. 5894, 6484, 7132, 7845, 8630, 9493, 10442, 11487, 12635, 13899,
  48. 15289, 16818, 18500, 20350, 22385, 24623, 27086, 29794, 32767
  49. };