Ignore:
Timestamp:
22 Feb 2013, 02:13:37 (12 years ago)
Author:
seregin
Message:

reusing base MV scaling function in motion mapping

File:
1 edited

Legend:

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

    r44 r45  
    645645#endif
    646646      {
    647         for(UInt list = 0; list < 2; list++)  //each list
    648         {
    649           TComMv cMv = pcPicBase->getCU(uiBaseCUAddr)->getCUMvField((RefPicList)list)->getMv(uiBaseAbsPartIdx);
    650           Int refIdx = pcPicBase->getCU(uiBaseCUAddr)->getCUMvField((RefPicList)list)->getRefIdx(uiBaseAbsPartIdx);
     647        for(UInt refPicList = 0; refPicList < 2; refPicList++)  //for each reference list
     648        {
     649#if REUSE_MVSCALE
     650          TComMvField sMvFieldBase, sMvField;
     651          pcPicBase->getCU(uiBaseCUAddr)->getMvField( pcPicBase->getCU(uiBaseCUAddr), uiBaseAbsPartIdx, (RefPicList)refPicList, sMvFieldBase);
     652          pcCUDes->scaleBaseMV( sMvField, sMvFieldBase );
     653#else
     654          TComMv cMv = pcPicBase->getCU(uiBaseCUAddr)->getCUMvField((RefPicList)refPicList)->getMv(uiBaseAbsPartIdx);
     655          Int refIdx = pcPicBase->getCU(uiBaseCUAddr)->getCUMvField((RefPicList)refPicList)->getRefIdx(uiBaseAbsPartIdx);
    651656
    652657          Int Hor =  ((Int)upSampleRatio * cMv.getHor())/2 ;
     
    656661          TComMvField sMvField;
    657662          sMvField.setMvField(cScaledMv, refIdx);
    658 
    659           pcCUDes->getCUMvField((RefPicList)list)->setMvField(sMvField, uiAbsPartIdx);
     663#endif
     664
     665          pcCUDes->getCUMvField((RefPicList)refPicList)->setMvField(sMvField, uiAbsPartIdx);
    660666          pcCUDes->setPredictionMode(uiAbsPartIdx, MODE_INTER);
    661667        }
Note: See TracChangeset for help on using the changeset viewer.