videoeditorengine/mp3aacManipLib/AACGain/inc/aacdef.h
changeset 0 951a5db380a0
equal deleted inserted replaced
-1:000000000000 0:951a5db380a0
       
     1 /*
       
     2 * Copyright (c) 2010 Ixonos Plc.
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - Initial contribution
       
    11 *
       
    12 * Contributors:
       
    13 * Ixonos Plc
       
    14 *
       
    15 * Description:
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 /**************************************************************************
       
    21   aacdef.h - Interface to AAC core structures.
       
    22  
       
    23   Author(s): Juha Ojanpera
       
    24   Copyright (c) 2000-2004 by Nokia Research Center, Speech and Audio Systems.
       
    25   *************************************************************************/
       
    26 
       
    27 #ifndef AACDEF_H_
       
    28 #define AACDEF_H_
       
    29 
       
    30 /*-- Project Headers. --*/
       
    31 #include "chandefs.h"
       
    32 #include "defines.h"
       
    33 #include "dec_huf.h"
       
    34 
       
    35 /*
       
    36    Purpose:     Structure interface for window parameters.
       
    37    Explanation: - */
       
    38 class CWindowInfo : public CBase
       
    39 {
       
    40 public:
       
    41 
       
    42     static CWindowInfo* NewL();
       
    43     ~CWindowInfo();
       
    44     uint8 wnd;
       
    45     uint8 max_sfb;
       
    46     uint8 hasmask;
       
    47     uint8 predBands;
       
    48     PredType predType;
       
    49     int16 prstflag[2];
       
    50     Wnd_Shape wshape[2];
       
    51     uint8* group;//[NSHORT];
       
    52     uint8* mask;//[MAXBANDS];
       
    53     int16* sfac;//[MAXBANDS];
       
    54     uint8* cb_map;//[MAXBANDS];
       
    55     int16* lpflag;//[MAXBANDS];
       
    56 
       
    57 private:
       
    58 
       
    59     void ConstructL();
       
    60     CWindowInfo();
       
    61 
       
    62 };
       
    63 
       
    64 /*
       
    65    Purpose:     Information about the audio channel.
       
    66    Explanation: - */
       
    67 class TCh_Info
       
    68 {
       
    69 public:
       
    70 
       
    71     int16 present;         /* Channel present.                              */
       
    72     int16 num_bins;        /* # of active (i.e., nonzero) bins for this ch. */
       
    73     int16 tag;             /* Element tag.                                  */
       
    74     int16 cpe;             /* 0 if single channel, 1 if channel pair.       */
       
    75     int16 paired_ch;       /* Index of paired channel in cpe.               */
       
    76     int16 widx;            /* Window element index for this channel.        */
       
    77     
       
    78     BOOL is_present;       /* Intensity stereo is used.                     */
       
    79     BOOL pns_present;      /* PNS is used.                                  */
       
    80     BOOL tns_present;      /* TNS is used.                                  */
       
    81     BOOL parseCh;          /* TRUE if channel only parsed not decoded.      */
       
    82     
       
    83     int16 ncch;            /* Number of coupling channels for this ch.      */
       
    84     int16 cch[CChansD];    /* Coupling channel idx.                         */
       
    85     int16 cc_dom[CChansD]; /* Coupling channel domain.                      */
       
    86     int16 cc_ind[CChansD]; /* Independently switched coupling channel flag. */
       
    87     CInfo *info;            /* Block parameters for this channel.            */
       
    88     
       
    89     /*-- Huffman tables. --*/
       
    90     Huffman_DecInfo **huf;
       
    91     Huffman_DecSfInfo *sf_huf;
       
    92     
       
    93 };
       
    94 
       
    95 
       
    96 /*
       
    97    Purpose:     Channel mapping information.
       
    98    Explanation: - */
       
    99 class CMC_Info : public CBase
       
   100 {
       
   101 public:
       
   102 
       
   103     static CMC_Info* NewL();
       
   104     ~CMC_Info();
       
   105     /*
       
   106     * Max number of supported main and coulping channels.
       
   107     */
       
   108     int16 maxnCh;
       
   109     int16 maxnCCh;
       
   110 
       
   111     /*
       
   112     * Audio channels (LFE, SCE, and CPE) up to 'maxnCh' will be decoded.
       
   113     * All the other channels will be only parsed. 'dummyCh' is therefore
       
   114     * the channel index into 'ch_info' structure which is used for the unused
       
   115     * audio channels. 'dummyCCh' identifies the channel index for unused CCE
       
   116     * channels.
       
   117     */
       
   118     int16 dummyCh;
       
   119     int16 dummyCCh;
       
   120     
       
   121     /*
       
   122     * This will be set to 1 when the channel limit has been reached.
       
   123     */
       
   124     int16 dummyAlways;
       
   125     
       
   126     /*
       
   127     * These members identify how many audio channels (LFE, SCE, CPE, CCE)
       
   128     * were found from the bitstream on a frame-by-frame basis.
       
   129     */
       
   130     int16 nch;
       
   131     int16 ncch;
       
   132 
       
   133     int16 cc_tag[1 << LEN_TAG]; /* Tags of valid CCE's.                           */
       
   134     int16 cc_ind[1 << LEN_TAG]; /* Independently switched CCE's.                  */
       
   135     uint8 profile;
       
   136     uint8 sfreq_idx;
       
   137     
       
   138     int16 cur_prog;
       
   139     int16 default_config;
       
   140     
       
   141     CSfb_Info* sfbInfo;
       
   142     
       
   143     TCh_Info ch_info[ChansD];
       
   144 
       
   145 private:
       
   146 
       
   147     void ConstructL();
       
   148     CMC_Info();
       
   149 
       
   150 
       
   151 };
       
   152 
       
   153 /*
       
   154    Purpose:     Pulse noiseless coding.
       
   155    Explanation: - */
       
   156 typedef struct PulseInfoStr
       
   157 {
       
   158   int16 number_pulse;
       
   159   int16 pulse_start_sfb;
       
   160   int16 pulse_data_present;
       
   161   int16 pulse_amp[NUM_PULSE_LINES];
       
   162   int16 pulse_offset[NUM_PULSE_LINES];
       
   163   int16 pulse_position[NUM_PULSE_LINES];
       
   164 
       
   165 } PulseInfo;
       
   166 
       
   167 #endif /*-- AACDEF_H_ --*/