diff --git a/doc/links.txt b/doc/links.txt index 9625dac53d..da77de3601 100644 --- a/doc/links.txt +++ b/doc/links.txt @@ -63,6 +63,9 @@ .. _`ZBOSS API documentation`: .. _`ZBOSS stack release notes`: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/zboss/index.html +.. _`LC3 API documentation document`: https://developer.nordicsemi.com/nRF_Connect_SDK/nrf5340_audio/lc3_api/T2_LC3_API_Documentation_1.5.pdf +.. _`Bluetooth® LE Audio specifications`: https://www.bluetooth.com/learn-about-bluetooth/recent-enhancements/le-audio/le-audio-specifications/ + .. _`certification policy`: https://zigbeealliance.org/wp-content/uploads/2021/04/07-4842-13-Zigbee-certification-policy.pdf .. _`Mbed TLS backend`: https://tls.mbed.org/ diff --git a/lc3/README.md b/lc3/README.md deleted file mode 100755 index 4cca585acf..0000000000 --- a/lc3/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) 2022 Nordic Semiconductor ASA - -Scope. LC3 library ----------------------- -- LC3 Library: delivered as .a library format -- The - LC3 Library - contain BT5.2 compliant codec (QDID: 156294) -- Terms and Conditions for LC3 -- For the terms and conditions, see license.txt diff --git a/lc3/README.rst b/lc3/README.rst new file mode 100644 index 0000000000..ea7dc51588 --- /dev/null +++ b/lc3/README.rst @@ -0,0 +1,186 @@ +.. _lc3: + +Low Complexity Communication Codec (LC3) +######################################## + +.. contents:: + :local: + :depth: 2 + +Low Complexity Communication Codec (LC3) is the default software codec for the :ref:`nrf53_audio_app` application, conformant to the `Bluetooth® LE Audio specifications`_ (Bluetooth 5.2, QDID #156294). +It is used only by this application for encoding and decoding purposes, but can be used with any other audio application developed with the nRF5340 Audio DK. +For more information about the codec usage in the application, see the application documentation page in the |NCS| documentation. + +The nrfxlib module includes the :file:`lc3/include/sw_codec_lc3.h` and :file:`lc3/src/sw_codec_lc3.c` files that form a translation layer for using a standardized API in the nRF5340 Audio application. + +.. _lc3_legal: + +License and attribution +*********************** + +For the terms and conditions for using the LC3 codec, see :file:`license.txt` and :file:`attiribution.txt` at :file:`lc3/`. + +.. _lc3_api: + +API documentation +***************** + +For API documenation, check the `LC3 API documentation document`_. + +.. _lc3_changelog: + +Changelog +********* + +All notable changes to this project are documented in this section. + +main branch +=========== + +Initial release. +This release includes the following changes to the codec. + +LC3 v1.0.4 +---------- + +Build information: + +* Platform: ARM Cortex-M33, Cortex-M44 +* Compiler: ARM v6, -Ofast +* Hard floating point, fixed point + +Changes: + +* Replaced floating point stdlib dependencies in data path with T2 functions. +* Optimized the LTPF decoder, fixed point. + +LC3 v1.0.3 +---------- + +Changes: + +* MDCT optimizations. +* LTPF optimizations. +* Arithmetic encoding optimizations. + +LC3 v1.0.2 +---------- + +Changes: + +* Platform-specific optimizations. + +LC3 v1.0.1 +---------- + +Changes: + +* Fixed point optimizations. + +LC3 v1.0.0 +---------- + +Changes: + +* ARC LTPF SIMD optimizations. + +LC3 v0.9.14 +----------- + +Changes: + +* ARM optimizations. + +LC3 v0.9.13 +----------- + +Changes: + +* Added compile option to separate encode/decode memory. + +LC3 v0.9.12 +----------- + +Changes: + +* ARM optimizations. + +LC3 v0.9.11 +----------- + +Changes: + +* ARM optimizations. + +LC3 v0.9.10 +----------- + +Changes: + +* Incorporated all technical errata up to 15138. + +LC3 v0.9.9 +---------- + +Changes: + +* Non-functional changes. + +LC3 v0.9.8 +---------- + +Changes: + +* Fixed point memory optimizations. +* Fixed point 7.5 ms frame size conformance improvements, meets stricter 0.06 ODG threshold in conformance tests. +* Fixed scaling for > 16 bit PCM output in fixed point. + +LC3 v0.9.7 +---------- + +Changes: + +* Fixed Glockenspiel 24 kHz / 48 kbps / 7.5 ms exceeding 0.06 ODG in floating point encode/decode test. +* Performance optimizations. + +LC3 v0.9.6 +---------- + +Changes: + +* Added 7.5 ms support for floating point. + +LC3 v0.9.5 +---------- + +Changes: + +* Fixed point memory optimizations. + +LC3 v0.9.4 +---------- + +Changes: + +* Added 24 and 32 bit PCM input and output to T2_LC3. +* Optimizations in pitch lag detection. +* Added API for amount of packet loss correction (PLC) applied. +* Added API for providing static buffers. +* Added error code offset to avoid value conflict with other modules. +* Added API for the number of bytes read from encoder input. + +LC3 v0.9.3 +---------- + +Changes: + +* Fixed an issue in T2_LC3 where decoding a single frame resulted in 1/4 frame of additional PCM output. + +LC3 v0.9.2 +---------- + +Changes: + +* Added x64 Linux build T2_LC3. +* Added support for multi-channel WAV files to T2_LC3 application. +* Removed a DLL dependency from T2_LC3 Windows build. diff --git a/lc3/doc/license.txt b/lc3/attribution.txt old mode 100755 new mode 100644 similarity index 100% rename from lc3/doc/license.txt rename to lc3/attribution.txt diff --git a/lc3/doc/T2_LC3_API_Documentation_1.5.pdf b/lc3/doc/T2_LC3_API_Documentation_1.5.pdf deleted file mode 100644 index 3d953792b2..0000000000 Binary files a/lc3/doc/T2_LC3_API_Documentation_1.5.pdf and /dev/null differ diff --git a/lc3/doc/readme.html b/lc3/doc/readme.html deleted file mode 100755 index 8102a5fcf2..0000000000 --- a/lc3/doc/readme.html +++ /dev/null @@ -1,461 +0,0 @@ - - - -readme_dist - - - - -

T2 SOFTWARE LC3

-

Integration and distribution information for T2 Software, Inc.'s LC3 codec library.

-

OVERVIEW:

-

This distribution provides a means for integrating into your application, as well as an application for using the LC3 codec on a desktop computer.

-

DIRECTORIES:

- -

INTEGRATION:

-

The LC3 library can be integrated into your application via the following steps:

-
    -
  1. Port memory functions to your platform if needed
  2. -
  3. Update your project with the necessary files
  4. -
-

PLATFORM

-

The directory "platform/os/baremetal" contains an abstraction layer that uses the stdlib heap functions (malloc/free).

-

If you need to use a different heap, then create a new directory platform/os/[PLATFORM] where [PLATFORM] is the name of your platform and modify the functions as needed.

-

If you will be providing your own buffers directly to the LC3 APIs, then the heap functions will not be called. You may stub these platform functions if malloc() and free() are not present in your project in that case.

-

BUILD

-

The following are the necessary components for integrating LC3 into your project:

- -

Also ensure you are using the appropriate compiler flags for either hard or soft float and that the corresponding math library is linked.

-

APPLICATION:

-

T2_LC3

-

T2_LC3 is an application that allows you to use the LC3 codec on a desktop computer. It is able to both encode WAV files into a binary format, and decode binary files back into WAV files.

-

Builds of T2_LC3 are provided for PC.

-

Usage

-

Usage: [mode] [options] [input] [output] [bitrate]

-

Where [mode] is:

- -

Where [options] are all optional and may include:

- -

Where [input] is:

- -

Where [output] is:

- -

Where [bitrate] is:

- -

Example Commands

-

An example encode command is:

- -

An example decode command is:

- -

An example encode/decode command (10 msec frame) is:

- -

An example encode/decode command (7.5 msec frame) is:

- -

An example encode/decode command with a specified output bit depth is:

- -

An example encode/decode command with a specified output bit depth and delay compensation disabled is:

- - - - - diff --git a/lc3/doc/readme.md b/lc3/doc/readme.md deleted file mode 100755 index aebcb9c6a0..0000000000 --- a/lc3/doc/readme.md +++ /dev/null @@ -1,129 +0,0 @@ -# T2 SOFTWARE LC3 - -Integration and distribution information for T2 Software, Inc.'s LC3 codec library. - -## OVERVIEW: - -This distribution provides a means for integrating into your application, as well as an application for using the LC3 codec on a desktop computer. - -## DIRECTORIES: - -- apps - - Demo/utility applications -- codec - - Library and header for use in your application -- doc - - API documentation -- platform - - Platform abstraction layer - -## INTEGRATION: - -The LC3 library can be integrated into your application via the following steps: - -1. Port memory functions to your platform if needed -2. Update your project with the necessary files - -### PLATFORM - -The directory "platform/os/baremetal" contains an abstraction layer that uses the stdlib heap functions (malloc/free). - -If you need to use a different heap, then create a new directory platform/os/[PLATFORM] where [PLATFORM] is the name of your platform and modify the functions as needed. - -If you will be providing your own buffers directly to the LC3 APIs, then the heap functions will not be called. You may stub these platform functions if malloc() and free() are not present in your project in that case. - -### BUILD - -The following are the necessary components for integrating LC3 into your project: - -- Link - - codec/[CODEC_TYPE]/lib/[PLATFORM]libLC3.a -- Header file - - codec/inc/LC3API.h -- Include directories - - platform/os/inc - - platform/os/[PLATFORM]/inc -- C Files - - platform/os/[PLATFORM]/src/osal.c - -Also ensure you are using the appropriate compiler flags for either hard or soft float and that the corresponding math library is linked. - -## APPLICATION: - -### T2_LC3 - -T2_LC3 is an application that allows you to use the LC3 codec on a desktop computer. It is able to both encode WAV files into a binary format, and decode binary files back into WAV files. - -Builds of T2_LC3 are provided for PC. - -#### Usage - -Usage: [mode] [options] [input] [output] [bitrate] - -Where [mode] is: - -- -E for encode mode. -- -D for decode mode. -- Omitted for encode/decode mode (encode, then decode). - -Where [options] are all optional and may include: - -- -bps [bit depth] - - Sets the output bit depth, defaults to 16 bits. 16, 24, or 32 are allowed. - - Valid in encode/decode or decode mode. - -- -frame_ms [value] - - Set the frame size, defaults to 10 msec. 10 - 10 msec; 7.5 - 7.5 msec. - -- -swf [file] - - Uses a variable bit rate pattern read from the given file. The file format is binary with every two little endian bytes representing the total number of bytes per second for all channels. The pattern defined by the file is repeated when the codec reaches the end of the file. Valid in encode or encode/decode mode. - -- -epf [file] - - Uses a pattern file designating lost frames. The file format is binary with every non-zero 16 bit value indicating a frame loss. The pattern defined by the file is repeated when the codec reaches the end of the file. Valid in decode or encode/decode mode. - -- -edf [file] - - Creates a frame loss pattern file by capturing the decode frame results. The file format is binary with every non-zero 16 bit value indicating a detected errored. Valid in decode or encode/decode mode. - -- -dc [value] - - Enables delay compensation by removing the first 1/4 frame of the decoder output when the value is set to 1. Disables delay compensation by including the first 1/4 frame of the decoder output when the value is set to 0. Default value is enabled. - -Where [input] is: - -- A WAV file in encode or encode/decode mode. -- A binary file in decode mode. - -Where [output] is: - -- A binary file in encode mode. -- A WAV file in decode or encode/decode mode. - -Where [bitrate] is: - -- Bits per second in encode or encode/decode mode. -- Ignored in decode mode. - -#### Example Commands - -An example encode command is: - -- T2_LC3 -E input.wav tmp.bin 80000 - -An example decode command is: - -- T2_LC3 -D tmp.bin output.wav - -An example encode/decode command (10 msec frame) is: - -- T2_LC3 input.wav output.wav 80000 - -An example encode/decode command (7.5 msec frame) is: - -- T2_LC3 -frame\_ms 7.5 input.wav output.wav 80000 - -An example encode/decode command with a specified output bit depth is: - -- T2_LC3 -bps 24 input.wav output.wav 80000 - -An example encode/decode command with a specified output bit depth and delay compensation disabled is: - -- T2_LC3 -bps 24 -dc 0 input.wav output.wav 80000 \ No newline at end of file diff --git a/lc3/doc/release_notes.txt b/lc3/doc/release_notes.txt deleted file mode 100755 index 7e72404d43..0000000000 --- a/lc3/doc/release_notes.txt +++ /dev/null @@ -1,73 +0,0 @@ -LC3 version 1.0.4, release type 1.1 - -Build information: - * Platform: ARM Cortex-M33, Cortex-M44 - * Compiler: ARM v6, -Ofast - * Hard floating point, fixed point - -Changes in 1.0.4: - * Replace floating point stdlib dependencies in data path with T2 functions - * LTPF decoder optimizations, fixed point - -Changes in 1.0.3: - * MDCT optimizations - * LTPF optimizations - * Arithmetic encoding optimizations - -Changes in 1.0.2: - * Platform-specific optimizations - -Changes in 1.0.1: - * Fixed point optimizations. - -Changes in 1.0.0: - * ARC LTPF SIMD optimizations - -Changes in 0.9.14: - * ARM optimizations - -Changes in 0.9.13: - * Add compile option to separate encode/decode memory - -Changes in 0.9.12: - * ARM optimizations - -Changes in 0.9.11: - * ARM optimizations - -Changes in 0.9.10: - * Incorporate all technical errata up to 15138 - -Changes in 0.9.9: - * Non-functional changes - -Changes in 0.9.8: - * Fixed point memory optimizations - * Fixed point 7.5 ms frame size conformance improvements, meets stricter 0.06 ODG threshold in conformance tests - * Fix scaling for > 16 bit PCM output in fixed point - -Changes in 0.9.7: - * Fix for Glockenspiel 24 kHz / 48 kbps / 7.5 ms exceeding 0.06 ODG in floating point encode/decode test - * Performance optimizations - -Changes in 0.9.6: - * Added 7.5 ms support for floating point - -Changes in 0.9.5: - * Fixed point memory optimizations - -Changes in 0.9.4: - * Added 24 and 32 bit PCM input and output to T2_LC3. - * Optimizations in pitch lag detection - * Added API for amount of packet loss correction (PLC) applied - * Added API for providing static buffers - * Added error code offset to avoid value conflict with other modules - * Added API for the number of bytes read from encoder input. - -Changes in 0.9.3: - * Fixed an issue in T2_LC3 where decoding a single frame resulted in 1/4 frame of additional PCM output. - -Changes in 0.9.2: - * Added x64 Linux build T2_LC3 - * Added support for multi-channel WAV files to T2_LC3 application - * Removed a DLL dependency from T2_LC3 Windows build