Changeset 1289 in SHVCSoftware for branches/SHM-dev/source/Lib/TLibCommon
- Timestamp:
- 18 Jul 2015, 00:52:46 (10 years ago)
- Location:
- branches/SHM-dev/source/Lib/TLibCommon
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.cpp
r1260 r1289 425 425 Bool TComDataCU::isLastSubCUOfCtu(const UInt absPartIdx) 426 426 { 427 TComPic* pcPic = getPic(); 428 TComSlice * pcSlice = pcPic->getSlice(pcPic->getCurrSliceIdx()); 427 const TComSPS &sps=*(getSlice()->getSPS()); 429 428 430 429 #if SVC_EXTENSION 430 TComSlice * pcSlice = m_pcPic->getSlice(m_pcPic->getCurrSliceIdx()); 431 431 const UInt picWidth = pcSlice->getPicWidthInLumaSamples(); 432 432 const UInt picHeight = pcSlice->getPicHeightInLumaSamples(); 433 433 #else 434 const UInt picWidth = pcSlice->getSPS()->getPicWidthInLumaSamples();435 const UInt picHeight = pcSlice->getSPS()->getPicHeightInLumaSamples();434 const UInt picWidth = sps.getPicWidthInLumaSamples(); 435 const UInt picHeight = sps.getPicHeightInLumaSamples(); 436 436 #endif 437 const UInt granularityWidth = g_uiMaxCUWidth;437 const UInt granularityWidth = sps.getMaxCUWidth(); 438 438 439 439 const UInt cuPosX = getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[absPartIdx] ]; … … 461 461 { 462 462 463 const UInt maxCUWidth = pcPic->getPicSym()->getSPS().getMaxCUWidth(); 464 const UInt maxCUHeight= pcPic->getPicSym()->getSPS().getMaxCUHeight(); 463 465 m_pcPic = pcPic; 464 466 m_pcSlice = pcPic->getSlice(pcPic->getCurrSliceIdx()); 465 467 m_ctuRsAddr = ctuRsAddr; 466 m_uiCUPelX = ( ctuRsAddr % pcPic->getFrameWidthInCtus() ) * g_uiMaxCUWidth;467 m_uiCUPelY = ( ctuRsAddr / pcPic->getFrameWidthInCtus() ) * g_uiMaxCUHeight;468 m_uiCUPelX = ( ctuRsAddr % pcPic->getFrameWidthInCtus() ) * maxCUWidth; 469 m_uiCUPelY = ( ctuRsAddr / pcPic->getFrameWidthInCtus() ) * maxCUHeight; 468 470 m_absZIdxInCtu = 0; 469 471 m_dTotalCost = MAX_DOUBLE; … … 484 486 memset( m_puhDepth , 0, m_uiNumPartition * sizeof( *m_puhDepth ) ); 485 487 memset( m_puhTrIdx , 0, m_uiNumPartition * sizeof( *m_puhTrIdx ) ); 486 memset( m_puhWidth , g_uiMaxCUWidth,m_uiNumPartition * sizeof( *m_puhWidth ) );487 memset( m_puhHeight , g_uiMaxCUHeight,m_uiNumPartition * sizeof( *m_puhHeight ) );488 memset( m_puhWidth , maxCUWidth, m_uiNumPartition * sizeof( *m_puhWidth ) ); 489 memset( m_puhHeight , maxCUHeight, m_uiNumPartition * sizeof( *m_puhHeight ) ); 488 490 for(UInt i=0; i<NUM_REF_PIC_LIST_01; i++) 489 491 { … … 510 512 memset( m_pbIPCMFlag , false, m_uiNumPartition * sizeof( *m_pbIPCMFlag ) ); 511 513 512 const UInt numCoeffY = g_uiMaxCUWidth*g_uiMaxCUHeight;514 const UInt numCoeffY = maxCUWidth*maxCUHeight; 513 515 for (UInt comp=0; comp<MAX_NUM_COMPONENT; comp++) 514 516 { … … 585 587 m_uiTotalBins = 0; 586 588 587 UChar uhWidth = g_uiMaxCUWidth>> uiDepth;588 UChar uhHeight = g_uiMaxCUHeight>> uiDepth;589 const UChar uhWidth = getSlice()->getSPS()->getMaxCUWidth() >> uiDepth; 590 const UChar uhHeight = getSlice()->getSPS()->getMaxCUHeight() >> uiDepth; 589 591 590 592 for (UInt ui = 0; ui < m_uiNumPartition; ui++) … … 656 658 657 659 m_pcPic = pcCU->getPic(); 658 m_pcSlice = m_pcPic->getSlice(m_pcPic->getCurrSliceIdx());660 m_pcSlice = pcCU->getSlice(); 659 661 m_ctuRsAddr = pcCU->getCtuRsAddr(); 660 662 m_absZIdxInCtu = pcCU->getZorderIdxInCtu() + uiPartOffset; 661 663 662 m_uiCUPelX = pcCU->getCUPelX() + ( g_uiMaxCUWidth>>uiDepth )*( uiPartUnitIdx & 1 ); 663 m_uiCUPelY = pcCU->getCUPelY() + ( g_uiMaxCUHeight>>uiDepth )*( uiPartUnitIdx >> 1 ); 664 const UChar uhWidth = getSlice()->getSPS()->getMaxCUWidth() >> uiDepth; 665 const UChar uhHeight = getSlice()->getSPS()->getMaxCUHeight() >> uiDepth; 666 667 m_uiCUPelX = pcCU->getCUPelX() + ( uhWidth )*( uiPartUnitIdx & 1 ); 668 m_uiCUPelY = pcCU->getCUPelY() + ( uhHeight)*( uiPartUnitIdx >> 1 ); 664 669 665 670 m_dTotalCost = MAX_DOUBLE; … … 693 698 694 699 memset( m_puhDepth, uiDepth, iSizeInUchar ); 695 696 UChar uhWidth = g_uiMaxCUWidth >> uiDepth;697 UChar uhHeight = g_uiMaxCUHeight >> uiDepth;698 700 memset( m_puhWidth, uhWidth, iSizeInUchar ); 699 701 memset( m_puhHeight, uhHeight, iSizeInUchar ); … … 744 746 Void TComDataCU::setOutsideCUPart( UInt uiAbsPartIdx, UInt uiDepth ) 745 747 { 746 UIntuiNumPartition = m_uiNumPartition >> (uiDepth << 1);747 UInt uiSizeInUchar= sizeof( UChar ) * uiNumPartition;748 749 UChar uhWidth = g_uiMaxCUWidth>> uiDepth;750 UChar uhHeight = g_uiMaxCUHeight>> uiDepth;748 const UInt uiNumPartition = m_uiNumPartition >> (uiDepth << 1); 749 const UInt uiSizeInUchar = sizeof( UChar ) * uiNumPartition; 750 const TComSPS &sps = *(getSlice()->getSPS()); 751 const UChar uhWidth = sps.getMaxCUWidth() >> uiDepth; 752 const UChar uhHeight = sps.getMaxCUHeight() >> uiDepth; 751 753 memset( m_puhDepth + uiAbsPartIdx, uiDepth, uiSizeInUchar ); 752 754 memset( m_puhWidth + uiAbsPartIdx, uhWidth, uiSizeInUchar ); … … 952 954 } 953 955 954 const UInt numCoeffY = g_uiMaxCUWidth*g_uiMaxCUHeight>> (uiDepth<<1);956 const UInt numCoeffY = (pcCU->getSlice()->getSPS()->getMaxCUWidth()*pcCU->getSlice()->getSPS()->getMaxCUHeight()) >> (uiDepth<<1); 955 957 const UInt offsetY = uiPartUnitIdx*numCoeffY; 956 958 for (UInt ch=0; ch<numValidComp; ch++) … … 1030 1032 memcpy( pCtu->getIPCMFlag() + m_absZIdxInCtu, m_pbIPCMFlag, iSizeInBool ); 1031 1033 1032 const UInt numCoeffY = ( g_uiMaxCUWidth*g_uiMaxCUHeight)>>(uhDepth<<1);1034 const UInt numCoeffY = (pCtu->getSlice()->getSPS()->getMaxCUWidth()*pCtu->getSlice()->getSPS()->getMaxCUHeight())>>(uhDepth<<1); 1033 1035 const UInt offsetY = m_absZIdxInCtu*m_pcPic->getMinCUWidth()*m_pcPic->getMinCUHeight(); 1034 1036 for (UInt comp=0; comp<numValidComp; comp++) … … 2954 2956 Void TComDataCU::clipMv (TComMv& rcMv) 2955 2957 { 2958 const TComSPS &sps=*(m_pcSlice->getSPS()); 2956 2959 Int iMvShift = 2; 2957 2960 Int iOffset = 8; 2958 2961 #if SVC_EXTENSION 2959 Int iHorMax = ( m_pcSlice->getPicWidthInLumaSamples() + iOffset - m_uiCUPelX - 1 ) << iMvShift;2962 Int iHorMax = ( m_pcSlice->getPicWidthInLumaSamples() + iOffset - (Int)m_uiCUPelX - 1 ) << iMvShift; 2960 2963 #else 2961 Int iHorMax = ( m_pcSlice->getSPS()->getPicWidthInLumaSamples() + iOffset -m_uiCUPelX - 1 ) << iMvShift;2964 Int iHorMax = ( sps.getPicWidthInLumaSamples() + iOffset - (Int)m_uiCUPelX - 1 ) << iMvShift; 2962 2965 #endif 2963 Int iHorMin = ( -(Int)g_uiMaxCUWidth- iOffset - (Int)m_uiCUPelX + 1 ) << iMvShift;2966 Int iHorMin = ( -(Int)sps.getMaxCUWidth() - iOffset - (Int)m_uiCUPelX + 1 ) << iMvShift; 2964 2967 2965 2968 #if SVC_EXTENSION 2966 Int iVerMax = ( m_pcSlice->getPicHeightInLumaSamples() + iOffset - m_uiCUPelY - 1 ) << iMvShift;2969 Int iVerMax = ( m_pcSlice->getPicHeightInLumaSamples() + iOffset - (Int)m_uiCUPelY - 1 ) << iMvShift; 2967 2970 #else 2968 Int iVerMax = ( m_pcSlice->getSPS()->getPicHeightInLumaSamples() + iOffset -m_uiCUPelY - 1 ) << iMvShift;2971 Int iVerMax = ( sps.getPicHeightInLumaSamples() + iOffset - (Int)m_uiCUPelY - 1 ) << iMvShift; 2969 2972 #endif 2970 Int iVerMin = ( -(Int)g_uiMaxCUHeight- iOffset - (Int)m_uiCUPelY + 1 ) << iMvShift;2973 Int iVerMin = ( -(Int)sps.getMaxCUHeight() - iOffset - (Int)m_uiCUPelY + 1 ) << iMvShift; 2971 2974 2972 2975 rcMv.setHor( min (iHorMax, max (iHorMin, rcMv.getHor())) ); … … 3483 3486 } 3484 3487 3485 #if LAYER_CTB 3486 UInt baseMaxCUHeight = baseColPic->getPicSym()->getMaxCUHeight(); 3487 UInt baseMaxCUWidth = baseColPic->getPicSym()->getMaxCUWidth(); 3488 UInt baseMaxCUHeight = baseColPic->getSlice(0)->getSPS()->getMaxCUHeight(); 3489 UInt baseMaxCUWidth = baseColPic->getSlice(0)->getSPS()->getMaxCUWidth(); 3488 3490 UInt baseMinUnitSize = baseColPic->getMinCUWidth(); 3489 3491 3490 3492 uiCUAddrBase = ( iBY / baseMaxCUHeight ) * baseColPic->getFrameWidthInCtus() + ( iBX / baseMaxCUWidth ); 3491 #else3492 uiCUAddrBase = (iBY/g_uiMaxCUHeight)*baseColPic->getFrameWidthInCtus() + (iBX/g_uiMaxCUWidth);3493 #endif3494 3493 3495 3494 assert(uiCUAddrBase < baseColPic->getNumberOfCtusInFrame()); 3496 3495 3496 UInt uiRasterAddrBase = ( iBY - (iBY/baseMaxCUHeight)*baseMaxCUHeight ) / baseMinUnitSize * baseColPic->getNumPartInCtuWidth() + ( iBX - (iBX/baseMaxCUWidth)*baseMaxCUWidth ) / baseMinUnitSize; 3497 3497 3498 #if LAYER_CTB 3498 UInt uiRasterAddrBase = ( iBY - (iBY/baseMaxCUHeight)*baseMaxCUHeight ) / baseMinUnitSize * baseColPic->getNumPartInCtuWidth() + ( iBX - (iBX/baseMaxCUWidth)*baseMaxCUWidth ) / baseMinUnitSize;3499 3500 3499 uiAbsPartIdxBase = g_auiLayerRasterToZscan[baseColPic->getLayerId()][uiRasterAddrBase]; 3501 3500 #else 3502 UInt uiRasterAddrBase = (iBY - (iBY/g_uiMaxCUHeight)*g_uiMaxCUHeight)/uiMinUnitSize*baseColPic->getNumPartInCtuWidth() + (iBX - (iBX/g_uiMaxCUWidth)*g_uiMaxCUWidth)/uiMinUnitSize;3503 3504 3501 uiAbsPartIdxBase = g_auiRasterToZscan[uiRasterAddrBase]; 3505 3502 #endif -
branches/SHM-dev/source/Lib/TLibCommon/TComLoopFilter.cpp
r1287 r1289 177 177 UInt uiCurNumParts = pcPic->getNumPartitionsInCtu() >> (uiDepth<<1); 178 178 UInt uiQNumParts = uiCurNumParts>>2; 179 const TComSPS &sps = *(pcCU->getSlice()->getSPS()); 179 180 180 181 if( pcCU->getDepth(uiAbsZorderIdx) > uiDepth ) … … 187 188 if( ( uiLPelX < pcCU->getSlice()->getPicWidthInLumaSamples() ) && ( uiTPelY < pcCU->getSlice()->getPicHeightInLumaSamples() ) ) 188 189 #else 189 if( ( uiLPelX < pcCU->getSlice()->getSPS()->getPicWidthInLumaSamples() ) && ( uiTPelY < pcCU->getSlice()->getSPS()->getPicHeightInLumaSamples() ) )190 if( ( uiLPelX < sps.getPicWidthInLumaSamples() ) && ( uiTPelY < sps.getPicHeightInLumaSamples() ) ) 190 191 #endif 191 192 { … … 201 202 xSetEdgefilterPU ( pcCU, uiAbsZorderIdx ); 202 203 204 const UInt uiPelsInPart = sps.getMaxCUWidth() >> g_uiMaxCUDepth; 205 203 206 for( UInt uiPartIdx = uiAbsZorderIdx; uiPartIdx < uiAbsZorderIdx + uiCurNumParts; uiPartIdx++ ) 204 207 { 205 208 UInt uiBSCheck; 206 if( (g_uiMaxCUWidth >> g_uiMaxCUDepth)== 4 )209 if( uiPelsInPart == 4 ) 207 210 { 208 211 uiBSCheck = (edgeDir == EDGE_VER && uiPartIdx%2 == 0) || (edgeDir == EDGE_HOR && (uiPartIdx-((uiPartIdx>>2)<<2))/2 == 0); … … 219 222 } 220 223 221 UInt uiPelsInPart = g_uiMaxCUWidth >> g_uiMaxCUDepth;222 224 UInt PartIdxIncr = DEBLOCK_SMALLEST_BLOCK / uiPelsInPart ? DEBLOCK_SMALLEST_BLOCK / uiPelsInPart : 1 ; 223 225 … … 290 292 291 293 const TComRectangle &rect = rTu.getRect(COMPONENT_Y); 292 293 const UInt uiWidthInBaseUnits = rect.width / (g_uiMaxCUWidth >> g_uiMaxCUDepth); 294 const UInt uiHeightInBaseUnits = rect.height / (g_uiMaxCUWidth >> g_uiMaxCUDepth); 294 const TComSPS &sps=*(pcCU->getSlice()->getSPS()); 295 296 const UInt uiWidthInBaseUnits = rect.width / (sps.getMaxCUWidth() >> g_uiMaxCUDepth); 297 const UInt uiHeightInBaseUnits = rect.height / (sps.getMaxCUHeight() >> g_uiMaxCUDepth); 295 298 296 299 xSetEdgefilterMultiple( pcCU, rTu.GetAbsPartIdxCU(), uiTransDepthTotal, EDGE_VER, 0, m_stLFCUParam.bInternalEdge, uiWidthInBaseUnits, uiHeightInBaseUnits, &rect ); … … 559 562 560 563 561 Void TComLoopFilter::xEdgeFilterLuma( TComDataCU* pcCU, UInt uiAbsZorderIdx, UInt uiDepth, DeblockEdgeDir edgeDir, Int iEdge ) 562 { 563 TComPicYuv* pcPicYuvRec = pcCU->getPic()->getPicYuvRec(); 564 Pel* piSrc = pcPicYuvRec->getAddr(COMPONENT_Y, pcCU->getCtuRsAddr(), uiAbsZorderIdx ); 565 Pel* piTmpSrc = piSrc; 564 Void TComLoopFilter::xEdgeFilterLuma( TComDataCU* const pcCU, const UInt uiAbsZorderIdx, const UInt uiDepth, const DeblockEdgeDir edgeDir, const Int iEdge ) 565 { 566 TComPicYuv *pcPicYuvRec = pcCU->getPic()->getPicYuvRec(); 567 Pel *piSrc = pcPicYuvRec->getAddr(COMPONENT_Y, pcCU->getCtuRsAddr(), uiAbsZorderIdx ); 568 Pel *piTmpSrc = piSrc; 569 const TComSPS &sps = *(pcCU->getSlice()->getSPS()); 570 const Bool ppsTransquantBypassEnableFlag = pcCU->getSlice()->getPPS()->getTransquantBypassEnableFlag(); 571 566 572 #if SVC_EXTENSION 567 const Int bitDepthLuma = pcCU->getSlice()->getBitDepth(CHANNEL_TYPE_LUMA);573 const Int bitDepthLuma = pcCU->getSlice()->getBitDepth(CHANNEL_TYPE_LUMA); 568 574 #else 569 const Int bitDepthLuma = pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA);575 const Int bitDepthLuma = sps.getBitDepth(CHANNEL_TYPE_LUMA); 570 576 #endif 571 577 572 const Bool lfCrossSliceBoundaryFlag=pcCU->getSlice()->getLFCrossSliceBoundaryFlag();578 const Bool lfCrossSliceBoundaryFlag = pcCU->getSlice()->getLFCrossSliceBoundaryFlag(); 573 579 574 580 Int iStride = pcPicYuvRec->getStride(COMPONENT_Y); … … 578 584 UInt uiNumParts = pcCU->getPic()->getNumPartInCtuWidth()>>uiDepth; 579 585 580 UInt uiPelsInPart = g_uiMaxCUWidth>> g_uiMaxCUDepth;586 UInt uiPelsInPart = sps.getMaxCUWidth() >> g_uiMaxCUDepth; 581 587 UInt uiBsAbsIdx = 0, uiBs = 0; 582 588 Int iOffset, iSrcStep; 583 589 584 Bool bPCMFilter = ( pcCU->getSlice()->getSPS()->getUsePCM() && pcCU->getSlice()->getSPS()->getPCMFilterDisableFlag())? true : false;590 Bool bPCMFilter = (sps.getUsePCM() && sps.getPCMFilterDisableFlag())? true : false; 585 591 Bool bPartPNoFilter = false; 586 592 Bool bPartQNoFilter = false; … … 622 628 else // (iDir == EDGE_HOR) 623 629 { 624 pcCUP = pcCUQ->getPUAbove(uiPartPIdx, uiPartQIdx,! pcCU->getSlice()->getLFCrossSliceBoundaryFlag(), false, !m_bLFCrossTileBoundary);630 pcCUP = pcCUQ->getPUAbove(uiPartPIdx, uiPartQIdx,!lfCrossSliceBoundaryFlag, false, !m_bLFCrossTileBoundary); 625 631 } 626 632 … … 651 657 Int d = d0 + d3; 652 658 653 if (bPCMFilter || p cCU->getSlice()->getPPS()->getTransquantBypassEnableFlag())659 if (bPCMFilter || ppsTransquantBypassEnableFlag) 654 660 { 655 661 // Check if each of PUs is I_PCM with LF disabling … … 681 687 682 688 683 Void TComLoopFilter::xEdgeFilterChroma( TComDataCU* pcCU, UInt uiAbsZorderIdx, UInt uiDepth, DeblockEdgeDir edgeDir, Int iEdge ) 684 { 685 TComPicYuv* pcPicYuvRec = pcCU->getPic()->getPicYuvRec(); 686 Int iStride = pcPicYuvRec->getStride(COMPONENT_Cb); 687 Pel* piSrcCb = pcPicYuvRec->getAddr( COMPONENT_Cb, pcCU->getCtuRsAddr(), uiAbsZorderIdx ); 688 Pel* piSrcCr = pcPicYuvRec->getAddr( COMPONENT_Cr, pcCU->getCtuRsAddr(), uiAbsZorderIdx ); 689 Void TComLoopFilter::xEdgeFilterChroma( TComDataCU* const pcCU, const UInt uiAbsZorderIdx, const UInt uiDepth, const DeblockEdgeDir edgeDir, const Int iEdge ) 690 { 691 TComPicYuv *pcPicYuvRec = pcCU->getPic()->getPicYuvRec(); 692 Int iStride = pcPicYuvRec->getStride(COMPONENT_Cb); 693 Pel *piSrcCb = pcPicYuvRec->getAddr( COMPONENT_Cb, pcCU->getCtuRsAddr(), uiAbsZorderIdx ); 694 Pel *piSrcCr = pcPicYuvRec->getAddr( COMPONENT_Cr, pcCU->getCtuRsAddr(), uiAbsZorderIdx ); 695 696 const TComSPS &sps = *(pcCU->getSlice()->getSPS()); 689 697 #if SVC_EXTENSION 690 const Int bitDepthChroma = pcCU->getSlice()->getBitDepth(CHANNEL_TYPE_CHROMA);691 #else 692 const Int bitDepthChroma = pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_CHROMA);698 const Int bitDepthChroma = pcCU->getSlice()->getBitDepth(CHANNEL_TYPE_CHROMA); 699 #else 700 const Int bitDepthChroma = sps.getBitDepth(CHANNEL_TYPE_CHROMA); 693 701 #endif 702 703 const UInt uiPelsInPartChromaH = sps.getMaxCUWidth() >> (g_uiMaxCUDepth+pcPicYuvRec->getComponentScaleX(COMPONENT_Cb)); 704 const UInt uiPelsInPartChromaV = sps.getMaxCUHeight() >> (g_uiMaxCUDepth+pcPicYuvRec->getComponentScaleY(COMPONENT_Cb)); 705 694 706 Int iQP = 0; 695 707 Int iQP_P = 0; 696 708 Int iQP_Q = 0; 697 698 UInt uiPelsInPartChromaH = g_uiMaxCUWidth >> (g_uiMaxCUDepth+pcPicYuvRec->getComponentScaleX(COMPONENT_Cb));699 UInt uiPelsInPartChromaV = g_uiMaxCUWidth >> (g_uiMaxCUDepth+pcPicYuvRec->getComponentScaleY(COMPONENT_Cb));700 709 701 710 Int iOffset, iSrcStep; … … 777 786 else // (edgeDir == EDGE_HOR) 778 787 { 779 pcCUP = pcCUQ->getPUAbove(uiPartPIdx, uiPartQIdx,! pcCU->getSlice()->getLFCrossSliceBoundaryFlag(), false, !m_bLFCrossTileBoundary);788 pcCUP = pcCUQ->getPUAbove(uiPartPIdx, uiPartQIdx,!lfCrossSliceBoundaryFlag, false, !m_bLFCrossTileBoundary); 780 789 } 781 790 -
branches/SHM-dev/source/Lib/TLibCommon/TComLoopFilter.h
r1287 r1289 105 105 ); 106 106 107 Void xEdgeFilterLuma ( TComDataCU* pcCU, UInt uiAbsZorderIdx, UInt uiDepth, DeblockEdgeDir edgeDir,Int iEdge );108 Void xEdgeFilterChroma ( TComDataCU* pcCU, UInt uiAbsZorderIdx, UInt uiDepth, DeblockEdgeDir edgeDir,Int iEdge );107 Void xEdgeFilterLuma ( TComDataCU* const pcCU, const UInt uiAbsZorderIdx, const UInt uiDepth, const DeblockEdgeDir edgeDir, const Int iEdge ); 108 Void xEdgeFilterChroma ( TComDataCU* const pcCU, const UInt uiAbsZorderIdx, const UInt uiDepth, const DeblockEdgeDir edgeDir, const Int iEdge ); 109 109 110 110 __inline Void xPelFilterLuma( Pel* piSrc, Int iOffset, Int tc, Bool sw, Bool bPartPNoFilter, Bool bPartQNoFilter, Int iThrCut, Bool bFilterSecondP, Bool bFilterSecondQ, const Int bitDepthLuma); -
branches/SHM-dev/source/Lib/TLibCommon/TComPattern.cpp
r1287 r1289 110 110 111 111 TComDataCU *pcCU=rTu.getCU(); 112 const TComSPS &sps = *(pcCU->getSlice()->getSPS()); 112 113 const UInt uiZorderIdxInPart=rTu.GetAbsPartIdxTU(); 113 114 const UInt uiTuWidth = rTu.getRect(compID).width; … … 116 117 const UInt uiTuHeight2 = uiTuHeight << 1; 117 118 118 const Int iBaseUnitSize = g_uiMaxCUWidth>> g_uiMaxCUDepth;119 const Int iBaseUnitSize = sps.getMaxCUWidth() >> g_uiMaxCUDepth; 119 120 const Int iUnitWidth = iBaseUnitSize >> pcCU->getPic()->getPicYuvRec()->getComponentScaleX(compID); 120 121 const Int iUnitHeight = iBaseUnitSize >> pcCU->getPic()->getPicYuvRec()->getComponentScaleY(compID); … … 126 127 const Int bitDepthForChannel = pcCU->getSlice()->getBitDepth(chType); 127 128 #else 128 const Int bitDepthForChannel = pcCU->getSlice()->getSPS()->getBitDepth(chType);129 const Int bitDepthForChannel = sps.getBitDepth(chType); 129 130 #endif 130 131 … … 164 165 Pel *piRoiOrigin = pcCU->getPic()->getPicYuvRec()->getAddr(compID, pcCU->getCtuRsAddr(), pcCU->getZorderIdxInCtu()+uiZorderIdxInPart); 165 166 #if O0043_BEST_EFFORT_DECODING 166 const Int bitDepthForChannelInStream = pcCU->getSlice()->getSPS()->getStreamBitDepth(chType);167 const Int bitDepthForChannelInStream = sps.getStreamBitDepth(chType); 167 168 fillReferenceSamples (bitDepthForChannelInStream, bitDepthForChannelInStream - bitDepthForChannel, pcCU, piRoiOrigin, piAdiTemp, bNeighborFlags, iNumIntraNeighbor, iUnitWidth, iUnitHeight, iAboveUnits, iLeftUnits, 168 169 #else … … 202 203 //------------------------------------------------ 203 204 204 Bool useStrongIntraSmoothing = isLuma(chType) && pcCU->getSlice()->getSPS()->getUseStrongIntraSmoothing();205 Bool useStrongIntraSmoothing = isLuma(chType) && sps.getUseStrongIntraSmoothing(); 205 206 206 207 const Pel bottomLeft = piAdiTemp[stride * uiTuHeight2]; -
branches/SHM-dev/source/Lib/TLibCommon/TComPic.cpp
r1259 r1289 75 75 } 76 76 #if SVC_EXTENSION 77 Void TComPic::create( const TComVPS &vps, const TComSPS &sps, const TComPPS &pps, const UInt uiMax Width, const UInt uiMaxHeight, const UInt uiMaxDepth, const Bool bIsVirtual, const UInt layerId )77 Void TComPic::create( const TComVPS &vps, const TComSPS &sps, const TComPPS &pps, const UInt uiMaxDepth, const Bool bIsVirtual, const UInt layerId ) 78 78 { 79 79 const ChromaFormat chromaFormatIDC = vps.getChromaFormatIdc(&sps, layerId); 80 80 const Int iWidth = vps.getPicWidthInLumaSamples(&sps, layerId); 81 81 const Int iHeight = vps.getPicHeightInLumaSamples(&sps, layerId); 82 const UInt uiMaxCuWidth = sps.getMaxCUWidth(); 83 const UInt uiMaxCuHeight = sps.getMaxCUHeight(); 82 84 83 85 const Window& conformanceWindow = vps.getConformanceWindow( &sps, layerId ); 84 86 85 m_picSym.create( vps, sps, pps, uiMax Width, uiMaxHeight, uiMaxDepth, layerId );87 m_picSym.create( vps, sps, pps, uiMaxDepth, layerId ); 86 88 87 89 if (!bIsVirtual) 88 90 { 89 m_apcPicYuv[PIC_YUV_ORG] = new TComPicYuv; m_apcPicYuv[PIC_YUV_ORG]->create( iWidth, iHeight, chromaFormatIDC, uiMax Width, uiMaxHeight, uiMaxDepth, &conformanceWindow );90 m_apcPicYuv[PIC_YUV_TRUE_ORG] = new TComPicYuv; m_apcPicYuv[PIC_YUV_TRUE_ORG]->create( iWidth, iHeight, chromaFormatIDC, uiMax Width, uiMaxHeight, uiMaxDepth, &conformanceWindow );91 } 92 m_apcPicYuv[PIC_YUV_REC] = new TComPicYuv; m_apcPicYuv[PIC_YUV_REC]->create( iWidth, iHeight, chromaFormatIDC, uiMax Width, uiMaxHeight, uiMaxDepth, &conformanceWindow );91 m_apcPicYuv[PIC_YUV_ORG] = new TComPicYuv; m_apcPicYuv[PIC_YUV_ORG]->create( iWidth, iHeight, chromaFormatIDC, uiMaxCuWidth, uiMaxCuHeight, uiMaxDepth, true, &conformanceWindow ); 92 m_apcPicYuv[PIC_YUV_TRUE_ORG] = new TComPicYuv; m_apcPicYuv[PIC_YUV_TRUE_ORG]->create( iWidth, iHeight, chromaFormatIDC, uiMaxCuWidth, uiMaxCuHeight, uiMaxDepth, true, &conformanceWindow ); 93 } 94 m_apcPicYuv[PIC_YUV_REC] = new TComPicYuv; m_apcPicYuv[PIC_YUV_REC]->create( iWidth, iHeight, chromaFormatIDC, uiMaxCuWidth, uiMaxCuHeight, uiMaxDepth, true, &conformanceWindow ); 93 95 94 96 for( Int i = 0; i < MAX_LAYERS; i++ ) … … 96 98 if( m_bSpatialEnhLayer[i] ) 97 99 { 98 m_pcFullPelBaseRec[i] = new TComPicYuv; m_pcFullPelBaseRec[i]->create( iWidth, iHeight, chromaFormatIDC, uiMax Width, uiMaxHeight, uiMaxDepth, &conformanceWindow );100 m_pcFullPelBaseRec[i] = new TComPicYuv; m_pcFullPelBaseRec[i]->create( iWidth, iHeight, chromaFormatIDC, uiMaxCuWidth, uiMaxCuHeight, uiMaxDepth, true, &conformanceWindow ); 99 101 } 100 102 } … … 108 110 } 109 111 #else 110 Void TComPic::create( const TComSPS &sps, const TComPPS &pps, const UInt uiMax Width, const UInt uiMaxHeight, const UInt uiMaxDepth, const Bool bIsVirtual)112 Void TComPic::create( const TComSPS &sps, const TComPPS &pps, const UInt uiMaxDepth, const Bool bIsVirtual) 111 113 { 112 114 const ChromaFormat chromaFormatIDC=sps.getChromaFormatIdc(); 113 const Int iWidth = sps.getPicWidthInLumaSamples(); 114 const Int iHeight = sps.getPicHeightInLumaSamples(); 115 116 m_picSym.create( sps, pps, uiMaxWidth, uiMaxHeight, uiMaxDepth ); 115 const Int iWidth = sps.getPicWidthInLumaSamples(); 116 const Int iHeight = sps.getPicHeightInLumaSamples(); 117 const UInt uiMaxCuWidth = sps.getMaxCUWidth(); 118 const UInt uiMaxCuHeight = sps.getMaxCUHeight(); 119 120 m_picSym.create( sps, pps, uiMaxDepth ); 117 121 if (!bIsVirtual) 118 122 { 119 m_apcPicYuv[PIC_YUV_ORG ] = new TComPicYuv; m_apcPicYuv[PIC_YUV_ORG ]->create( iWidth, iHeight, chromaFormatIDC, uiMax Width, uiMaxHeight, uiMaxDepth);120 m_apcPicYuv[PIC_YUV_TRUE_ORG] = new TComPicYuv; m_apcPicYuv[PIC_YUV_TRUE_ORG]->create( iWidth, iHeight, chromaFormatIDC, uiMax Width, uiMaxHeight, uiMaxDepth);121 } 122 m_apcPicYuv[PIC_YUV_REC] = new TComPicYuv; m_apcPicYuv[PIC_YUV_REC]->create( iWidth, iHeight, chromaFormatIDC, uiMax Width, uiMaxHeight, uiMaxDepth);123 m_apcPicYuv[PIC_YUV_ORG ] = new TComPicYuv; m_apcPicYuv[PIC_YUV_ORG ]->create( iWidth, iHeight, chromaFormatIDC, uiMaxCuWidth, uiMaxCuHeight, uiMaxDepth, true ); 124 m_apcPicYuv[PIC_YUV_TRUE_ORG] = new TComPicYuv; m_apcPicYuv[PIC_YUV_TRUE_ORG]->create( iWidth, iHeight, chromaFormatIDC, uiMaxCuWidth, uiMaxCuHeight, uiMaxDepth, true ); 125 } 126 m_apcPicYuv[PIC_YUV_REC] = new TComPicYuv; m_apcPicYuv[PIC_YUV_REC]->create( iWidth, iHeight, chromaFormatIDC, uiMaxCuWidth, uiMaxCuHeight, uiMaxDepth, true ); 123 127 124 128 // there are no SEI messages associated with this picture initially … … 256 260 } 257 261 258 Void TComPic::copyUpsampledMvField(UInt refLayerIdc , TComPic* pcPicBase)262 Void TComPic::copyUpsampledMvField(UInt refLayerIdc) 259 263 { 260 264 UInt numPartitions = 1<<(g_uiMaxCUDepth<<1); 261 UInt widthMinPU = g _uiMaxCUWidth/(1<<g_uiMaxCUDepth);262 UInt heightMinPU = g _uiMaxCUHeight/(1<<g_uiMaxCUDepth);263 Int unitNum = max (1, (Int)((16/widthMinPU)*(16/heightMinPU)) );265 UInt widthMinPU = getSlice(0)->getSPS()->getMaxCUWidth() / (1<<g_uiMaxCUDepth); 266 UInt heightMinPU = getSlice(0)->getSPS()->getMaxCUHeight() / (1<<g_uiMaxCUDepth); 267 Int unitNum = max( 1, (Int)((16/widthMinPU)*(16/heightMinPU)) ); 264 268 265 269 for(UInt cuIdx = 0; cuIdx < getPicSym()->getNumberOfCtusInFrame(); cuIdx++) //each LCU … … 270 274 { 271 275 //pixel position of each unit in up-sampled layer 272 UInt 273 UInt 276 UInt pelX = pcCUDes->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[absPartIdx] ]; 277 UInt pelY = pcCUDes->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[absPartIdx] ]; 274 278 UInt baseCUAddr, baseAbsPartIdx; 275 279 -
branches/SHM-dev/source/Lib/TLibCommon/TComPic.h
r1259 r1289 99 99 100 100 #if SVC_EXTENSION 101 Void create( const TComVPS& vps, const TComSPS &sps, const TComPPS &pps, const UInt uiMax Width, const UInt uiMaxHeight, const UInt uiMaxDepth, const Bool bIsVirtual /*= false*/, const UInt layerId );101 Void create( const TComVPS& vps, const TComSPS &sps, const TComPPS &pps, const UInt uiMaxDepth, const Bool bIsVirtual /*= false*/, const UInt layerId ); 102 102 #else 103 Void create( const TComSPS &sps, const TComPPS &pps, const UInt uiMax Width, const UInt uiMaxHeight, const UInt uiMaxDepth, const Bool bIsVirtual /*= false*/ );103 Void create( const TComSPS &sps, const TComPPS &pps, const UInt uiMaxDepth, const Bool bIsVirtual /*= false*/ ); 104 104 #endif 105 105 … … 121 121 TComDataCU* getCtu( UInt ctuRsAddr ) { return m_picSym.getCtu( ctuRsAddr ); } 122 122 const TComDataCU* getCtu( UInt ctuRsAddr ) const { return m_picSym.getCtu( ctuRsAddr ); } 123 124 123 125 124 TComPicYuv* getPicYuvOrg() { return m_apcPicYuv[PIC_YUV_ORG]; } … … 186 185 187 186 #if SVC_EXTENSION 188 Void setLayerId (UInt layerId) { m_layerId = layerId;}189 UInt getLayerId () { return m_layerId;}190 UInt getLayerIdx() { return getSlice(0)->getVPS()->getLayerIdxInVps(m_layerId); }191 Bool isSpatialEnhLayer(UInt refLayerIdc) { return m_bSpatialEnhLayer[refLayerIdc];}192 Void setSpatialEnhLayerFlag (UInt refLayerIdc, Bool b) { m_bSpatialEnhLayer[refLayerIdc] = b;}193 Void setFullPelBaseRec (UInt refLayerIdc, TComPicYuv* p) { m_pcFullPelBaseRec[refLayerIdc] = p;}194 TComPicYuv* getFullPelBaseRec (UInt refLayerIdc) { return m_pcFullPelBaseRec[refLayerIdc];}195 Bool isILR( UInt currLayerId ) { return ( m_bIsLongTerm && m_layerId < currLayerId );}196 Bool equalPictureSizeAndOffsetFlag(UInt refLayerIdc) { return m_equalPictureSizeAndOffsetFlag[refLayerIdc]; }197 Void setEqualPictureSizeAndOffsetFlag(UInt refLayerIdc, Bool b) { m_equalPictureSizeAndOffsetFlag[refLayerIdc] = b; }198 Void copyUpsampledMvField ( UInt refLayerIdc, TComPic* pcPicBase);199 Void initUpsampledMvField 187 Void setLayerId(UInt layerId) { m_layerId = layerId; } 188 UInt getLayerId() { return m_layerId; } 189 UInt getLayerIdx() { return getSlice(0)->getVPS()->getLayerIdxInVps(m_layerId); } 190 Bool isSpatialEnhLayer(UInt refLayerIdc) { return m_bSpatialEnhLayer[refLayerIdc]; } 191 Void setSpatialEnhLayerFlag (UInt refLayerIdc, Bool b) { m_bSpatialEnhLayer[refLayerIdc] = b; } 192 Void setFullPelBaseRec (UInt refLayerIdc, TComPicYuv* p) { m_pcFullPelBaseRec[refLayerIdc] = p; } 193 TComPicYuv* getFullPelBaseRec (UInt refLayerIdc) { return m_pcFullPelBaseRec[refLayerIdc]; } 194 Bool isILR( UInt currLayerId ) { return ( m_bIsLongTerm && m_layerId < currLayerId ); } 195 Bool equalPictureSizeAndOffsetFlag(UInt refLayerIdc) { return m_equalPictureSizeAndOffsetFlag[refLayerIdc]; } 196 Void setEqualPictureSizeAndOffsetFlag(UInt refLayerIdc, Bool b) { m_equalPictureSizeAndOffsetFlag[refLayerIdc] = b; } 197 Void copyUpsampledMvField(UInt refLayerIdc); 198 Void initUpsampledMvField(); 200 199 Bool checkSameRefInfo(); 201 200 Void copyUpsampledPictureYuv(TComPicYuv* pcPicYuvIn, TComPicYuv* pcPicYuvOut); 202 201 #if CGS_3D_ASYMLUT 203 Void setFrameBit( Int n ) { m_nFrameBit = n;}204 Int getFrameBit() { return m_nFrameBit;}205 #endif 206 Bool isCurrAu() { return m_currAuFlag; }207 Void setCurrAuFlag(Bool x) {m_currAuFlag = x;}202 Void setFrameBit( Int n ) { m_nFrameBit = n; } 203 Int getFrameBit() { return m_nFrameBit; } 204 #endif 205 Bool isCurrAu() { return m_currAuFlag; } 206 Void setCurrAuFlag(Bool x) { m_currAuFlag = x; } 208 207 #endif //SVC_EXTENSION 209 208 };// END CLASS DEFINITION TComPic -
branches/SHM-dev/source/Lib/TLibCommon/TComPicSym.cpp
r1259 r1289 50 50 :m_frameWidthInCtus(0) 51 51 ,m_frameHeightInCtus(0) 52 ,m_uiMaxCUWidth(0)53 ,m_uiMaxCUHeight(0)54 52 ,m_uiMinCUWidth(0) 55 53 ,m_uiMinCUHeight(0) … … 77 75 78 76 #if SVC_EXTENSION 79 Void TComPicSym::create ( const TComVPS& vps, const TComSPS &sps, const TComPPS &pps, UInt uiMax Width, UInt uiMaxHeight, UInt uiMaxDepth, const UInt layerId )77 Void TComPicSym::create ( const TComVPS& vps, const TComSPS &sps, const TComPPS &pps, UInt uiMaxDepth, const UInt layerId ) 80 78 { 81 79 UInt i; … … 88 86 const Int iPicHeight = vps.getPicHeightInLumaSamples(&sps, layerId); 89 87 #else 90 Void TComPicSym::create ( const TComSPS &sps, const TComPPS &pps, UInt uiMax Width, UInt uiMaxHeight, UInt uiMaxDepth )88 Void TComPicSym::create ( const TComSPS &sps, const TComPPS &pps, UInt uiMaxDepth ) 91 89 { 92 90 UInt i; … … 94 92 m_pps = pps; 95 93 96 const ChromaFormat chromaFormatIDC=sps.getChromaFormatIdc(); 97 const Int iPicWidth = sps.getPicWidthInLumaSamples(); 98 const Int iPicHeight = sps.getPicHeightInLumaSamples(); 99 #endif 94 const ChromaFormat chromaFormatIDC = sps.getChromaFormatIdc(); 95 const Int iPicWidth = sps.getPicWidthInLumaSamples(); 96 const Int iPicHeight = sps.getPicHeightInLumaSamples(); 97 #endif 98 99 const UInt uiMaxCuWidth = sps.getMaxCUWidth(); 100 const UInt uiMaxCuHeight = sps.getMaxCUHeight(); 100 101 101 102 m_uhTotalDepth = uiMaxDepth; 102 103 m_numPartitionsInCtu = 1<<(m_uhTotalDepth<<1); 103 104 104 m_uiMaxCUWidth = uiMaxWidth; 105 m_uiMaxCUHeight = uiMaxHeight; 106 107 m_uiMinCUWidth = uiMaxWidth >> m_uhTotalDepth; 108 m_uiMinCUHeight = uiMaxHeight >> m_uhTotalDepth; 109 110 m_numPartInCtuWidth = m_uiMaxCUWidth / m_uiMinCUWidth; // equivalent to 1<<m_uhTotalDepth 111 m_numPartInCtuHeight = m_uiMaxCUHeight / m_uiMinCUHeight; // equivalent to 1<<m_uhTotalDepth 112 113 m_frameWidthInCtus = ( iPicWidth %m_uiMaxCUWidth ) ? iPicWidth /m_uiMaxCUWidth + 1 : iPicWidth /m_uiMaxCUWidth; 114 m_frameHeightInCtus = ( iPicHeight%m_uiMaxCUHeight ) ? iPicHeight/m_uiMaxCUHeight + 1 : iPicHeight/m_uiMaxCUHeight; 105 m_uiMinCUWidth = uiMaxCuWidth >> m_uhTotalDepth; 106 m_uiMinCUHeight = uiMaxCuHeight >> m_uhTotalDepth; 107 108 m_numPartInCtuWidth = uiMaxCuWidth / m_uiMinCUWidth; // equivalent to 1<<m_uhTotalDepth 109 m_numPartInCtuHeight = uiMaxCuHeight / m_uiMinCUHeight; // equivalent to 1<<m_uhTotalDepth 110 111 m_frameWidthInCtus = ( iPicWidth %uiMaxCuWidth ) ? iPicWidth /uiMaxCuWidth + 1 : iPicWidth /uiMaxCuWidth; 112 m_frameHeightInCtus = ( iPicHeight%uiMaxCuHeight ) ? iPicHeight/uiMaxCuHeight + 1 : iPicHeight/uiMaxCuHeight; 115 113 116 114 m_numCtusInFrame = m_frameWidthInCtus * m_frameHeightInCtus; … … 123 121 { 124 122 m_pictureCtuArray[i] = new TComDataCU; 125 m_pictureCtuArray[i]->create( chromaFormatIDC, m_numPartitionsInCtu, m_uiMaxCUWidth, m_uiMaxCUHeight, false, m_uiMaxCUWidth >> m_uhTotalDepth123 m_pictureCtuArray[i]->create( chromaFormatIDC, m_numPartitionsInCtu, uiMaxCuWidth, uiMaxCuHeight, false, uiMaxCuWidth >> m_uhTotalDepth 126 124 #if ADAPTIVE_QP_SELECTION 127 125 , true … … 291 289 if (m_pps.getTilesEnabledFlag()) 292 290 { 293 minHeight = 64 / g_uiMaxCUHeight;294 minWidth = 256 / g_uiMaxCUWidth;291 minHeight = 64 / m_sps.getMaxCUHeight(); 292 minWidth = 256 / m_sps.getMaxCUWidth(); 295 293 } 296 294 } -
branches/SHM-dev/source/Lib/TLibCommon/TComPicSym.h
r1259 r1289 87 87 UInt m_frameHeightInCtus; 88 88 89 UInt m_uiMaxCUWidth;90 UInt m_uiMaxCUHeight;91 89 UInt m_uiMinCUWidth; 92 90 UInt m_uiMinCUHeight; … … 99 97 100 98 std::deque<TComSlice*> m_apSlices; 101 102 TComSlice** m_apcTComSlice;103 UInt m_uiNumAllocatedSlice;104 99 TComDataCU** m_pictureCtuArray; ///< array of CU data. 105 100 … … 133 128 public: 134 129 #if SVC_EXTENSION 135 Void create ( const TComVPS &vps, const TComSPS &sps, const TComPPS &pps, UInt uiMax Width, UInt uiMaxHeight, UInt uiMaxDepth, const UInt layerId );130 Void create ( const TComVPS &vps, const TComSPS &sps, const TComPPS &pps, UInt uiMaxDepth, const UInt layerId ); 136 131 #if CGS_3D_ASYMLUT 137 132 TComPPS* getPPSToUpdate() { return &m_pps; } 138 133 #endif 139 134 #else 140 Void create ( const TComSPS &sps, const TComPPS &pps, UInt uiMax Width, UInt uiMaxHeight, UInt uiMaxDepth );135 Void create ( const TComSPS &sps, const TComPPS &pps, UInt uiMaxDepth ); 141 136 #endif 142 137 Void destroy (); -
branches/SHM-dev/source/Lib/TLibCommon/TComPicYuv.cpp
r1287 r1289 76 76 } 77 77 78 Void TComPicYuv::create ( const Int iPicWidth, 79 const Int iPicHeight, 80 const ChromaFormat chromaFormatIDC, 81 const UInt uiMaxCUWidth, ///< used for generating offsets to CUs. Can use iPicWidth if no offsets are required 82 const UInt uiMaxCUHeight, ///< used for generating offsets to CUs. Can use iPicHeight if no offsets are required 83 const UInt uiMaxCUDepth, ///< used for generating offsets to CUs. Can use 0 if no offsets are required 78 84 #if SVC_EXTENSION 79 Void TComPicYuv::create( const Int iPicWidth, const Int iPicHeight, const ChromaFormat chromaFormatIDC, const UInt uiMaxCUWidth, const UInt uiMaxCUHeight, const UInt uiMaxCUDepth, const Window* conformanceWindow ) 85 const Bool bUseMargin, ///< if true, then a margin of uiMaxCUWidth+16 and uiMaxCUHeight+16 is created around the image. 86 const Window* conformanceWindow) 80 87 #else 81 Void TComPicYuv::create( const Int iPicWidth, const Int iPicHeight, const ChromaFormat chromaFormatIDC, 82 const UInt uiMaxCUWidth, const UInt uiMaxCUHeight, const UInt uiMaxCUDepth ) 88 const Bool bUseMargin) ///< if true, then a margin of uiMaxCUWidth+16 and uiMaxCUHeight+16 is created around the image. 83 89 #endif 84 90 { 91 #if SVC_EXTENSION 92 if(conformanceWindow != NULL) 93 { 94 m_conformanceWindow = *conformanceWindow; 95 } 96 #endif 97 85 98 m_iPicWidth = iPicWidth; 86 99 m_iPicHeight = iPicHeight; 87 100 m_chromaFormatIDC = chromaFormatIDC; 88 89 #if SVC_EXTENSION 90 if(conformanceWindow != NULL) 91 { 92 m_conformanceWindow = *conformanceWindow; 93 } 94 #endif 95 96 #if LAYER_CTB 97 m_iMarginX = uiMaxCUWidth + 16; // for 16-byte alignment 98 m_iMarginY = uiMaxCUHeight + 16; // margin for 8-tap filter and infinite padding 99 #else 100 m_iMarginX = g_uiMaxCUWidth + 16; // for 16-byte alignment 101 m_iMarginY = g_uiMaxCUHeight + 16; // margin for 8-tap filter and infinite padding 102 #endif 103 101 m_iMarginX = (bUseMargin?uiMaxCUWidth:0) + 16; // for 16-byte alignment 102 m_iMarginY = (bUseMargin?uiMaxCUHeight:0) + 16; // margin for 8-tap filter and infinite padding 104 103 m_bIsBorderExtended = false; 105 104 -
branches/SHM-dev/source/Lib/TLibCommon/TComPicYuv.h
r1287 r1289 95 95 // Memory management 96 96 // ------------------------------------------------------------------------------------------------ 97 #if SVC_EXTENSION 98 Void create ( Int iPicWidth, Int iPicHeight, ChromaFormat chromaFormatIDC, UInt uiMaxCUWidth, UInt uiMaxCUHeight, UInt uiMaxCUDepth, const Window* conformanceWindow = NULL); 99 #else 97 100 98 Void create (const Int iPicWidth, 101 99 const Int iPicHeight, 102 100 const ChromaFormat chromaFormatIDC, 103 const UInt uiMaxCUWidth, 104 const UInt uiMaxCUHeight, 105 const UInt uiMaxCUDepth ); 101 const UInt uiMaxCUWidth, ///< used for generating offsets to CUs. Can use iPicWidth if no offsets are required 102 const UInt uiMaxCUHeight, ///< used for generating offsets to CUs. Can use iPicHeight if no offsets are required 103 const UInt uiMaxCUDepth, ///< used for generating offsets to CUs. Can use 0 if no offsets are required 104 #if SVC_EXTENSION 105 const Bool bUseMargin, ///< if true, then a margin of uiMaxCUWidth+16 and uiMaxCUHeight+16 is created around the image. 106 const Window* conformanceWindow = NULL); 107 #else 108 const Bool bUseMargin); ///< if true, then a margin of uiMaxCUWidth+16 and uiMaxCUHeight+16 is created around the image. 106 109 #endif 107 110 -
branches/SHM-dev/source/Lib/TLibCommon/TComRom.cpp
r1287 r1289 249 249 // ==================================================================================================================== 250 250 251 UInt g_uiMaxCUWidth = MAX_CU_SIZE;252 UInt g_uiMaxCUHeight = MAX_CU_SIZE;253 251 UInt g_uiMaxCUDepth = MAX_CU_DEPTH; 254 252 UInt g_uiAddCUDepth = 0; -
branches/SHM-dev/source/Lib/TLibCommon/TComRom.h
r1287 r1289 86 86 87 87 // global variable (CTU width/height, max. CU depth) 88 extern UInt g_uiMaxCUWidth;89 extern UInt g_uiMaxCUHeight;90 88 extern UInt g_uiMaxCUDepth; 91 89 extern UInt g_uiAddCUDepth; -
branches/SHM-dev/source/Lib/TLibCommon/TComSampleAdaptiveOffset.cpp
r1287 r1289 145 145 { 146 146 m_tempPicYuv = new TComPicYuv; 147 m_tempPicYuv->create( m_picWidth, m_picHeight, m_chromaFormatIDC, m_maxCUWidth, m_maxCUHeight, maxCUDepth );147 m_tempPicYuv->create( m_picWidth, m_picHeight, m_chromaFormatIDC, m_maxCUWidth, m_maxCUHeight, maxCUDepth, true ); 148 148 } 149 149 … … 729 729 const Pel *piPcm = pcCU->getPCMSample(compID) + uiOffset; 730 730 const UInt uiStride = pcPicYuvRec->getStride(compID); 731 const UInt uiWidth = ((g_uiMaxCUWidth >> uiDepth) >> csx); 732 const UInt uiHeight = ((g_uiMaxCUWidth >> uiDepth) >> csy); 731 const TComSPS &sps = *(pcCU->getSlice()->getSPS()); 732 const UInt uiWidth = ((sps.getMaxCUWidth() >> uiDepth) >> csx); 733 const UInt uiHeight = ((sps.getMaxCUHeight() >> uiDepth) >> csy); 733 734 734 735 if ( pcCU->isLosslessCoded(uiAbsZorderIdx) && !pcCU->getIPCMFlag(uiAbsZorderIdx) ) … … 741 742 uiPcmLeftShiftBit = pcCU->getSlice()->getBitDepth(toChannelType(compID)) - pcCU->getSlice()->getSPS()->getPCMBitDepth(toChannelType(compID)); 742 743 #else 743 uiPcmLeftShiftBit = pcCU->getSlice()->getSPS()->getBitDepth(toChannelType(compID)) - pcCU->getSlice()->getSPS()->getPCMBitDepth(toChannelType(compID));744 uiPcmLeftShiftBit = sps.getBitDepth(toChannelType(compID)) - sps.getPCMBitDepth(toChannelType(compID)); 744 745 #endif 745 746 } -
branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp
r1287 r1289 3790 3790 } 3791 3791 3792 pcIlpPic[refLayerIdc]->copyUpsampledMvField( refLayerIdc, m_pcBaseColPic[refLayerIdc]);3792 pcIlpPic[refLayerIdc]->copyUpsampledMvField(refLayerIdc); 3793 3793 } 3794 3794 else
Note: See TracChangeset for help on using the changeset viewer.