From: Kostya Shishkov Date: Mon, 15 Jun 2020 16:47:32 +0000 (+0200) Subject: codec_support/vq: use 1% improvement as a threshold in ELBG loop X-Git-Url: https://git.nihav.org/?a=commitdiff_plain;h=c5a6ae875be31f47bc318a6dc5b1a0209b9b66f7;p=nihav.git codec_support/vq: use 1% improvement as a threshold in ELBG loop --- 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;