summaryrefslogtreecommitdiff
path: root/vp9/common/vp9_entropy.c
diff options
context:
space:
mode:
authorAlex Converse <aconverse@google.com>2016-02-17 13:39:44 -0800
committerAlex Converse <aconverse@google.com>2016-02-17 14:46:26 -0800
commit09f9c5d7f90bd19dfc1994926a6e35680ba9545c (patch)
tree4b885467bbbd25a070ac47459e586e608b8b7073 /vp9/common/vp9_entropy.c
parentfdc977afc6b431c7577e70d151f89ea726bcaf8f (diff)
downloadlibvpx-09f9c5d7f90bd19dfc1994926a6e35680ba9545c.tar
libvpx-09f9c5d7f90bd19dfc1994926a6e35680ba9545c.tar.gz
libvpx-09f9c5d7f90bd19dfc1994926a6e35680ba9545c.tar.bz2
libvpx-09f9c5d7f90bd19dfc1994926a6e35680ba9545c.zip
Better workaround for Bug 1089.
Don't initialize first pass costs for a number of symbols where first pass probabilities aren't initialized. This brings a 1.22x first pass speedup. https://bugs.chromium.org/p/webm/issues/detail?id=1089 Change-Id: I97438c357bd88f52f5a15c697031cf0c3cc8f510
Diffstat (limited to 'vp9/common/vp9_entropy.c')
-rw-r--r--vp9/common/vp9_entropy.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/vp9/common/vp9_entropy.c b/vp9/common/vp9_entropy.c
index fc022093c..7b490af34 100644
--- a/vp9/common/vp9_entropy.c
+++ b/vp9/common/vp9_entropy.c
@@ -728,10 +728,8 @@ static const vp9_coeff_probs_model default_coef_probs_32x32[PLANE_TYPES] = {
};
static void extend_to_full_distribution(vpx_prob *probs, vpx_prob p) {
- // TODO(aconverse): model[PIVOT_NODE] should never be zero.
- // https://code.google.com/p/webm/issues/detail?id=1089
- memcpy(probs, vp9_pareto8_full[p == 0 ? 254 : p - 1],
- MODEL_NODES * sizeof(vpx_prob));
+ assert(p != 0);
+ memcpy(probs, vp9_pareto8_full[p - 1], MODEL_NODES * sizeof(vpx_prob));
}
void vp9_model_to_full_probs(const vpx_prob *model, vpx_prob *full) {