You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-11-23 21:54:53 +02:00
avfilter/vf_fsppdsp: Use enum for constants
It means that the compiler does not have to optimize the static const object away. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
|
||||
#define DCTSIZE 8
|
||||
|
||||
#define FIX(x,s) ((x) * (1 << s) + 0.5)
|
||||
#define FIX(x,s) (int)((x) * (1 << s) + 0.5)
|
||||
|
||||
#define MULTIPLY16H(x,k) (((x) * (k)) >> 16)
|
||||
#define THRESHOLD(r,x,t) \
|
||||
@@ -38,15 +38,18 @@
|
||||
#define DESCALE(x,n) (((x) + (1 << ((n) - 1))) >> n)
|
||||
|
||||
typedef int32_t int_simd16_t;
|
||||
static const int16_t FIX_0_382683433 = FIX(0.382683433, 14);
|
||||
static const int16_t FIX_0_541196100 = FIX(0.541196100, 14);
|
||||
static const int16_t FIX_0_707106781 = FIX(M_SQRT1_2 , 14);
|
||||
static const int16_t FIX_1_306562965 = FIX(1.306562965, 14);
|
||||
static const int16_t FIX_1_414213562_A = FIX(M_SQRT2 , 14);
|
||||
static const int16_t FIX_1_847759065 = FIX(1.847759065, 13);
|
||||
static const int16_t FIX_2_613125930 = FIX(-2.613125930, 13);
|
||||
static const int16_t FIX_1_414213562 = FIX(M_SQRT2 , 13);
|
||||
static const int16_t FIX_1_082392200 = FIX(1.082392200, 13);
|
||||
|
||||
enum {
|
||||
FIX_0_382683433 = FIX(0.382683433, 14),
|
||||
FIX_0_541196100 = FIX(0.541196100, 14),
|
||||
FIX_0_707106781 = FIX(M_SQRT1_2 , 14),
|
||||
FIX_1_306562965 = FIX(1.306562965, 14),
|
||||
FIX_1_414213562_A = FIX(M_SQRT2 , 14),
|
||||
FIX_1_847759065 = FIX(1.847759065, 13),
|
||||
FIX_2_613125930 = FIX(-2.613125930, 13),
|
||||
FIX_1_414213562 = FIX(M_SQRT2 , 13),
|
||||
FIX_1_082392200 = FIX(1.082392200, 13),
|
||||
};
|
||||
|
||||
DECLARE_ALIGNED(32, static const uint8_t, dither)[8][8] = {
|
||||
{ 0, 48, 12, 60, 3, 51, 15, 63, },
|
||||
|
||||
Reference in New Issue
Block a user