Changeset 99 in SHVCSoftware for branches


Ignore:
Timestamp:
25 Mar 2013, 18:29:05 (12 years ago)
Author:
seregin
Message:

check for MFM flag

Location:
branches/HM-10.0-dev-SHM/source/Lib
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/HM-10.0-dev-SHM/source/Lib/TLibCommon/TComPic.cpp

    r97 r99  
    736736      }
    737737    }
    738     memset( pcCUDes->getPartitionSize(), SIZE_2Nx2N, sizeof(char)*numPartitions);
     738    memset( pcCUDes->getPartitionSize(), SIZE_2Nx2N, sizeof(Char)*numPartitions);
    739739  }
    740740}
  • branches/HM-10.0-dev-SHM/source/Lib/TLibCommon/TComSlice.cpp

    r97 r99  
    21552155  {
    21562156    RefPicList refPicList = RefPicList( refList );
    2157 
    2158     //initialize reference POC of ILP
    2159     for(Int refIdx = 0; refIdx < MAX_NUM_REF; refIdx++)
     2157   
     2158    //set reference POC of ILP
     2159    ilpPic[0]->getSlice(0)->setNumRefIdx(refPicList, pcRefPicBL->getSlice(0)->getNumRefIdx(refPicList));
     2160    assert(ilpPic[0]->getSlice(0)->getNumRefIdx(refPicList) >= 0);
     2161    assert(ilpPic[0]->getSlice(0)->getNumRefIdx(refPicList) <= MAX_NUM_REF);
     2162
     2163    //initialize reference POC of ILP
     2164    for(Int refIdx = 0; refIdx < pcRefPicBL->getSlice(0)->getNumRefIdx(refPicList); refIdx++)
     2165    {
     2166      ilpPic[0]->getSlice(0)->setRefPOC(pcRefPicBL->getSlice(0)->getRefPOC(refPicList, refIdx), refPicList, refIdx);
     2167      ilpPic[0]->getSlice(0)->setRefPic(pcRefPicBL->getSlice(0)->getRefPic(refPicList, refIdx), refPicList, refIdx);
     2168    }
     2169
     2170    for(Int refIdx = pcRefPicBL->getSlice(0)->getNumRefIdx(refPicList); refIdx < MAX_NUM_REF; refIdx++)
    21602171    {
    21612172      ilpPic[0]->getSlice(0)->setRefPOC(0, refPicList, refIdx);
    21622173      ilpPic[0]->getSlice(0)->setRefPic(NULL, refPicList, refIdx);
    21632174    }
    2164 
    2165     //set reference POC of ILP
    2166     ilpPic[0]->getSlice(0)->setNumRefIdx(refPicList, pcRefPicBL->getSlice(0)->getNumRefIdx(refPicList));
    2167     assert(ilpPic[0]->getSlice(0)->getNumRefIdx(refPicList) <= MAX_NUM_REF);
    2168 
    2169     for(Int refIdx = 0; refIdx < pcRefPicBL->getSlice(0)->getNumRefIdx(refPicList); refIdx++)
    2170     {
    2171       ilpPic[0]->getSlice(0)->setRefPOC(pcRefPicBL->getSlice(0)->getRefPOC(refPicList, refIdx), refPicList, refIdx);
    2172       ilpPic[0]->getSlice(0)->setRefPic(pcRefPicBL->getSlice(0)->getRefPic(refPicList, refIdx), refPicList, refIdx);
    2173     }
    21742175  }
    21752176  return;
  • branches/HM-10.0-dev-SHM/source/Lib/TLibEncoder/TEncGOP.cpp

    r98 r99  
    564564
    565565#if REF_IDX_MFM
    566       pcSlice->setRefPOCListILP(m_pcEncTop->getIlpList(), pcSlice->getBaseColPic());
     566      if( pcSlice->getSPS()->getMFMEnabledFlag() )
     567      {
     568        pcSlice->setRefPOCListILP(m_pcEncTop->getIlpList(), pcSlice->getBaseColPic());
     569      }
    567570#endif
    568571      pcSlice->addRefPicList ( m_pcEncTop->getIlpList(), 1);
    569572
    570573#if REF_IDX_MFM
    571       Bool found         = false;
    572       UInt ColFromL0Flag = pcSlice->getColFromL0Flag();
    573       UInt ColRefIdx     = pcSlice->getColRefIdx();
    574       for(Int colIdx = 0; colIdx < pcSlice->getNumRefIdx( RefPicList(1 - ColFromL0Flag) ); colIdx++)
    575       {
    576         if( pcSlice->getRefPic( RefPicList(1 - ColFromL0Flag), colIdx)->isILR() )
    577         {
    578           ColRefIdx = colIdx;
    579           found = true;
    580           break;
    581         }
    582       }
    583 
    584       if( found == false )
    585       {
    586         ColFromL0Flag = 1 - ColFromL0Flag;
     574      if( pcSlice->getSPS()->getMFMEnabledFlag() )
     575      {
     576        Bool found         = false;
     577        UInt ColFromL0Flag = pcSlice->getColFromL0Flag();
     578        UInt ColRefIdx     = pcSlice->getColRefIdx();
    587579        for(Int colIdx = 0; colIdx < pcSlice->getNumRefIdx( RefPicList(1 - ColFromL0Flag) ); colIdx++)
    588580        {
     
    590582          {
    591583            ColRefIdx = colIdx;
    592             found = true; 
     584            found = true;
    593585            break;
    594           }
    595         }
    596       }
    597 
    598       if(found == true)
    599       {
    600         pcSlice->setColFromL0Flag(ColFromL0Flag);
    601         pcSlice->setColRefIdx(ColRefIdx);
     586          }
     587        }
     588
     589        if( found == false )
     590        {
     591          ColFromL0Flag = 1 - ColFromL0Flag;
     592          for(Int colIdx = 0; colIdx < pcSlice->getNumRefIdx( RefPicList(1 - ColFromL0Flag) ); colIdx++)
     593          {
     594            if( pcSlice->getRefPic( RefPicList(1 - ColFromL0Flag), colIdx)->isILR() )
     595            {
     596              ColRefIdx = colIdx;
     597              found = true;
     598              break;
     599            }
     600          }
     601        }
     602
     603        if(found == true)
     604        {
     605          pcSlice->setColFromL0Flag(ColFromL0Flag);
     606          pcSlice->setColRefIdx(ColRefIdx);
     607        }
    602608      }
    603609#endif
Note: See TracChangeset for help on using the changeset viewer.