]> git.nihav.org Git - nihav.git/commitdiff
codec_support/vq: calculate full cluster distortion instead of an average
authorKostya Shishkov <kostya.shishkov@gmail.com>
Mon, 15 Jun 2020 16:46:08 +0000 (18:46 +0200)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Mon, 15 Jun 2020 16:46:08 +0000 (18:46 +0200)
nihav-codec-support/src/vq/generic_elbg.rs

index 3c3e3c075f480043b3834e88e24ba6eb7bbc89fc..01feaa852084c7cbc30c95de74337de62883d87a 100644 (file)
@@ -56,9 +56,6 @@ impl<T: VQElement, TS: VQElementSum<T>> Cluster<T, TS> {
         }
     }
     fn calc_dist(&mut self) {
-        if self.count != 0 {
-            self.dist = (self.dist + self.count / 2) / self.count;
-        }
     }
 }