Commit f777b6ab authored by David Flynn's avatar David Flynn
Browse files

geom/m46402: sixteen entry occupancy context map update table

Replaces the existing map update tables (generated from (L*p+s)/(L+1),
memory L=10) with an adaptive memory (L=max(5, 1/p, 1/(1-p)) clipped
to 200) represented as delta transitions and quantised to 16 entries.
parent 0d8f1119
......@@ -194,9 +194,9 @@ CtxMapOctreeOccupancy::evolve(bool bit, uint8_t* ctxIdx)
uint8_t retval = *ctxIdx;
if (bit)
*ctxIdx = kCtxMapOctreeOccupancyEvolutionOn1[*ctxIdx];
*ctxIdx += kCtxMapOctreeOccupancyDelta[(255 - *ctxIdx) >> 4];
else
*ctxIdx = kCtxMapOctreeOccupancyEvolutionOn0[*ctxIdx];
*ctxIdx -= kCtxMapOctreeOccupancyDelta[*ctxIdx >> 4];
return retval;
}
......
......@@ -257,46 +257,9 @@ const uint8_t pcc::kOccMapRotateZ090[256] = {
//============================================================================
// transition tables L= 10; 256 ctx
const uint8_t pcc::kCtxMapOctreeOccupancyEvolutionOn0[256] = {
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 10, 11, 12, 13,
14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
29, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
43, 44, 45, 46, 47, 48, 48, 49, 50, 51, 52, 53, 54, 55, 56,
57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 66, 67, 68, 69, 70,
71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 82, 83, 84,
85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 96, 97, 98,
99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 109, 110, 111, 112,
113, 114, 115, 116, 117, 118, 119, 120, 120, 121, 122, 123, 124, 125, 126,
127, 128, 129, 130, 130, 131, 132, 133, 134, 135, 136, 137, 138, 138, 139,
140, 141, 142, 143, 144, 145, 146, 146, 147, 148, 149, 150, 151, 152, 152,
153, 154, 155, 156, 157, 158, 158, 159, 160, 161, 162, 163, 163, 164, 165,
166, 167, 167, 168, 169, 170, 171, 171, 172, 173, 174, 175, 175, 176, 177,
178, 178, 179, 180, 181, 181, 182, 183, 183, 184, 185, 185, 186, 187, 187,
188, 189, 189, 190, 191, 191, 192, 192, 193, 194, 194, 195, 195, 196, 196,
197, 197, 198, 198, 199, 199, 199, 200, 200, 201, 201, 201, 202, 202, 202,
203, 203, 203, 203, 204, 204, 204, 204, 204, 204, 204, 205, 205, 205, 205,
205};
const uint8_t pcc::kCtxMapOctreeOccupancyEvolutionOn1[256] = {
49, 49, 49, 49, 49, 49, 49, 49, 49, 50, 50, 50, 50, 51, 51,
51, 51, 52, 52, 52, 53, 53, 54, 54, 54, 55, 55, 56, 56, 57,
57, 58, 58, 59, 59, 60, 61, 61, 62, 62, 63, 64, 64, 65, 66,
66, 67, 68, 68, 69, 70, 70, 71, 72, 72, 73, 74, 75, 75, 76,
77, 78, 78, 79, 80, 81, 82, 82, 83, 84, 85, 86, 86, 87, 88,
89, 90, 90, 91, 92, 93, 94, 95, 95, 96, 97, 98, 99, 100, 101,
101, 102, 103, 104, 105, 106, 107, 107, 108, 109, 110, 111, 112, 113, 114,
115, 115, 116, 117, 118, 119, 120, 121, 122, 123, 123, 124, 125, 126, 127,
128, 129, 130, 131, 132, 133, 133, 134, 135, 136, 137, 138, 139, 140, 141,
142, 143, 144, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155,
156, 157, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169,
170, 171, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183,
184, 185, 186, 187, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197,
198, 199, 200, 201, 202, 203, 204, 205, 205, 206, 207, 208, 209, 210, 211,
212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 224, 225,
226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240,
241, 242, 243, 244, 245, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254,
255};
// Generated from (L*p+s)/(L+1), L=min(200, max(5, 1/p, 1/(1-p))
const uint8_t pcc::kCtxMapOctreeOccupancyDelta[16] = {
0, 1, 1, 2, 4, 7, 9, 11, 14, 16, 19, 23, 22, 18, 13, 6};
//============================================================================
......
......@@ -82,9 +82,9 @@ extern const uint8_t kOccMapRotateZ270[256];
extern const uint8_t kOccMapRotateZ180[256];
extern const uint8_t kOccMapRotateZ090[256];
// todo(df): ...
extern const uint8_t kCtxMapOctreeOccupancyEvolutionOn0[256];
extern const uint8_t kCtxMapOctreeOccupancyEvolutionOn1[256];
// Geometry occupancy context map update table, represented as deltas to
// current map entry value.
extern const uint8_t kCtxMapOctreeOccupancyDelta[16];
// LUT initialisation table
extern const uint8_t kDualLutOccupancyCoderInit[10][32];
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment