]> granicus.if.org Git - libvpx/commit
Make the zero handling in extend_to_full_distribution more explicit.
authorAlex Converse <aconverse@google.com>
Thu, 8 Oct 2015 23:01:42 +0000 (16:01 -0700)
committerAlex Converse <aconverse@google.com>
Thu, 29 Oct 2015 21:46:55 +0000 (14:46 -0700)
commit989193c797722dd2a37d481ab7cbd01a5d37270f
tree350c1307beef44977df3d6efa22d25f485cb938b
parent6f229b3e62549045ec12b955148dba56e4496cac
Make the zero handling in extend_to_full_distribution more explicit.

The old workaround "p = 0 ? 0 : p -1" is misleading.

?: happens before =
assigning back to p truncates to one byte.

Therefore it is equivalent to (p - 1) & 0xFF, but the check just exists
to work around a first pass bug, so let's make the work around more
clear.

https://bugs.chromium.org/p/webm/issues/detail?id=1089

Change-Id: I587c44dd61c1f3767543c0126376f881889935af
vp10/common/entropy.c
vp10/common/entropy.h
vp9/common/vp9_entropy.c
vp9/common/vp9_entropy.h