palette: Use some enums / defines
Change-Id: If5d4f6d261276d9cfdd59fd7779467d92f56c395
diff --git a/av1/common/entropymode.c b/av1/common/entropymode.c
index e36c52c..f652cbe 100644
--- a/av1/common/entropymode.c
+++ b/av1/common/entropymode.c
@@ -833,8 +833,7 @@
// Trees to code palette color indices (for various palette sizes), and the
// corresponding probability tables for Y and UV planes.
const aom_tree_index
- av1_palette_color_index_tree[PALETTE_MAX_SIZE -
- 1][TREE_SIZE(PALETTE_COLORS)] = {
+ av1_palette_color_index_tree[PALETTE_SIZES][TREE_SIZE(PALETTE_COLORS)] = {
{ // 2 colors
-PALETTE_COLOR_ONE, -PALETTE_COLOR_TWO },
{ // 3 colors
@@ -862,7 +861,7 @@
#define UNUSED_PROB 128
const aom_prob av1_default_palette_y_color_index_prob
- [PALETTE_MAX_SIZE - 1][PALETTE_COLOR_INDEX_CONTEXTS][PALETTE_COLORS - 1] = {
+ [PALETTE_SIZES][PALETTE_COLOR_INDEX_CONTEXTS][PALETTE_COLORS - 1] = {
{
// 2 colors
{ 231, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
@@ -932,7 +931,7 @@
};
const aom_prob av1_default_palette_uv_color_index_prob
- [PALETTE_MAX_SIZE - 1][PALETTE_COLOR_INDEX_CONTEXTS][PALETTE_COLORS - 1] = {
+ [PALETTE_SIZES][PALETTE_COLOR_INDEX_CONTEXTS][PALETTE_COLORS - 1] = {
{
// 2 colors
{ 233, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,