www.pudn.com > iMagic_2006_0428_v098r23.rar > bitstream.h


#ifndef BITSTREAM_H 
#define BITSTREAM_H 
 
#include "AACEncoder.h" 
 
 
// Raw bitstream constants 
#define LEN_SE_ID 3 
#define LEN_TAG 4 
#define LEN_GLOB_GAIN 8 
#define LEN_COM_WIN 1 
#define LEN_ICS_RESERV 1 
#define LEN_WIN_SEQ 2 
#define LEN_WIN_SH 1 
#define LEN_MAX_SFBL 6 
#define LEN_PRED_PRES 1 
#define LEN_MASK_PRES 2 
#define LEN_MASK 1 
#define LEN_PULSE_PRES 1 
#define LEN_TNS_PRES 1 
#define LEN_GAIN_PRES 1 
 
 
#define ID_SCE 0 
#define ID_CPE 1 
#define ID_CCE 2 
#define ID_LFE 3 
#define ID_DSE 4 
#define ID_PCE 5 
#define ID_FIL 6 
#define ID_END 7 
 
 
static int WriteCPE(AAC_Config* aac_config, 
               ChannelInfo* channelinfoL, 
               ChannelInfo* channelinfoR); 
 
static void WriteSCE(AAC_Config* aac_config, 
                    ChannelInfo *channelInfo); 
 
static void WriteICS(AAC_Config* aac_config, 
               ChannelInfo* channelinfo, 
                    int commonWindow); 
 
static void WriteSpectralData( 
               AAC_Config* aac_config, 
               ChannelInfo* channelinfo); 
 
static void ByteAlign(AAC_Config* aac_config, 
               int bits); 
 
void WriteBitstream( AAC_Config* aac_config, 
               ChannelInfo *channelInfo); 
 
 
void PutBit(      AAC_Config* aac_config, 
               unsigned long data, 
               int numBit); 
 
#endif // BITSTREAM_H