singe/thirdparty/SDL2_image/external/libjxl/tools/ssimulacra.h
2023-10-23 19:38:18 -05:00

34 lines
706 B
C++

// Copyright (c) the JPEG XL Project Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
#ifndef TOOLS_SSIMULACRA_H_
#define TOOLS_SSIMULACRA_H_
#include <vector>
#include "lib/jxl/image.h"
namespace ssimulacra {
struct SsimulacraScale {
double avg_ssim[3];
double min_ssim[3];
};
struct Ssimulacra {
std::vector<SsimulacraScale> scales;
double avg_edgediff[3];
double row_p2[2][3];
double col_p2[2][3];
double Score() const;
void PrintDetails() const;
};
Ssimulacra ComputeDiff(const jxl::Image3F& orig, const jxl::Image3F& distorted);
} // namespace ssimulacra
#endif // TOOLS_SSIMULACRA_H_