Changeset 591 in 3DVCSoftware for branches/HTM-DEV-2.0-dev2-LG
- Timestamp:
- 26 Aug 2013, 03:57:29 (11 years ago)
- Location:
- branches/HTM-DEV-2.0-dev2-LG/source/Lib/TLibCommon
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-DEV-2.0-dev2-LG/source/Lib/TLibCommon/TComDataCU.cpp
r575 r591 5668 5668 #endif 5669 5669 5670 #if H_3D_FIX 5670 5671 #if H_3D_IC 5671 5672 Void TComDataCU::setICFlagSubParts( Bool bICFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ) … … 5721 5722 return false; 5722 5723 } 5724 #endif 5723 5725 #if H_3D_DIM_DMM 5724 5726 Void TComDataCU::setDmmWedgeTabIdxSubParts( UInt tabIdx, UInt dmmType, UInt uiAbsPartIdx, UInt uiDepth ) … … 6359 6361 } 6360 6362 #endif 6363 #else 6364 #if H_3D_IC 6365 Void TComDataCU::setICFlagSubParts( Bool bICFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ) 6366 { 6367 memset( m_pbICFlag + uiAbsPartIdx, bICFlag, (m_pcPic->getNumPartInCU() >> ( 2 * uiDepth ))*sizeof(Bool) ); 6368 } 6369 6370 Bool TComDataCU::isICFlagRequired( UInt uiAbsPartIdx ) 6371 { 6372 UInt uiPartAddr; 6373 UInt iNumbPart; 6374 6375 if( !( getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ) ) 6376 { 6377 return false; 6378 } 6379 6380 if( getSlice()->getIcSkipParseFlag() ) 6381 { 6382 if( getMergeFlag( uiAbsPartIdx ) && getMergeIndex( uiAbsPartIdx ) == 0 ) 6383 { 6384 return false; 6385 } 6386 } 6387 6388 if( getMergeFlag( uiAbsPartIdx ) ) 6389 { 6390 return true; 6391 } 6392 6393 6394 Int iWidth, iHeight; 6395 6396 iNumbPart = ( getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ? 1 : ( getPartitionSize( uiAbsPartIdx ) == SIZE_NxN ? 4 : 2 ) ); 6397 6398 for(UInt i = 0; i < iNumbPart; i++) 6399 { 6400 getPartIndexAndSize( i, uiPartAddr, iWidth, iHeight, uiAbsPartIdx, true ); 6401 uiPartAddr += uiAbsPartIdx; 6402 6403 for(UInt uiRefIdx = 0; uiRefIdx < 2; uiRefIdx++) 6404 { 6405 RefPicList eRefList = uiRefIdx ? REF_PIC_LIST_1 : REF_PIC_LIST_0; 6406 Int iBestRefIdx = getCUMvField(eRefList)->getRefIdx(uiPartAddr); 6407 6408 if( ( getInterDir( uiPartAddr ) & ( uiRefIdx+1 ) ) && iBestRefIdx >= 0 && getSlice()->getViewIndex() != getSlice()->getRefPic( eRefList, iBestRefIdx )->getViewIndex() ) 6409 { 6410 return true; 6411 } 6412 } 6413 } 6414 6415 return false; 6416 } 6417 #if H_3D_DIM_DMM 6418 Void TComDataCU::setDmmWedgeTabIdxSubParts( UInt tabIdx, UInt dmmType, UInt uiAbsPartIdx, UInt uiDepth ) 6419 { 6420 UInt uiCurrPartNumb = m_pcPic->getNumPartInCU() >> (uiDepth << 1); 6421 for( UInt ui = 0; ui < uiCurrPartNumb; ui++ ) { m_dmmWedgeTabIdx[dmmType][uiAbsPartIdx+ui] = tabIdx; } 6422 } 6423 Void TComDataCU::setDmm2DeltaEndSubParts( Int iDelta, UInt uiAbsPartIdx, UInt uiDepth ) 6424 { 6425 UInt uiCurrPartNumb = m_pcPic->getNumPartInCU() >> (uiDepth << 1); 6426 for( UInt ui = 0; ui < uiCurrPartNumb; ui++ ) { m_dmm2DeltaEnd[uiAbsPartIdx+ui] = iDelta; } 6427 } 6428 Void TComDataCU::setDmm3IntraTabIdxSubParts( UInt uiTIdx, UInt uiAbsPartIdx, UInt uiDepth ) 6429 { 6430 UInt uiCurrPartNumb = m_pcPic->getNumPartInCU() >> (uiDepth << 1); 6431 for( UInt ui = 0; ui < uiCurrPartNumb; ui++ ) { m_dmm3IntraTabIdx[uiAbsPartIdx+ui] = uiTIdx; } 6432 } 6433 #endif 6434 #if H_3D_DIM_RBC 6435 Void TComDataCU::reconPartition( UInt uiAbsPartIdx, UInt uiDepth, Bool bLeft, UChar ucStartPos, UChar ucNumEdge, UChar* pucEdgeCode, Bool* pbRegion ) 6436 { 6437 Int iWidth; 6438 Int iHeight; 6439 if( uiDepth == 0 ) 6440 { 6441 iWidth = 64; 6442 iHeight = 64; 6443 } 6444 else if( uiDepth == 1 ) 6445 { 6446 iWidth = 32; 6447 iHeight = 32; 6448 } 6449 else if( uiDepth == 2 ) 6450 { 6451 iWidth = 16; 6452 iHeight = 16; 6453 } 6454 else if( uiDepth == 3 ) 6455 { 6456 iWidth = 8; 6457 iHeight = 8; 6458 } 6459 else // uiDepth == 4 6460 { 6461 iWidth = 4; 6462 iHeight = 4; 6463 } 6464 6465 Int iPtr = 0; 6466 Int iX, iY; 6467 Int iDir = -1; 6468 Int iDiffX = 0, iDiffY = 0; 6469 6470 // 1. Edge Code -> Vert & Horz Edges 6471 Bool* pbEdge = (Bool*) xMalloc( Bool, 4 * iWidth * iHeight ); 6472 6473 for( UInt ui = 0; ui < 4 * iWidth * iHeight; ui++ ) 6474 pbEdge [ ui ] = false; 6475 6476 // Direction : left(0), right(1), top(2), bottom(3), left-top(4), right-top(5), left-bottom(6), right-bottom(7) 6477 // Code : 0deg(0), 45deg(1), -45deg(2), 90deg(3), -90deg(4), 135deg(5), -135deg(6) 6478 const UChar tableDir[8][7] = { { 0, 6, 4, 3, 2, 7, 5 }, 6479 { 1, 5, 7, 2, 3, 4, 6 }, 6480 { 2, 4, 5, 0, 1, 6, 7 }, 6481 { 3, 7, 6, 1, 0, 5, 4 }, 6482 { 4, 0, 2, 6, 5, 3, 1 }, 6483 { 5, 2, 1, 4, 7, 0, 3 }, 6484 { 6, 3, 0, 7, 4, 1, 2 }, 6485 { 7, 1, 3, 5, 6, 2, 0 }}; 6486 6487 UChar ucCode = pucEdgeCode[iPtr++]; 6488 6489 if( !bLeft ) 6490 { 6491 iX = ucStartPos; 6492 iY = 0; 6493 6494 switch(ucCode) 6495 { 6496 case 0: // bottom 6497 iDir = 3; 6498 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true; 6499 break; 6500 case 2: // left-bottom 6501 iDir = 6; 6502 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true; 6503 break; 6504 case 1: // right-bottom 6505 iDir = 7; 6506 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true; 6507 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true; 6508 break; 6509 case 4: // left 6510 iDir = 0; 6511 assert(false); 6512 break; 6513 case 3: // right 6514 iDir = 1; 6515 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true; 6516 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true; 6517 break; 6518 } 6519 } 6520 else 6521 { 6522 iX = 0; 6523 iY = ucStartPos; 6524 6525 switch(ucCode) 6526 { 6527 case 0: // right 6528 iDir = 1; 6529 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true; 6530 break; 6531 case 1: // right-top 6532 iDir = 5; 6533 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true; 6534 if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true; 6535 break; 6536 case 2: // right-bottom 6537 iDir = 7; 6538 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true; 6539 break; 6540 case 3: // top 6541 iDir = 2; 6542 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true; 6543 if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true; 6544 break; 6545 case 4: // bottom 6546 iDir = 3; 6547 assert(false); 6548 break; 6549 } 6550 } 6551 6552 switch( iDir ) 6553 { 6554 case 0: // left 6555 iDiffX = -1; 6556 iDiffY = 0; 6557 break; 6558 case 1: // right 6559 iDiffX = +1; 6560 iDiffY = 0; 6561 break; 6562 case 2: // top 6563 iDiffX = 0; 6564 iDiffY = -1; 6565 break; 6566 case 3: // bottom 6567 iDiffX = 0; 6568 iDiffY = +1; 6569 break; 6570 case 4: // left-top 6571 iDiffX = -1; 6572 iDiffY = -1; 6573 break; 6574 case 5: // right-top 6575 iDiffX = +1; 6576 iDiffY = -1; 6577 break; 6578 case 6: // left-bottom 6579 iDiffX = -1; 6580 iDiffY = +1; 6581 break; 6582 case 7: // right-bottom 6583 iDiffX = +1; 6584 iDiffY = +1; 6585 break; 6586 } 6587 6588 iX += iDiffX; 6589 iY += iDiffY; 6590 6591 while( iPtr < ucNumEdge ) 6592 { 6593 ucCode = pucEdgeCode[iPtr++]; 6594 6595 Int iNewDir = tableDir[iDir][ucCode]; 6596 6597 switch( iNewDir ) 6598 { 6599 case 0: // left 6600 iDiffX = -1; 6601 iDiffY = 0; 6602 break; 6603 case 1: // right 6604 iDiffX = +1; 6605 iDiffY = 0; 6606 break; 6607 case 2: // top 6608 iDiffX = 0; 6609 iDiffY = -1; 6610 break; 6611 case 3: // bottom 6612 iDiffX = 0; 6613 iDiffY = +1; 6614 break; 6615 case 4: // left-top 6616 iDiffX = -1; 6617 iDiffY = -1; 6618 break; 6619 case 5: // right-top 6620 iDiffX = +1; 6621 iDiffY = -1; 6622 break; 6623 case 6: // left-bottom 6624 iDiffX = -1; 6625 iDiffY = +1; 6626 break; 6627 case 7: // right-bottom 6628 iDiffX = +1; 6629 iDiffY = +1; 6630 break; 6631 } 6632 6633 switch( iDir ) 6634 { 6635 case 0: // left 6636 switch( ucCode ) 6637 { 6638 case 0: 6639 case 2: 6640 if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true; 6641 break; 6642 case 1: 6643 case 3: 6644 if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true; 6645 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true; 6646 break; 6647 case 4: 6648 case 6: 6649 // no 6650 break; 6651 case 5: 6652 if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true; 6653 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true; 6654 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true; 6655 break; 6656 } 6657 break; 6658 case 1: // right 6659 switch( ucCode ) 6660 { 6661 case 0: 6662 case 2: 6663 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true; 6664 break; 6665 case 1: 6666 case 3: 6667 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true; 6668 if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true; 6669 break; 6670 case 4: 6671 case 6: 6672 // no 6673 break; 6674 case 5: 6675 if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true; 6676 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true; 6677 if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true; 6678 break; 6679 } 6680 break; 6681 case 2: // top 6682 switch( ucCode ) 6683 { 6684 case 0: 6685 case 2: 6686 if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true; 6687 break; 6688 case 1: 6689 case 3: 6690 if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true; 6691 if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true; 6692 break; 6693 case 4: 6694 case 6: 6695 // no 6696 break; 6697 case 5: 6698 if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true; 6699 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true; 6700 if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true; 6701 break; 6702 } 6703 break; 6704 case 3: // bottom 6705 switch( ucCode ) 6706 { 6707 case 0: 6708 case 2: 6709 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true; 6710 break; 6711 case 1: 6712 case 3: 6713 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true; 6714 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true; 6715 break; 6716 case 4: 6717 case 6: 6718 // no 6719 break; 6720 case 5: 6721 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true; 6722 if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true; 6723 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true; 6724 break; 6725 } 6726 break; 6727 case 4: // left-top 6728 switch( ucCode ) 6729 { 6730 case 0: 6731 case 1: 6732 if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true; 6733 if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true; 6734 break; 6735 case 2: 6736 case 4: 6737 if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true; 6738 break; 6739 case 3: 6740 case 5: 6741 if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true; 6742 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true; 6743 if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true; 6744 break; 6745 case 6: 6746 // no 6747 break; 6748 } 6749 break; 6750 case 5: // right-top 6751 switch( ucCode ) 6752 { 6753 case 0: 6754 case 1: 6755 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true; 6756 if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true; 6757 break; 6758 case 2: 6759 case 4: 6760 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true; 6761 break; 6762 case 3: 6763 case 5: 6764 if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true; 6765 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true; 6766 if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true; 6767 break; 6768 case 6: 6769 // no 6770 break; 6771 } 6772 break; 6773 case 6: // left-bottom 6774 switch( ucCode ) 6775 { 6776 case 0: 6777 case 1: 6778 if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true; 6779 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true; 6780 break; 6781 case 2: 6782 case 4: 6783 if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true; 6784 break; 6785 case 3: 6786 case 5: 6787 if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true; 6788 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true; 6789 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true; 6790 break; 6791 case 6: 6792 // no 6793 break; 6794 } 6795 break; 6796 case 7: // right-bottom 6797 switch( ucCode ) 6798 { 6799 case 0: 6800 case 1: 6801 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true; 6802 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true; 6803 break; 6804 case 2: 6805 case 4: 6806 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true; 6807 break; 6808 case 3: 6809 case 5: 6810 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true; 6811 if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true; 6812 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true; 6813 break; 6814 case 6: 6815 // no 6816 break; 6817 } 6818 break; 6819 } 6820 6821 assert( iX >= 0 && iX <= iWidth ); 6822 assert( iY >= 0 && iY <= iHeight ); 6823 6824 iX += iDiffX; 6825 iY += iDiffY; 6826 iDir = iNewDir; 6827 } 6828 6829 // finalize edge chain 6830 if( iX == iWidth-1 ) 6831 { 6832 if( iY == 0 ) 6833 { 6834 if( iDir == 1 ) 6835 { 6836 pbEdge[ 2 * iX + (2 * iY + 1) * 2 * iWidth ] = true; 6837 } 6838 else if( iDir == 5 ) 6839 { 6840 pbEdge[ 2 * iX + (2 * iY + 1) * 2 * iWidth ] = true; 6841 } 6842 else 6843 { 6844 assert(false); 6845 } 6846 } 6847 else if( iY == iHeight-1 ) 6848 { 6849 if( iDir == 3 ) 6850 { 6851 pbEdge[ 2 * iX - 1 + 2 * iY * 2 * iWidth ] = true; 6852 } 6853 else if( iDir == 7 ) 6854 { 6855 pbEdge[ 2 * iX - 1 + 2 * iY * 2 * iWidth ] = true; 6856 } 6857 else 6858 { 6859 assert(false); 6860 } 6861 } 6862 else 6863 { 6864 if( iDir == 1 ) 6865 { 6866 pbEdge[ 2 * iX + (2 * iY + 1) * 2 * iWidth ] = true; 6867 } 6868 else if( iDir == 3 ) 6869 { 6870 pbEdge[ 2 * iX - 1 + 2 * iY * 2 * iWidth ] = true; 6871 pbEdge[ 2 * iX + (2 * iY + 1) * 2 * iWidth ] = true; 6872 } 6873 else if( iDir == 5 ) 6874 { 6875 pbEdge[ 2 * iX + (2 * iY + 1) * 2 * iWidth ] = true; 6876 } 6877 else if( iDir == 7 ) 6878 { 6879 pbEdge[ 2 * iX - 1 + 2 * iY * 2 * iWidth ] = true; 6880 pbEdge[ 2 * iX + (2 * iY + 1) * 2 * iWidth ] = true; 6881 } 6882 else 6883 { 6884 assert(false); 6885 } 6886 } 6887 } 6888 else if( iX == 0 ) 6889 { 6890 if( iY == 0 ) 6891 { 6892 if( iDir == 2 ) 6893 { 6894 pbEdge[ 2 * iX + 1 + 2 * iY * 2 * iWidth ] = true; 6895 } 6896 else if( iDir == 4 ) 6897 { 6898 pbEdge[ 2 * iX + 1 + 2 * iY * 2 * iWidth ] = true; 6899 } 6900 else 6901 { 6902 assert(false); 6903 } 6904 } 6905 else if( iY == iHeight-1 ) 6906 { 6907 if( iDir == 0 ) 6908 { 6909 pbEdge[ 2 * iX + (2 * iY - 1) * 2 * iWidth ] = true; 6910 } 6911 else if( iDir == 6 ) 6912 { 6913 pbEdge[ 2 * iX + (2 * iY - 1) * 2 * iWidth ] = true; 6914 } 6915 else 6916 { 6917 assert(false); 6918 } 6919 } 6920 else 6921 { 6922 if( iDir == 0 ) 6923 { 6924 pbEdge[ 2 * iX + (2 * iY - 1) * 2 * iWidth ] = true; 6925 } 6926 else if( iDir == 2 ) 6927 { 6928 pbEdge[ 2 * iX + 1 + 2 * iY * 2 * iWidth ] = true; 6929 pbEdge[ 2 * iX + (2 * iY - 1) * 2 * iWidth ] = true; 6930 } 6931 else if( iDir == 4 ) 6932 { 6933 pbEdge[ 2 * iX + 1 + 2 * iY * 2 * iWidth ] = true; 6934 pbEdge[ 2 * iX + (2 * iY - 1) * 2 * iWidth ] = true; 6935 } 6936 else if( iDir == 6 ) 6937 { 6938 pbEdge[ 2 * iX + (2 * iY - 1) * 2 * iWidth ] = true; 6939 } 6940 else 6941 { 6942 assert(false); 6943 } 6944 } 6945 } 6946 else if( iY == 0 ) 6947 { 6948 if( iDir == 1 ) 6949 { 6950 pbEdge[ 2 * iX + (2 * iY + 1) * 2 * iWidth ] = true; 6951 pbEdge[ 2 * iX + 1 + 2 * iY * 2 * iWidth ] = true; 6952 } 6953 else if( iDir == 2 ) 6954 { 6955 pbEdge[ 2 * iX + 1 + 2 * iY * 2 * iWidth ] = true; 6956 } 6957 else if( iDir == 4 ) 6958 { 6959 pbEdge[ 2 * iX + 1 + 2 * iY * 2 * iWidth ] = true; 6960 } 6961 else if( iDir == 5 ) 6962 { 6963 pbEdge[ 2 * iX + (2 * iY + 1) * 2 * iWidth ] = true; 6964 pbEdge[ 2 * iX + 1 + 2 * iY * 2 * iWidth ] = true; 6965 } 6966 else 6967 { 6968 assert(false); 6969 } 6970 } 6971 else if( iY == iHeight-1 ) 6972 { 6973 if( iDir == 0 ) 6974 { 6975 pbEdge[ 2 * iX + (2 * iY - 1) * 2 * iWidth ] = true; 6976 pbEdge[ 2 * iX - 1 + 2 * iY * 2 * iWidth ] = true; 6977 } 6978 else if( iDir == 3 ) 6979 { 6980 pbEdge[ 2 * iX - 1 + 2 * iY * 2 * iWidth ] = true; 6981 } 6982 else if( iDir == 6 ) 6983 { 6984 pbEdge[ 2 * iX + (2 * iY - 1) * 2 * iWidth ] = true; 6985 pbEdge[ 2 * iX - 1 + 2 * iY * 2 * iWidth ] = true; 6986 } 6987 else if( iDir == 7 ) 6988 { 6989 pbEdge[ 2 * iX - 1 + 2 * iY * 2 * iWidth ] = true; 6990 } 6991 else 6992 { 6993 assert(false); 6994 } 6995 } 6996 else 6997 { 6998 printf("reconPartiton: wrong termination\n"); 6999 assert(false); 7000 } 7001 7002 // Reconstruct Region from Chain Code 7003 Bool* pbVisit = (Bool*) xMalloc( Bool, iWidth * iHeight ); 7004 Int* piStack = (Int* ) xMalloc( Int, iWidth * iHeight ); 7005 7006 for( UInt ui = 0; ui < iWidth * iHeight; ui++ ) 7007 { 7008 pbRegion[ ui ] = true; // fill it as region 1 (we'll discover region 0 next) 7009 pbVisit [ ui ] = false; 7010 } 7011 7012 iPtr = 0; 7013 piStack[iPtr++] = (0 << 8) | (0); 7014 pbRegion[ 0 ] = false; 7015 7016 while(iPtr > 0) 7017 { 7018 Int iTmp = piStack[--iPtr]; 7019 Int iX1, iY1; 7020 iX1 = iTmp & 0xff; 7021 iY1 = (iTmp >> 8) & 0xff; 7022 7023 pbVisit[ iX1 + iY1 * iWidth ] = true; 7024 7025 assert( iX1 >= 0 && iX1 < iWidth ); 7026 assert( iY1 >= 0 && iY1 < iHeight ); 7027 7028 if( iX1 > 0 && !pbEdge[ 2 * iX1 - 1 + 4 * iY1 * iWidth ] && !pbVisit[ iX1 - 1 + iY1 * iWidth ] ) 7029 { 7030 piStack[iPtr++] = (iY1 << 8) | (iX1 - 1); 7031 pbRegion[ iX1 - 1 + iY1 * iWidth ] = false; 7032 } 7033 if( iX1 < iWidth - 1 && !pbEdge[ 2 * iX1 + 1 + 4 * iY1 * iWidth ] && !pbVisit[ iX1 + 1 + iY1 * iWidth ] ) 7034 { 7035 piStack[iPtr++] = (iY1 << 8) | (iX1 + 1); 7036 pbRegion[ iX1 + 1 + iY1 * iWidth ] = false; 7037 } 7038 if( iY1 > 0 && !pbEdge[ 2 * iX1 + 2 * (2 * iY1 - 1) * iWidth ] && !pbVisit[ iX1 + (iY1 - 1) * iWidth ] ) 7039 { 7040 piStack[iPtr++] = ((iY1 - 1) << 8) | iX1; 7041 pbRegion[ iX1 + (iY1 - 1) * iWidth ] = false; 7042 } 7043 if( iY1 < iHeight - 1 && !pbEdge[ 2 * iX1 + 2 * (2 * iY1 + 1) * iWidth ] && !pbVisit[ iX1 + (iY1 + 1) * iWidth ] ) 7044 { 7045 piStack[iPtr++] = ((iY1 + 1) << 8) | iX1; 7046 pbRegion[ iX1 + (iY1 + 1) * iWidth ] = false; 7047 } 7048 } 7049 7050 xFree( pbEdge ); 7051 xFree( pbVisit ); 7052 xFree( piStack ); 7053 } 7054 #endif 7055 #endif 6361 7056 #endif 6362 7057 -
branches/HTM-DEV-2.0-dev2-LG/source/Lib/TLibCommon/TComRdCost.cpp
r571 r591 1220 1220 #endif 1221 1221 1222 #if H_3D_IC 1222 #if H_3D_IC || LGE_INTER_SDC_E0156 1223 1223 UInt TComRdCost::xGetSADic( DistParam* pcDtParam ) 1224 1224 { … … 3575 3575 } 3576 3576 3577 #if H_3D_IC 3577 #if H_3D_IC || LGE_INTER_SDC_E0156 3578 3578 UInt TComRdCost::xGetHADsic( DistParam* pcDtParam ) 3579 3579 { -
branches/HTM-DEV-2.0-dev2-LG/source/Lib/TLibCommon/TComRdCost.h
r571 r591 280 280 static UInt xGetSSE64 ( DistParam* pcDtParam ); 281 281 static UInt xGetSSE16N ( DistParam* pcDtParam ); 282 #if H_3D_IC 282 #if H_3D_IC || LGE_INTER_SDC_E0156 283 283 static UInt xGetSADic ( DistParam* pcDtParam ); 284 284 static UInt xGetSAD4ic ( DistParam* pcDtParam ); … … 308 308 309 309 #if AMP_SAD 310 #if H_3D_IC 310 #if H_3D_IC || LGE_INTER_SDC_E0156 311 311 static UInt xGetSAD12ic ( DistParam* pcDtParam ); 312 312 static UInt xGetSAD24ic ( DistParam* pcDtParam ); … … 319 319 #endif 320 320 321 #if H_3D_IC 321 #if H_3D_IC || LGE_INTER_SDC_E0156 322 322 static UInt xGetHADsic ( DistParam* pcDtParam ); 323 323 #endif -
branches/HTM-DEV-2.0-dev2-LG/source/Lib/TLibCommon/TypeDef.h
r571 r591 93 93 // SEC_DEFAULT_DV_D0112 94 94 #define H_3D_ARP 1 // Advanced residual prediction (ARP), JCT3V-D0177 95 #define H_3D_IC 1// Illumination Compensation, JCT3V-B0045, JCT3V-C0046, JCT3V-D006095 #define H_3D_IC 0 // Illumination Compensation, JCT3V-B0045, JCT3V-C0046, JCT3V-D0060 96 96 // Unifying rounding offset, for IC part, JCT3V-D0135 97 97 // Full Pel Interpolation for Depth, HHI_FULL_PEL_DEPTH_MAP_MV_ACC 98 #define H_3D_FIX 1 // Bug Fix 98 99 #define SHARP_ILLUCOMP_REFINE_E0046 1 99 100 #define MTK_FAST_TEXTURE_ENCODING_E0173 1 // Fast merge mode decision and early CU determination for texture component of dependent view, JCT3V-E0173 101 #if H_3D_FIX 102 #if H_3D_IC 100 103 #define MTK_CLIPPING_ALIGN_IC_E0168 1 // To support simplify bi-prediction PU with identical motion checking, JCT3V-E0168 104 #endif 105 #else 106 #define MTK_CLIPPING_ALIGN_IC_E0168 1 // To support simplify bi-prediction PU with identical motion checking, JCT3V-E0168 107 #endif 101 108 #define MTK_SONY_PROGRESSIVE_MV_COMPRESSION_E0170 1 // Progressive MV Compression, JCT3V-E0170 102 109 #define LGE_INTER_SDC_E0156 1 // Enable inter SDC for depth coding
Note: See TracChangeset for help on using the changeset viewer.