#1041 closed defect (fixed)
Compilation error when BLOCK_STATS_AS_CSV is set to 1
Reported by: | arthurcerveira | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | VTM | Version: | VTM-8.1 |
Keywords: | Cc: | ksuehring, XiangLi, fbossen, jvet@… |
Description
VTM fails to compile when BLOCK_STATS_AS_CSV is enabled in TypeDef.h. This is how the macros are defined:
#ifndef ENABLE_TRACING #define ENABLE_TRACING 1 // DISABLE by default (enable only when debugging, requires 15% run-time in decoding) -- see documentation in 'doc/DTrace for NextSoftware.pdf' #endif #if ENABLE_TRACING #define K0149_BLOCK_STATISTICS 1 // enables block statistics, which can be analysed with YUView (https://github.com/IENT/YUView) #if K0149_BLOCK_STATISTICS #define BLOCK_STATS_AS_CSV 1 // statistics will be written in a comma separated value format. this is not supported by YUView #endif #endif
This error occurs because there is a mistake in the file dtrace_blockstatistics.cpp.
The function CDTrace::dtrace_block_vector uses the variable pu instead of tu.
void CDTrace::dtrace_block_vector(int k, const TransformUnit &tu, std::string stat_type, signed val_x, signed val_y) { const CodingStructure& cs = *tu.cs; #if BLOCK_STATS_AS_CSV dtrace<false>(k, "BlockStat;%d;%4d;%4d;%2d;%2d;%s;%4d;%4d\n", cs.picture->poc, pu.lx(), pu.ly(), pu.lwidth(), pu.lheight(), stat_type.c_str(), val_x, val_y); #else dtrace<false>(k, "BlockStat: POC %d @(%4d,%4d) [%2dx%2d] %s={%4d,%4d}\n", cs.picture->poc, tu.lx(), tu.ly(), tu.lwidth(), tu.lheight(), stat_type.c_str(), val_x, val_y); #endif }
To fix this error, it's necessary to change the variable name.
void CDTrace::dtrace_block_vector(int k, const TransformUnit &tu, std::string stat_type, signed val_x, signed val_y) { const CodingStructure& cs = *tu.cs; #if BLOCK_STATS_AS_CSV dtrace<false>(k, "BlockStat;%d;%4d;%4d;%2d;%2d;%s;%4d;%4d\n", cs.picture->poc, tu.lx(), tu.ly(), tu.lwidth(), tu.lheight(), stat_type.c_str(), val_x, val_y); #else dtrace<false>(k, "BlockStat: POC %d @(%4d,%4d) [%2dx%2d] %s={%4d,%4d}\n", cs.picture->poc, tu.lx(), tu.ly(), tu.lwidth(), tu.lheight(), stat_type.c_str(), val_x, val_y); #endif }
Change history (1)
comment:1 Changed 5 years ago by arthurcerveira
- Resolution set to fixed
- Status changed from new to closed
Note: See TracTickets for help on using tickets.
Fixed in MR 1589
https://vcgit.hhi.fraunhofer.de/jvet/VVCSoftware_VTM/-/merge_requests/1589