7#include "xorshift128p.hpp"
8#include "../utility/module.hpp"
10namespace hi::inline
v1 {
38 auto maximum_value =
static_cast<float>((1_uz << num_bits) - 1);
41 maximum_value *= 127.0f;
44 maximum_value *= 2.0f;
46 _multiplier = f32x4::broadcast(1.0f / maximum_value);
74 [[nodiscard]] f32x4
next(f32x4 samples)
noexcept
76 return samples + next();
84 [[nodiscard]]
float next(
float sample)
noexcept
86 return get<0>(f32x4::broadcast(sample) + next());
90 f32x4 _multiplier = {};
92 xorshift128p _state = {};
93 unsigned char _counter = 0;
#define hi_not_implemented(...)
This part of the code has not been implemented yet.
Definition assert.hpp:320
#define hi_axiom(expression,...)
Specify an axiom; an expression that is true.
Definition assert.hpp:238
DOXYGEN BUG.
Definition algorithm.hpp:13
An object that create dither values to add to samples before rounding.
Definition dither.hpp:23
dither(int num_bits) noexcept
Create a dither object.
Definition dither.hpp:35
f32x4 next() noexcept
Get 8 floating point number to add to a samples.
Definition dither.hpp:52
f32x4 next(f32x4 samples) noexcept
Add dither to the given samples.
Definition dither.hpp:74
float next(float sample) noexcept
Add dither to the given samples.
Definition dither.hpp:84