ssimulacra.h (858B)
1 // Copyright (c) the JPEG XL Project Authors. All rights reserved. 2 // 3 // Use of this source code is governed by a BSD-style 4 // license that can be found in the LICENSE file. 5 6 #ifndef TOOLS_SSIMULACRA_H_ 7 #define TOOLS_SSIMULACRA_H_ 8 9 #include <vector> 10 11 #include "lib/jxl/base/status.h" 12 #include "lib/jxl/image.h" 13 14 namespace ssimulacra { 15 16 struct SsimulacraScale { 17 double avg_ssim[3]; 18 double min_ssim[3]; 19 }; 20 21 struct Ssimulacra { 22 std::vector<SsimulacraScale> scales; 23 double avg_edgediff[3]; 24 double row_p2[2][3]; 25 double col_p2[2][3]; 26 bool simple; 27 28 double Score() const; 29 void PrintDetails() const; 30 }; 31 32 jxl::StatusOr<Ssimulacra> ComputeDiff(const jxl::Image3F& orig, 33 const jxl::Image3F& distorted, 34 bool simple); 35 36 } // namespace ssimulacra 37 38 #endif // TOOLS_SSIMULACRA_H_