Commit eb54e0cd authored by Urvang Joshi's avatar Urvang Joshi
Browse files

Revert of "Mark bogus palette color probabilities as zero".

Reverted commit: f8306bfd (with some changes).

Reason: This was triggering an assert in debug build because of zero
probability values. So, using an "UNUSED_PROB" macro to replace these to
retain clarity.

Assertion failure can be reproduced as follows:

$ make clean; extra_cflags='-O0 -g -fno-inline' ../../configure
--enable-debug --enable-experimental --enable-palette && make -j 16

$ ./aomenc -D --codec=av1 ~/videos/screen_content_set/gimp.y4m -o
/tmp/foo.webm --tune-content=screen --limit=50

Pass 1/2 frame   50/51      8976B    1436b/f   86169b/s 2902620 us
(17.23 fps)
Pass 2/2 frame   25/0          0B 2933053 us 8.52 fps [ETA  unknown]
aomenc: ../../av1/encoder/cost.c:46: cost: Assertion `prob != 0' failed.
Aborted (core dumped)

Change-Id: I47a76b8f415060909bc8448fae3002857eb61d8e
parent fd248ab1
</
......@@ -561,283 +561,348 @@ const aom_tree_index
-PALETTE_COLOR_SEVEN, -PALETTE_COLOR_EIGHT },
};
const aom_prob
av1_default_palette_y_color_prob[PALETTE_MAX_SIZE - 1]
[PALETTE_COLOR_CONTEXTS]
[PALETTE_COLORS - 1] = {
{
// 2 colors
{ 230, 0, 0, 0, 0, 0, 0 },
{ 214, 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 },
{ 240, 0, 0, 0, 0, 0, 0 },
{ 73, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0 },
{ 130, 0, 0, 0, 0, 0, 0 },
{ 227, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0 },
{ 188, 0, 0, 0, 0, 0, 0 },
{ 75, 0, 0, 0, 0, 0, 0 },
{ 250, 0, 0, 0, 0, 0, 0 },
{ 223, 0, 0, 0, 0, 0, 0 },
{ 252, 0, 0, 0, 0, 0, 0 },
},
{
// 3 colors
{ 229, 137, 0, 0, 0, 0, 0 },
{ 197, 120, 0, 0, 0, 0, 0 },
{ 107, 195, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0 },
{ 27, 151, 0, 0, 0, 0, 0 },
{ 230, 130, 0, 0, 0, 0, 0 },
{ 37, 230, 0, 0, 0, 0, 0 },
{ 67, 221, 0, 0, 0, 0, 0 },
{ 124, 230, 0, 0, 0, 0, 0 },
{ 195, 109, 0, 0, 0, 0, 0 },
{ 99, 122, 0, 0, 0, 0, 0 },
{ 205, 208, 0, 0, 0, 0, 0 },
{ 40, 235, 0, 0, 0, 0, 0 },
{ 251, 132, 0, 0, 0, 0, 0 },
{ 237, 186, 0, 0, 0, 0, 0 },
{ 253, 112, 0, 0, 0, 0, 0 },
},
{
// 4 colors
{ 195, 87, 128, 0, 0, 0, 0 },
{ 143, 100, 123, 0, 0, 0, 0 },
{ 94, 124, 119, 0, 0, 0, 0 },
{ 77, 91, 130, 0, 0, 0, 0 },
{ 39, 114, 178, 0, 0, 0, 0 },
{ 222, 94, 125, 0, 0, 0, 0 },
{ 44, 203, 132, 0, 0, 0, 0 },
{ 68, 175, 122, 0, 0, 0, 0 },
{ 110, 187, 124, 0, 0, 0, 0 },
{ 152, 91, 128, 0, 0, 0, 0 },
{ 70, 109, 181, 0, 0, 0, 0 },
{ 133, 113, 164, 0, 0, 0, 0 },
{ 47, 205, 133, 0, 0, 0, 0 },
{ 247, 94, 136, 0, 0, 0, 0 },
{ 205, 122, 146, 0, 0, 0, 0 },
{ 251, 100, 141, 0, 0, 0, 0 },
},
{
// 5 colors
{ 195, 65, 84, 125, 0, 0, 0 },
{ 150, 76, 84, 121, 0, 0, 0 },
{ 94, 110, 81, 117, 0, 0, 0 },
{ 79, 85, 91, 139, 0, 0, 0 },
{ 26, 102, 139, 127, 0, 0, 0 },
{ 220, 73, 91, 119, 0, 0, 0 },
{ 38, 203, 86, 127, 0, 0, 0 },
{ 61, 186, 72, 124, 0, 0, 0 },
{ 132, 199, 84, 128, 0, 0, 0 },
{ 172, 52, 62, 120, 0, 0, 0 },
{ 102, 89, 121, 122, 0, 0, 0 },
{ 182, 48, 69, 186, 0, 0, 0 },
{ 36, 206, 87, 126, 0, 0, 0 },
{ 249, 55, 67, 122, 0, 0, 0 },
{ 218, 88, 75, 122, 0, 0, 0 },
{ 253, 64, 80, 119, 0, 0, 0 },
},
{
// 6 colors
{ 182, 54, 64, 75, 118, 0, 0 },
{ 126, 67, 70, 76, 116, 0, 0 },
{ 79, 92, 67, 85, 120, 0, 0 },
{ 63, 61, 81, 118, 132, 0, 0 },
{ 21, 80, 105, 83, 119, 0, 0 },
{ 215, 72, 74, 74, 111, 0, 0 },
{ 50, 176, 63, 79, 120, 0, 0 },
{ 72, 148, 66, 77, 120, 0, 0 },
{ 105, 177, 57, 78, 130, 0, 0 },
{ 150, 66, 66, 80, 127, 0, 0 },
{ 81, 76, 109, 85, 116, 0, 0 },
{ 113, 81, 62, 96, 148, 0, 0 },
{ 54, 179, 69, 82, 121, 0, 0 },
{ 244, 47, 48, 67, 118, 0, 0 },
{ 198, 83, 53, 65, 121, 0, 0 },
{ 250, 42, 51, 69, 110, 0, 0 },
},
{
// 7 colors
{ 182, 45, 54, 62, 74, 113, 0 },
{ 124, 63, 57, 62, 77, 114, 0 },
{ 77, 80, 56, 66, 76, 117, 0 },
{ 63, 57, 69, 98, 85, 131, 0 },
{ 19, 81, 98, 63, 80, 116, 0 },
{ 215, 56, 60, 63, 68, 105, 0 },
{ 50, 174, 50, 60, 79, 118, 0 },
{ 68, 151, 50, 58, 73, 117, 0 },
{ 104, 182, 53, 57, 79, 127, 0 },
{ 156, 50, 51, 63, 77, 111, 0 },
{ 88, 67, 97, 59, 82, 120, 0 },
{ 114, 81, 46, 65, 103, 132, 0 },
{ 55, 166, 57, 66, 82, 120, 0 },
{ 245, 34, 38, 43, 63, 114, 0 },
{ 203, 68, 45, 47, 60, 118, 0 },
{ 250, 35, 37, 47, 66, 110, 0 },
},
{
// 8 colors
{ 180, 43, 46, 50, 56, 69, 109 },
{ 116, 53, 51, 49, 57, 73, 115 },
{ 79, 70, 49, 50, 59, 74, 117 },
{ 60, 54, 57, 70, 62, 83, 129 },
{ 20, 73, 85, 52, 66, 81, 119 },
{ 213, 56, 52, 49, 53, 62, 104 },
{ 48, 161, 41, 45, 56, 77, 116 },
{ 68, 139, 40, 47, 54, 71, 116 },
{ 123, 166, 42, 43, 52, 76, 130 },
{ 153, 44, 44, 47, 54, 79, 129 },
{ 87, 64, 83, 49, 60, 75, 127 },
{ 131, 68, 43, 48, 73, 96, 130 },
{ 55, 152, 45, 51, 64, 77, 113 },
{ 243, 30, 28, 33, 41, 65, 114 },
{ 202, 56, 35, 36, 42, 63, 123 },
{ 249, 31, 29, 32, 45, 68, 111 },
}
};
// Note: Has to be non-zero to avoid any asserts triggering.
#define UNUSED_PROB 128
const aom_prob
av1_default_palette_uv_color_prob[PALETTE_MAX_SIZE - 1]
[PALETTE_COLOR_CONTEXTS]
[PALETTE_COLORS - 1] = {
{
// 2 colors
{ 228, 0, 0, 0, 0, 0, 0 },
{ 195, 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 },
{ 228, 0, 0, 0, 0, 0, 0 },
{ 71, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0 },
{ 129, 0, 0, 0, 0, 0, 0 },
{ 206, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0 },
{ 136, 0, 0, 0, 0, 0, 0 },
{ 98, 0, 0, 0, 0, 0, 0 },
{ 236, 0, 0, 0, 0, 0, 0 },
{ 222, 0, 0, 0, 0, 0, 0 },
{ 249, 0, 0, 0, 0, 0, 0 },
},
{
// 3 colors
{ 198, 136, 0, 0, 0, 0, 0 },
{ 178, 105, 0, 0, 0, 0, 0 },
{ 100, 206, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0 },
{ 12, 136, 0, 0, 0, 0, 0 },
{ 219, 134, 0, 0, 0, 0, 0 },
{ 50, 198, 0, 0, 0, 0, 0 },
{ 61, 231, 0, 0, 0, 0, 0 },
{ 110, 209, 0, 0, 0, 0, 0 },
{ 173, 106, 0, 0, 0, 0, 0 },
{ 145, 166, 0, 0, 0, 0, 0 },
{ 156, 175, 0, 0, 0, 0, 0 },
{ 69, 183, 0, 0, 0, 0, 0 },
{ 241, 163, 0, 0, 0, 0, 0 },
{ 224, 160, 0, 0, 0, 0, 0 },
{ 246, 154, 0, 0, 0, 0, 0 },
},
{
// 4 colors
{ 173, 88, 143, 0, 0, 0, 0 },
{ 146, 81, 127, 0, 0, 0, 0 },
{ 84, 134, 102, 0, 0, 0, 0 },
{ 69, 138, 140, 0, 0, 0, 0 },
{ 31, 103, 200, 0, 0, 0, 0 },
{ 217, 101, 139, 0, 0, 0, 0 },
{ 51, 174, 121, 0, 0, 0, 0 },
{ 64, 177, 109, 0, 0, 0, 0 },
{ 96, 179, 145, 0, 0, 0, 0 },
{ 164, 77, 114, 0, 0, 0, 0 },
{ 87, 94, 156, 0, 0, 0, 0 },
{ 105, 57, 173, 0, 0, 0, 0 },
{ 63, 158, 137, 0, 0, 0, 0 },
{ 236, 102, 156, 0, 0, 0, 0 },
{ 197, 115, 153, 0, 0, 0, 0 },
{ 245, 106, 154, 0, 0, 0, 0 },
},
{
// 5 colors
{ 179, 64, 97, 129, 0, 0, 0 },
{ 137, 56, 88, 125, 0, 0, 0 },
{ 82, 107, 61, 118, 0, 0, 0 },
{ 59, 113, 86, 115, 0, 0, 0 },
{ 23, 88, 118, 130, 0, 0, 0 },
{ 213, 66, 90, 125, 0, 0, 0 },
{ 37, 181, 103, 121, 0, 0, 0 },
{ 47, 188, 61, 131, 0, 0, 0 },
{ 104, 185, 103, 144, 0, 0, 0 },
{ 163, 39, 76, 112, 0, 0, 0 },
{ 94, 74, 131, 126, 0, 0, 0 },
{ 142, 42, 103, 163, 0, 0, 0 },
{ 53, 162, 99, 149, 0, 0, 0 },
{ 239, 54, 84, 108, 0, 0, 0 },
{ 203, 84, 110, 147, 0, 0, 0 },
{ 248, 70, 105, 151, 0, 0, 0 },
},
{
// 6 colors
{ 189, 50, 67, 90, 130, 0, 0 },
{ 114, 50, 55, 90, 123, 0, 0 },
{ 66, 76, 54, 82, 128, 0, 0 },
{ 43, 69, 69, 80, 129, 0, 0 },
{ 22, 59, 87, 88, 141, 0, 0 },
{ 203, 49, 68, 87, 122, 0, 0 },
{ 43, 157, 74, 104, 146, 0, 0 },
{ 54, 138, 51, 95, 138, 0, 0 },
{ 82, 171, 58, 102, 146, 0, 0 },
{ 129, 38, 59, 64, 168, 0, 0 },
{ 56, 67, 119, 92, 112, 0, 0 },
{ 96, 62, 53, 132, 82, 0, 0 },
{ 60, 147, 77, 108, 145, 0, 0 },
{ 238, 76, 73, 93, 148, 0, 0 },
{ 189, 86, 73, 103, 157, 0, 0 },
{ 246, 62, 75, 83, 167, 0, 0 },
},
{
// 7 colors
{ 179, 42, 51, 73, 99, 134, 0 },
{ 119, 52, 52, 61, 64, 114, 0 },
{ 53, 77, 35, 65, 71, 131, 0 },
{ 38, 70, 51, 68, 89, 144, 0 },
{ 23, 65, 128, 73, 97, 131, 0 },
{ 210, 47, 52, 63, 81, 143, 0 },
{ 42, 159, 57, 68, 98, 143, 0 },
{ 49, 153, 45, 82, 93, 143, 0 },
{ 81, 169, 52, 72, 113, 151, 0 },
{ 136, 46, 35, 56, 75, 96, 0 },
{ 57, 84, 109, 47, 107, 131, 0 },
{ 128, 78, 57, 36, 128, 85, 0 },
{ 54, 149, 68, 77, 94, 153, 0 },
{ 243, 58, 50, 71, 81, 167, 0 },
{ 189, 92, 64, 70, 121, 173, 0 },
{ 248, 35, 38, 51, 82, 201, 0 },
},
{
// 8 colors
{ 201, 40, 36, 42, 64, 92, 123 },
{ 116, 43, 33, 43, 73, 102, 128 },
{ 46, 77, 37, 69, 62, 78, 150 },
{ 40, 65, 52, 50, 76, 89, 133 },
{ 28, 48, 91, 17, 64, 77, 133 },
{ 218, 43, 43, 37, 56, 72, 163 },
{ 41, 155, 44, 83, 82, 129, 180 },
{ 44, 141, 29, 55, 64, 89, 147 },
{ 92, 166, 48, 45, 59, 126, 179 },
{ 169, 35, 49, 41, 36, 99, 139 },
{ 55, 77, 77, 56, 60, 75, 156 },
{ 155, 81, 51, 64, 57, 182, 255 },
{ 60, 134, 49, 49, 93, 128, 174 },
{ 244, 98, 51, 46, 22, 73, 238 },
{ 189, 70, 40, 87, 93, 79, 201 },
{ 248, 54, 49, 40, 29, 42, 227 },
}
};
const aom_prob av1_default_palette_y_color_prob
[PALETTE_MAX_SIZE - 1][PALETTE_COLOR_CONTEXTS][PALETTE_COLORS - 1] = {
{
// 2 colors
{ 230, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB, UNUSED_PROB },
{ 214, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB, UNUSED_PROB },
{ UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB, UNUSED_PROB },
{ UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB, UNUSED_PROB },
{ UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB, UNUSED_PROB },
{ 240, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB, UNUSED_PROB },
{ 73, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB },
{ UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB, UNUSED_PROB },
{ 130, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB, UNUSED_PROB },
{ 227, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB, UNUSED_PROB },
{ UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB, UNUSED_PROB },
{ 188, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB, UNUSED_PROB },
{ 75, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB },
{ 250, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB, UNUSED_PROB },
{ 223, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB, UNUSED_PROB },
{ 252, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB, UNUSED_PROB },
},
{
// 3 colors
{ 229, 137, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB },
{ 197, 120, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB },
{ 107, 195, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB },
{ UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB, UNUSED_PROB },
{ 27, 151, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB },
{ 230, 130, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB },
{ 37, 230, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB },
{ 67, 221, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB },
{ 124, 230, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB },
{ 195, 109, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB },
{ 99, 122, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB },
{ 205, 208, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB },
{ 40, 235, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB },
{ 251, 132, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB },
{ 237, 186, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB },
{ 253, 112, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB },
},
{
// 4 colors
{ 195, 87, 128, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB },
{ 143, 100, 123, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB },
{ 94, 124, 119, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB },
{ 77, 91, 130, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB },
{ 39, 114, 178, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB },
{ 222, 94, 125, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB },
{ 44, 203, 132, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB },
{ 68, 175, 122, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB },
{ 110, 187, 124, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB },
{ 152, 91, 128, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB },
{ 70, 109, 181, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB },
{ 133, 113, 164, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB },
{ 47, 205, 133, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB },
{ 247, 94, 136, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB },
{ 205, 122, 146, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB },
{ 251, 100, 141, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB },
},
{
// 5 colors
{ 195, 65, 84, 125, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB },
{ 150, 76, 84, 121, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB },
{ 94, 110, 81, 117, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB },
{ 79, 85, 91, 139, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB },
{ 26, 102, 139, 127, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB },
{ 220, 73, 91, 119, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB },
{ 38, 203, 86, 127, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB },
{ 61, 186, 72, 124, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB },
{ 132, 199, 84, 128, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB },
{ 172, 52, 62, 120, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB },
{ 102, 89, 121, 122, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB },
{ 182, 48, 69, 186, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB },
{ 36, 206, 87, 126, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB },
{ 249, 55, 67, 122, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB },
{ 218, 88, 75, 122, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB },
{ 253, 64, 80, 119, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB },
},
{
// 6 colors
{ 182, 54, 64, 75, 118, UNUSED_PROB, UNUSED_PROB },
{ 126, 67, 70, 76, 116, UNUSED_PROB, UNUSED_PROB },
{ 79, 92, 67, 85, 120, UNUSED_PROB, UNUSED_PROB },
{ 63, 61, 81, 118, 132, UNUSED_PROB, UNUSED_PROB },
{ 21, 80, 105, 83, 119, UNUSED_PROB, UNUSED_PROB },
{ 215, 72, 74, 74, 111, UNUSED_PROB, UNUSED_PROB },
{ 50, 176, 63, 79, 120, UNUSED_PROB, UNUSED_PROB },
{ 72, 148, 66, 77, 120, UNUSED_PROB, UNUSED_PROB },
{ 105, 177, 57, 78, 130, UNUSED_PROB, UNUSED_PROB },
{ 150, 66, 66, 80, 127, UNUSED_PROB, UNUSED_PROB },
{ 81, 76, 109, 85, 116, UNUSED_PROB, UNUSED_PROB },
{ 113, 81, 62, 96, 148, UNUSED_PROB, UNUSED_PROB },
{ 54, 179, 69, 82, 121, UNUSED_PROB, UNUSED_PROB },
{ 244, 47, 48, 67, 118, UNUSED_PROB, UNUSED_PROB },
{ 198, 83, 53, 65, 121, UNUSED_PROB, UNUSED_PROB },
{ 250, 42, 51, 69, 110, UNUSED_PROB, UNUSED_PROB },
},
{
// 7 colors
{ 182, 45, 54, 62, 74, 113, UNUSED_PROB },
{ 124, 63, 57, 62, 77, 114, UNUSED_PROB },
{ 77, 80, 56, 66, 76, 117, UNUSED_PROB },
{ 63, 57, 69, 98, 85, 131, UNUSED_PROB },
{ 19, 81, 98, 63, 80, 116, UNUSED_PROB },
{ 215, 56, 60, 63, 68, 105, UNUSED_PROB },
{ 50, 174, 50, 60, 79, 118, UNUSED_PROB },
{ 68, 151, 50, 58, 73, 117, UNUSED_PROB },
{ 104, 182, 53, 57, 79, 127, UNUSED_PROB },
{ 156, 50, 51, 63, 77, 111, UNUSED_PROB },
{ 88, 67, 97, 59, 82, 120, UNUSED_PROB },
{ 114, 81, 46, 65, 103, 132, UNUSED_PROB },
{ 55, 166, 57, 66, 82, 120, UNUSED_PROB },
{ 245, 34, 38, 43, 63, 114, UNUSED_PROB },
{ 203, 68, 45, 47, 60, 118, UNUSED_PROB },
{ 250, 35, 37, 47, 66, 110, UNUSED_PROB },
},
{
// 8 colors
{ 180, 43, 46, 50, 56, 69, 109 },
{ 116, 53, 51, 49, 57, 73, 115 },
{ 79, 70, 49, 50, 59, 74, 117 },
{ 60, 54, 57, 70, 62, 83, 129 },
{ 20, 73, 85, 52, 66, 81, 119 },
{ 213, 56, 52, 49, 53, 62, 104 },
{ 48, 161, 41, 45, 56, 77, 116 },
{ 68, 139, 40, 47, 54, 71, 116 },
{ 123, 166, 42, 43, 52, 76, 130 },
{ 153, 44, 44, 47, 54, 79, 129 },
{ 87, 64, 83, 49, 60, 75, 127 },
{ 131, 68, 43, 48, 73, 96, 130 },
{ 55, 152, 45, 51, 64, 77, 113 },
{ 243, 30, 28, 33, 41, 65, 114 },
{ 202, 56, 35, 36, 42, 63, 123 },
{ 249, 31, 29, 32, 45, 68, 111 },
}
};
const aom_prob av1_default_palette_uv_color_prob
[PALETTE_MAX_SIZE - 1][PALETTE_COLOR_CONTEXTS][PALETTE_COLORS - 1] = {
{
// 2 colors
{ 228, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB, UNUSED_PROB },
{ 195, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB, UNUSED_PROB },
{ UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB, UNUSED_PROB },
{ UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB, UNUSED_PROB },
{ UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB, UNUSED_PROB },
{ 228, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB, UNUSED_PROB },
{ 71, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB },
{ UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB, UNUSED_PROB },
{ 129, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB, UNUSED_PROB },
{ 206, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB, UNUSED_PROB },
{ UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB, UNUSED_PROB },
{ 136, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB, UNUSED_PROB },
{ 98, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB },
{ 236, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB, UNUSED_PROB },
{ 222, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB, UNUSED_PROB },
{ 249, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB, UNUSED_PROB },
},
{
// 3 colors
{ 198, 136, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB },
{ 178, 105, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB },
{ 100, 206, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB },
{ UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB, UNUSED_PROB },
{ 12, 136, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB },
{ 219, 134, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB },
{ 50, 198, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB },
{ 61, 231, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB },
{ 110, 209, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB },
{ 173, 106, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB },
{ 145, 166, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB },
{ 156, 175, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB },
{ 69, 183, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB },
{ 241, 163, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB },
{ 224, 160, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB },
{ 246, 154, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB,
UNUSED_PROB },
},
{
// 4 colors
{ 173, 88, 143, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB },
{ 146, 81, 127, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB },
{ 84, 134, 102, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB },
{ 69, 138, 140, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB },
{ 31, 103, 200, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB },
{ 217, 101, 139, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB },
{ 51, 174, 121, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB },
{ 64, 177, 109, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB },
{ 96, 179, 145, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB },
{ 164, 77, 114, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB },
{ 87, 94, 156, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB },
{ 105, 57, 173, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB },
{ 63, 158, 137, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB },
{ 236, 102, 156, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB },
{ 197, 115, 153, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB },
{ 245, 106, 154, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB },
},
{
// 5 colors
{ 179, 64, 97, 129, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB },
{ 137, 56, 88, 125, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB },
{ 82, 107, 61, 118, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB },
{ 59, 113, 86, 115, UNUSED_PROB, UNUSED_PROB, UNUSED_PROB },