- Timestamp:
- 8 Feb 2013, 00:06:35 (12 years ago)
- Location:
- trunk/source
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source
-
Property
svn:mergeinfo
set to
/branches/SHM-1.0-dev/source merged eligible
-
Property
svn:mergeinfo
set to
-
trunk/source/App/TAppEncoder/TAppEncTop.cpp
r28 r33 99 99 100 100 #if REF_IDX_MFM 101 if(layer == 0) 102 m_acTEncTop[layer].setMFMEnabledFlag(false); 103 else 104 m_acTEncTop[layer].setMFMEnabledFlag(true); 101 if(layer == 0) 102 { 103 m_acTEncTop[layer].setMFMEnabledFlag(false); 104 } 105 else 106 { 107 m_acTEncTop[layer].setMFMEnabledFlag(true); 108 } 105 109 #endif 106 110 // set layer ID -
trunk/source/Lib/TLibCommon/TComDataCU.cpp
r28 r33 2146 2146 Bool TComDataCU::xCheckZeroMVILRMerge(UChar uhInterDir, TComMvField& cMvFieldL0, TComMvField& cMvFieldL1) 2147 2147 { 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2148 Bool checkZeroMVILR = true; 2149 2150 if(uhInterDir&0x1) //list0 2151 { 2152 Int refIdxL0 = cMvFieldL0.getRefIdx(); 2153 if(getSlice()->getRefPic(REF_PIC_LIST_0, refIdxL0)->getIsILR()) 2154 checkZeroMVILR &= (cMvFieldL0.getHor() == 0 && cMvFieldL0.getVer() == 0); 2155 } 2156 if(uhInterDir&0x2) //list1 2157 { 2158 Int refIdxL1 = cMvFieldL1.getRefIdx(); 2159 if(getSlice()->getRefPic(REF_PIC_LIST_1, refIdxL1)->getIsILR()) 2160 checkZeroMVILR &= (cMvFieldL1.getHor() == 0 && cMvFieldL1.getVer() == 0); 2161 } 2162 2163 return checkZeroMVILR; 2164 2164 } 2165 2165 2166 2166 Bool TComDataCU::xCheckZeroMVILRMvdL1Zero(Int iRefList, Int iRefIdx, Int MvpIdx) 2167 2167 { 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2168 RefPicList eRefPicList = iRefList > 0? REF_PIC_LIST_1: REF_PIC_LIST_0; 2169 assert(eRefPicList == REF_PIC_LIST_1); 2170 2171 Bool checkZeroMVILR = true; 2172 2173 if(getSlice()->getRefPic(eRefPicList, iRefIdx)->getIsILR()) 2174 { 2175 AMVPInfo* pcAMVPInfo = getCUMvField(eRefPicList)->getAMVPInfo(); 2176 TComMv cMv = pcAMVPInfo->m_acMvCand[MvpIdx]; 2177 checkZeroMVILR &= (cMv.getHor() == 0 && cMv.getVer() == 0); 2178 } 2179 2180 return checkZeroMVILR; 2181 2181 } 2182 2182 #endif -
trunk/source/Lib/TLibCommon/TComPic.cpp
r30 r33 588 588 Void TComPic::copyUpsampledMvField(TComPic* pcPicBase) 589 589 { 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 UIntuiPelX = pcCUDes->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiAbsPartIdx] ];628 UIntuiPelY = pcCUDes->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiAbsPartIdx] ];629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 590 Int iBWidth = pcPicBase->getPicYuvRec()->getWidth () - pcPicBase->getPicYuvRec()->getPicCropLeftOffset() - pcPicBase->getPicYuvRec()->getPicCropRightOffset(); 591 Int iBHeight = pcPicBase->getPicYuvRec()->getHeight() - pcPicBase->getPicYuvRec()->getPicCropTopOffset() - pcPicBase->getPicYuvRec()->getPicCropBottomOffset(); 592 593 Int iEWidth = getPicYuvRec()->getWidth() - getPicYuvRec()->getPicCropLeftOffset() - getPicYuvRec()->getPicCropRightOffset(); 594 Int iEHeight = getPicYuvRec()->getHeight() - getPicYuvRec()->getPicCropTopOffset() - getPicYuvRec()->getPicCropBottomOffset(); 595 596 UInt upSampleRatio = 0; 597 if(iEWidth == iBWidth && iEHeight == iBHeight) 598 { 599 upSampleRatio = 2; 600 } 601 else if(2*iEWidth == 3*iBWidth && 2*iEHeight == 3*iBHeight) 602 { 603 upSampleRatio = 3; 604 } 605 else if(iEWidth == 2*iBWidth && iEHeight == 2*iBHeight) 606 { 607 upSampleRatio = 4; 608 } 609 else 610 { 611 assert(0); 612 } 613 614 for(UInt cuIdx = 0; cuIdx < getPicSym()->getNumberOfCUsInFrame(); cuIdx++) //each LCU 615 { 616 UInt uiNumPartitions = 1<<(g_uiMaxCUDepth<<1); 617 618 TComDataCU* pcCUDes = getCU(cuIdx); 619 620 UInt uiWidthMinPU = g_uiMaxCUWidth/(1<<g_uiMaxCUDepth); 621 UInt uiHeightMinPU = g_uiMaxCUHeight/(1<<g_uiMaxCUDepth); 622 Int unitNum = max (1, (Int)((16/uiWidthMinPU)*(16/uiHeightMinPU)) ); 623 624 for(UInt uiAbsPartIdx = 0; uiAbsPartIdx < uiNumPartitions; uiAbsPartIdx+=unitNum ) //each 16x16 unit 625 { 626 //pixel position of each unit in up-sampled layer 627 UInt uiPelX = pcCUDes->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiAbsPartIdx] ]; 628 UInt uiPelY = pcCUDes->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiAbsPartIdx] ]; 629 UInt uiBaseCUAddr, uiBaseAbsPartIdx; 630 pcPicBase->deriveUnitIdxBase(uiPelX + 8, uiPelY + 8, upSampleRatio, uiBaseCUAddr, uiBaseAbsPartIdx); 631 if( (pcPicBase->getCU(uiBaseCUAddr)->getPredictionMode(uiBaseAbsPartIdx) != MODE_NONE) && (pcPicBase->getCU(uiBaseCUAddr)->getPredictionMode(uiBaseAbsPartIdx) != MODE_INTRA) ) //base layer unit not skip and invalid mode 632 { 633 for(UInt list = 0; list < 2; list++) //each list 634 { 635 TComMv cMv = pcPicBase->getCU(uiBaseCUAddr)->getCUMvField((RefPicList)list)->getMv(uiBaseAbsPartIdx); 636 Int refIdx = pcPicBase->getCU(uiBaseCUAddr)->getCUMvField((RefPicList)list)->getRefIdx(uiBaseAbsPartIdx); 637 638 Int Hor = ((Int)upSampleRatio * cMv.getHor())/2 ; 639 Int Ver = ((Int)upSampleRatio * cMv.getVer())/2 ; 640 641 TComMv cScaledMv(Hor, Ver); 642 TComMvField sMvField; 643 sMvField.setMvField(cScaledMv, refIdx); 644 645 pcCUDes->getCUMvField((RefPicList)list)->setMvField(sMvField, uiAbsPartIdx); 646 pcCUDes->setPredictionMode(uiAbsPartIdx, MODE_INTER); 647 } 648 } 649 else 650 { 651 TComMvField zeroMvField; //zero MV and invalid reference index 652 pcCUDes->getCUMvField(REF_PIC_LIST_0)->setMvField(zeroMvField, uiAbsPartIdx); 653 pcCUDes->getCUMvField(REF_PIC_LIST_1)->setMvField(zeroMvField, uiAbsPartIdx); 654 pcCUDes->setPredictionMode(uiAbsPartIdx, MODE_INTRA); 655 } 656 657 for(UInt i = 1; i < unitNum; i++ ) 658 { 659 pcCUDes->getCUMvField(REF_PIC_LIST_0)->setMvField(pcCUDes->getCUMvField(REF_PIC_LIST_0)->getMv(uiAbsPartIdx), pcCUDes->getCUMvField(REF_PIC_LIST_0)->getRefIdx(uiAbsPartIdx), uiAbsPartIdx + i); 660 pcCUDes->getCUMvField(REF_PIC_LIST_1)->setMvField(pcCUDes->getCUMvField(REF_PIC_LIST_1)->getMv(uiAbsPartIdx), pcCUDes->getCUMvField(REF_PIC_LIST_1)->getRefIdx(uiAbsPartIdx), uiAbsPartIdx + i); 661 pcCUDes->setPredictionMode(uiAbsPartIdx+i, pcCUDes->getPredictionMode(uiAbsPartIdx)) ; 662 } 663 } 664 memset( pcCUDes->getPartitionSize(), SIZE_2Nx2N, sizeof(char)*uiNumPartitions); 665 } 666 666 } 667 667 #endif -
trunk/source/Lib/TLibCommon/TComSlice.cpp
r28 r33 580 580 for(Int refIdx = 0; refIdx < pcRefPicBL->getSlice(0)->getNumRefIdx(REF_PIC_LIST_0); refIdx++) 581 581 { 582 582 ilpPic[0]->getSlice(0)->setRefPOC(pcRefPicBL->getSlice(0)->getRefPOC(REF_PIC_LIST_0, refIdx), REF_PIC_LIST_0, refIdx); 583 583 } 584 584 for(Int refIdx = 0; refIdx < pcRefPicBL->getSlice(0)->getNumRefIdx(REF_PIC_LIST_1); refIdx++) 585 585 { 586 586 ilpPic[0]->getSlice(0)->setRefPOC(pcRefPicBL->getSlice(0)->getRefPOC(REF_PIC_LIST_1, refIdx), REF_PIC_LIST_1, refIdx); 587 587 } 588 588 for(Int refIdx = 0; refIdx < pcRefPicBL->getSlice(0)->getNumRefIdx(REF_PIC_LIST_0); refIdx++) 589 589 { 590 590 ilpPic[0]->getSlice(0)->setRefPic(pcRefPicBL->getSlice(0)->getRefPic(REF_PIC_LIST_0, refIdx), REF_PIC_LIST_0, refIdx); 591 591 } 592 592 for(Int refIdx = 0; refIdx < pcRefPicBL->getSlice(0)->getNumRefIdx(REF_PIC_LIST_1); refIdx++) 593 593 { 594 594 ilpPic[0]->getSlice(0)->setRefPic(pcRefPicBL->getSlice(0)->getRefPic(REF_PIC_LIST_1, refIdx), REF_PIC_LIST_1, refIdx); 595 595 } 596 596 return; -
trunk/source/Lib/TLibCommon/TComYuv.h
r17 r33 116 116 Void copyFromPicChroma ( TComPicYuv* pcPicYuvSrc, UInt iCuAddr, UInt uiAbsZorderIdx ); 117 117 #if NO_RESIDUAL_FLAG_FOR_BLPRED 118 Void 118 Void copyFromPicLuma ( TComPicYuv* pcPicYuvSrc, UInt iCuAddr, UInt uiZorderIdxInCU, UInt uiAbsZorderIdx, UInt uiWidth, UInt uiHeight ); 119 119 Void copyFromPicChroma( TComPicYuv* pcPicYuvSrc, UInt iCuAddr, UInt uiZorderIdxInCU, UInt uiAbsZorderIdx, UInt uiCWidth, UInt uiCHeight, UInt uiChromaId ); 120 120 #endif -
trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp
r28 r33 847 847 if(pcSPS->getLayerId() > 0) 848 848 { 849 850 851 849 READ_FLAG( uiCode, "sps_enh_mfm_enable_flag" ); 850 pcSPS->setMFMEnabledFlag( uiCode ? true : false ); 851 assert(pcSPS->getMFMEnabledFlag()); 852 852 } 853 853 #endif -
trunk/source/Lib/TLibEncoder/TEncCavlc.cpp
r28 r33 603 603 if( pcSPS->getLayerId() > 0 ) 604 604 { 605 606 605 assert(pcSPS->getMFMEnabledFlag()); 606 WRITE_FLAG( pcSPS->getMFMEnabledFlag() ? 1 : 0, "sps_enh_mfm_enable_flag" ); 607 607 } 608 608 #endif -
trunk/source/Lib/TLibEncoder/TEncSearch.cpp
r30 r33 3187 3187 uhInterDirNeighbours[uiMergeCand] = 0; 3188 3188 cMvFieldNeighbours[0 + 2*uiMergeCand].setMvField(TComMv(), NOT_VALID); 3189 3189 cMvFieldNeighbours[1 + 2*uiMergeCand].setMvField(TComMv(), NOT_VALID); 3190 3190 } 3191 3191 #endif … … 3212 3212 { 3213 3213 #if REF_IDX_ME_ZEROMV 3214 3215 3216 3214 Bool bZeroMVILR = pcCU->xCheckZeroMVILRMerge(uhInterDirNeighbours[uiMergeCand], cMvFieldNeighbours[0 + 2*uiMergeCand], cMvFieldNeighbours[1 + 2*uiMergeCand]); 3215 if(bZeroMVILR) 3216 { 3217 3217 #endif 3218 3218 UInt uiCostCand = MAX_UINT; … … 3240 3240 } 3241 3241 #if REF_IDX_ME_ZEROMV 3242 3242 } 3243 3243 #endif 3244 3244 }
Note: See TracChangeset for help on using the changeset viewer.