commit | bb27bcd9c676f65937a2637d8c400d491d655f54 | [log] [tgz] |
---|---|---|
author | Kevin DuBois <kevindubois@google.com> | Tue Apr 02 14:34:35 2019 -0700 |
committer | Kevin DuBois <kevindubois@google.com> | Wed Apr 03 13:18:04 2019 -0700 |
tree | e29a56544a000ada1440c49cc1581244c003e6ac | |
parent | 945a7006f905b5f460668923b9875cd6637931a6 [diff] |
SF: fix off-by one in luma mean calculation There was an off by one error in luma mean calculation that could lead to segfault. Flaw was figured out in writing the 5 attached unit tests for the function. Condition would be obscure in the wild, but an exactly half-white, half-another-color in the sampled region could present condition. Fixes: 129858549 Test: libsurfaceflinger_unittest (5 new tests) Change-Id: I920cd9cac15122178ec9258e33c9bc35b1bb9357