Opened 14 years ago Closed 14 years ago #195 closed defect (fixed)Uninitialized context model used in xQuadTreeDecisionFunc (SAO)
Description
Context model m_cAOUvlcSCModel.get( 0, 0, 0 ) is used uninitialized during estimation.
This can be reproduced by setting variable m_ucState of class ContextModel to 126 in the constructor (126 can never occur otherwise) and by adding a breakpoint in function getState that triggers when m_ucState equals 126. See the attached svn diff of ContextModel.cpp. Attachments (1)Change History (6)Changed 14 years ago by Heiner Kirchhoffercomment:1 Changed 14 years ago by chihming.fucomment:2 Changed 14 years ago by ksuehring
Fixed in r1279 (3.4-dev-cleanup) comment:3 Changed 14 years ago by davidf
Updating component after adding WD (Text) tickets comment:4 Changed 14 years ago by davidf
comment:5 Changed 14 years ago by davidf
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
| ||||||||||||||||
The modified xQuadTreeDecisionFunc function can solve this issue
Void TEncSampleAdaptiveOffset::xQuadTreeDecisionFunc(SAOQTPart *psQTPart, Int iPartIdx, Double &dCostFinal, Int iMaxLevel, Double dLambda) { SAOQTPart* pOnePart = &(psQTPart[iPartIdx]); UInt uiDepth = pOnePart->PartLevel; UInt uhNextDepth = uiDepth+1; if (iPartIdx == 0) { dCostFinal = 0; } //QAO for this part if(!pOnePart->bProcessed) { xQAOOnePart (psQTPart, iPartIdx, dLambda); } //QAO for sub 4 parts if (pOnePart->PartLevel < iMaxLevel) { Double dCostNotSplit = dLambda + pOnePart->dMinCost; Double dCostSplit = dLambda; for (Int i=0; i< NUM_DOWN_PART ;i++) { if( m_bUseSBACRD ) { if ( 0 == i) //initialize RD with previous depth buffer { m_pppcRDSbacCoder[uhNextDepth][CI_CURR_BEST]->load(m_pppcRDSbacCoder[uiDepth][CI_CURR_BEST]); } else { m_pppcRDSbacCoder[uhNextDepth][CI_CURR_BEST]->load(m_pppcRDSbacCoder[uhNextDepth][CI_NEXT_BEST]); } } xQuadTreeDecisionFunc(psQTPart, pOnePart->DownPartsIdx[i], dCostFinal, iMaxLevel, dLambda); dCostSplit += dCostFinal; if( m_bUseSBACRD ) { m_pppcRDSbacCoder[uhNextDepth][CI_NEXT_BEST]->load(m_pppcRDSbacCoder[uhNextDepth][CI_TEMP_BEST]); } } if(dCostSplit < dCostNotSplit) { dCostFinal = dCostSplit; pOnePart->bSplit = true; pOnePart->bEnableFlag = false; pOnePart->iLength = 0; pOnePart->iBestType = -1; if( m_bUseSBACRD ) { m_pppcRDSbacCoder[uiDepth][CI_NEXT_BEST]->load(m_pppcRDSbacCoder[uhNextDepth][CI_NEXT_BEST]); } } else { dCostFinal = dCostNotSplit; pOnePart->bSplit = false; for (Int i=0; i<NUM_DOWN_PART; i++) { xPartTreeDisable(psQTPart, pOnePart->DownPartsIdx[i]); } if( m_bUseSBACRD ) { m_pppcRDSbacCoder[uiDepth][CI_NEXT_BEST]->load(m_pppcRDSbacCoder[uiDepth][CI_TEMP_BEST]); } } } else { dCostFinal = pOnePart->dMinCost; } }