diff --git a/tests/color-icc-output-test.c b/tests/color-icc-output-test.c index 2f2de05e..682e10c7 100644 --- a/tests/color-icc-output-test.c +++ b/tests/color-icc-output-test.c @@ -175,7 +175,7 @@ test_roundtrip(uint8_t r, uint8_t g, uint8_t b, cmsPipeline *pip, struct color_float out = {}; cmsPipelineEvalFloat(in.rgb, out.rgb, pip); - rgb_diff_stat_update(stat, &in, &out); + rgb_diff_stat_update(stat, &in, &out, &in); } /* diff --git a/tests/color_util.c b/tests/color_util.c index da2f5c6b..9267aefe 100644 --- a/tests/color_util.c +++ b/tests/color_util.c @@ -449,7 +449,8 @@ rgb_diff_stat_print(const struct rgb_diff_stat *stat, void rgb_diff_stat_update(struct rgb_diff_stat *stat, const struct color_float *ref, - const struct color_float *val) + const struct color_float *val, + const struct color_float *pos) { unsigned i; double ssd = 0.0; @@ -457,9 +458,9 @@ rgb_diff_stat_update(struct rgb_diff_stat *stat, for (i = 0; i < COLOR_CHAN_NUM; i++) { double diff = val->rgb[i] - ref->rgb[i]; - scalar_stat_update(&stat->rgb[i], diff, ref); + scalar_stat_update(&stat->rgb[i], diff, pos); ssd += diff * diff; } - scalar_stat_update(&stat->two_norm, sqrt(ssd), ref); + scalar_stat_update(&stat->two_norm, sqrt(ssd), pos); } diff --git a/tests/color_util.h b/tests/color_util.h index 1bb7297a..9ad09588 100644 --- a/tests/color_util.h +++ b/tests/color_util.h @@ -164,7 +164,8 @@ scalar_stat_print_float(const struct scalar_stat *stat); void rgb_diff_stat_update(struct rgb_diff_stat *stat, const struct color_float *ref, - const struct color_float *val); + const struct color_float *val, + const struct color_float *pos); void rgb_diff_stat_print(const struct rgb_diff_stat *stat,