Don't use "static const" for compile time float constants, but use defines. This fixes the following error: src/libavfilter/vf_ssim360.c(549): error C2099: initializer is not a constant
Unified · Split
| @@ -72,11 +72,11 @@ · 71 unmodified lines | ||
| 72 | 72 | |
| 73 | 73 | #define DEFAULT_EXPANSION_COEF 1.01f |
| 74 | 74 | |
| 75 | −static const float BARREL_THETA_RANGE = DEFAULT_EXPANSION_COEF * 2.0f * M_PI_F; | |
| 76 | −static const float BARREL_PHI_RANGE = DEFAULT_EXPANSION_COEF * M_PI_2_F; | |
| 75 | +#define BARREL_THETA_RANGE (DEFAULT_EXPANSION_COEF * 2.0f * M_PI_F) | |
| 76 | +#define BARREL_PHI_RANGE (DEFAULT_EXPANSION_COEF * M_PI_2_F) | |
| 77 | 77 | |
| 78 | 78 | // Use fixed-point with 16 bit precision for fast bilinear math |
| 79 | −static const int FIXED_POINT_PRECISION = 16; | |
| 79 | +#define FIXED_POINT_PRECISION 16 | |
| 80 | 80 | |
| 81 | 81 | // Use 1MB per channel for the histogram to get 5-digit precise SSIM value |
| 82 | 82 | #define SSIM360_HIST_SIZE 131072 |