Skip to content

Commit 08e8b1d

Browse files
committed
bit info output added (decoder_bit.txt)
1 parent 5b15487 commit 08e8b1d

File tree

8 files changed

+44
-10
lines changed

8 files changed

+44
-10
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ For historical reasons, besides formal HEVC bitstream, it also supports bitstrea
5555

5656
Road Map
5757
========
58+
- [ ] Frames Bit Heatmap Filter
59+
- [ ] Slice Display
60+
- [ ] Tile Display
5861
- [ ] GOP Structure Graph
5962
- [ ] 10 Bit YUV Support
6063
- [ ] Bitsteam Comparison

appgitlhevcdecoder/HM-10.0/source/Lib/TLibDecoder/TDecSlice.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,13 @@ Void TDecSlice::decompressSlice(TComInputBitstream** ppcSubstreams, TComPic*& rp
365365
}
366366
}
367367
}
368+
#if ENABLE_ANAYSIS_OUTPUT
369+
UInt uiBefore = ppcSubstreams[uiSubStrm]->getByteLocation();
370+
#endif
368371
m_pcCuDecoder->decodeCU ( pcCU, uiIsLast );
372+
#if ENABLE_ANAYSIS_OUTPUT
373+
pcCU->getTotalBits() = ppcSubstreams[uiSubStrm]->getByteLocation() - uiBefore;
374+
#endif
369375
m_pcCuDecoder->decompressCU ( pcCU );
370376

371377
#if ENC_DEC_TRACE

appgitlhevcdecoder/HM-4.0/source/Lib/TLibDecoder/TDecSlice.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,14 @@ Void TDecSlice::decompressSlice(TComInputBitstream* pcBitstream, TComPic*& rpcPi
106106
#if ENC_DEC_TRACE
107107
g_bJustDoIt = g_bEncDecTraceEnable;
108108
#endif
109+
110+
#if ENABLE_ANAYSIS_OUTPUT
111+
UInt uiBefore = pcBitstream->getNumBitsLeft();
112+
#endif
109113
m_pcCuDecoder->decodeCU ( pcCU, uiIsLast );
114+
#if ENABLE_ANAYSIS_OUTPUT
115+
pcCU->getTotalBits() = uiBefore - pcBitstream->getNumBitsLeft();
116+
#endif
110117
m_pcCuDecoder->decompressCU ( pcCU );
111118

112119
#if ENC_DEC_TRACE

appgitlhevcdecoder/HM-5.2/source/Lib/TLibDecoder/TDecSlice.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,10 +302,14 @@ Void TDecSlice::decompressSlice(TComInputBitstream* pcBitstream, TComInputBitstr
302302
#if ENC_DEC_TRACE
303303
g_bJustDoIt = g_bEncDecTraceEnable;
304304
#endif
305-
305+
#if ENABLE_ANAYSIS_OUTPUT
306+
UInt uiBefore = ppcSubstreams[uiSubStrm]->getByteLocation();
307+
#endif
306308
m_pcCuDecoder->decodeCU ( pcCU, uiIsLast );
307309
m_pcCuDecoder->decompressCU ( pcCU );
308-
310+
#if ENABLE_ANAYSIS_OUTPUT
311+
pcCU->getTotalBits() = ppcSubstreams[uiSubStrm]->getByteLocation() - uiBefore;
312+
#endif
309313
#if ENC_DEC_TRACE
310314
g_bJustDoIt = g_bEncDecTraceDisable;
311315
#endif

appgitlhevcdecoder/TLibSysuAnalyzer/TSysuAnalyzerOutput.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ TSysuAnalyzerOutput::TSysuAnalyzerOutput()
1313
m_cIntraOutput.open("decoder_intra.txt",ios::out);
1414
m_cTUOutput.open ("decoder_tu.txt", ios::out);
1515
m_cMEOutput.open ("encoder_me.txt", ios::out);
16+
m_cBitOutput.open ("decoder_bit.txt", ios::out);
1617

1718

1819
}
@@ -31,15 +32,19 @@ void TSysuAnalyzerOutput::writeOutCUInfo ( TComDataCU* pcCU )
3132
m_cMergeOutput<< "<" << iPoc << "," << iAddr << ">" << " "; ///< Write out merge mode info
3233
m_cIntraOutput<< "<" << iPoc << "," << iAddr << ">" << " "; ///< Write out intra mode info
3334
m_cTUOutput << "<" << iPoc << "," << iAddr << ">" << " "; ///< Write out TU mode info
34-
m_cMEOutput << "<" << iPoc << "," << iAddr << ">" << " "; ///< Write out ME info
35+
m_cBitOutput << "<" << iPoc << "," << iAddr << ">" << " "; ///< Write out bit info
36+
m_cMEOutput << "<" << iPoc << "," << iAddr << ">" << " "; ///< Write out ME info
37+
3538
xWriteOutCUInfo ( pcCU, iTotalNumPart, 0, 0 ); ///< Recursive write Prediction, CU, PU, Merge, Intra, ME
39+
m_cBitOutput << pcCU->getTotalBits(); ///< Bit info
3640

3741
m_cPredOutput << endl;
3842
m_cCUPUOutput << endl;
3943
m_cMVOutput << endl;
4044
m_cMergeOutput<< endl;
4145
m_cIntraOutput<< endl;
4246
m_cTUOutput << endl;
47+
m_cBitOutput << endl;
4348
m_cMEOutput << endl;
4449
}
4550

@@ -230,5 +235,6 @@ TSysuAnalyzerOutput::~TSysuAnalyzerOutput()
230235
m_cSpsOut.close();
231236
m_cIntraOutput.close();
232237
m_cTUOutput.close();
238+
m_cBitOutput.close();
233239
m_cMEOutput.close();
234240
}

appgitlhevcdecoder/TLibSysuAnalyzer/TSysuAnalyzerOutput.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ class TSysuAnalyzerOutput
5252
std::ofstream m_cMergeOutput; ///< Merge info output
5353
std::ofstream m_cIntraOutput; ///< Intra info output
5454
std::ofstream m_cTUOutput; ///< TU info output
55+
std::ofstream m_cBitOutput; ///< CU bit output
5556

5657
/// Encoder output ( extracted in the encoding process
5758
std::ofstream m_cMEOutput; ///< ME info (search point number, SAD, cost, etc)

libplugins/libcudisplayfilter/cudisplayfilter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ CUDisplayFilter::CUDisplayFilter(QObject *parent) :
88

99
/// init lcu pen
1010
m_cLCUPen.setStyle(Qt::SolidLine);
11-
m_cLCUPen.setWidth(2);
12-
m_cLCUPen.setBrush(QBrush(QColor(255,255,255,255)));
11+
m_cLCUPen.setWidth(3);
12+
m_cLCUPen.setBrush(QBrush(QColor(255,255,255,128)));
1313

1414
/// init cu pen
1515
m_cCUPen.setStyle(Qt::SolidLine);

libplugins/libmvdisplayfilter/mvdisplayfilter.cpp

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,25 @@ MVDisplayFilter::MVDisplayFilter(QObject *parent) :
66
setName("MV Display");
77
m_bShowRefPOC = false;
88

9+
QColor cBlue(Qt::blue);
10+
cBlue.setAlpha(200);
11+
QColor cRed(Qt::red);
12+
cRed.setAlpha(200);
13+
QColor cGreen(Qt::green);
14+
cGreen.setAlpha(200);
15+
916
/// MV pen
10-
m_cPenL0.setColor(QColor(Qt::blue));
11-
m_cPenL1.setColor(QColor(Qt::red));
17+
m_cPenL0.setColor(cBlue);
18+
m_cPenL1.setColor(cRed);
1219

1320
/// text pen
14-
m_cPenText.setColor(QColor(Qt::yellow));
21+
m_cPenText.setColor(cGreen);
1522

1623
/// circle filling
1724
m_cCircleL0Fill.setStyle(Qt::SolidPattern);
18-
m_cCircleL0Fill.setColor(QColor(Qt::blue));
25+
m_cCircleL0Fill.setColor(cBlue);
1926
m_cCircleL1Fill.setStyle(Qt::SolidPattern);
20-
m_cCircleL1Fill.setColor(QColor(Qt::red));
27+
m_cCircleL1Fill.setColor(cRed);
2128
}
2229

2330
bool MVDisplayFilter::config (FilterContext* pcContext)

0 commit comments

Comments
 (0)