summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_rdopt.c
diff options
context:
space:
mode:
authorSami Pietila <samipietila@google.com>2013-05-23 13:08:00 +0300
committerPaul Wilkins <paulwilkins@google.com>2013-05-29 15:21:01 +0100
commit88a4d4c5109ce53680fc5b4f5104efd7d0c1994e (patch)
tree7884d6185e1498dbc731d10dfe6cc513ecf59f64 /vp9/encoder/vp9_rdopt.c
parent3d4e032e16a9252de6ea378924f8bf678dbeafd1 (diff)
downloadlibvpx-88a4d4c5109ce53680fc5b4f5104efd7d0c1994e.tar
libvpx-88a4d4c5109ce53680fc5b4f5104efd7d0c1994e.tar.gz
libvpx-88a4d4c5109ce53680fc5b4f5104efd7d0c1994e.tar.bz2
libvpx-88a4d4c5109ce53680fc5b4f5104efd7d0c1994e.zip
Residual coding to cache energy class of tokens.
Proposal for tuning the residual coding by changing how the context from previous tokens is calculated. Storing the energy class of previous tokens instead of the token itself eases the critical path of HW implementations. Change-Id: I6d71d856b84518f6c88de771ddd818436f794bab
Diffstat (limited to 'vp9/encoder/vp9_rdopt.c')
-rw-r--r--vp9/encoder/vp9_rdopt.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/vp9/encoder/vp9_rdopt.c b/vp9/encoder/vp9_rdopt.c
index 2eb3f9b29..aaba2bb11 100644
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -46,6 +46,9 @@
/* Factor to weigh the rate for switchable interp filters */
#define SWITCHABLE_INTERP_RATE_FACTOR 1
+DECLARE_ALIGNED(16, extern const uint8_t,
+ vp9_pt_energy_class[MAX_ENTROPY_TOKENS]);
+
const MODE_DEFINITION vp9_mode_order[MAX_MODES] = {
{ZEROMV, LAST_FRAME, NONE},
{DC_PRED, INTRA_FRAME, NONE},
@@ -366,7 +369,7 @@ static INLINE int cost_coeffs(VP9_COMMON *const cm, MACROBLOCK *mb,
if (!c || token_cache[scan[c - 1]])
cost += vp9_cost_bit(coef_probs[band][pt][0], 1);
- token_cache[scan[c]] = t;
+ token_cache[scan[c]] = vp9_pt_energy_class[t];
}
if (c < seg_eob) {
if (c)