Introduction
This application note details the porting and performance evaluation of the Free Lossless Audio Codec (FLAC) library on NXP's i.MX RT685 platform. It focuses on comparing the performance characteristics of the integrated Cortex-M33 and Cadence Tensilica HiFi4 DSP cores.
FLAC Overview
FLAC is a lossless audio compression format, similar to MP3 but without any loss in audio quality. The document outlines its encoding steps and evaluation methodology.
Evaluation Environment
The evaluation utilizes the i.MX RT685, featuring a 300 MHz Cortex-M33 core and a 600 MHz HiFi4 DSP core. The i.MX RT600 EVK board serves as the hardware platform for these tests.
FLAC Porting and Methodology
The document describes the process of porting the FLAC library, including directory structure analysis, file system integration (using FatFs), and macro definitions. Performance evaluation involves testing compression and decompression across various audio sources and compression levels.
Key aspects of the evaluation methodology include:
- Correctness verification by comparing encoded/decoded files with original audio.
- Testing with diverse audio sources (sine wave, speech, music) at different sample rates and channels.
- Measuring compression and decompression times on both CM33 and HiFi4 DSP cores, differentiating between SD card and SRAM operations.
- Utilizing the GNU profiler to identify time-consuming functions for optimization.
Performance Findings
The evaluation highlights significant performance differences between the cores:
- The HiFi4 DSP core (600 MHz) offers substantially better performance, achieving compression and decompression times approximately 25-30% of the Cortex-M33 core (300 MHz).
- Both cores can achieve real-time compression for most audio types, with HiFi4 demonstrating superior efficiency.
- Compression level significantly impacts encoding time but has a lesser effect on decoding time.
- Sample rate and audio content (mono/stereo, type) influence performance and compression ratios.
References
Key references include the FLAC website, GNU gprof documentation, and NXP's i.MX RT600 EVK documentation.