Changeset 126 in 3DVCSoftware
- Timestamp:
- 7 Sep 2012, 16:47:36 (12 years ago)
- Location:
- trunk/source/Lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibCommon/TComPic.h
r100 r126 113 113 Int** m_aaiCodedOffset; 114 114 115 #if OL_DEPTHLIMIT_A0044 116 UInt* m_texPartInfo; 117 UInt m_uiTexPartIndex; 118 #endif 119 115 120 public: 116 121 TComPic(); … … 243 248 Void removeResidualBuffer (); 244 249 #endif 250 251 #if OL_DEPTHLIMIT_A0044 252 UInt accessPartInfo ( UInt count ) { return m_texPartInfo[m_uiTexPartIndex + count]; }; 253 Void incrementTexPartIndex ( ) { m_uiTexPartIndex += 2; }; 254 UInt getTexPartIndex () { return m_uiTexPartIndex; }; 255 Void setTexPartIndex ( UInt idx ) { m_uiTexPartIndex = idx; }; 256 Void setPartInfo ( UInt* texPart) { m_texPartInfo = texPart; }; 257 #endif 258 245 259 Bool getValidSlice (Int sliceID) {return m_pbValidSlice[sliceID];} 246 260 Int getSliceGranularityForNDBFilter () {return m_sliceGranularityForNDBFilter;} -
trunk/source/Lib/TLibEncoder/TEncCu.cpp
r116 r126 455 455 TComPic *pcTexture; 456 456 TComDataCU * pcTextureCU; 457 458 static UInt* texPartInfo; 459 static UInt uiTexPartIndex; 460 static Bool depthMapDetect = false; 461 457 Bool depthMapDetect = false; 462 458 UInt uiPrevTexPartIndex = 0; 463 459 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 464 staticBool bIntraSliceDetect = false;460 Bool bIntraSliceDetect = false; 465 461 #endif 466 462 Bool bTry2NxN = false; 467 463 Bool bTryNx2N = false; 468 if(uiDepth == 0)469 {470 464 pcTexture = rpcBestCU->getSlice()->getTexturePic(); 471 465 if(pcTexture != NULL) //depth map being encoded 472 466 { 467 depthMapDetect = true; 473 468 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 474 469 bIntraSliceDetect = (rpcBestCU->getSlice()->getSliceType()==I_SLICE); 475 470 #endif 471 if(uiDepth == 0) 472 { 476 473 pcTextureCU = pcTexture->getCU( rpcBestCU->getAddr() ); 477 texPartInfo = pcTextureCU -> readPartInfo();478 uiTexPartIndex = 0;479 depthMapDetect = true;474 pcTexture->setPartInfo(pcTextureCU->readPartInfo()); 475 pcTexture->setTexPartIndex(0); 476 } 480 477 } 481 478 else … … 483 480 depthMapDetect = false; 484 481 } 485 }486 482 #endif 487 483 // get Original YUV data from picture … … 635 631 #endif 636 632 { 637 assert(uiDepth == (UInt)texPartInfo[uiTexPartIndex+1]);638 if( (UInt)texPartInfo[uiTexPartIndex]== 1) //NxN modes633 assert(uiDepth == pcTexture->accessPartInfo(1)); 634 if(pcTexture->accessPartInfo(0) == 1) //NxN modes 639 635 { 640 636 bTrySplit = true; 641 637 bTryNx2N = true; 642 638 bTry2NxN = true; 643 uiPrevTexPartIndex = uiTexPartIndex;644 uiTexPartIndex += 2;639 uiPrevTexPartIndex = pcTexture->getTexPartIndex(); 640 pcTexture->incrementTexPartIndex(); 645 641 } 646 else if( (UInt)texPartInfo[uiTexPartIndex]== 0) //2Nx2N modes642 else if(pcTexture->accessPartInfo(0) == 0) //2Nx2N modes 647 643 { 648 644 UInt uiTexdepth; … … 651 647 652 648 //scan ahead till next depth 653 uiTexdepth = (UInt)texPartInfo[uiTexPartIndex+1];654 uiPrevTexPartIndex = uiTexPartIndex;655 uiTexPartIndex+=2;656 temp_uiTexPartIndex = uiTexPartIndex; //store in case to rewind657 658 while(uiTexdepth != (UInt)texPartInfo[uiTexPartIndex+1]&& uiTexdepth != 0)649 uiTexdepth = pcTexture->accessPartInfo(1); 650 uiPrevTexPartIndex = pcTexture->getTexPartIndex(); 651 pcTexture->incrementTexPartIndex(); 652 temp_uiTexPartIndex = pcTexture->getTexPartIndex(); //store in case to rewind 653 654 while(uiTexdepth != pcTexture->accessPartInfo(1) && uiTexdepth != 0) 659 655 { 660 if( (UInt)texPartInfo[uiTexPartIndex+1]< uiTexdepth)656 if(pcTexture->accessPartInfo(1) < uiTexdepth) 661 657 { 662 658 break; 663 659 } 664 uiTexPartIndex+=2;665 666 if( (UInt)texPartInfo[uiTexPartIndex+1]== OL_END_CU)660 pcTexture->incrementTexPartIndex(); 661 662 if(pcTexture->accessPartInfo(1) == OL_END_CU) 667 663 { 668 uiTexPartIndex = temp_uiTexPartIndex;664 pcTexture->setTexPartIndex(temp_uiTexPartIndex); 669 665 uiTexdepth++; 670 666 if(uiTexdepth >= g_uiMaxCUDepth) … … 675 671 } 676 672 } 677 else if( (UInt)texPartInfo[uiTexPartIndex]== OL_END_CU)673 else if(pcTexture->accessPartInfo(0) == OL_END_CU) 678 674 { 679 675 bTrySplit = false; … … 681 677 bTry2NxN = false; 682 678 } 683 else if( (UInt)texPartInfo[uiTexPartIndex]== 2) //2NxN case679 else if(pcTexture->accessPartInfo(0) == 2) //2NxN case 684 680 { 685 681 bTrySplit = false; 686 682 bTryNx2N = false; 687 683 bTry2NxN = true; 688 uiPrevTexPartIndex = uiTexPartIndex;689 uiTexPartIndex += 2;684 uiPrevTexPartIndex = pcTexture->getTexPartIndex(); 685 pcTexture->incrementTexPartIndex(); ; 690 686 } 691 else if( (UInt)texPartInfo[uiTexPartIndex]== 3) //Nx2N case687 else if(pcTexture->accessPartInfo(0) == 3) //Nx2N case 692 688 { 693 689 bTrySplit = false; 694 690 bTryNx2N = true; 695 691 bTry2NxN = false; 696 uiPrevTexPartIndex = uiTexPartIndex;697 uiTexPartIndex += 2;692 uiPrevTexPartIndex = pcTexture->getTexPartIndex(); 693 pcTexture->incrementTexPartIndex(); ; 698 694 } 699 695 } … … 861 857 #endif 862 858 { 863 assert(uiDepth == (UInt)texPartInfo[uiPrevTexPartIndex+1]);864 859 if (bTrySplit) 865 860 { … … 902 897 #endif 903 898 { 904 assert(uiDepth == (UInt)texPartInfo[uiPrevTexPartIndex+1]);905 899 if (bTryNx2N) 906 900 { … … 953 947 #endif 954 948 { 955 assert(uiDepth == (UInt)texPartInfo[uiPrevTexPartIndex+1]);956 949 if (bTry2NxN) 957 950 { … … 1023 1016 #endif 1024 1017 { 1025 assert(uiDepth == (UInt)texPartInfo[uiPrevTexPartIndex+1]);1026 1018 if (bTry2NxN) 1027 1019 { … … 1109 1101 #endif 1110 1102 { 1111 assert(uiDepth == (UInt)texPartInfo[uiPrevTexPartIndex+1]);1112 1103 if (bTry2NxN) 1113 1104 { … … 1198 1189 #endif 1199 1190 { 1200 assert(uiDepth == (UInt)texPartInfo[uiPrevTexPartIndex+1]);1201 1191 if (bTryNx2N) 1202 1192 { … … 1276 1266 #endif 1277 1267 { 1278 assert(uiDepth == (UInt)texPartInfo[uiPrevTexPartIndex+1]);1279 1268 if (bTryNx2N) 1280 1269 { … … 1423 1412 #endif 1424 1413 { 1425 assert(uiDepth == (UInt)texPartInfo[uiPrevTexPartIndex+1]);1426 1414 if (bTrySplit) 1427 1415 {
Note: See TracChangeset for help on using the changeset viewer.