Home | History | Annotate | Download | only in aacdec
      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 
     20  Pathname: ./include/e_BlockSwitching.h
     21 
     22 ------------------------------------------------------------------------------
     23  REVISION HISTORY
     24 
     25  Who:                       Date:
     26  Description:
     27 
     28 ------------------------------------------------------------------------------
     29  INCLUDE DESCRIPTION
     30 
     31  enum for BlockSwitching related constants
     32 
     33 ------------------------------------------------------------------------------
     34 */
     35 
     36 /*----------------------------------------------------------------------------
     37 ; CONTINUE ONLY IF NOT ALREADY DEFINED
     38 ----------------------------------------------------------------------------*/
     39 #ifndef E_BLOCK_SWITCHING_H
     40 #define E_BLOCK_SWITCHING_H
     41 
     42 /*----------------------------------------------------------------------------
     43 ; INCLUDES
     44 ----------------------------------------------------------------------------*/
     45 
     46 /*----------------------------------------------------------------------------
     47 ; MACROS
     48 ; Define module specific macros here
     49 ----------------------------------------------------------------------------*/
     50 
     51 /*----------------------------------------------------------------------------
     52 ; DEFINES
     53 ; Include all pre-processor statements here.
     54 ----------------------------------------------------------------------------*/
     55 
     56 /*----------------------------------------------------------------------------
     57 ; EXTERNAL VARIABLES REFERENCES
     58 ; Declare variables used in this module but defined elsewhere
     59 ----------------------------------------------------------------------------*/
     60 
     61 /*----------------------------------------------------------------------------
     62 ; SIMPLE TYPEDEF'S
     63 ----------------------------------------------------------------------------*/
     64 
     65 /*----------------------------------------------------------------------------
     66 ; ENUMERATED TYPEDEF'S
     67 ----------------------------------------------------------------------------*/
     68 typedef enum
     69 {
     70     /*
     71      * block switching
     72      */
     73     LN          = 2048,
     74     SN          = 256,
     75     LN2         = LN / 2,
     76     SN2         = SN / 2,
     77     LN4         = LN / 4,
     78     SN4         = SN / 4,
     79     NSHORT      = LN / SN,
     80     MAX_SBK     = NSHORT,
     81     MAX_WIN     = MAX_SBK,
     82 
     83     ONLY_LONG_WINDOW    = 0,
     84     LONG_START_WINDOW,
     85     EIGHT_SHORT_WINDOW,
     86     LONG_STOP_WINDOW,
     87     NUM_WIN_SEQ,
     88 
     89     WLONG       = ONLY_LONG_WINDOW,
     90     WSTART,
     91     WSHORT,
     92     WSTOP,
     93 
     94     MAXBANDS        = 16 * NSHORT,  /* max number of scale factor bands */
     95     MAXFAC      = 121,      /* maximum scale factor */
     96     MIDFAC      = (MAXFAC - 1) / 2,
     97     SF_OFFSET       = 100       /* global gain must be positive */
     98 } eBlockSwitching;
     99 
    100 /*----------------------------------------------------------------------------
    101 ; STRUCTURES TYPEDEF'S
    102 ----------------------------------------------------------------------------*/
    103 
    104 /*----------------------------------------------------------------------------
    105 ; GLOBAL FUNCTION DEFINITIONS
    106 ; Function Prototype declaration
    107 ----------------------------------------------------------------------------*/
    108 
    109 /*----------------------------------------------------------------------------
    110 ; END
    111 ----------------------------------------------------------------------------*/
    112 #endif
    113