summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_rdopt.c
diff options
context:
space:
mode:
authorPaul Wilkins <paulwilkins@google.com>2013-02-19 10:12:00 -0800
committerRonald S. Bultje <rbultje@google.com>2013-02-23 07:29:09 -0800
commitc17672a33d9a0f94b9b5cf178d83455fee269ee6 (patch)
tree7c40cd7fd21cf35eccb21204c497d66c445ae41d /vp9/encoder/vp9_rdopt.c
parentbf0570a7e6773ea4daeeab1e59a911ba7e002b23 (diff)
downloadlibvpx-c17672a33d9a0f94b9b5cf178d83455fee269ee6.tar
libvpx-c17672a33d9a0f94b9b5cf178d83455fee269ee6.tar.gz
libvpx-c17672a33d9a0f94b9b5cf178d83455fee269ee6.tar.bz2
libvpx-c17672a33d9a0f94b9b5cf178d83455fee269ee6.zip
Further changes to coefficient contexts.
This patch alters the balance of context between the coefficient bands (reflecting the position of coefficients within a transform blocks) and the energy of the previous token (or tokens) within a block. In this case the number of coefficient bands is reduced but more previous token energy bands are supported. Some initial rebalancing of the default tables has been by running multiple derf clips at multiple data rates using the ENTOPY_STATS macro. Further balancing needs to be done using larger image formatsd especially in regard to the bigger transform sizes which are not as well represented in encodings of smaller image formats. Change-Id: If9736e95c391e711b04aef6393d26f60f36e1f8a
Diffstat (limited to 'vp9/encoder/vp9_rdopt.c')
-rw-r--r--vp9/encoder/vp9_rdopt.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/vp9/encoder/vp9_rdopt.c b/vp9/encoder/vp9_rdopt.c
index 8d005d7fd..fd2c2b01f 100644
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -458,24 +458,24 @@ static INLINE int cost_coeffs(MACROBLOCK *mb,
for (; c < eob; c++) {
int v = qcoeff_ptr[scan[c]];
int t = vp9_dct_value_tokens_ptr[v].Token;
- cost += token_costs[get_coef_band(c)][pt][t];
+ cost += token_costs[get_coef_band(tx_size, c)][pt][t];
cost += vp9_dct_value_cost_ptr[v];
pt = vp9_get_coef_context(&recent_energy, t);
}
if (c < seg_eob)
- cost += mb->hybrid_token_costs[tx_size][type][get_coef_band(c)]
+ cost += mb->hybrid_token_costs[tx_size][type][get_coef_band(tx_size, c)]
[pt][DCT_EOB_TOKEN];
} else {
int recent_energy = 0;
for (; c < eob; c++) {
int v = qcoeff_ptr[scan[c]];
int t = vp9_dct_value_tokens_ptr[v].Token;
- cost += token_costs[get_coef_band(c)][pt][t];
+ cost += token_costs[get_coef_band(tx_size, c)][pt][t];
cost += vp9_dct_value_cost_ptr[v];
pt = vp9_get_coef_context(&recent_energy, t);
}
if (c < seg_eob)
- cost += mb->token_costs[tx_size][type][get_coef_band(c)]
+ cost += mb->token_costs[tx_size][type][get_coef_band(tx_size, c)]
[pt][DCT_EOB_TOKEN];
}