Home | History | Annotate | Download | only in src
      1 /* ------------------------------------------------------------------
      2  * Copyright (C) 1998-2009 PacketVideo
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
     13  * express or implied.
     14  * See the License for the specific language governing permissions
     15  * and limitations under the License.
     16  * -------------------------------------------------------------------
     17  */
     18 /****************************************************************************************
     19 Portions of this file are derived from the following 3GPP standard:
     20 
     21     3GPP TS 26.073
     22     ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
     23     Available from http://www.3gpp.org
     24 
     25 (C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
     26 Permission to distribute, modify and use this file under the standard license
     27 terms listed above has been obtained from the copyright holder.
     28 ****************************************************************************************/
     29 /*
     30 
     31  Filename: /audio/gsm_amr/c/src/gray_tbl.c
     32 
     33 ------------------------------------------------------------------------------
     34  REVISION HISTORY
     35 
     36  Description: Added #ifdef __cplusplus and removed "extern" from table
     37               definition.
     38 
     39  Description: Put "extern" back.
     40 
     41  Who:                       Date:
     42  Description:
     43 
     44 ------------------------------------------------------------------------------
     45  MODULE DESCRIPTION
     46 
     47  This file contains the declaration for the gray encoding and decoding tables,
     48  gray_tbl[] and dgray_tbl[] used by the c1035pf and d1035pf module
     49  respectively.
     50 
     51 ------------------------------------------------------------------------------
     52 */
     53 
     54 /*----------------------------------------------------------------------------
     55 ; INCLUDES
     56 ----------------------------------------------------------------------------*/
     57 #include "typedef.h"
     58 
     59 /*--------------------------------------------------------------------------*/
     60 #ifdef __cplusplus
     61 extern "C"
     62 {
     63 #endif
     64 
     65     /*----------------------------------------------------------------------------
     66     ; MACROS
     67     ; [Define module specific macros here]
     68     ----------------------------------------------------------------------------*/
     69 
     70     /*----------------------------------------------------------------------------
     71     ; DEFINES
     72     ; [Include all pre-processor statements here. Include conditional
     73     ; compile variables also.]
     74     ----------------------------------------------------------------------------*/
     75 
     76     /*----------------------------------------------------------------------------
     77     ; LOCAL FUNCTION DEFINITIONS
     78     ; [List function prototypes here]
     79     ----------------------------------------------------------------------------*/
     80 
     81     /*----------------------------------------------------------------------------
     82     ; LOCAL VARIABLE DEFINITIONS
     83     ; [Variable declaration - defined here and used outside this module]
     84     ----------------------------------------------------------------------------*/
     85 
     86     extern const Word16 gray[8]  = {0, 1, 3, 2, 6, 4, 5, 7};
     87     extern const Word16 dgray[8] = {0, 1, 3, 2, 5, 6, 4, 7};
     88 
     89     /*--------------------------------------------------------------------------*/
     90 #ifdef __cplusplus
     91 }
     92 #endif
     93 
     94 /*
     95 ------------------------------------------------------------------------------
     96  FUNCTION NAME:
     97 ------------------------------------------------------------------------------
     98  INPUT AND OUTPUT DEFINITIONS
     99 
    100  Inputs:
    101     None
    102 
    103  Outputs:
    104     None
    105 
    106  Returns:
    107     None
    108 
    109  Global Variables Used:
    110     None
    111 
    112  Local Variables Needed:
    113     None
    114 
    115 ------------------------------------------------------------------------------
    116  FUNCTION DESCRIPTION
    117 
    118  None
    119 
    120 ------------------------------------------------------------------------------
    121  REQUIREMENTS
    122 
    123  None
    124 
    125 ------------------------------------------------------------------------------
    126  REFERENCES
    127 
    128  [1] gray.tab,  UMTS GSM AMR speech codec, R99 - Version 3.2.0, March 2, 2001
    129 
    130 ------------------------------------------------------------------------------
    131  PSEUDO-CODE
    132 
    133 
    134 ------------------------------------------------------------------------------
    135  RESOURCES USED [optional]
    136 
    137  When the code is written for a specific target processor the
    138  the resources used should be documented below.
    139 
    140  HEAP MEMORY USED: x bytes
    141 
    142  STACK MEMORY USED: x bytes
    143 
    144  CLOCK CYCLES: (cycle count equation for this function) + (variable
    145                 used to represent cycle count for each subroutine
    146                 called)
    147      where: (cycle count variable) = cycle count for [subroutine
    148                                      name]
    149 
    150 ------------------------------------------------------------------------------
    151  CAUTION [optional]
    152  [State any special notes, constraints or cautions for users of this function]
    153 
    154 ------------------------------------------------------------------------------
    155 */
    156 
    157 /*----------------------------------------------------------------------------
    158 ; FUNCTION CODE
    159 ----------------------------------------------------------------------------*/
    160 
    161