Log in

View Full Version : Extracting HEVC frame bits numbers during decoding


JamesLittle
4th December 2013, 19:32
I am using HEVC to encode some videos and i will wish to get the bit number of each SLICE when decoding the video.

The current output of the decoding process looks like this:

POC 0 TId: 0 ( I-SLICE, QP 17 ) [DT 0.470] [L0 ] [L1 ] [MD5:7229d85f78b911005893d3796fe72416,(OK)]
POC 8 TId: 0 ( B-SLICE, QP 18 ) [DT 0.410] [L0 0 ] [L1 0 ] [LC 0 ] [MD5:ded0952d9a26852a87937ca9d80357cb,(OK)]
POC 4 TId: 0 ( B-SLICE, QP 19 ) [DT 0.320] [L0 0 8 ] [L1 8 0 ] [LC 0 8 ] [MD5:b591dc4540df5d97a38914027c26cd4b,(OK)]
POC 2 TId: 0 ( B-SLICE, QP 20 ) [DT 0.290] [L0 0 4 ] [L1 4 8 ] [LC 0 4 8 ] [MD5:4ee2f198db0ce090e730660afc1627c5,(OK)]
POC 1 TId: 0 ( b-SLICE, QP 21 ) [DT 0.250] [L0 0 2 ] [L1 2 4 ] [LC 0 2 4 ] [MD5:b4e94fb1ce9c90c106a0bf84376ab438,(OK)]

To get the bit number of each frame, i did the following modification on TDecGop.cpp file from reference software.

printf("\nPOC %4d TId: %1d ( %c-SLICE, QP%3d ) %4d Bits: ",pcSlice->getPOC(), pcSlice->getTLayer(), c, pcSlice->getSliceQp(), pcSlice->getSliceBits());

My new output look like this:

POC 0 TId: 0 ( I-SLICE, QP 17 ) 0 Bits: [DT 0.470] [L0 ] [L1 ] [MD5:7229d85f78b911005893d3796fe72416,(OK)]
POC 8 TId: 0 ( B-SLICE, QP 18 ) 0 Bits: [DT 0.410] [L0 0 ] [L1 0 ] [LC 0 ] [MD5:ded0952d9a26852a87937ca9d80357cb,(OK)]
POC 4 TId: 0 ( B-SLICE, QP 19 ) 0 Bits: [DT 0.320] [L0 0 8 ] [L1 8 0 ] [LC 0 8 ] [MD5:b591dc4540df5d97a38914027c26cd4b,(OK)]
POC 2 TId: 0 ( B-SLICE, QP 20 ) 0 Bits: [DT 0.290] [L0 0 4 ] [L1 4 8 ] [LC 0 4 8 ] [MD5:4ee2f198db0ce090e730660afc1627c5,(OK)]
POC 1 TId: 0 ( b-SLICE, QP 21 ) 0 Bits: [DT 0.250] [L0 0 2 ] [L1 2 4 ] [LC 0 2 4 ] [MD5:b4e94fb1ce9c90c106a0bf84376ab438,(OK)]


The question is, why i am getting 0 instead of the actual bits number for every frame?

I will be very grateful if someone could help me out with this.

Many thanks