mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-10-24 02:09:03 +03:00
tests/tiny_ssim: fixed mistake in ssim_c1 calculation
Reporter uses this code in production.
Signed-off-by: Valerii Zapodovnikov <val.zapod.vz@gmail.com>
(cherry picked from commit 8cd7465565)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
committed by
Michael Niedermayer
parent
80b3a04f5d
commit
666e70923f
@@ -79,11 +79,11 @@ static float ssim_end1( int s1, int s2, int ss, int s12 )
|
||||
* Maximum value for 9-bit is: ss*64 = (2^9-1)^2*16*4*64 = 1069551616, which will not overflow. */
|
||||
#if BIT_DEPTH > 9
|
||||
typedef float type;
|
||||
static const float ssim_c1 = .01*.01*PIXEL_MAX*PIXEL_MAX*64;
|
||||
static const float ssim_c1 = .01*.01*PIXEL_MAX*PIXEL_MAX*64*64;
|
||||
static const float ssim_c2 = .03*.03*PIXEL_MAX*PIXEL_MAX*64*63;
|
||||
#else
|
||||
typedef int type;
|
||||
static const int ssim_c1 = (int)(.01*.01*PIXEL_MAX*PIXEL_MAX*64 + .5);
|
||||
static const int ssim_c1 = (int)(.01*.01*PIXEL_MAX*PIXEL_MAX*64*64 + .5);
|
||||
static const int ssim_c2 = (int)(.03*.03*PIXEL_MAX*PIXEL_MAX*64*63 + .5);
|
||||
#endif
|
||||
type fs1 = s1;
|
||||
|
||||
Reference in New Issue
Block a user