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);
22 void setMax(
int maxscale,
int maxrange)
24 if (maxscale == 0 || maxrange == 0)
32 auto domain = (
long double) maxscale;
33 auto drange = (
long double) maxrange;
36 long double e4 = 1.0E-8;
39 for (
int i = 0; i < maxrange; i++)
43 for (
uint i = 0; i < 10000 && (std::abs(dx) > e4); i++)
45 long double t =
std::log((domain + x) / x);
46 long double y = (x *
t) - drange;
47 long double yy =
t - (domain / (x + domain));
53 for (
int i = 1; i < (int) domain; i++)
55 int scaled = (int) floor(0.5 + (alpha *
log((
double(i) + alpha) / alpha)));
209 #endif // VIDEOVISUAL_DEFS_H
static void mono16_from_monopcm8(short *l, const uchar *c, long cnt)
int operator[](int index) const
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)