Go to the documentation of this file. 1 #ifndef VIDEOVISUAL_DEFS_H
2 #define VIDEOVISUAL_DEFS_H
9 explicit LogScale(
int maxscale = 0,
int maxrange = 0)
11 setMax(maxscale, maxrange);
17 void setMax(
int maxscale,
int maxrange)
19 if (maxscale == 0 || maxrange == 0)
25 auto domain = (
long double) maxscale;
26 auto drange = (
long double) maxrange;
29 long double e4 = 1.0E-8;
35 for (
uint i = 0; i < 10000 && (std::abs(dx) > e4); i++)
37 long double t =
std::log((domain + x) / x);
38 long double y = (x *
t) - drange;
39 long double yy =
t - (domain / (x + domain));
45 for (
int i = 1; i < (int) domain; i++)
47 int scaled = (int) floor(0.5 + (alpha *
log((
double(i) + alpha) / alpha)));
201 #endif // VIDEOVISUAL_DEFS_H
static void mono16_from_monopcm8(short *l, const uchar *c, long cnt)
int operator[](int index) const
std::vector< int > m_indices
LogScale(int maxscale=0, int maxrange=0)
static void mono16_from_monopcm16(short *l, const short *s, long cnt)
static void stereo16_from_stereopcm16(short *l, short *r, const short *s, long cnt)
void setMax(int maxscale, int maxrange)
static void stereo16_from_stereopcm8(short *l, short *r, const uchar *c, long cnt)