summaryrefslogtreecommitdiff
path: root/vp9
diff options
context:
space:
mode:
authorJames Zern <jzern@google.com>2013-07-23 11:37:01 -0700
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>2013-07-23 11:37:01 -0700
commit8dede954c7d3cba10692dbf9744e2c3d3a94c72b (patch)
treeacc630df7110c346a2f7d3f670ddb6ae1707d5c1 /vp9
parent4ef1d35abfb96f92b8999cea4ffed099518a1eba (diff)
parent3c8cce353fe9579203b88c1dcd2f245ee85d654d (diff)
downloadlibvpx-8dede954c7d3cba10692dbf9744e2c3d3a94c72b.tar
libvpx-8dede954c7d3cba10692dbf9744e2c3d3a94c72b.tar.gz
libvpx-8dede954c7d3cba10692dbf9744e2c3d3a94c72b.tar.bz2
libvpx-8dede954c7d3cba10692dbf9744e2c3d3a94c72b.zip
Merge "vp9: make some static tables const"
Diffstat (limited to 'vp9')
-rw-r--r--vp9/common/vp9_mvref_common.c5
-rw-r--r--vp9/encoder/vp9_rdopt.c10
-rw-r--r--vp9/encoder/vp9_subexp.c2
3 files changed, 9 insertions, 8 deletions
diff --git a/vp9/common/vp9_mvref_common.c b/vp9/common/vp9_mvref_common.c
index 778eedc58..253a138c1 100644
--- a/vp9/common/vp9_mvref_common.c
+++ b/vp9/common/vp9_mvref_common.c
@@ -11,7 +11,7 @@
#include "vp9/common/vp9_mvref_common.h"
#define MVREF_NEIGHBOURS 8
-static int mv_ref_blocks[BLOCK_SIZE_TYPES][MVREF_NEIGHBOURS][2] = {
+static const int mv_ref_blocks[BLOCK_SIZE_TYPES][MVREF_NEIGHBOURS][2] = {
// SB4X4
{{0, -1}, {-1, 0}, {-1, -1}, {0, -2}, {-2, 0}, {-1, -2}, {-2, -1}, {-2, -2}},
// SB4X8
@@ -150,7 +150,7 @@ void vp9_find_mv_refs_idx(VP9_COMMON *cm, MACROBLOCKD *xd, MODE_INFO *here,
int candidate_scores[MAX_MV_REF_CANDIDATES] = { 0 };
int refmv_count = 0;
int split_count = 0;
- int (*mv_ref_search)[2];
+ const int (*mv_ref_search)[2] = mv_ref_blocks[mbmi->sb_type];
const int mi_col = get_mi_col(xd);
const int mi_row = get_mi_row(xd);
int intra_count = 0;
@@ -161,7 +161,6 @@ void vp9_find_mv_refs_idx(VP9_COMMON *cm, MACROBLOCKD *xd, MODE_INFO *here,
// Blank the reference vector lists and other local structures.
vpx_memset(mv_ref_list, 0, sizeof(int_mv) * MAX_MV_REF_CANDIDATES);
- mv_ref_search = mv_ref_blocks[mbmi->sb_type];
if (mbmi->sb_type < BLOCK_SIZE_SB8X8) {
x_idx = block_idx & 1;
y_idx = block_idx >> 1;
diff --git a/vp9/encoder/vp9_rdopt.c b/vp9/encoder/vp9_rdopt.c
index f8df234ca..9c6f9f8db 100644
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -136,10 +136,12 @@ static void fill_token_costs(vp9_coeff_count (*c)[BLOCK_TYPES][2],
}
}
-static int rd_iifactor[32] = { 4, 4, 3, 2, 1, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, };
+static const int rd_iifactor[32] = {
+ 4, 4, 3, 2, 1, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+};
// 3* dc_qlookup[Q]*dc_qlookup[Q];
diff --git a/vp9/encoder/vp9_subexp.c b/vp9/encoder/vp9_subexp.c
index 01e04d5b0..667b8012c 100644
--- a/vp9/encoder/vp9_subexp.c
+++ b/vp9/encoder/vp9_subexp.c
@@ -50,7 +50,7 @@ static int recenter_nonneg(int v, int m) {
static int remap_prob(int v, int m) {
int i;
- static int map_table[MAX_PROB - 1] = {
+ static const int map_table[MAX_PROB - 1] = {
// generated by:
// map_table[j] = split_index(j, MAX_PROB - 1, MODULUS_PARAM);
20, 21, 22, 23, 24, 25, 0, 26, 27, 28, 29, 30, 31, 32, 33,