Data Types and Structures

This section describes the data types and structures of the Intel ® IPP advanced audio coding.

ADIF Header

typedef struct {
	Ipp32u	 ADIFId;		/* 32-bit, "ADIF" ASCII code */
	int	 copyIdPres;		/* copy id flag: 0 - off, 1 - on */
	int	 originalCopy;		/* copyright bit:
						0 - no copyright on the coded bitstream,
								1 - copyright protected */
	int	 home; 		/* original/home bit:
							0 - the bitstream is a copy,
					1 - the bitstream is the original
	int	 bitstreamType;		/* bitstream flag:
					0 - constant rate bitstream,
					1 - variable rate bitstream */
	int	 bitRate;		/* bit rate: if 0, unknown bit rate */
	int	 numPrgCfgElt;				/* number of program configure elements */
	int	 pADIFBufFullness[IPP_AAC_ELT_NUM];				/*buffer fullness */
	Ipp8u	 pCopyId[9];					/* 72-bit copy id */
} IppAACADIFHeader;

ADTS Frame Header

typedef struct {
	/* ADTS fixed header */
	int id;							/* ID 1*/
	int layer;							/* layer index:0x3 - Layer I
								                0x2 - LayerII
								                0x1 - LayerIII */
	int protectionBit;							/* CRCflag 0: CRC on, 1: CRC off */
	int profile;					/* profile: 0:MP,1:LC, 2:SSR */
	int samplingRateIndex;							/* sampling rate index */
	int privateBit;							/* private_bit, no use  */
	int chConfig;							/* channel configure*/
	int	 originalCopy;			/* copyright bit:
						0 - no copyright on the coded bitstream,	1 - copyright protected */
	int	 home; 			/* original/home bit: 
							0 - the bitstream is a copy,
					  1 - the bitstream is the original
	int emphasis;							/* not used by ISO/IEC 13818-7, but used
								by 14496-3 */	
	/* ADTS variable header */
	int cpRightIdBit;							/* copyright id bit */
	int cpRightIdStart;							/* copyright id start */
	int frameLen;							/* frame length in bytes */
	int ADTSBufFullness;							/* buffer fullness */
	int numRawBlock;							/* number of raw data blocks in the	frame */
	/* ADTS CRC error check, 16bits 									*/
	int CRCWord;								/* CRC-check word */
} IppAACADTSFrameHeader;

Individual Channel Side Information

typedef struct {
	/* unpacked from the bitstream */
	int	 icsReservedBit;					/* reserved bit */
	int	 winSequence;					/* window sequence flag */
	int	 winShape;					/* window shape flag:
					0 - sine window,
					1 - KBD window */
	int	 maxSfb;				/* maximum effective scale factor bands */
	int	 sfGrouping;					/* scale factor grouping information */
	int	 predDataPres;					/* prediction data present flag for one
								frame:
					0 - prediction off,
					1 - prediction on */
	int	 predReset;					/* prediction reset flag:
					0 - reset off,
					1 - reset on */
	int	 predResetGroupNum;					/* prediction reset group number */
	Ipp8u pPredUsed[IPP_AAC_PRED_SFB_MAX+3];									/* prediction flag buffer 
									for 	each scale factor band:
					0 - off,
					1 - on buffer length 44 bytes, 4-byte align							 */
	/* decoded from the above info */
	int	 numWinGrp;					/* group number */
	int	 pWinGrpLen[IPP_AAC_GROUP_NUM_MAX];									/* buffer for number of windows in each group */
} IppAACIcsInfo;

AAC Scalable Main Element Header

typedef struct{
	int windowSequence; 	/* windows is short or long type */
	int windowShape;			 /* what window is used for the right hand
				part of this analysis window */
	int maxSfb;			/* number of scale factor band transmitted */
	int sfGrouping;			/* grouping of short spectral data */
	int numWinGrp;			/* window group number */
	int pWinGrpLen[IPP_AAC_GROUP_NUM_MAX]; /* length of every group */
     int msMode;				/* MS stereo flag: 					
					0 - none, 
					1 - different for every sfb, 
					2 - all */
	Ipp8u (*ppMsMask)[IPP_AAC_SF_MAX]; /* if MS's used in one sfb, when msMode ==1 */
	IppAACTnsInfo pTnsInfo[IPP_AAC_CHAN_NUM];/* TNS structure for 
												                 channels */
	IppAACLtpInfo pLtpInfo[IPP_AAC_CHAN_NUM];/* LTP structure for 
												                 channels */
}IppAACMainHeader;

AAC Scalable Extension Element Header

typedef struct{
	int msMode;	 	/* 0 - non; 1 - part; 2 - all */
	int maxSfb;	 	/* number of scale factor band for extension layer */
	Ipp8u (*ppMsMask)[IPP_AAC_SF_MAX]; /* if ms is used */
     IppAACTnsInfo pTnsInfo[IPP_AAC_CHAN_NUM]; /* TNS structure for
										                   Stereo */
     int pDiffControlLr[IPP_AAC_CHAN_NUM][IPP_AAC_SFB_MAX]; /* FSS
								               		    information for stereo */
}IppAACExtHeader;

AAC Program Config Element

typedef struct {
   int eltInsTag;              /* element instance tag */
   int profile;                /* profile index:
                                  0 - main,
                                  1 - Low Complexity,
                                  2 - Scaleable Sampling Rate,
                                  3 - reserved */
   int samplingRateIndex;      /* sampling rate index */
   int numFrontElt;            /* number of front elements */
   int numSideElt;             /* number of side elements */
   int numBackElt;             /* number of back elements */
   int numLfeElt;              /* number of LFE elements  */
   int numDataElt;             /* number of data elements */
   int numValidCcElt;          /* number of coupling channel elements */    int monoMixdownPres;         /* mono mixdown flag:
                                  0 - off,
                                  1 - on */
   int monoMixdownEltNum;      /* number of mono mixdown elements */
   int stereoMixdownPres;      /* stereo mixdown flag:
                                  0 - off,
                                  1 - on */
   int stereoMixdownEltNum;    /* number of stereo mixdown elements */
   int matrixMixdownIdxPres;   /* matrix mixdown flag:
                                  0 - off,
                                  1 - on  */
   int matrixMixdownIdx;       /* identifier of the surround mixdown 					 coefficient */
   int pseudoSurroundEnable;   /* pseudo surround:
                                  0 - off,
                                  1 - on */
   int pFrontIsCpe[IPP_AAC_ELT_NUM];     /* channel pair flag for
                                           front elements */
   int pFrontTagSel[IPP_AAC_ELT_NUM];    /* instance tag for front
                                           elements */
   int pSideIsCpe[IPP_AAC_ELT_NUM];      /* channel pair flag for
                                           side elements */
   int pSideTagSel[IPP_AAC_ELT_NUM];     /* instance tag for side
                                           elements */
   int pBackIsCpe[IPP_AAC_ELT_NUM];      /* channel pair flag for
                                           back elements */
   int pBackTagSel[IPP_AAC_ELT_NUM];     /* instance tag for back
                                           elements */
   int pLfeTagSel[IPP_AAC_LFE_ELT_NUM];  /* channel pair flag for
                                           LFE elements */
   int pDataTagSel[IPP_AAC_DATA_ELT_NUM];  /* instance tag for data
                                             elements */
   int pCceIsIndSw[IPP_AAC_ELT_NUM];     /* independent flag for
                                           coupling */
            /* channel elements */
   int pCceTagSel[IPP_AAC_ELT_NUM];      /* instance tag for coupling
                                           channel elements */
   int numComBytes;                      /* number of comment field
                                           bytes */
   Ipp8s pComFieldData[IPP_AAC_COMMENTS_LEN]; /* comment buffer field */
}IppAACPrgCfgElt;

Temporal Noise Shaping (TNS) Structure for One Layer

typedef struct{
	int tnsDataPresent; /* Indicator of TNS data present:
					0 - not present,
					1 - present */
	int pTnsNumFilt[IPP_AAC_GROUP_NUM_MAX];	/*TNS number filter buffer*/
	int pTnsFiltCoefRes[IPP_AAC_GROUP_NUM_MAX]; /* TNS coef resolution
								                   flag */
	int pTnsRegionLen[IPP_AAC_TNS_FILT_MAX];	/* TNS filter length */
	int pTnsFiltOrder[IPP_AAC_TNS_FILT_MAX];	/* TNS filter order */
	int pTnsDirection[IPP_AAC_TNS_FILT_MAX];	/* TNS filter direction
														         
         flag */ 
	int pTnsCoefCompress[IPP_AAC_GROUP_NUM_MAX]; /* The most
			 significant bit of the coefficientsof the noise
		 	shaping filter in window w isomitted or not */
	Ipp8s pTnsFiltCoef[IPP_AAC_TNS_COEF_LEN];
/* Coefficients of one
				noise shaping filter applied to window w */
}IppAACTnsInfo;

Long Term Prediction (LTP) Structure

typedef struct{
	int ltpDataPresent;	     /* Indicator of LTP data present:
					        0 - not present,
					        1 - present */ 
	int ltpLag;		            /* the optimal delay from 0 to 2047 */
	Ipp16s ltpCoef;	           /* indicate the  LTP coefficient */
	int pLtpLongUsed[IPP_AAC_SF_MAX+1]; /* if long block use ltp */
	int pLtpShortUsed[IPP_AAC_WIN_MAX]; /* if short block use ltp */ 
	int pLtpShortLagPresent[IPP_AAC_WIN_MAX]; /* if short lag is
								                   transmitted */ 
	int pLtpShortLag[IPP_AAC_WIN_MAX];  /* relative delay for short
								            window */
}IppAACLtpInfo;

Channel Pair Element

typedef struct {
	int	commonWin;              /* common window flag:
								         0 - off,
						         1 - on */
	int	msMaskPres;					
        /* MS stereo mask present flag */
     Ipp8u		 pMsMask[IPP_AAC_GROUP_NUM_MAX][IPP_AAC_SF_MAX];	/* MS stereo
								         flag buffer for each scalefactor
							         band */
} IppAACChanPairElt;

Channel Information

typedef struct {
	int	tag;			/* channel tag */
	int	id;				/* element id */
	int	samplingRateIndex;					/* sampling rate index */
	int	predSfbMax;				/* maximum prediction scale factor bands*/
	int	preWinShape;				/* previous block window shape */
	int	winLen;				/* 128 - short window, 1024 - others */
	int	numWin;				/* 1 - long block, 8 - short block */
	int	numSwb;				/* decided by sampling frequency and block
							 type */
	
	/* unpacking from the bitstream */
	int	globGain;		/* global gain */
	int	pulseDataPres;		/* pulse data present flag: 0 - off, 1 - on */
	int	tnsDataPres;		/* TNS data present flag: 0 - off, 1 - on */
	int	gainContrDataPres;		/* gain control data present flag: 0 - off,  												         
                  1 - on */
		/* icsInfo pointer */
	IppAACIcsInfo *pIcsInfo;							/* pointer to IppAACIcsInfo structure */

	/* channel pair pointer */
	IppAACChanPairElt *pChanPairElt;									/* pointer to IppAACChanPairElt
				                structure */

	/* section data */
	Ipp8u pSectCb[IPP_AAC_SF_LEN];									/* section code book buffer */
	Ipp8u pSectEnd[IPP_AAC_SF_LEN];									/* end of scalefactor offset
										in each section */
	int pMaxSect[IPP_AAC_GROUP_NUM_MAX];										/* maximum section number
											for each group */
	int pTnsNumFilt[IPP_AAC_GROUP_NUM_MAX];	/*TNS number filter
												number buffer*/

	/* TNS data */
	int pTnsFiltCoefRes[IPP_AAC_GROUP_NUM_MAX];											/* TNS coefficients
													resolution flag */
	int pTnsRegionLen[IPP_AAC_TNS_FILT_MAX];											/* TNS filter length */
	int pTnsFiltOrder[IPP_AAC_TNS_FILT_MAX];											/* TNS filter order */
	int pTnsDirection[IPP_AAC_TNS_FILT_MAX];											/* TNS filter direction
												flag */
}IppAACChanInfo;


Submit feedback on this help topic

Copyright © 2000 - 2010, Intel Corporation. All rights reserved.