Imported Upstream version 0.7.0
[platform/upstream/libjxl.git] / lib / extras / metrics.h
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 LIB_EXTRAS_METRICS_H_
7 #define LIB_EXTRAS_METRICS_H_
8
9 #include <stdint.h>
10
11 #include "lib/jxl/butteraugli/butteraugli.h"
12 #include "lib/jxl/image_bundle.h"
13
14 namespace jxl {
15
16 // Computes p-norm given the butteraugli distmap.
17 double ComputeDistanceP(const ImageF& distmap, const ButteraugliParams& params,
18                         double p);
19
20 double ComputeDistance2(const ImageBundle& ib1, const ImageBundle& ib2,
21                         const JxlCmsInterface& cms);
22
23 double ComputePSNR(const ImageBundle& ib1, const ImageBundle& ib2,
24                    const JxlCmsInterface& cms);
25
26 }  // namespace jxl
27
28 #endif  // LIB_EXTRAS_METRICS_H_