Skip to content

Latest commit

 

History

History
86 lines (61 loc) · 2.29 KB

File metadata and controls

86 lines (61 loc) · 2.29 KB

AMR-NB Codec

This project provides the AMR-NB encoder/decoder optimized for Nuclei CPUs.

The origin source code comes from opencore-amr (current version :0.1.6).

File Structure

Directory Description
enc AMR-NB encoding source files
dec AMR-NB decoding source files
common AMR-NB base operators used in both encoding and decoding
oscl part of the origin source files
data data manipulation source files and some test results

Prerequests

Please refer to the Prerequests section in the parent directory's README.

Build

Switch to the directory containing the Makefile.
Below are build examples for the Nuclei N300 CPU.

Build without extension:

make CORE=n300 ARCH_EXT= all

Build with B and P extension:

make CORE=n300 ARCH_EXT=_zba_zbb_zbc_zbs_xxldspn3x all

For details about Nuclei CPU architecture extensions, see the ARCH_EXT section in the Nuclei SDK documentation.

Performance Test

Generate Test Data

Codec performance depends on both bitrate and input audio data.
To simplify testing with different bitrates and audio files, a helper script is provided:

👉 data/bin/gendata.sh

Note

This script is only supported on Linux x86_64
It relies on prebuilt binaries (encoder/decoder) available only for x86_64.
You may also build these binaries yourself if needed.

To view usage details:

./data/bin/gendata.sh -h

Expected Output

A typical output looks like this:

Nuclei SDK Build Time: Sep  3 2025, 17:55:22
Download Mode: ILM
CPU Frequency 50003968 Hz
CPU HartID: 0
Start Encoding...
bitrate: 12200
CSV, amrnb_encode, 23.05
Result matches!
Start Decoding...
CSV, amrnb_decode, 13.88
Result matches!
PASS

The key results are prefixed with CSV, making them easy to parse in scripts for further analysis.

The performance metric is reported in MCPS (Milion Cycles Per Second), which represents the number of CPU cycles required to process one second of audio data.