Skip to content
Snippets Groups Projects
Commit 2cb745ef authored by Johannes Sauer's avatar Johannes Sauer
Browse files

K0149 BLOCK_STATISTICS UPDATE

added traces for motion buffers (MotionBufL0, MotionBufL1)
parent f4dbd560
No related branches found
No related tags found
No related merge requests found
......@@ -603,6 +603,83 @@ void writeAllData(const CodingStructure& cs, const UnitArea& ctuArea)
}
}
// tracing Motion buffers
CMotionBuf mb = pu.getMotionBuf();
// todo: assuming granulatiry == 4. can it be derived?
for( int y = 0; y < mb.height; y++ )
{
for( int x = 0; x < mb.width; x++ )
{
const MotionInfo &pixMi = mb.at( x, y );
if( pixMi.interDir == 1)
{
const Mv mv = pixMi.mv[REF_PIC_LIST_0];
g_trace_ctx->dtrace<false>(
D_BLOCK_STATISTICS_ALL,
"BlockStat: POC %d @(%4d,%4d) [%2dx%2d] %s={%4d,%4d}\n",
cs.picture->poc,
pu.lx() + 4*x,
pu.ly() + 4*y,
4,
4,
GetBlockStatisticName(BlockStatistic::MotionBufL0).c_str(),
mv.hor,
mv.ver);
}
else if( pixMi.interDir == 2)
{
const Mv mv = pixMi.mv[REF_PIC_LIST_1];
g_trace_ctx->dtrace<false>(
D_BLOCK_STATISTICS_ALL,
"BlockStat: POC %d @(%4d,%4d) [%2dx%2d] %s={%4d,%4d}\n",
cs.picture->poc,
pu.lx() + 4*x,
pu.ly() + 4*y,
4,
4,
GetBlockStatisticName(BlockStatistic::MotionBufL1).c_str(),
mv.hor,
mv.ver);
}
else if( pixMi.interDir == 3)
{
{
const Mv mv = pixMi.mv[REF_PIC_LIST_0];
g_trace_ctx->dtrace<false>(
D_BLOCK_STATISTICS_ALL,
"BlockStat: POC %d @(%4d,%4d) [%2dx%2d] %s={%4d,%4d}\n",
cs.picture->poc,
pu.lx() + 4*x,
pu.ly() + 4*y,
4,
4,
GetBlockStatisticName(BlockStatistic::MotionBufL0).c_str(),
mv.hor,
mv.ver);
}
{
const Mv mv = pixMi.mv[REF_PIC_LIST_1];
g_trace_ctx->dtrace<false>(
D_BLOCK_STATISTICS_ALL,
"BlockStat: POC %d @(%4d,%4d) [%2dx%2d] %s={%4d,%4d}\n",
cs.picture->poc,
pu.lx() + 4*x,
pu.ly() + 4*y,
4,
4,
GetBlockStatisticName(BlockStatistic::MotionBufL1).c_str(),
mv.hor,
mv.ver);
}
}
}
}
}
DTRACE_BLOCK_SCALAR(g_trace_ctx, D_BLOCK_STATISTICS_ALL, cu, GetBlockStatisticName(BlockStatistic::IMVMode), cu.imv);
DTRACE_BLOCK_SCALAR(g_trace_ctx, D_BLOCK_STATISTICS_ALL, cu, GetBlockStatisticName(BlockStatistic::RootCbf), cu.rootCbf);
......
......@@ -93,6 +93,8 @@ enum class BlockStatistic {
MVL1,
MVDL0,
MVDL1,
MotionBufL0,
MotionBufL1,
RefIdxL0,
RefIdxL1,
AffineFlag,
......@@ -190,6 +192,8 @@ static const std::map<BlockStatistic, std::tuple<std::string, BlockStatisticType
{ BlockStatistic::AffineMVL1, std::tuple<std::string, BlockStatisticType, std::string>{"AffineMVL1", BlockStatisticType::AffineTFVectors, "Scale: 4"}},
{ BlockStatistic::AffineType, std::tuple<std::string, BlockStatisticType, std::string>{"AffineType", BlockStatisticType::Flag, ""} },
{ BlockStatistic::EMTFlag, std::tuple<std::string, BlockStatisticType, std::string>{"EMTFlag", BlockStatisticType::Flag, ""}},
{ BlockStatistic::MotionBufL0, std::tuple<std::string, BlockStatisticType, std::string>{"MotionBufL0", BlockStatisticType::Vector, "Scale: 16"}},
{ BlockStatistic::MotionBufL1, std::tuple<std::string, BlockStatisticType, std::string>{"MotionBufL1", BlockStatisticType::Vector, "Scale: 16"}},
#if JVET_L0283_MULTI_REF_LINE
{ BlockStatistic::MultiRefIdx, std::tuple<std::string, BlockStatisticType, std::string>{"MultiRefIdx", BlockStatisticType::Integer, "[0, 1]"}},
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment