Skip to content

Commit

Permalink
Re-remove harmonic mean, sadge
Browse files Browse the repository at this point in the history
  • Loading branch information
shssoichiro committed Jun 13, 2024
1 parent fbd45f9 commit 08fdfb9
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## Version 0.5.2

- Re-remove harmonic mean. Unfortunately it cannot be used on sets that have negative numbers, which includes
ssimulacra2 scores. Geometric mean was also tested, and in _theory_ it may be computed on sets with negative values,
in practice it cannot be due to computer algorithms using logarithms for the computation.

## Version 0.5.1

- Add harmonic mean output
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ssimulacra2_rs"
version = "0.5.1"
version = "0.5.2"
edition = "2021"
description = "Binary exposing the ssimulacra2 rust implementation"
repository = "https://github.com/rust-av/ssimulacra2_bin"
Expand Down
3 changes: 1 addition & 2 deletions src/video.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use ssimulacra2::{
compute_frame_ssimulacra2, ColorPrimaries, MatrixCoefficients, Pixel, TransferCharacteristic,
Yuv, YuvConfig,
};
use statrs::statistics::{Data, Distribution, Median, OrderStatistics, Statistics};
use statrs::statistics::{Data, Distribution, Median, OrderStatistics};

const PROGRESS_CHARS: &str = "█▉▊▋▌▍▎▏ ";
const INDICATIF_PROGRESS_TEMPLATE: &str = if cfg!(windows) {
Expand Down Expand Up @@ -454,7 +454,6 @@ fn compare_videos_inner<D: Decoder + 'static, E: Decoder + 'static>(
println!("Video Score for {} frames", frames);
println!("Mean: {:.8}", data.mean().unwrap());
println!("Median: {:.8}", data.median());
println!("Harmonic Mean: {:.8}", data.iter().harmonic_mean());
println!("Std Dev: {:.8}", data.std_dev().unwrap());
println!("5th Percentile: {:.8}", data.percentile(5));
println!("95th Percentile: {:.8}", data.percentile(95));
Expand Down

0 comments on commit 08fdfb9

Please sign in to comment.