MloElementFil.h

00001 /*****************************************************************
00002 |
00003 |    Copyright 2004-2006 Axiomatic Systems LLC
00004 |
00005 |    This file is part of Melo (Melo AAC Decoder).
00006 |
00007 |    Unless you have obtained Melo under a difference license,
00008 |    this version of Melo is Melo|GPL.
00009 |    Melo|GPL is free software; you can redistribute it and/or modify
00010 |    it under the terms of the GNU General Public License as published by
00011 |    the Free Software Foundation; either version 2, or (at your option)
00012 |    any later version.
00013 |
00014 |    Melo|GPL is distributed in the hope that it will be useful,
00015 |    but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 |    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017 |    GNU General Public License for more details.
00018 |
00019 |    You should have received a copy of the GNU General Public License
00020 |    along with Melo|GPL; see the file COPYING.  If not, write to the
00021 |    Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
00022 |    02111-1307, USA.
00023 |
00024  ****************************************************************/
00025 
00026 /*
00027 Fill Element
00028 
00029 One of the Syntactic Elements contained in the raw data blocks.
00030 
00031 Ref:
00032 4.4.1.1, Table 4.11
00033 4.4.2.7, Table 4.51
00034 4.5.2.9
00035 */
00036 
00037 #ifndef _MLO_ELEMENT_FIL_H_
00038 #define _MLO_ELEMENT_FIL_H_
00039 
00040 
00041 
00042 /*----------------------------------------------------------------------
00043 |       Includes
00044 +---------------------------------------------------------------------*/
00045 
00046 
00047 
00048 #include "MloBitStream.h"
00049 #include "MloTypes.h"
00050 
00051 
00052 
00053 /*----------------------------------------------------------------------
00054 |       Constants
00055 +---------------------------------------------------------------------*/
00056 
00057 
00058 
00059 #define  MLO_ERROR_SBR_IN_LC           (MLO_ERROR_BASE_ELEMENT_FIL-0)
00060 #define  MLO_ERROR_WRONG_FILL_NIBBLE   (MLO_ERROR_BASE_ELEMENT_FIL-1)
00061 #define  MLO_ERROR_WRONG_FILL_BYTE     (MLO_ERROR_BASE_ELEMENT_FIL-2)
00062 
00063 
00064 
00065 /*----------------------------------------------------------------------
00066 |       Types
00067 +---------------------------------------------------------------------*/
00068 
00069 
00070 
00071 enum {   MLO_ELEMENT_FIL_DYN_RANGE_INFO_MAX_NBR_BANDS = 17  };
00072 
00073 /* 4.4.2.7, Table 4.52 */
00074 /*** Ca faudra peut-etre le deplacer dans un module
00075    a part, particulierement a cause de l'init ***/
00076 typedef struct MLO_ElementFil_DynamicRangeInfo
00077 {
00078    int            num_bands;
00079    int            pce_instance_tag;
00080    int            tag_reserved_bits;
00081    MLO_Boolean    excluded_chns_present_flag;
00082    MLO_UInt32     excluded_mask; /* 1 bit per channel. Here, max number of channels = 32 */
00083    int            band_top_arr [MLO_ELEMENT_FIL_DYN_RANGE_INFO_MAX_NBR_BANDS];
00084    int            prog_ref_level;
00085    int            dyn_rng_sgn [MLO_ELEMENT_FIL_DYN_RANGE_INFO_MAX_NBR_BANDS]; /* -1 or +1 */
00086    int            dyn_rng_ctl [MLO_ELEMENT_FIL_DYN_RANGE_INFO_MAX_NBR_BANDS];
00087 }  MLO_ElementFil_DynamicRangeInfo;
00088 
00089 
00090 
00091 typedef struct MLO_ElementFil
00092 {
00093    MLO_ElementFil_DynamicRangeInfo
00094                   dynamic_range_info;
00095 }  MLO_ElementFil;
00096 
00097 
00098 /*----------------------------------------------------------------------
00099 |       Function prototypes
00100 +---------------------------------------------------------------------*/
00101 
00102 
00103 
00104 #ifdef __cplusplus
00105 extern "C" {
00106 #endif /* __cplusplus */
00107 
00108 
00109 
00110 MLO_Result  MLO_ElementFil_Decode (MLO_ElementFil *fil_ptr, MLO_BitStream *bit_ptr);
00111 
00112 
00113 
00114 #ifdef __cplusplus
00115 }
00116 #endif /* __cplusplus */
00117 
00118 
00119 
00120 #endif /* _MLO_ELEMENT_FIL_H_ */