Prevent negative variance
authorYaowu Xu <yaowu@google.com>
Wed, 22 Jun 2016 17:41:52 +0000 (10:41 -0700)
committerYaowu Xu <yaowu@google.com>
Wed, 22 Jun 2016 17:55:14 +0000 (17:55 +0000)
commitef665996ae59a43575272449d0120a67457a7856
treef5e540eeae59e7b2643a92d0df46635d0a20e254
parentb3933e2d3ccf0de83441eac9d22a145c20ac6803
Prevent negative variance

Due to rounding used computation, HDB variance computation may produce
slightly negative values. This commit adds clamping to make sure
output variance values for 10 and 12 to be non-negative.

Change-Id: Id679aa55a4c201958c4c7d28cd8733b9246a71c8
vpx_dsp/variance.c