HE-AAC Appendix

Changes From the LC Library

The HE-AAC Audio Decoder Library contains the features of the MPEG-4 AAC LC Decoding Library (LC library). The following describes the differences between the two libraries, and how to migrate from the LC library to this library in user applications.

Differences in API Organization

The API organization is different between the LC library and this library. The following table lists the features provided in the two libraries and correspondence between API member functions.

Library Features and API Support

Feature HE-AAC Library LC Library
Initialize memory and the library. HEAACDECOpen AACDECOpen
Set decoding conditions. AACDECExecute
Load the lead frame. HEAACDECBegin
Decode single frames (output the result of decoding the previous frame and load a frame). HEAACDECExecute
Output the result of decoding the end frame. HEAACDECEnd
Close the library. HEAACDECClose AACDECClose
Perform preprocessing for restarting execution when not using sequential decoding. HEAACDECRestart AACDECRestart
Get the size of work memory. HEAACDECMemoryRequirement. No equivalent.

Differences in Data Organization

Structure Definitions

Structures defined in this library and the LC library have similar names, but essentially different purposes. The following table lists the structures defined in each library.

Attribute HE-AAC Library LC Library
Name HEAACDEC_AAC_INFO AACDEC_AAC_INFO
Purpose Store decoding conditions. Provide parameters at time of execution.
Members Sampling rate and number of channels. Sampling rate, number of channels, and number of bytes for the bitstream per frame.

Constant Definitions

Some of the defined values for constants used in the LC library and this library differ. Their names also differ. The following table lists the return values defined in each library.

Value Meaning HE-AAC Library Name LC Library Name
0 Normal termination. HEAACDEC_RET_OK AACDEC_NO_ERR
-1 Memory specification error. HEAACDEC_RET_BUFFER_ERR AACDEC_WORK_ERR
-2 Input parameter value specification error. HEAACDEC_RET_ERR_PARAM AACDEC_PARAM_ERR
-3 Input bitstream error. HEAACDEC_RET_STREAM_ERR AACDEC_STREAM_ERR
-4 API calling order error. HEAACDEC_RET_INVALID_ERR No equivalent; see Note
NOTE:
The LC library does not have an equivalent definition because it does not check the order of API function calls.

Data Size Definitions

Value Meaning HE-AAC Library Name LC Library Name
1600 Maximum bitstream output size per frame. HEAACDEC_STREAM_MAX_SIZE AACDEC_STREAM_MAX_SIZE
1024 Number of output samples per frame (maximum per L/R channel). HEAACDEC_PCM_FRAME_LENGTH AACDEC_PCM_SAMPLE_SIZE
31808 Work memory size. No equivalent; see Note. AACDEC_WORK_SIZE
NOTE:
This library does not have an equivalent definition because the work memory size is obtained using a utility function HEAACDECMemoryRequirement.

Memory for Storing the Result of Encoding

The type of memory used to store the various decoded data and how this memory is specified differs between the LC library and this library. The following table lists parameters passed to each library for use during execution.

Attribute HE-AAC Library Name LC Library Name
Channel 1 audio data memory. **decodedPcm pcmL
Channel 2 audio data memory. pcmR
Audio data size in bytes. *PcmLength No equivalent; see Note.
Audio data frequency. *outputFreqIndex
NOTE:
The LC library does not include an equivalent buffer memory for storing the frequency of audio data because the number of bytes and frequency of audio data do not change between input and output, as the only input format that can be decoded by the LC library is AAC-LC.

Migrating Libraries in User Applications

The following figure shows how to migrate from the LC library to this library in user applications.

The main change to this library from the LC version library is that Start HEAACDECBegin and Finalization HEAACDECEnd were added to the basic API. As the way this library is designed, the result obtained from the Execution HEAACDECExecute process is the decoding result of the frame input in the previous call. To handle this one frame worth of delay, the input for the first frame is performed with the Start HEAACDECBegin process, and the output for the last frame is performed with the Finalization HEAACDECEnd process.

Changes From the HE Library

This library contains the features of the HE-AAC Audio Decoder Library (HE library). This section describes the differences between the two libraries. The following table shows the differences.

Resources Occupied

The resources occupied by this library and the HE library differ.

Differences in Resources Occupied

Description Size in Bytes
HE-AAC Decoder
Library
HE Library
HE-AAC Audio Decoder Library. 283,172 280,764
Memory the user application should allocate for this library to use. 162,732 53,132

Operational Specifications

The areas of memory used by this library and the HE library differ in size. The following table shows the differences.

The resources occupied by this library and the HE library differ.

Differences in Areas of Memory

Description Size in Bytes
HE-AAC Decoder Library HE Library
Work memory. 162,732 53,132
Bitstream memory. 800 * 6 channels. 1600
Audio data memory. 2048 * 6 channels * 2
see Note.
2048 * 2 channels * 2
see Note.
NOTE:
For the channels, set the value specified for the decoding conditions.

Differences in Data Organization

This library and the HE library differ in the number of areas in memory where the decoded results are stored. The following table shows these differences.

Areas Where Channel Audio Data Is Stored

Channel HE-AAC Decoder Library HE Library
1 *decodedPcm[0] *decodedPcm[0]
2 *decodedPcm[1] *decodedPcm[1]
3 *decodedPcm[2]
4 *decodedPcm[3]
5 *decodedPcm[4]
6 *decodedPcm[5]

Revision History

2014/07/17 Initial version.


CONFIDENTIAL