summaryrefslogtreecommitdiff
path: root/vp9/encoder
diff options
context:
space:
mode:
authorDmitry Kovalev <dkovalev@google.com>2013-09-29 12:01:36 -0700
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>2013-09-29 12:01:36 -0700
commit734368167567c7189246bef2d16f15039a690cbc (patch)
tree7c65bd79786a2d6e2e19431f123f349c0e9ddd12 /vp9/encoder
parentefbacc9f8911ff2b073ffea0e597d4c29e087098 (diff)
parent209c6cbf8f8ffcd0a43a9deaad0516aca8d59a9f (diff)
downloadlibvpx-734368167567c7189246bef2d16f15039a690cbc.tar
libvpx-734368167567c7189246bef2d16f15039a690cbc.tar.gz
libvpx-734368167567c7189246bef2d16f15039a690cbc.tar.bz2
libvpx-734368167567c7189246bef2d16f15039a690cbc.zip
Merge "Removing vp9_get_coef_neighbors_handle function."
Diffstat (limited to 'vp9/encoder')
-rw-r--r--vp9/encoder/vp9_encodemb.c3
-rw-r--r--vp9/encoder/vp9_rdopt.c7
-rw-r--r--vp9/encoder/vp9_tokenize.c3
3 files changed, 6 insertions, 7 deletions
diff --git a/vp9/encoder/vp9_encodemb.c b/vp9/encoder/vp9_encodemb.c
index 058bde66f..fae4e6a8f 100644
--- a/vp9/encoder/vp9_encodemb.c
+++ b/vp9/encoder/vp9_encodemb.c
@@ -172,7 +172,7 @@ static void optimize_b(MACROBLOCK *mb,
assert((!type && !plane) || (type && plane));
dqcoeff_ptr = BLOCK_OFFSET(pd->dqcoeff, block);
qcoeff_ptr = BLOCK_OFFSET(pd->qcoeff, block);
- get_scan_and_band(xd, tx_size, type, ib, &scan, &band_translate);
+ get_scan_and_band(xd, tx_size, type, ib, &scan, &nb, &band_translate);
assert(eob <= default_eob);
/* Now set up a Viterbi trellis to evaluate alternative roundings. */
@@ -191,7 +191,6 @@ static void optimize_b(MACROBLOCK *mb,
for (i = 0; i < eob; i++)
token_cache[scan[i]] = vp9_pt_energy_class[vp9_dct_value_tokens_ptr[
qcoeff_ptr[scan[i]]].token];
- nb = vp9_get_coef_neighbors_handle(scan);
for (i = eob; i-- > i0;) {
int base_bits, d2, dx;
diff --git a/vp9/encoder/vp9_rdopt.c b/vp9/encoder/vp9_rdopt.c
index 9ffb7dbd5..ec81e6ba4 100644
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -1074,6 +1074,7 @@ static int64_t rd_pick_intra4x4block(VP9_COMP *cpi, MACROBLOCK *x, int ib,
for (idx = 0; idx < num_4x4_blocks_wide; ++idx) {
int64_t ssz;
const int16_t *scan;
+ const int16_t *nb;
uint8_t *src = src_init + idx * 4 + idy * 4 * src_stride;
uint8_t *dst = dst_init + idx * 4 + idy * 4 * dst_stride;
@@ -1099,10 +1100,10 @@ static int64_t rd_pick_intra4x4block(VP9_COMP *cpi, MACROBLOCK *x, int ib,
x->quantize_b_4x4(x, block, tx_type, 16);
}
- scan = get_scan_4x4(get_tx_type_4x4(PLANE_TYPE_Y_WITH_DC, xd, block));
+ get_scan_nb_4x4(get_tx_type_4x4(PLANE_TYPE_Y_WITH_DC, xd, block),
+ &scan, &nb);
ratey += cost_coeffs(x, 0, block,
- tempa + idx, templ + idy, TX_4X4, scan,
- vp9_get_coef_neighbors_handle(scan));
+ tempa + idx, templ + idy, TX_4X4, scan, nb);
distortion += vp9_block_error(coeff, BLOCK_OFFSET(pd->dqcoeff, block),
16, &ssz) >> 2;
if (RDCOST(x->rdmult, x->rddiv, ratey, distortion) >= best_rd)
diff --git a/vp9/encoder/vp9_tokenize.c b/vp9/encoder/vp9_tokenize.c
index a59f6db88..7c14c18aa 100644
--- a/vp9/encoder/vp9_tokenize.c
+++ b/vp9/encoder/vp9_tokenize.c
@@ -137,8 +137,7 @@ static void tokenize_b(int plane, int block, BLOCK_SIZE plane_bsize,
pt = get_entropy_context(tx_size, pd->above_context + aoff,
pd->left_context + loff);
- get_scan_and_band(xd, tx_size, type, block, &scan, &band_translate);
- nb = vp9_get_coef_neighbors_handle(scan);
+ get_scan_and_band(xd, tx_size, type, block, &scan, &nb, &band_translate);
c = 0;
do {
const int band = get_coef_band(band_translate, c);