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
72 72
73#define DEFAULT_EXPANSION_COEF 1.01f73#define DEFAULT_EXPANSION_COEF 1.01f
74 74
75static const float BARREL_THETA_RANGE = DEFAULT_EXPANSION_COEF * 2.0f * M_PI_F;75#define BARREL_THETA_RANGE (DEFAULT_EXPANSION_COEF * 2.0f * M_PI_F)
76static const float BARREL_PHI_RANGE = DEFAULT_EXPANSION_COEF * M_PI_2_F;76#define BARREL_PHI_RANGE (DEFAULT_EXPANSION_COEF * M_PI_2_F)
77 77
78// Use fixed-point with 16 bit precision for fast bilinear math78// Use fixed-point with 16 bit precision for fast bilinear math
79static const int FIXED_POINT_PRECISION = 16;79#define FIXED_POINT_PRECISION 16
80 80
81// Use 1MB per channel for the histogram to get 5-digit precise SSIM value81// Use 1MB per channel for the histogram to get 5-digit precise SSIM value
82#define SSIM360_HIST_SIZE 13107282#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