Giter Club home page Giter Club logo

liblc3's Introduction

Low Complexity Communication Codec (LC3)

The LC3 is an efficient low latency audio codec.

Low Complexity Communication Codec

Overview

The directory layout is as follows :

  • include: Library interface
  • src: Source files
  • tools: Standalone encoder/decoder tools
  • test: Python implentation, used as reference for unit testing
  • build: Building outputs
  • bin: Compilation output

How to build

The default toolchain used is GCC. Invoke make to build the library.

$ make -j

Compiled library liblc3.a will be found in bin directory.

Cross compilation

The cc, as, ld and ar can be selected with respective Makefile variables CC, AS, LD and AR. The AS and LD selections are optionnal, and fallback to CC selection when not defined.

The LIBC must be set to bionic for android cross-compilation. This switch prevent link with pthread and rt libraries, that is included in the bionic libc.

Following example build for android, using NDK toolset.

$ make -j CC=path_to_android_ndk_prebuilt/toolchain-prefix-clang LIBC=bionic

Compiled library will be found in bin directory.

Tools

Tools can be all compiled, while involking make as follows :

$ make tools

The standalone encoder elc3 take a wave file as input and encode it according given parameter. The LC3 binary file format used is the non standard format described by the reference encoder / decoder tools. The standalone decoder dlc3 do the inverse operation.

Refer to elc3 -h or dlc3 -h for options.

Note that elc3 output bitstream to standard output when output file is omitted. On the other side dlc3 read from standard input when input output file are omitted. In such way you can easly test encoding / decoding loop with :

$ ./elc3 <in.wav> -b <bitrate> | ./dlc3 > <out.wav>

Adding Linux aplay tools, you will be able to instant hear the result :

$ ./elc3 <in.wav> -b <bitrate> | ./dlc3 | aplay

Test

A python implementation of the encoder is provided in test diretory. The C implementation is unitary validated against this implementation and intermediate values given in Appendix C of the specification.

Prerequisite

# apt install python3 python3-dev python3-pip
$ pip3 install scipy numpy

Running test suite

$ make test

Conformance

The proposed encoder and decoder implementation have been fully tested and validated.

For more detail on conformance, refer to Bluetooth Conformance Documents and scripts

liblc3's People

Contributors

asoulier avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.