Home | History | Annotate | Download | only in inc
      1 /*
      2  ** Copyright 2003-2010, VisualOn, Inc.
      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 express or implied.
     13  ** See the License for the specific language governing permissions and
     14  ** limitations under the License.
     15  */
     16 /*******************************************************************************
     17 	File:		psy_const.h
     18 
     19 	Content:	Global psychoacoustic constants structures
     20 
     21 *******************************************************************************/
     22 
     23 #ifndef _PSYCONST_H
     24 #define _PSYCONST_H
     25 
     26 #include "config.h"
     27 
     28 #define TRUE  1
     29 #define FALSE 0
     30 
     31 #define FRAME_LEN_LONG    AACENC_BLOCKSIZE
     32 #define TRANS_FAC         8
     33 #define FRAME_LEN_SHORT   (FRAME_LEN_LONG/TRANS_FAC)
     34 
     35 
     36 
     37 /* Block types */
     38 enum
     39 {
     40   LONG_WINDOW = 0,
     41   START_WINDOW,
     42   SHORT_WINDOW,
     43   STOP_WINDOW
     44 };
     45 
     46 /* Window shapes */
     47 enum
     48 {
     49   SINE_WINDOW = 0,
     50   KBD_WINDOW  = 1
     51 };
     52 
     53 /*
     54   MS stuff
     55 */
     56 enum
     57 {
     58   SI_MS_MASK_NONE = 0,
     59   SI_MS_MASK_SOME = 1,
     60   SI_MS_MASK_ALL  = 2
     61 };
     62 
     63 #define MAX_NO_OF_GROUPS 4
     64 #define MAX_SFB_SHORT   15  /* 15 for a memory optimized implementation, maybe 16 for convenient debugging */
     65 #define MAX_SFB_LONG    51  /* 51 for a memory optimized implementation, maybe 64 for convenient debugging */
     66 #define MAX_SFB         (MAX_SFB_SHORT > MAX_SFB_LONG ? MAX_SFB_SHORT : MAX_SFB_LONG)   /* = MAX_SFB_LONG */
     67 #define MAX_GROUPED_SFB (MAX_NO_OF_GROUPS*MAX_SFB_SHORT > MAX_SFB_LONG ? \
     68                          MAX_NO_OF_GROUPS*MAX_SFB_SHORT : MAX_SFB_LONG)
     69 
     70 #define BLOCK_SWITCHING_OFFSET		   (1*1024+3*128+64+128)
     71 #define BLOCK_SWITCHING_DATA_SIZE          FRAME_LEN_LONG
     72 
     73 #define TRANSFORM_OFFSET_LONG    0
     74 #define TRANSFORM_OFFSET_SHORT   448
     75 
     76 #define LOG_NORM_PCM          -15
     77 
     78 #define NUM_SAMPLE_RATES	12
     79 
     80 #endif /* _PSYCONST_H */
     81