Opened 12 years ago

Closed 12 years ago

#256 closed defect (fixed)

HM-5.0 crashes when Independent Tiles is used

Reported by: hendry Owned by:
Priority: minor Milestone:
Component: HM Version: HM-5.0
Keywords: Tiles Cc: fbossen, ksuehring, davidf, jct-vc@…

Description

The Tiles related configuration that are used (using encoder_randomaccess.cfg):
UniformSpacingIdc : 1
TileBoundaryIndependenceIdc : 1
NumTileColumnsMinus1 : 1
NumTileRowsMinus1 : 1
TileLocationInSliceHeaderFlag : 1
TileMarkerFlag : 1

Crash happens in function:
Void TComLoopFilter::xEdgeFilterLuma( TComDataCU* pcCU, UInt uiAbsZorderIdx, UInt uiDepth, Int iDir, Int iEdge )

The configuration that causes the crash seems to be TileBoundaryIndependenceIdc setting. When it is set to 0, no problem occurs.

Furthermore, the problem may be related to the macro DBF_DQP. When the macro is set to 0, the software runs without any problem even with TileBoundaryIndependenceIdc = 1.

Change History (6)

comment:1 Changed 12 years ago by DefaultCC Plugin

  • Cc fbossen ksuehring davidf added

comment:2 Changed 12 years ago by geertv

After some investigation, I think that the bug is situated in the TComLoopFilter::xSetLoopfilterParam function, which should make the "LeftEdge" and "TopEdge" flags false, so that the edge between tiles is not deblocked when TileBoundaryIndependenceIdc=1. Digging deeper into this function reveals that the bug is likely in the getPULeft and getPUAbove functions, where the getTileBoundaryIndependenceIdr() flag is read. If these two functions return NULL in case of TileBoundaryIndependenceIdc=1 for the particular tile boundary edge, then that edge will not be deblocking filtered and the QP availability problem inside the DBF_DQP macro will not occur. Note also that accessing the IPCM flag has a similar problem.

This is a temporary patch to correct the behavior of the deblocking filter if the CU on the left side or above the edge to be deblocking filtered is unavailable:

Put TILEBOUNDARYINDEPENDENCE_PATCH macro inside TComLoopFilter::xEdgeFilterLuma and TComLoopFilter::xEdgeFilterChroma functions:

#if DBF_DQP
      iQP_Q = pcCU->getQP( uiBsAbsIdx );
      uiPartQIdx = uiBsAbsIdx;
      // Derive neighboring PU index
      if (iDir == EDGE_VER)
      {
        pcCUP = pcCUQ->getPULeft (uiPartPIdx, uiPartQIdx);
      }
      else  // (iDir == EDGE_HOR)
      {
        pcCUP = pcCUQ->getPUAbove(uiPartPIdx, uiPartQIdx);
      }
#if TILEBOUNDARYINDEPENDENCE_PATCH
      if (!pcCUP)
      {
	return;
      }
#endif
      iQP_P = pcCUP->getQP(uiPartPIdx);

      if(pcCU->getIPCMFlag(uiPartQIdx)) 
      {
        iQP_Q = 0; 
      }
      if(pcCUP->getIPCMFlag(uiPartPIdx)) 
      {
        iQP_P = 0; 
      }

      iQP = (iQP_P + iQP_Q + 1) >> 1;
#endif
Last edited 12 years ago by ksuehring (previous) (diff)

comment:3 follow-up: Changed 12 years ago by ksuehring

So it seems issue #257 is a duplicate of this? I think it suggests the same NULL pointer check.

comment:4 in reply to: ↑ 3 Changed 12 years ago by geertv

Replying to ksuehring:

So it seems issue #257 is a duplicate of this? I think it suggests the same NULL pointer check.

That is partially correct, however, even with the suggested patch for ticket #256, the encoder will still crash (not deblocking related) for the crash conditions attached to ticket #257.

comment:5 Changed 12 years ago by ksuehring

  • Resolution set to fixed
  • Status changed from new to closed

the patch has been applied to HM-5.0-dev-bugfix in r1704

comment:6 Changed 12 years ago by davidf

  • Cc jct-vc@… added
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

  • David Flynn(Subscriber, Participant)
  • Frank Bossen(Subscriber)
  • Geert Van der Auwera(Participant)
  • Hendry(Reporter)
  • jct-vc@…(Subscriber)
  • karl.sharman@…(Always)
  • Karsten Suehring(Subscriber, Participant, Always)