Changeset 97 in SHVCSoftware for branches/HM-10.0-dev-SHM/source/Lib


Ignore:
Timestamp:
22 Mar 2013, 23:31:53 (12 years ago)
Author:
seregin
Message:

refactoring for ILP reference picture list setting

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

Legend:

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

    r85 r97  
    662662  for(UInt cuIdx = 0; cuIdx < getPicSym()->getNumberOfCUsInFrame(); cuIdx++)  //each LCU
    663663  {
    664     TComDataCU*             pcCUDes = getCU(cuIdx);
     664    TComDataCU* pcCUDes = getCU(cuIdx);
    665665
    666666    for(UInt absPartIdx = 0; absPartIdx < numPartitions; absPartIdx+=unitNum )  //each 16x16 unit
     
    733733        pcCUDes->getCUMvField(REF_PIC_LIST_0)->setMvField(pcCUDes->getCUMvField(REF_PIC_LIST_0)->getMv(absPartIdx), pcCUDes->getCUMvField(REF_PIC_LIST_0)->getRefIdx(absPartIdx), absPartIdx + i);
    734734        pcCUDes->getCUMvField(REF_PIC_LIST_1)->setMvField(pcCUDes->getCUMvField(REF_PIC_LIST_1)->getMv(absPartIdx), pcCUDes->getCUMvField(REF_PIC_LIST_1)->getRefIdx(absPartIdx), absPartIdx + i);
    735         pcCUDes->setPredictionMode(absPartIdx+i, pcCUDes->getPredictionMode(absPartIdx))  ;
    736       }
    737     }
    738       memset( pcCUDes->getPartitionSize(), SIZE_2Nx2N, sizeof(char)*numPartitions);
     735        pcCUDes->setPredictionMode(absPartIdx+i, pcCUDes->getPredictionMode(absPartIdx));
     736      }
     737    }
     738    memset( pcCUDes->getPartitionSize(), SIZE_2Nx2N, sizeof(char)*numPartitions);
    739739  }
    740740}
  • branches/HM-10.0-dev-SHM/source/Lib/TLibCommon/TComSlice.cpp

    r94 r97  
    21522152#endif
    21532153
    2154   //initialize reference POC of ILP
    2155   for(Int refIdx = 0; refIdx < MAX_NUM_REF; refIdx++)
    2156   {
    2157     ilpPic[0]->getSlice(0)->setRefPOC(0, REF_PIC_LIST_0, refIdx);
    2158     ilpPic[0]->getSlice(0)->setRefPOC(0, REF_PIC_LIST_1, refIdx);
    2159 
    2160     ilpPic[0]->getSlice(0)->setRefPic(NULL, REF_PIC_LIST_0, refIdx);
    2161     ilpPic[0]->getSlice(0)->setRefPic(NULL, REF_PIC_LIST_1, refIdx);
    2162   }
    2163 
    2164   //set reference POC of ILP
    2165   ilpPic[0]->getSlice(0)->setNumRefIdx(REF_PIC_LIST_0, pcRefPicBL->getSlice(0)->getNumRefIdx(REF_PIC_LIST_0));
    2166   assert(ilpPic[0]->getSlice(0)->getNumRefIdx(REF_PIC_LIST_0) <= MAX_NUM_REF);
    2167   ilpPic[0]->getSlice(0)->setNumRefIdx(REF_PIC_LIST_1, pcRefPicBL->getSlice(0)->getNumRefIdx(REF_PIC_LIST_1));
    2168   assert(ilpPic[0]->getSlice(0)->getNumRefIdx(REF_PIC_LIST_1) <= MAX_NUM_REF);
    2169 
    2170   for(Int refIdx = 0; refIdx < pcRefPicBL->getSlice(0)->getNumRefIdx(REF_PIC_LIST_0); refIdx++)
    2171   {
    2172     ilpPic[0]->getSlice(0)->setRefPOC(pcRefPicBL->getSlice(0)->getRefPOC(REF_PIC_LIST_0, refIdx), REF_PIC_LIST_0, refIdx);
    2173   }
    2174   for(Int refIdx = 0; refIdx < pcRefPicBL->getSlice(0)->getNumRefIdx(REF_PIC_LIST_1); refIdx++)
    2175   {
    2176     ilpPic[0]->getSlice(0)->setRefPOC(pcRefPicBL->getSlice(0)->getRefPOC(REF_PIC_LIST_1, refIdx), REF_PIC_LIST_1, refIdx);
    2177   }
    2178   for(Int refIdx = 0; refIdx < pcRefPicBL->getSlice(0)->getNumRefIdx(REF_PIC_LIST_0); refIdx++)
    2179   {
    2180     ilpPic[0]->getSlice(0)->setRefPic(pcRefPicBL->getSlice(0)->getRefPic(REF_PIC_LIST_0, refIdx), REF_PIC_LIST_0, refIdx);
    2181   }
    2182   for(Int refIdx = 0; refIdx < pcRefPicBL->getSlice(0)->getNumRefIdx(REF_PIC_LIST_1); refIdx++)
    2183   {
    2184     ilpPic[0]->getSlice(0)->setRefPic(pcRefPicBL->getSlice(0)->getRefPic(REF_PIC_LIST_1, refIdx), REF_PIC_LIST_1, refIdx);
     2154  for( Int refList = 0; refList < 2; refList++ )
     2155  {
     2156    RefPicList refPicList = RefPicList( refList );
     2157
     2158    //initialize reference POC of ILP
     2159    for(Int refIdx = 0; refIdx < MAX_NUM_REF; refIdx++)
     2160    {
     2161      ilpPic[0]->getSlice(0)->setRefPOC(0, refPicList, refIdx);
     2162      ilpPic[0]->getSlice(0)->setRefPic(NULL, refPicList, refIdx);
     2163    }
     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    }
    21852174  }
    21862175  return;
Note: See TracChangeset for help on using the changeset viewer.