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