xmos / lib_agc Goto Github PK
View Code? Open in Web Editor NEWAutomatic gain control library
License: Other
Automatic gain control library
License: Other
The gain value, as defined in agc_channel_state_t, doesn't correspond to a gain (in dB value) on the input signal.
For example, with channel state gain set to 6, and gain_exp set to 0 (see agc_init_channel()) a constant input signal results in the following constant output values:
G(INT_MAX * 0.1) = INT_MAX * 0.54
G(INT_MAX * 0.2) = INT_MAX * 0.73
G(INT_MAX * 0.25) = INT_MAX * 0.77
G(INT_MAX * 0.4) = INT_MAX * 0.83
This is unexpected. Shouldn't the gain value in agc_channel_state_t correspond to a dB gain on the channel input?
Recent CI runs of the develop branch show a failure when running flake8, which checks Python scripts for good style. Currently we pin flake8 at v3.8.3. Flake8 uses importlib-metadata. A known issue in importlib-metadata breaks flake8. By pinning importlib-metadata at v4.13.0, flake8 can run as normal.
In passing, this issue also covers an update of the XMOS Jenkins Shared Library to the latest available version, v0.20.0.
{uint32_t, int} subtract(uint32_t a, int a_exp, uint32_t b, int b_exp), as defined in agc.xc, returns wildly incorrect values in cases where:
Or, conversely, when:
agc_init_channel() sets the agc state to the following values:
db: 20
gain exp: 3
gain: 20971522
This scrambles the output of the agc process.
This repository does not contain an application note providing an example to support a customer in becoming familiar with building and using it.
The API header files include xccompat.h and use its macros to accommodate both a C and XC interface. However, only an XC definition of each declared API function exists.
The set and get functions in agc.h do not check ch_index parameter for correctness.
If ch_index >= AGC_INPUT_CHANNELS then an out-of-bounds exception will occur.
Any fix should be documented in the setter/getter Doxygen comments as defined behaviour.
The AGC API includes XC language features, specifically the use of references..
The branch feature/c_callable
contains initial enhancements to provide a C API. Pull request #120 exists to review and merge these enhancements. The changes in this PR do not include the C language definitions of the AGC functions, only their declarations.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.