diff options
author | Deb Mukherjee <debargha@google.com> | 2013-03-28 10:42:23 -0700 |
---|---|---|
committer | Deb Mukherjee <debargha@google.com> | 2013-04-22 09:27:59 -0700 |
commit | 70d9f116fd90f130ec7798b16c2083c9e3853050 (patch) | |
tree | 81ca57725ba81035969a4f15ae5ab372032f2b50 /vp9/encoder/vp9_encodemb.c | |
parent | f82c61b8862f258bde802dd2a509a8718a718a6b (diff) | |
download | libvpx-70d9f116fd90f130ec7798b16c2083c9e3853050.tar libvpx-70d9f116fd90f130ec7798b16c2083c9e3853050.tar.gz libvpx-70d9f116fd90f130ec7798b16c2083c9e3853050.tar.bz2 libvpx-70d9f116fd90f130ec7798b16c2083c9e3853050.zip |
End of orientation zero group experiment
Adds an experiment that codes an end-of-orientation symbol
for every eligible zero encountered in scan order.
This cleans out various other sub-experiments that were part
of the origiinal patch, which will be later included if found
useful.
Results are slightly positive on all sets (0.1 - 0.2% range).
Change-Id: I57765c605fefc7fb9d1b57f1b356843602abefaf
Diffstat (limited to 'vp9/encoder/vp9_encodemb.c')
-rw-r--r-- | vp9/encoder/vp9_encodemb.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/vp9/encoder/vp9_encodemb.c b/vp9/encoder/vp9_encodemb.c index ea19fbfa8..cf2625db4 100644 --- a/vp9/encoder/vp9_encodemb.c +++ b/vp9/encoder/vp9_encodemb.c @@ -295,10 +295,10 @@ static int trellis_get_coeff_context(const int *scan, int idx, int token, uint8_t *token_cache, int pad, int l) { - int bak = token_cache[idx], pt; - token_cache[idx] = token; + int bak = token_cache[scan[idx]], pt; + token_cache[scan[idx]] = token; pt = vp9_get_coef_context(scan, nb, pad, token_cache, idx + 1, l); - token_cache[idx] = bak; + token_cache[scan[idx]] = bak; return pt; } @@ -430,7 +430,7 @@ static void optimize_b(VP9_COMMON *const cm, *(tokens[eob] + 1) = *(tokens[eob] + 0); next = eob; for (i = 0; i < eob; i++) - token_cache[i] = vp9_dct_value_tokens_ptr[qcoeff_ptr[scan[i]]].token; + token_cache[scan[i]] = vp9_dct_value_tokens_ptr[qcoeff_ptr[scan[i]]].token; nb = vp9_get_coef_neighbors_handle(scan, &pad); for (i = eob; i-- > i0;) { @@ -590,6 +590,8 @@ static void optimize_b(VP9_COMMON *const cm, final_nzc_exp = (best ? nzc1 : nzc0); #endif final_eob = i0 - 1; + vpx_memset(qcoeff_ptr, 0, sizeof(*qcoeff_ptr) * (16 << (tx_size * 2))); + vpx_memset(dqcoeff_ptr, 0, sizeof(*dqcoeff_ptr) * (16 << (tx_size * 2))); for (i = next; i < eob; i = next) { x = tokens[i][best].qc; if (x) { |