Low Complexity Communication Codec. This is an audio codec targeting no_std
environments.
To start take a look at the lc3_decoder.rs
and lc3_encoder.rs
files.
To check lines of code run:
loc --exclude ./tables/*
The unit tests in place right now are primarily here to facilitate a major refactoring effort by helping me identify refactors with material changes to the input and output data. Basically I don't want to break things and this helps with that. More granular and useful tests will come as soon as the codebase stabilizes a little.
To setup follow instructions here: https://github.com/flamegraph-rs/flamegraph Note that the debug symbols should be included in release mode and you should only profile release builds
```
[profile.release] debug = true ```
To run:
Use flamegraph directly: ```
echo -1 | sudo tee /proc/sys/kernel/perfeventparanoid
flamegraph -o flamegraph.svg ./target/release/decode flamegraph -o flamegraph.svg ./target/release/examples/spectralnoiseshaping_decode
echo 3 | sudo tee /proc/sys/kernel/perfeventparanoid ```
or use cargo-flamegraph for more advanced features (andd no need to change perf_event_paranoid
):
```
cargo flamegraph -c "record -e instructions -c 100 --call-graph lbr -g" --example decode --root
cargo flamegraph --bench modifieddctdecode --root -- --bench
cargo flamegraph -c "record -e instructions -c 100 --call-graph lbr -g" --example mdct_decode --root
cargo flamegraph -c "record -e instructions -c 100 --call-graph lbr -g" --example mdct_decode --root
```
``` Copyright 2022 David Haig
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at:
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ```