From ec910d81405c736a4490383a250299a7837c2e64 Mon Sep 17 00:00:00 2001 From: trav90 Date: Thu, 18 Oct 2018 21:53:44 -0500 Subject: Update aom to commit id e87fb2378f01103d5d6e477a4ef6892dc714e614 --- third_party/aom/aom_dsp/prob.h | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'third_party/aom/aom_dsp/prob.h') diff --git a/third_party/aom/aom_dsp/prob.h b/third_party/aom/aom_dsp/prob.h index 35db134e5..a517e810a 100644 --- a/third_party/aom/aom_dsp/prob.h +++ b/third_party/aom/aom_dsp/prob.h @@ -46,6 +46,14 @@ typedef uint16_t aom_cdf_prob; #define MAX_PROB 255 +#define LV_MAP_PROB 1 + +#define BR_NODE 1 + +#if CONFIG_ADAPT_SCAN +#define CACHE_SCAN_PROB 1 +#endif + #define aom_prob_half ((aom_prob)128) typedef int8_t aom_tree_index; @@ -149,7 +157,11 @@ static INLINE void av1_tree_to_cdf(const aom_tree_index *tree, void av1_indices_from_tree(int *ind, int *inv, const aom_tree_index *tree); static INLINE void update_cdf(aom_cdf_prob *cdf, int val, int nsymbs) { - const int rate = 4 + (cdf[nsymbs] > 31) + get_msb(nsymbs); + int rate = 4 + (cdf[nsymbs] > 31) + get_msb(nsymbs); +#if CONFIG_LV_MAP + if (nsymbs == 2) + rate = 4 + (cdf[nsymbs] > 7) + (cdf[nsymbs] > 15) + get_msb(nsymbs); +#endif const int rate2 = 5; int i, tmp; int diff; @@ -158,7 +170,7 @@ static INLINE void update_cdf(aom_cdf_prob *cdf, int val, int nsymbs) { tmp = AOM_ICDF(tmp0); diff = ((CDF_PROB_TOP - (nsymbs << rate2)) >> rate) << rate; // Single loop (faster) -#if !CONFIG_ANS && CONFIG_EC_SMALLMUL +#if !CONFIG_ANS for (i = 0; i < nsymbs - 1; ++i, tmp -= tmp0) { tmp -= (i == val ? diff : 0); cdf[i] += ((tmp - cdf[i]) >> rate); @@ -183,6 +195,12 @@ static INLINE void update_cdf(aom_cdf_prob *cdf, int val, int nsymbs) { cdf[nsymbs] += (cdf[nsymbs] < 32); } +#if CONFIG_LV_MAP +static INLINE void update_bin(aom_cdf_prob *cdf, int val, int nsymbs) { + update_cdf(cdf, val, nsymbs); +} +#endif + #ifdef __cplusplus } // extern "C" #endif -- cgit v1.2.3