Ignore:
Timestamp:
26 Nov 2012, 18:35:20 (12 years ago)
Author:
qualcomm
Message:

JCT3V-B0046, MVHEVC codec;
Two bugs fixed for HTM:
1) encoder crash, see the macro 'BUG_FIX_HTM'
2) wrong place for '#endif' in TComPrediction.h

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-5.0-Qualcomm/source/Lib/TLibEncoder/TEncGOP.cpp

    r189 r194  
    246246
    247247      std::vector<TComAPS>& vAPS = m_pcEncTop->getAPS();
    248 #if VIDYO_VPS_INTEGRATION
     248#if VIDYO_VPS_INTEGRATION|MVHEVC
    249249    m_pcSliceEncoder->initEncSlice ( pcPic, iPOCLast, uiPOCCurr, iNumPicRcvd, iGOPid, pcSlice, m_pcEncTop->getEncTop()->getVPS(), m_pcEncTop->getSPS(), m_pcEncTop->getPPS() );
    250250#else
     
    298298      if( pcSlice->getSliceType() == B_SLICE )
    299299      {
    300         if( m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid ).m_sliceType == 'P' ) { pcSlice->setSliceType( P_SLICE ); }
    301       }
     300#if QC_REM_IDV
     301      if( m_pcCfg->getGOPEntry(pcSlice->getSPS()->getViewId() && ((getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDR) || (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_CRA))? MAX_GOP : iGOPid ).m_sliceType == 'P' ) { pcSlice->setSliceType( P_SLICE ); }
     302#else
     303      if( m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid ).m_sliceType == 'P' ) { pcSlice->setSliceType( P_SLICE ); }
     304#endif
     305    }
    302306
    303307      // Set the nal unit type
     
    332336#endif
    333337
     338#if !QC_REM_IDV
    334339      pcSlice->setNumRefIdx( REF_PIC_LIST_0, min( m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid ).m_numRefPicsActive, (pcSlice->getRPS()->getNumberOfPictures() + pcSlice->getSPS()->getNumberOfUsableInterViewRefs()) ) );
    335340      pcSlice->setNumRefIdx( REF_PIC_LIST_1, min( m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid ).m_numRefPicsActive, (pcSlice->getRPS()->getNumberOfPictures() + pcSlice->getSPS()->getNumberOfUsableInterViewRefs()) ) );
    336 
    337       TComRefPicListModification* refPicListModification = pcSlice->getRefPicListModification();
    338       refPicListModification->setRefPicListModificationFlagL0( false );
     341#else
     342
     343    Bool bNalRAP = ((getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_CRA) || (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDR)) && (pcSlice->getSPS()->getViewId())  ? 1: 0;
     344    pcSlice->setNumRefIdx( REF_PIC_LIST_0, min( m_pcCfg->getGOPEntry( bNalRAP ? MAX_GOP : iGOPid ).m_numRefPicsActive, (pcSlice->getRPS()->getNumberOfPictures() + pcSlice->getSPS()->getNumberOfUsableInterViewRefs()) ) );
     345    pcSlice->setNumRefIdx( REF_PIC_LIST_1, min( m_pcCfg->getGOPEntry( bNalRAP ? MAX_GOP : iGOPid ).m_numRefPicsActive, (pcSlice->getRPS()->getNumberOfPictures() + pcSlice->getSPS()->getNumberOfUsableInterViewRefs()) ) );
     346#endif
     347    TComRefPicListModification* refPicListModification = pcSlice->getRefPicListModification();
     348    refPicListModification->setRefPicListModificationFlagL0( false );
    339349#if !H0137_0138_LIST_MODIFICATION
    340350      refPicListModification->setNumberOfRefPicListModificationsL0(0);
     
    363373      if( pcSlice->getSliceType() == B_SLICE )
    364374      {
     375#if !QC_REM_IDV
    365376        if( m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid ).m_sliceType == 'P' ) { pcSlice->setSliceType( P_SLICE ); }
     377#else
     378      Bool bRAP = ((getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_CRA) || (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDR)) && (pcSlice->getSPS()->getViewId())  ? 1: 0;
     379      if( m_pcCfg->getGOPEntry( bRAP ? MAX_GOP : iGOPid ).m_sliceType == 'P' ) { pcSlice->setSliceType( P_SLICE ); }
     380#endif
    366381      }
    367382     
     
    830845      if ( m_bSeqFirst )
    831846      {
    832 #if VIDYO_VPS_INTEGRATION
     847#if MVHEVC
     848      if(!m_pcEncTop->getLayerId())
     849      {
     850#endif
     851#if VIDYO_VPS_INTEGRATION|MVHEVC
    833852        {
    834853          OutputNALUnit nalu(NAL_UNIT_VPS, true, m_pcEncTop->getLayerId());
     
    840859#endif
    841860#if NAL_REF_FLAG
    842 #if VIDYO_VPS_INTEGRATION
     861#if VIDYO_VPS_INTEGRATION|MVHEVC
    843862        OutputNALUnit nalu(NAL_UNIT_SPS, true, m_pcEncTop->getLayerId());
    844863#else
     
    861880
    862881#if NAL_REF_FLAG
    863 #if VIDYO_VPS_INTEGRATION
     882#if VIDYO_VPS_INTEGRATION|MVHEVC
     883#if MVHEVC
    864884        nalu = NALUnit(NAL_UNIT_PPS, true, m_pcEncTop->getLayerId());
     885#else
     886        nalu = NALUnit(NAL_UNIT_PPS, true, m_pcEncTop->getLayerId());
     887#endif
    865888#else
    866889        nalu = NALUnit(NAL_UNIT_PPS, true, m_pcEncTop->getViewId(), m_pcEncTop->getIsDepth());
     
    873896        writeRBSPTrailingBits(nalu.m_Bitstream);
    874897        accessUnit.push_back(new NALUnitEBSP(nalu));
    875 
    876         m_bSeqFirst = false;
    877       }
     898#if MVHEVC
     899      }
     900#endif
     901      m_bSeqFirst = false;
     902    }
    878903
    879904      /* use the main bitstream buffer for storing the marshalled picture */
     
    9931018#if NAL_REF_FLAG
    9941019        OutputNALUnit nalu( pcSlice->getNalUnitType(), pcSlice->isReferenced(),
    995 #if !VIDYO_VPS_INTEGRATION
     1020#if !VIDYO_VPS_INTEGRATION &!MVHEVC
    9961021                           m_pcEncTop->getViewId(), m_pcEncTop->getIsDepth(), pcSlice->getTLayer() );
    9971022#else
     
    14691494          {
    14701495#if NAL_REF_FLAG
    1471 #if VIDYO_VPS_INTEGRATION
     1496#if VIDYO_VPS_INTEGRATION | MVHEVC
    14721497            OutputNALUnit nalu(NAL_UNIT_APS, true, m_pcEncTop->getLayerId());
    14731498#else
     
    15351560
    15361561#if NAL_REF_FLAG
    1537 #if VIDYO_VPS_INTEGRATION
     1562#if VIDYO_VPS_INTEGRATION | MVHEVC
    15381563        OutputNALUnit nalu(NAL_UNIT_SEI, false, m_pcEncTop->getLayerId());
    15391564#else
     
    19731998  case NAL_UNIT_CODED_SLICE: return "SLICE";
    19741999#if H0566_TLA
     2000#if !QC_REM_IDV
    19752001  case NAL_UNIT_CODED_SLICE_IDV: return "IDV";
     2002#endif
    19762003  case NAL_UNIT_CODED_SLICE_CRA: return "CRA";
    19772004  case NAL_UNIT_CODED_SLICE_TLA: return "TLA";
     
    21882215    if( bInterViewOnlySlice )
    21892216    {
     2217#if !QC_REM_IDV
    21902218      return NAL_UNIT_CODED_SLICE_IDV;
     2219#else
     2220      return NAL_UNIT_CODED_SLICE_IDR;
     2221#endif
    21912222    }
    21922223    else
     
    22012232      if( bInterViewOnlySlice )
    22022233      {
     2234#if !QC_REM_IDV
    22032235        return NAL_UNIT_CODED_SLICE_IDV;
     2236#else
     2237        return NAL_UNIT_CODED_SLICE_CRA;
     2238#endif
    22042239      }
    22052240      else
     
    22162251      if( bInterViewOnlySlice )
    22172252      {
     2253#if !QC_REM_IDV
    22182254        return NAL_UNIT_CODED_SLICE_IDV;
     2255#else
     2256        return NAL_UNIT_CODED_SLICE_IDR;
     2257#endif
    22192258      }
    22202259      else
     
    24542493
    24552494  // analyze inter-view modifications
     2495#if !QC_REM_IDV
    24562496  GOPEntryMvc gem = m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid );
     2497#else
     2498  Bool bRAP = ((getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDR) || (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_CRA)) && (pcSlice->getSPS()->getViewId()) ? 1:0;
     2499  GOPEntryMvc gem = m_pcCfg->getGOPEntry( bRAP ? MAX_GOP : iGOPid );
     2500#endif
    24572501  Int numL0Modifications = 0;
    24582502  Int numL1Modifications = 0;
Note: See TracChangeset for help on using the changeset viewer.