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

entropy: introduce o3dgc::Adaptive_Bit_Model_Fast abstraction

This commit provides an encapsulated interface to the fast update option
of the o3dgc context models with a statistic halving period of 128
symbols (max_count).
parent d44baa86
......@@ -135,6 +135,25 @@ private: // . . . . . . . . . . . . . . . . . . . . . .
friend class Arithmetic_Codec;
};
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// adaptive model for binary data, probability update each bin
class Adaptive_Bit_Model_Fast : public Adaptive_Bit_Model
{
public:
Adaptive_Bit_Model_Fast(void)
: Adaptive_Bit_Model()
{
reset();
}
// reset to equiprobable model
void reset(void)
{
Adaptive_Bit_Model::reset(true);
}
};
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
class Adaptive_Data_Model // adaptive model for binary data
......
......@@ -196,28 +196,6 @@ updateGeometryNeighState(
}
}
//---------------------------------------------------------------------------
CtxModelOctreeOccupancy::CtxModelOctreeOccupancy()
{
for (auto& ctx : b0)
ctx.reset(true);
for (auto& ctx : b1)
ctx.reset(true);
for (auto& ctx : b2)
ctx.reset(true);
for (auto& ctx : b3)
ctx.reset(true);
for (auto& ctx : b4)
ctx.reset(true);
for (auto& ctx : b5)
ctx.reset(true);
for (auto& ctx : b6)
ctx.reset(true);
for (auto& ctx : b7)
ctx.reset(true);
}
//============================================================================
} // namespace pcc
......@@ -130,16 +130,14 @@ isDirectModeEligible(
//---------------------------------------------------------------------------
struct CtxModelOctreeOccupancy {
o3dgc::Adaptive_Bit_Model b0[10];
o3dgc::Adaptive_Bit_Model b1[2 * 10];
o3dgc::Adaptive_Bit_Model b2[4 * 10];
o3dgc::Adaptive_Bit_Model b3[8 * 10];
o3dgc::Adaptive_Bit_Model b4[75];
o3dgc::Adaptive_Bit_Model b5[112];
o3dgc::Adaptive_Bit_Model b6[117];
o3dgc::Adaptive_Bit_Model b7[127];
CtxModelOctreeOccupancy();
o3dgc::Adaptive_Bit_Model_Fast b0[10];
o3dgc::Adaptive_Bit_Model_Fast b1[2 * 10];
o3dgc::Adaptive_Bit_Model_Fast b2[4 * 10];
o3dgc::Adaptive_Bit_Model_Fast b3[8 * 10];
o3dgc::Adaptive_Bit_Model_Fast b4[75];
o3dgc::Adaptive_Bit_Model_Fast b5[112];
o3dgc::Adaptive_Bit_Model_Fast b6[117];
o3dgc::Adaptive_Bit_Model_Fast b7[127];
o3dgc::Adaptive_Bit_Model* operator[](int bit_pos)
{
......
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