Opened 10 years ago Last modified 10 years ago #1304 new defectUnclear decoder DPB behaviour
Description
We have generated a simple bitstream using our encoder with the following sequence parameters:
The stream has a GOP structure like this:
Decode Order:
POC:
Decoding the stream with HM-15.0 produces the following output ( MD5 values removed ):
HM software: Decoder Version [15.0][Windows][VS 1600][64 bit]
POC 0 TId: 0 ( I-SLICE, QP 25 ) [DT 0.015] [L0 ] [L1 ] [MD5:,(OK)]
For the picture with POC=8 the HM decoder executes the following code in TDecTop::xGetNewPicBuffer: if ( !bBufferIsAvailable ) { //There is no room for this picture, either because of faulty encoder or dropped NAL. Extend the buffer. m_iMaxRefPicNum++; rpcPic = new TComPic(); m_cListPic.pushBack( rpcPic ); }
The comment in the source code suggests a fault in our encoder.
The RPS for the picture with POC=8 is as follows:
At this point ( before the execution of the code ) the decoder DPB contains the following 4 pictures:
The previous picture output by the decoder had POC=2.
We are currently interpetrating the point of code to be in the decode process after parsing the slice header of the first slice of the picture with POC=8 but before decoding of the picture with POC=8. ( The RPS has already been applied ).
We are currently also considering the possibility that the HM-15.0 decoder slightly inaccurate because, if the full output and removal of pictures from the DPB process of C.5.2.2 had been applied after the application of the RPS but before the call to TDecTop::xGetNewPicBuffer, we believe the picture with POC=3 might has been output and removed from the DPB.
We find this a possibility because C.5.2.2 states that for the non IRAP picture case the bumping process in C.5.2.4 is invoked if the number of pictures in the DPB is greater than or equal to sps_max_dec_pic_buffering_minus1 + 1, which, so we think, should have output the picture with POC=3 and marked it as not needed for output so it is removed from the DPB.
We tested this hypothesis in a somewhat crude way by calling the TAppDecTop::xWriteOutput method from inside TDecTop::xDecodeSlice after the call to m_apcSlicePilot->applyReferencePictureSet(m_cListPic, m_apcSlicePilot->getRPS()); but before the call to xGetNewPicBuffer (m_apcSlicePilot, pcPic); and, for this case, checking in xWriteOutput for dpbFullness >= maxDecPicBufferingHighestTid. The result of this experiment is that the picture with POC=3 is output by the call to xWriteOutput() and removed from the DPB after applying the RPS of the picture with POC=8.
The modified decoder also did not execute the code in question above for the whole sequence.
Creating a stream with the standard HM configuration files for random access and a sequence like so:
So if our assumption is correct the decoder seems to be implementing the bumping/output process of pictures from the DPB slightly inefficiently and might confuse people looking for a reference example. Attachments (1)Change History (5)comment:1 Changed 10 years ago by DefaultCC Plugin
Changed 10 years ago by ralfwcomment:2 Changed 10 years ago by ksuehring
comment:3 Changed 10 years ago by adarsh
I agree that the example brings out the inefficient implementation of the bumping process in HM.
In SHM, (branch SHM-dev: https://hevc.hhi.fraunhofer.de/svn/svn_SHVCSoftware/branches/SHM-dev), the DPB is implemented such that the bumping process/picture output is called after the decoding of the RPS. I tried decoding this bitstream ( gop4_dpb4_reordering2.hevc) with the SHM code and it decodes fine without expanding the "DPB."
I can volunteer to provide a patch for HM (similar to SHM) to implement the DPB such that the the bumping is done after the RPS derivation. I will need some time to do it, though.
Adarsh comment:4 Changed 10 years ago by ksuehring
Thanks Adarsh for volunteering. Any help is appreciated.
I'm not sure if there is any difference in the RExt branch in this part of the software. But it might be a good idea to work directly on that branch, which is intended to be merged into mainline HM soon. Note: See
TracTickets for help on using
tickets. | This list contains all users that will be notified about changes made to this ticket. These roles will be notified: Reporter, Owner, Subscriber, Participant
|
our example stream