18 #ifndef PIC_UTIL_CACHED_TABLE_HPP 19 #define PIC_UTIL_CACHED_TABLE_HPP 44 float C_PI_2_inv_n =
C_PI_2 / float(
n);
46 for(
int i = 0; i <
n; i++) {
47 float value = float(i) * C_PI_2_inv_n;
53 PATCH =
new float [patchSize + 1];
54 int halfPatchSize = patchSize >> 1;
56 for(
int i = -halfPatchSize; i <= halfPatchSize; i++) {
57 PATCH[i + halfPatchSize] = float(i);
float COS_TABLE[512]
Definition: cached_table.hpp:30
float inv_width
Definition: cached_table.hpp:33
CachedTable(int patchSize, int width, int height)
CachedTable creates a precomputed table of sin and cos values.
Definition: cached_table.hpp:41
const float C_PI_2
Definition: math.hpp:52
float SIN_TABLE[512]
Definition: cached_table.hpp:31
float inv_height
Definition: cached_table.hpp:33
The CachedTable class.
Definition: cached_table.hpp:26
int n
Definition: cached_table.hpp:29
Definition: bilateral_separation.hpp:25
float * PATCH
Definition: cached_table.hpp:32