Control Surface main
MIDI Control Surface library for Arduino
Loading...
Searching...
No Matches
Namespaces | Functions | Variables
IncreaseBitDepth.hpp File Reference
#include <AH/STL/type_traits>
#include <limits.h>
#include <stddef.h>
+ Include dependency graph for IncreaseBitDepth.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  AH
 PrintStream library
 
namespace  AH::detail
 

Functions

template<size_t Bits_out, size_t Bits_in, class T_out , class T_in >
std::enable_if_t<(Bits_out<=Bits_in), T_outincreaseBitDepthImpl (T_in in)
 
template<size_t Bits_out, size_t Bits_in, class T_out , class T_in >
std::enable_if_t<(Bits_out > 2 *Bits_in), T_outincreaseBitDepthImpl (T_in in)
 
template<size_t Bits_out, size_t Bits_in, class T_out , class T_in >
T_out increaseBitDepth (T_in in)
 Increase the bit depth of the given value from Bits_in bits wide to Bits_out bits wide, (approximately) evenly distributing the error across the entire range, such that the error for each element is between -1 and +1.
 
template<size_t Bits_out, size_t Bits_in, class T_out , class T_in >
T_out increaseBitDepthMiddle (T_in in)
 Increase the bit depth of the given value from Bits_in bits wide to Bits_out bits wide, while ensuring that the middle of the input range maps exactly to the middle of the output range, i.e.
 

Variables

template<size_t Bits_out, size_t Bits_in, class T_out , class T_in >
std::enable_if_t<(Bits_out<=2 *Bits_in) &&(Bits_out > Bits_in), T_out increaseBitDepthImpl )(T_in in)