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  Filename: s_sbr_dec.h
     21  Funtions:
     22     get_dse
     23 
     24 ------------------------------------------------------------------------------
     25  REVISION HISTORY
     26 
     27 
     28  Who:                                   Date: MM/DD/YYYY
     29  Description:
     30 ------------------------------------------------------------------------------
     31 SC 29 Software Copyright Licencing Disclaimer:
     32 
     33 This software module was originally developed by
     34   Coding Technologies
     35 
     36 and edited by
     37   -
     38 
     39 in the course of development of the ISO/IEC 13818-7 and ISO/IEC 14496-3
     40 standards for reference purposes and its performance may not have been
     41 optimized. This software module is an implementation of one or more tools as
     42 specified by the ISO/IEC 13818-7 and ISO/IEC 14496-3 standards.
     43 ISO/IEC gives users free license to this software module or modifications
     44 thereof for use in products claiming conformance to audiovisual and
     45 image-coding related ITU Recommendations and/or ISO/IEC International
     46 Standards. ISO/IEC gives users the same free license to this software module or
     47 modifications thereof for research purposes and further ISO/IEC standardisation.
     48 Those intending to use this software module in products are advised that its
     49 use may infringe existing patents. ISO/IEC have no liability for use of this
     50 software module or modifications thereof. Copyright is not released for
     51 products that do not conform to audiovisual and image-coding related ITU
     52 Recommendations and/or ISO/IEC International Standards.
     53 The original developer retains full right to modify and use the code for its
     54 own purpose, assign or donate the code to a third party and to inhibit third
     55 parties from using the code for products that do not conform to audiovisual and
     56 image-coding related ITU Recommendations and/or ISO/IEC International Standards.
     57 This copyright notice must be included in all copies or derivative works.
     58 Copyright (c) ISO/IEC 2002.
     59 
     60  $Id: ct_envcalc.h,v 1.3 2002/11/29 16:11:49 kaehleof Exp $
     61 */
     62 
     63 /*----------------------------------------------------------------------------
     64 ; CONTINUE ONLY IF NOT ALREADY DEFINED
     65 ----------------------------------------------------------------------------*/
     66 #ifndef S_SBR_DEC_H
     67 #define S_SBR_DEC_H
     68 
     69 /*----------------------------------------------------------------------------
     70 ; INCLUDES
     71 ----------------------------------------------------------------------------*/
     72 
     73 #include    "s_sbr_frame_data.h"
     74 #include    "pv_audio_type_defs.h"
     75 #include    "s_patch.h"
     76 #include    "e_blockswitching.h"
     77 
     78 /*----------------------------------------------------------------------------
     79 ; MACROS
     80 ; Define module specific macros here
     81 ----------------------------------------------------------------------------*/
     82 
     83 /*----------------------------------------------------------------------------
     84 ; DEFINES
     85 ; Include all pre-processor statements here.
     86 ----------------------------------------------------------------------------*/
     87 
     88 /*----------------------------------------------------------------------------
     89 ; EXTERNAL VARIABLES REFERENCES
     90 ; Declare variables used in this module but defined elsewhere
     91 ----------------------------------------------------------------------------*/
     92 
     93 /*----------------------------------------------------------------------------
     94 ; SIMPLE TYPEDEF'S
     95 ----------------------------------------------------------------------------*/
     96 
     97 /*----------------------------------------------------------------------------
     98 ; ENUMERATED TYPEDEF'S
     99 ----------------------------------------------------------------------------*/
    100 
    101 /*----------------------------------------------------------------------------
    102 ; STRUCTURES TYPEDEF'S
    103 ----------------------------------------------------------------------------*/
    104 typedef struct
    105 {
    106     Int32 outSampleRate;
    107     Int32 LC_aacP_DecoderFlag;  /* Low Complexity decoder flag  */
    108 
    109     Int32 startIndexCodecQmf;
    110     Int32 lowBandAddSamples;
    111     Int32 noCols;
    112     Int32 qmfBufLen;
    113     Int32 bufWriteOffs;
    114     Int32 bufReadOffs;
    115 
    116     Int32 sbStopCodec;
    117     Int   lowSubband;
    118     Int   prevLowSubband;
    119     Int32 highSubband;
    120     Int32 noSubbands;
    121 
    122     Int   FreqBandTable[2][MAX_FREQ_COEFFS + 1];
    123     Int32 FreqBandTableNoise[MAX_NOISE_COEFFS + 1];
    124     Int32 V_k_master[MAX_FREQ_COEFFS + 1];         /* Master BandTable which freqBandTable is derived from*/
    125     Int32 NSfb[2];
    126     Int32 NoNoiseBands;                            /* Number of noisebands */
    127     Int32 Num_Master;                              /* Number of bands in V_k_master*/
    128 
    129     struct PATCH Patch;                         /* Used by sbr_generate_high_freq */
    130     /* Used by calc_sbr_envelope */
    131     Int32 gateMode[4];
    132     Int32 limSbc[4][12 + 1];                            /* Limiting bands */
    133 
    134     Int32 sqrt_cache[8][4];                     /* cache memory for repeated sqrt() calculations */
    135 
    136 } SBR_DEC;
    137 
    138 
    139 
    140 /*----------------------------------------------------------------------------
    141 ; END
    142 ----------------------------------------------------------------------------*/
    143 #endif
    144 
    145 
    146