libxaac/
) folder.test
folder.$ mm
Users can also use cmake to build for x86
, x86_64
, and Windows (MSVS project) platforms.
To create MSVS project files for the Ex-HEAAC decoder from cmake, run the following commands:
Go to the root directory(libxaac/) of the Ex-HEAAC Decoder. Create a new folder in the project root directory and move to the newly created folder. $ cd <path to libxaac> $ mkdir bin $ cd bin $ cmake -G "Visual Studio 15 2017" ..
The above command creates MSVS 2017 project files. If the version is different, modify the generator name accordingly. The Ex-HEAAC decoder can be built using these project files.
Run the following commands to build the Ex-HEAAC Decoder for native platform:
Go to the root directory(libxaac/) of the Ex-HEAAC Decoder. Create a new folder in the project root directory and move to the newly created folder. $ cd <path to libxaac> $ mkdir bin $ cd bin $ cmake .. $ cmake --build .
$ cd <path to libxaac> $ mkdir build $ cd build $ CFLAGS="-m32" CXXFLAGS="-m32" LDFLAGS="-m32" cmake .. $ make
Update ‘CMAKE_C_COMPILER’, ‘CMAKE_CXX_COMPILER’, ‘CMAKE_C_COMPILER_AR’, and ‘CMAKE_CXX_COMPILER_AR’ in CMAKE_TOOLCHAIN_FILE passed below
$ cd <path to libxaac> $ mkdir build $ cd build
$ cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch64_toolchain.cmake $ make
$ cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch32_toolchain.cmake $ make
The Ex-HEAAC Decoder can be run by providing command-line parameters(CLI options) directly or by providing a parameter file as a command line argument.
Command line usage :
<executable> -ifile:<input_file> -imeta:<meta_data_file> -ofile:<output_file> [options] [options] can be, [-mp4:<mp4_flag>] [-pcmsz:<pcmwordsize>] [-dmix:<down_mix>] [-esbr_hq:<esbr_hq_flag>] [-esbr_ps:<esbr_ps_flag>] [-tostereo:<interleave_to_stereo>] [-dsample:<down_sample_sbr>] [-drc_cut_fac:<drc_cut_factor>] [-drc_boost_fac:<drc_boost_factor>] [-drc_target_level:<drc_target_level>] [-drc_heavy_comp:<drc_heavy_compression>] [-effect:<effect_type>] [-target_loudness:<target_loudness>] [-nosync:<disable_sync>] [-sbrup:<auto_sbr_upsample>] [-flflag:<framelength_flag>} [-fs:<RAW_sample_rate>] [-maxchannel:<maximum_num_channels>] [-coupchannel:<coupling_channel>] [-downmix:<down_mix_stereo>] [-fs480:<ld_frame_size>] [-ld_testing:<ld_testing_flag>] [-peak_limiter_off:<peak_limiter_off_flag>] [-err_conceal:<error_concealment_flag>] where, <input_file> is the input AAC/HEAACv1/HEAACv2/USAC file name. <meta_data_file> is a text file which contains metadata. To be given when -mp4:1 is enabled. <output_file> is the output file name. <mp4_flag> is a flag that should be set to 1 when passing raw stream along with meta data text file. <pcmwordsize> is the bits per sample info. value can be 16 or 24. <down_mix> is to enable/disable always mono output. Default 1. <esbr_hq_flag> is to enable/disable high quality eSBR. Default 0. <esbr_ps_flag> is to indicate eSBR with PS. Default 0. <interleave_to_stereo> is to enable/disable always interleaved to stereo output. Default 1. <down_sample_sbr> is to enable/disable down-sampled SBR output. Default auto identification from header. <drc_cut_factor> is to set DRC cut factor value. Default value is 0. <drc_boost_factor> is to set DRC boost factor. Default value is 0. <drc_target_level> is to set DRC target reference level. Default value is 108. <drc_heavy_compression> is to enable/disable DRC heavy compression. Default value is 0. <effect_type> is to set DRC effect type. Default value is 0. <target_loudness> is to set target loudness level. Default value is -24. <disable_sync> is to disable the ADTS/ADIF sync search i.e when enabled the decoder expects the header to be at the start of input buffer. Default 0. <auto_sbr_upsample> is to enable(1) or disable(0) auto SBR upsample in case of stream changing from SBR present to SBR not present. Default 1. <framelength_flag> is flag for decoding framelength of 1024 or 960. 1 to decode 960 frame length, 0 to decode 1024 frame length. Frame length value in the GA header will override this option. Default 0. <RAW_sample_rate> is to indicate the core AAC sample rate for a RAW stream. If this is specified no other file format headers are searched for. <maximum_num_channels> is the number of maxiumum channels the input may have. Default is 6 for multichannel libraries and 2 for stereo libraries. <coupling_channel> is element instance tag of independent coupling channel to be mixed. Default is 0. <down_mix_stereo> is flag for Downmix. Give 1 to get stereo (downmix) output. Default is 0. <ld_frame_size> is to indicate ld frame size. 0 is for 512 frame length, 1 is for 480 frame length. Default value is 512 (0). <ld_testing_flag> is to enable/disable ld decoder testing. Default value is 0. <peak_limiter_off_flag> is to enable/disable peak limiter. Default value is 0. <error_concealment_flag> is to enable/disable error concealment. Default value is 0.
Sample CLI:
<xaac_dec_exe> -ifile:in_file.aac -ofile:out_file.wav -pcmsz:16
Conformance testing for AAC/HEAAC v1/HEAAC v2 mainly involves comparing decoder under test output with the ISO and 3GPP reference decoded output.
Testing for USAC is done using encoded streams generated using ISO USAC reference encoder. The output generated by ITTIAM USAC decoder is compared against the output generated by ISO USAC decoder for 16-bit conformance on the respective(ARMv7, ARMv8, X86_32, X86_64) platforms.