117299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong/*
217299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong ** Copyright 2003-2010, VisualOn, Inc.
317299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong **
417299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong ** Licensed under the Apache License, Version 2.0 (the "License");
517299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong ** you may not use this file except in compliance with the License.
617299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong ** You may obtain a copy of the License at
717299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong **
817299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong **     http://www.apache.org/licenses/LICENSE-2.0
917299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong **
1017299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong ** Unless required by applicable law or agreed to in writing, software
1117299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong ** distributed under the License is distributed on an "AS IS" BASIS,
1217299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1317299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong ** See the License for the specific language governing permissions and
1417299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong ** limitations under the License.
1517299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong */
1617299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong/*******************************************************************************
1717299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong	File:		psy_const.h
1817299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong
1917299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong	Content:	Global psychoacoustic constants structures
2017299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong
2117299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong*******************************************************************************/
2217299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong
2317299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong#ifndef _PSYCONST_H
2417299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong#define _PSYCONST_H
2517299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong
2617299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong#include "config.h"
2717299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong
2817299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong#define TRUE  1
2917299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong#define FALSE 0
3017299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong
3117299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong#define FRAME_LEN_LONG    AACENC_BLOCKSIZE
3217299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong#define TRANS_FAC         8
3317299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong#define FRAME_LEN_SHORT   (FRAME_LEN_LONG/TRANS_FAC)
3417299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong
3517299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong
3617299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong
3717299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong/* Block types */
3817299ab50ceb70d904e610e3b2d7fb2361a11e03James Dongenum
3917299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong{
4017299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong  LONG_WINDOW = 0,
4117299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong  START_WINDOW,
4217299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong  SHORT_WINDOW,
4317299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong  STOP_WINDOW
4417299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong};
4517299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong
4617299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong/* Window shapes */
4717299ab50ceb70d904e610e3b2d7fb2361a11e03James Dongenum
4817299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong{
4917299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong  SINE_WINDOW = 0,
5017299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong  KBD_WINDOW  = 1
5117299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong};
5217299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong
5317299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong/*
5417299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong  MS stuff
5517299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong*/
5617299ab50ceb70d904e610e3b2d7fb2361a11e03James Dongenum
5717299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong{
5817299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong  SI_MS_MASK_NONE = 0,
5917299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong  SI_MS_MASK_SOME = 1,
6017299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong  SI_MS_MASK_ALL  = 2
6117299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong};
6217299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong
6317299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong#define MAX_NO_OF_GROUPS 4
6417299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong#define MAX_SFB_SHORT   15  /* 15 for a memory optimized implementation, maybe 16 for convenient debugging */
6517299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong#define MAX_SFB_LONG    51  /* 51 for a memory optimized implementation, maybe 64 for convenient debugging */
6617299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong#define MAX_SFB         (MAX_SFB_SHORT > MAX_SFB_LONG ? MAX_SFB_SHORT : MAX_SFB_LONG)   /* = MAX_SFB_LONG */
6717299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong#define MAX_GROUPED_SFB (MAX_NO_OF_GROUPS*MAX_SFB_SHORT > MAX_SFB_LONG ? \
6817299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong                         MAX_NO_OF_GROUPS*MAX_SFB_SHORT : MAX_SFB_LONG)
6917299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong
7017299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong#define BLOCK_SWITCHING_OFFSET		   (1*1024+3*128+64+128)
7117299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong#define BLOCK_SWITCHING_DATA_SIZE          FRAME_LEN_LONG
7217299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong
7317299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong#define TRANSFORM_OFFSET_LONG    0
7417299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong#define TRANSFORM_OFFSET_SHORT   448
7517299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong
7617299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong#define LOG_NORM_PCM          -15
7717299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong
7817299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong#define NUM_SAMPLE_RATES	12
7917299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong
8017299ab50ceb70d904e610e3b2d7fb2361a11e03James Dong#endif /* _PSYCONST_H */
81