History

lavfi/vf_ssim360: Fix compilation with MSVC

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

Martin Storsjö committed 3 years ago

Commit c0cf2c41 parent ed519a31 file · +3 −3Browse files

Unified · Split

libavfilter/vf_ssim360.c+3−3
@@ -72,11 +72,11 @@ · 71 unmodified lines
7272
7373 #define DEFAULT_EXPANSION_COEF 1.01f
7474
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)
7777
7878 // 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
8080
8181 // Use 1MB per channel for the histogram to get 5-digit precise SSIM value
8282 #define SSIM360_HIST_SIZE 131072

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t