From c5a6ae875be31f47bc318a6dc5b1a0209b9b66f7 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Mon, 15 Jun 2020 18:47:32 +0200 Subject: [PATCH] codec_support/vq: use 1% improvement as a threshold in ELBG loop --- nihav-codec-support/src/vq/generic_elbg.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nihav-codec-support/src/vq/generic_elbg.rs b/nihav-codec-support/src/vq/generic_elbg.rs index 01feaa8..91a5658 100644 --- a/nihav-codec-support/src/vq/generic_elbg.rs +++ b/nihav-codec-support/src/vq/generic_elbg.rs @@ -181,7 +181,7 @@ impl> ELBG { let mut rng = RNG::new(); let mut iterations = 0usize; let mut do_elbg_step = true; - while (iterations < 20) && (dist < prev_dist - prev_dist / 1000) { + while (iterations < 20) && (dist < prev_dist - prev_dist / 100) { prev_dist = dist; for i in 0..dst.len() { old_cb[i] = self.clusters[i].centroid; -- 2.39.5