Changeset 210 in 3DVCSoftware for trunk/source/App
- Timestamp:
- 11 Dec 2012, 18:52:43 (12 years ago)
- Location:
- trunk/source/App
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/App/TAppDecoder/TAppDecTop.cpp
r189 r210 82 82 Void TAppDecTop::decode() 83 83 { 84 #if VIDYO_VPS_INTEGRATION 84 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 85 85 increaseNumberOfViews( 0, 0, 0 ); 86 86 #else … … 88 88 #endif 89 89 90 #if FLEX_CODING_ORDER_M23723 91 Int iDepthViewIdx = 0; 92 Int iTextureViewIdx=0; 93 Bool firstFrame=1; 94 Bool viewIdZero=true; 95 Int fcoIndex=0; //when the current frame is not first frame,use FCO_index stand for viewDepth. 96 #endif 97 90 98 #if SONY_COLPIC_AVAILABILITY 91 99 m_tDecTop[0]->setViewOrderIdx(0); … … 102 110 pcListPic[i] = NULL; 103 111 newPicture[i] = false; 112 #if FLEX_CODING_ORDER_M23723 113 #if FIX_FCO_COMP_WARNING 114 m_fcoOrder[i] = ' '; 115 #else 116 m_fcoOrder[i]=NULL; 117 #endif 118 #endif 119 104 120 } 105 121 … … 145 161 { 146 162 read(nalu, nalUnit); 163 #if QC_MVHEVC_B0046 164 viewDepthId = nalu.m_layerId; 165 Int depth = 0; 166 Int viewId = viewDepthId; 167 #else 147 168 #if VIDYO_VPS_INTEGRATION 148 169 Int viewId = 0; … … 156 177 depth = getVPSAccess()->getActiveVPS()->getDepthFlag(nalu.m_layerId); 157 178 } 179 #if FLEX_CODING_ORDER_M23723 180 if (viewId>0) 181 { 182 viewIdZero=false; 183 } 184 if (viewIdZero==false&&viewId==0) 185 { 186 firstFrame=0; //if viewId has been more than zero and now it set to zero again, we can see that it is not the first view 187 } 188 if (firstFrame) 189 { // if the current view is first frame, we set the viewDepthId as texture plus depth and get the FCO order 190 viewDepthId = iDepthViewIdx+iTextureViewIdx; 191 m_fcoViewDepthId=viewDepthId; 192 } 193 else 194 {//if current view is not first frame, we set the viewDepthId depended on the FCO order 195 viewDepthId=0; 196 if (depth) 197 { 198 for (fcoIndex=0;fcoIndex<2*MAX_VIEW_NUM;fcoIndex++ ) 199 { 200 if (m_fcoOrder[fcoIndex]=='D') 201 { 202 if (viewId==viewDepthId) 203 break; 204 else 205 viewDepthId++; 206 } 207 } 208 } 209 else 210 { 211 for (fcoIndex=0;fcoIndex<2*MAX_VIEW_NUM;fcoIndex++ ) 212 { 213 if (m_fcoOrder[fcoIndex]=='T') 214 { 215 if (viewId==viewDepthId) 216 break; 217 else 218 viewDepthId++; 219 } 220 } 221 } 222 223 viewDepthId=fcoIndex; 224 225 } 226 227 228 #else 158 229 viewDepthId = nalu.m_layerId; // coding order T0D0T1D1T2D2 230 #endif 231 159 232 #else 160 233 Int viewId = nalu.m_viewId; 161 234 Int depth = nalu.m_isDepth ? 1 : 0; 235 #if FLEX_CODING_ORDER_M23723 236 if (viewId>0) 237 { 238 viewIdZero=false; 239 } 240 if (viewIdZero==false&&viewId==0) 241 { 242 firstFrame=0; 243 } 244 if (firstFrame) 245 { 246 viewDepthId = iDepthViewIdx+iTextureViewIdx; 247 m_fcoViewDepthId=viewDepthId; 248 } 249 else 250 { 251 viewDepthId=0; 252 if (depth) 253 { 254 for (fcoIndex=0;fcoIndex<2*MAX_VIEW_NUM;fcoIndex++ ) 255 { 256 if (m_fcoOrder[fcoIndex]=='D') 257 { 258 if (viewId==viewDepthId) 259 break; 260 else 261 viewDepthId++; 262 } 263 } 264 } 265 else 266 { 267 for (fcoIndex=0;fcoIndex<2*MAX_VIEW_NUM;fcoIndex++ ) 268 { 269 if (m_fcoOrder[fcoIndex]=='T') 270 { 271 if (viewId==viewDepthId) 272 break; 273 else 274 viewDepthId++; 275 } 276 } 277 } 278 viewDepthId=fcoIndex; 279 } 280 #else 162 281 viewDepthId = viewId * 2 + depth; // coding order T0D0T1D1T2D2 163 282 #endif 164 283 #endif 284 #endif 165 285 newPicture[viewDepthId] = false; 166 286 if( viewDepthId >= m_tDecTop.size() ) 167 287 { 168 #if VIDYO_VPS_INTEGRATION 288 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 169 289 increaseNumberOfViews( viewDepthId, viewId, depth ); 170 290 #else … … 195 315 if( !(m_iMaxTemporalLayer >= 0 && nalu.m_temporalId > m_iMaxTemporalLayer) ) 196 316 { 317 #if QC_MVHEVC_B0046 318 if(viewDepthId && m_tDecTop[viewDepthId]->m_bFirstNal== false) 319 { 320 m_tDecTop[viewDepthId]->m_bFirstNal = true; 321 ParameterSetManagerDecoder* pDecV0 = m_tDecTop[0]->xGetParaSetDec(); 322 m_tDecTop[viewDepthId]->xCopyVPS(pDecV0->getPrefetchedVPS(0)); 323 m_tDecTop[viewDepthId]->xCopySPS(pDecV0->getPrefetchedSPS(0)); 324 m_tDecTop[viewDepthId]->xCopyPPS(pDecV0->getPrefetchedPPS(0)); 325 } 326 #endif 197 327 newPicture[viewDepthId] = m_tDecTop[viewDepthId]->decode(nalu, m_iSkipFrame, m_pocLastDisplay[viewDepthId]); 198 328 if (newPicture[viewDepthId]) … … 209 339 { 210 340 previousPictureDecoded = true; 341 #if FLEX_CODING_ORDER_M23723 342 if (firstFrame) 343 { 344 if (depth) 345 { 346 iDepthViewIdx++; 347 m_fcoOrder[viewDepthId]='D'; 348 } 349 else 350 { 351 iTextureViewIdx++; 352 m_fcoOrder[viewDepthId]='T'; 353 } 354 } 355 356 #endif 211 357 } 212 358 } … … 218 364 if( pcListPic[viewDepthId] ) 219 365 { 366 #if QC_REM_IDV_B0046 367 Int iviewId = m_tDecTop[viewDepthId]->getViewId(); 368 if( newPicture[viewDepthId] && (nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR || ((nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR && iviewId) && m_tDecTop[viewDepthId]->getNalUnitTypeBaseView() == NAL_UNIT_CODED_SLICE_IDR)) ) 369 #else 220 370 if( newPicture[viewDepthId] && (nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR || (nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDV && m_tDecTop[viewDepthId]->getNalUnitTypeBaseView() == NAL_UNIT_CODED_SLICE_IDR)) ) 371 #endif 221 372 { 222 373 xFlushOutput( pcListPic[viewDepthId], viewDepthId ); … … 275 426 m_tDecTop[viewDepthIdx]->destroy() ; 276 427 } 428 #if QC_MVHEVC_B0046 429 if(viewDepthIdx) 430 { 431 //Call clear function to remove the record, which has been freed during viewDepthIdx = 0 case. 432 m_tDecTop[viewDepthIdx]->xGetParaSetDec()->clearSPS(); 433 m_tDecTop[viewDepthIdx]->xGetParaSetDec()->clearVPS(); 434 m_tDecTop[viewDepthIdx]->xGetParaSetDec()->clearPPS(); 435 } 436 #endif 277 437 delete m_tDecTop[viewDepthIdx] ; 278 438 m_tDecTop[viewDepthIdx] = NULL ; … … 416 576 m_pocLastDisplay[viewDepthId] = -MAX_INT; 417 577 } 418 #if VIDYO_VPS_INTEGRATION 578 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 419 579 Void TAppDecTop::increaseNumberOfViews ( UInt layerId, UInt viewId, UInt isDepth ) 420 580 #else … … 422 582 #endif 423 583 { 424 #if VIDYO_VPS_INTEGRATION 584 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 425 585 Int newNumberOfViewDepth = layerId + 1; 426 586 #endif … … 429 589 m_outputBitDepth = g_uiBitDepth + g_uiBitIncrement; 430 590 } 431 #if !VIDYO_VPS_INTEGRATION 591 #if !VIDYO_VPS_INTEGRATION&!QC_MVHEVC_B0046 432 592 Int viewId = (newNumberOfViewDepth-1)>>1; // coding order T0D0T1D1T2D2 433 593 Bool isDepth = ((newNumberOfViewDepth % 2) == 0); // coding order T0D0T1D1T2D2 … … 442 602 m_tVideoIOYuvReconFile.push_back(new TVideoIOYuv); 443 603 Char buffer[4]; 444 #if VIDYO_VPS_INTEGRATION 604 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 445 605 sprintf(buffer,"_%i", viewId ); 446 606 #else … … 448 608 #endif 449 609 Char* nextFilename = NULL; 450 #if VIDYO_VPS_INTEGRATION 610 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 451 611 if( isDepth) 452 612 #else … … 463 623 xAppendToFileNameEnd( m_pchReconFile, buffer, nextFilename); 464 624 } 465 #if !VIDYO_VPS_INTEGRATION 625 #if !VIDYO_VPS_INTEGRATION&!QC_MVHEVC_B0046 466 626 if( isDepth || ( !isDepth && (m_tVideoIOYuvReconFile.size() % 2) == 1 ) ) 467 627 #endif … … 480 640 { 481 641 m_tDecTop.push_back(new TDecTop); 482 #if !VIDYO_VPS_INTEGRATION 642 #if !VIDYO_VPS_INTEGRATION&!QC_MVHEVC_B0046 483 643 if( isDepth || ( !isDepth && (m_tVideoIOYuvReconFile.size() % 2) == 1 ) ) 484 644 { … … 490 650 m_tDecTop.back()->setPictureDigestEnabled(m_pictureDigestEnabled); 491 651 m_tDecTop.back()->setCamParsCollector( &m_cCamParsCollector ); 492 #if !VIDYO_VPS_INTEGRATION 652 #if !VIDYO_VPS_INTEGRATION&!QC_MVHEVC_B0046 493 653 } 494 654 #endif … … 498 658 TDecTop* TAppDecTop::getTDecTop( Int viewId, Bool isDepth ) 499 659 { 660 #if FLEX_CODING_ORDER_M23723 661 Int viewnumber=0; 662 Int i=0; 663 Bool fcoFlag=0; 664 if (viewId>m_fcoViewDepthId) 665 { 666 return NULL; 667 } 668 else 669 { 670 if (isDepth) 671 { 672 for ( i=0; i<=m_fcoViewDepthId;i++) 673 { 674 if (m_fcoOrder[i]=='D') 675 { 676 if (viewnumber==viewId) 677 { 678 fcoFlag=1; 679 break; 680 } 681 else 682 viewnumber++; 683 } 684 } 685 } 686 else 687 { 688 for ( i=0; i<=m_fcoViewDepthId;i++) 689 { 690 if (m_fcoOrder[i]=='T') 691 { 692 if (viewnumber==viewId) 693 { 694 fcoFlag=1; 695 break; 696 } 697 else 698 viewnumber++; 699 } 700 } 701 } 702 if (fcoFlag) 703 { 704 return m_tDecTop[i]; 705 } 706 else 707 return NULL; 708 709 } 710 711 // coding order T0D0T1D1T2D2 712 #else 500 713 return m_tDecTop[(isDepth ? 1 : 0) + viewId * 2]; // coding order T0D0T1D1T2D2 714 #endif 715 501 716 } 502 717 … … 517 732 assert( ( viewId >= 0 ) ); 518 733 734 #if FLEX_CODING_ORDER_M23723 735 if (getTDecTop(viewId,isDepth)) 736 { 519 737 TComList<TComPic*>* apcListPic = getTDecTop( viewId, isDepth )->getListPic(); 520 738 TComPic* pcPic = NULL; … … 529 747 return pcPic; 530 748 } 749 else 750 return NULL; 751 #else 752 753 TComList<TComPic*>* apcListPic = getTDecTop( viewId, isDepth )->getListPic(); 754 TComPic* pcPic = NULL; 755 for( TComList<TComPic*>::iterator it=apcListPic->begin(); it!=apcListPic->end(); it++ ) 756 { 757 if( (*it)->getPOC() == poc ) 758 { 759 pcPic = *it; 760 break; 761 } 762 } 763 return pcPic; 764 #endif 765 } 531 766 //! \} -
trunk/source/App/TAppDecoder/TAppDecTop.h
r100 r210 71 71 Bool m_useDepth; 72 72 73 #if FLEX_CODING_ORDER_M23723 74 Int m_fcoViewDepthId; 75 Char m_fcoOrder[MAX_VIEW_NUM*2]; 76 #endif 77 73 78 FILE* m_pScaleOffsetFile; 74 79 CamParsCollector m_cCamParsCollector; 75 80 #if DEPTH_MAP_GENERATION 76 #if VIDYO_VPS_INTEGRATION 81 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 77 82 TComVPSAccess m_cVPSAccess; 78 83 #endif … … 88 93 Void destroy (); ///< destroy internal members 89 94 Void decode (); ///< main decoding function 90 #if VIDYO_VPS_INTEGRATION 95 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 91 96 Void increaseNumberOfViews (UInt layerId, UInt viewId, UInt isDepth); 92 97 #else -
trunk/source/App/TAppEncoder/TAppEncCfg.cpp
r189 r210 111 111 if (m_pchBitstreamFile != NULL) 112 112 free (m_pchBitstreamFile) ; 113 #if FLEX_CODING_ORDER_M23723 114 if (m_pchMVCJointCodingOrder != NULL) 115 { 116 free(m_pchMVCJointCodingOrder) ; 117 } 118 #endif 113 119 #if HHI_VSO 114 120 if ( m_pchVSOConfig != NULL) … … 203 209 string cfg_RowHeight; 204 210 string cfg_ScalingListFile; 211 212 #if FLEX_CODING_ORDER_M23723 213 string cfg_JointCodingOrdering; 214 #endif 215 205 216 po::Options opts; 206 217 opts.addOptions() … … 246 257 247 258 ("NumberOfViews", m_iNumberOfViews, 0, "Number of views") 259 #if FLEX_CODING_ORDER_M23723 260 ("FCO", m_b3DVFlexOrder, false, "flexible coding order flag" ) 261 ("FCOCodingOrder", cfg_JointCodingOrdering, string(""), "The coding order for joint texture-depth coding") 262 #endif 248 263 /* Unit definition parameters */ 249 264 ("MaxCUWidth", m_uiMaxCUWidth, 64u) … … 276 291 ("FastSearch", m_iFastSearch, 1, "0:Full search 1:Diamond 2:PMVFAST") 277 292 ("SearchRange,-sr",m_iSearchRange, 96, "motion search range") 293 #if DV_V_RESTRICTION_B0037 294 ("DisparitySearchRangeRestriction",m_bUseDisparitySearchRangeRestriction, false, "restrict disparity search range") 295 ("VerticalDisparitySearchRange",m_iVerticalDisparitySearchRange, 56, "vertical disparity search range") 296 #endif 278 297 ("BipredSearchRange", m_bipredSearchRange, 4, "motion search range for bipred refinement") 279 298 ("HadamardME", m_bUseHADME, true, "hadamard ME for fractional-pel") … … 329 348 /* Camera Paremetes */ 330 349 ("CameraParameterFile,cpf", m_pchCameraParameterFile, (Char *) 0, "Camera Parameter File Name") 350 #if QC_MVHEVC_B0046 351 ("BaseViewCameraNumbers" , m_aiVId, std::vector<Int>(1, MAX_VIEW_NUM), "Numbers of base views") 352 #endif 331 353 ("BaseViewCameraNumbers" , m_pchBaseViewCameraNumbers, (Char *) 0, "Numbers of base views") 332 354 … … 526 548 m_pchBitstreamFile = cfg_BitstreamFile.empty() ? NULL : strdup(cfg_BitstreamFile.c_str()); 527 549 m_pchdQPFile = cfg_dQPFile.empty() ? NULL : strdup(cfg_dQPFile.c_str()); 528 550 #if FLEX_CODING_ORDER_M23723 551 m_pchMVCJointCodingOrder= cfg_JointCodingOrdering.empty()?NULL:strdup(cfg_JointCodingOrdering.c_str()); 552 // If flexible order is enabled and if depth comes before the texture for a view, disable VSO 553 #if HHI_VSO && DISABLE_FCO_FOR_VSO 554 Bool depthComesFirst = false; 555 int iter = 0; 556 if ( m_b3DVFlexOrder ) 557 { 558 for(Int iViewIdx=0; iViewIdx<m_iNumberOfViews; iViewIdx++) 559 { 560 iter = 0; 561 for ( Int ii=1; ii<12; ii+=2 ) 562 { 563 Int iViewIdxCfg = (Int)(m_pchMVCJointCodingOrder[ii]-'0'); 564 if ( iViewIdxCfg == iViewIdx ) 565 { 566 iter ++; 567 if ( m_pchMVCJointCodingOrder[ii-1]=='D' ) // depth comes first for this view 568 { 569 if(iter == 1) 570 { 571 depthComesFirst = true; 572 break; 573 } 574 } 575 else 576 { 577 assert(m_pchMVCJointCodingOrder[ii-1]=='T'); 578 } 579 } 580 } 581 } 582 } 583 if (depthComesFirst) 584 { 585 m_bUseVSO = false; 586 } 587 #endif 588 #endif 529 589 m_pchColumnWidth = cfg_ColumnWidth.empty() ? NULL: strdup(cfg_ColumnWidth.c_str()); 530 590 m_pchRowHeight = cfg_RowHeight.empty() ? NULL : strdup(cfg_RowHeight.c_str()); … … 786 846 } 787 847 #else 848 #if !QC_MVHEVC_B0046 788 849 m_cCameraData .init ( (UInt)m_iNumberOfViews, 789 850 m_uiInputBitDepth, … … 797 858 LOG2_DISP_PREC_LUT ); 798 859 #endif 860 #endif 799 861 800 862 801 863 // check validity of input parameters 802 864 xCheckParameter(); 865 #if !QC_MVHEVC_B0046 803 866 m_cCameraData.check( false, true ); 804 867 #endif 805 868 // print-out parameters 806 869 xPrintParameter(); … … 850 913 xConfirmPara( m_iFastSearch < 0 || m_iFastSearch > 2, "Fast Search Mode is not supported value (0:Full search 1:Diamond 2:PMVFAST)" ); 851 914 xConfirmPara( m_iSearchRange < 0 , "Search Range must be more than 0" ); 915 #if DV_V_RESTRICTION_B0037 916 xConfirmPara( m_iVerticalDisparitySearchRange <= 0 , "Vertical Disparity Search Range must be more than 0" ); 917 #endif 852 918 xConfirmPara( m_bipredSearchRange < 0 , "Search Range must be more than 0" ); 853 919 xConfirmPara( m_iMaxDeltaQP > 7, "Absolute Delta QP exceeds supported range (0 to 7)" ); … … 1595 1661 printf("Min PCM size : %d\n", 1 << m_uiPCMLog2MinSize); 1596 1662 printf("Motion search range : %d\n", m_iSearchRange ); 1663 #if DV_V_RESTRICTION_B0037 1664 printf("Disp search range restriction: %d\n", m_bUseDisparitySearchRangeRestriction ); 1665 printf("Vertical disp search range : %d\n", m_iVerticalDisparitySearchRange ); 1666 #endif 1597 1667 printf("Intra period : %d\n", m_iIntraPeriod ); 1598 1668 printf("Decoding refresh type : %d\n", m_iDecodingRefreshType ); … … 1745 1815 #if TMVP_DEPTH_SWITCH 1746 1816 printf("TMVP:%d ", (m_enableTMVP[1] ? 1 : 0) ); 1817 #endif 1818 #if FLEX_CODING_ORDER_M23723 1819 printf("FCO:%d ", (m_b3DVFlexOrder ? 1: 0)); 1820 1821 if(m_b3DVFlexOrder) 1822 { 1823 printf("CodingOrder: %s ", m_pchMVCJointCodingOrder); 1824 } 1747 1825 #endif 1748 1826 #if HHI_VSO -
trunk/source/App/TAppEncoder/TAppEncCfg.h
r189 r210 88 88 Int m_iNumberOfViews; ///< number Views to Encode 89 89 Bool m_bUsingDepthMaps; 90 91 #if FLEX_CODING_ORDER_M23723 92 Char* m_pchMVCJointCodingOrder; ///< texture-depth coding order 93 Bool m_b3DVFlexOrder; ///< flexible coding order flag 94 #endif 95 90 96 // coding structure 91 97 Int m_iIntraPeriod; ///< period of I-slice (random access period) … … 109 115 std::vector<Double> m_adQP; ///< QP value of key-picture (floating point) [0] video, [1] depth 110 116 std::vector<Int> m_aiQP; ///< QP value of key-picture (integer) [0] video, [1] depth 117 #if QC_MVHEVC_B0046 118 std::vector<Int> m_aiVId; ///< view id 119 #endif 111 120 Int m_aiTLayerQPOffset[MAX_TLAYER]; ///< QP offset corresponding to temporal layer depth 112 121 char* m_pchdQPFile; ///< QP offset for each slice (initialized from external file) … … 200 209 Int m_iFastSearch; ///< ME mode, 0 = full, 1 = diamond, 2 = PMVFAST 201 210 Int m_iSearchRange; ///< ME search range 211 #if DV_V_RESTRICTION_B0037 212 Bool m_bUseDisparitySearchRangeRestriction; ///< restrict vertical search range for inter-view prediction 213 Int m_iVerticalDisparitySearchRange; ///< ME vertical search range for inter-view prediction 214 #endif 202 215 Int m_bipredSearchRange; ///< ME search range for bipred refinement 203 216 Bool m_bUseFastEnc; ///< flag for using fast encoder setting … … 285 298 Char* m_pchCameraParameterFile; ///< camera parameter file 286 299 Char* m_pchBaseViewCameraNumbers; 300 #if !QC_MVHEVC_B0046 287 301 TAppComCamPara m_cCameraData; 288 302 #endif 289 303 Int m_iCodedCamParPrecision; ///< precision for coding of camera parameters 290 304 -
trunk/source/App/TAppEncoder/TAppEncTop.cpp
r189 r210 67 67 Void TAppEncTop::xInitLibCfg() 68 68 { 69 #if VIDYO_VPS_INTEGRATION 69 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 70 #if !QC_MVHEVC_B0046 70 71 UInt layerId = 0; 72 #endif 71 73 // TODO: fix the assumption here that the temporal structures are all equal across all layers??? 72 74 m_cVPS.setMaxTLayers( m_maxTempLayer[0] ); 75 #if QC_MVHEVC_B0046 76 m_cVPS.setMaxLayers( m_iNumberOfViews ); 77 #else 73 78 m_cVPS.setMaxLayers( m_iNumberOfViews * (m_bUsingDepthMaps ? 2:1) ); 79 #endif 74 80 for(Int i = 0; i < MAX_TLAYER; i++) 75 81 { … … 101 107 m_acTEncTopList[iViewIdx]->setViewId ( iViewIdx ); 102 108 m_acTEncTopList[iViewIdx]->setIsDepth ( false ); 109 #if QC_MVHEVC_B0046 110 m_acTEncTopList[iViewIdx]->setLayerId ( iViewIdx ); 111 m_cVPS.setViewId ( m_aiVId[ iViewIdx ], iViewIdx ); 112 #else 103 113 m_acTEncTopList[iViewIdx]->setViewOrderIdx ( m_cCameraData.getViewOrderIndex()[ iViewIdx ] ); 104 114 #if VIDYO_VPS_INTEGRATION … … 117 127 m_acTEncTopList[iViewIdx]->setCodedScale ( m_cCameraData.getCodedScale () ); 118 128 m_acTEncTopList[iViewIdx]->setCodedOffset ( m_cCameraData.getCodedOffset () ); 129 #endif 119 130 120 131 //====== Coding Structure ======== … … 170 181 m_acTEncTopList[iViewIdx]->setSearchRange ( m_iSearchRange ); 171 182 m_acTEncTopList[iViewIdx]->setBipredSearchRange ( m_bipredSearchRange ); 172 183 #if DV_V_RESTRICTION_B0037 184 m_acTEncTopList[iViewIdx]->setUseDisparitySearchRangeRestriction ( m_bUseDisparitySearchRangeRestriction ); 185 m_acTEncTopList[iViewIdx]->setVerticalDisparitySearchRange( m_iVerticalDisparitySearchRange ); 186 #endif 173 187 //====== Quality control ======== 174 188 m_acTEncTopList[iViewIdx]->setMaxDeltaQP ( m_iMaxDeltaQP ); … … 386 400 for(Int iViewIdx=0; iViewIdx<m_iNumberOfViews; iViewIdx++) 387 401 { 402 403 #if FLEX_CODING_ORDER_M23723 404 // Detect whether depth comes before than texture for this view 405 Bool isDepthFirst = false; 406 if ( m_b3DVFlexOrder ) 407 { 408 for ( Int ii=1; ii<12; ii+=2 ) 409 { 410 Int iViewIdxCfg = (Int)(m_pchMVCJointCodingOrder[ii]-'0'); 411 if ( iViewIdxCfg == iViewIdx ) 412 { 413 if ( m_pchMVCJointCodingOrder[ii-1]=='D' ) // depth comes first for this view 414 { 415 isDepthFirst = true; 416 } 417 else 418 { 419 assert(m_pchMVCJointCodingOrder[ii-1]=='T'); 420 } 421 break; 422 } 423 } 424 } 425 #endif 426 388 427 m_depthFrameRcvd.push_back(0); 389 428 m_acTEncDepthTopList.push_back(new TEncTop); … … 406 445 m_acTEncDepthTopList[iViewIdx]->setViewId ( iViewIdx ); 407 446 m_acTEncDepthTopList[iViewIdx]->setIsDepth ( true ); 447 #if QC_MVHEVC_B0046 448 m_acTEncDepthTopList[iViewIdx]->setLayerId ( iViewIdx ); 449 #else 408 450 m_acTEncDepthTopList[iViewIdx]->setViewOrderIdx ( m_cCameraData.getViewOrderIndex()[ iViewIdx ] ); 451 #endif 409 452 #if VIDYO_VPS_INTEGRATION 410 453 layerId = iViewIdx * 2 + 1; … … 473 516 m_acTEncDepthTopList[iViewIdx]->setSearchRange ( m_iSearchRange ); 474 517 m_acTEncDepthTopList[iViewIdx]->setBipredSearchRange ( m_bipredSearchRange ); 475 518 #if DV_V_RESTRICTION_B0037 519 m_acTEncDepthTopList[iViewIdx]->setUseDisparitySearchRangeRestriction ( m_bUseDisparitySearchRangeRestriction ); 520 m_acTEncDepthTopList[iViewIdx]->setVerticalDisparitySearchRange( m_iVerticalDisparitySearchRange ); 521 #endif 476 522 //====== Quality control ======== 477 523 m_acTEncDepthTopList[iViewIdx]->setMaxDeltaQP ( m_iMaxDeltaQP ); … … 661 707 m_acTEncDepthTopList[iViewIdx]->setUseDMM ( m_bUseDMM ); 662 708 #endif 709 #if FLEX_CODING_ORDER_M23723 && HHI_DMM_PRED_TEX 710 m_acTEncDepthTopList[iViewIdx]->setUseDMM34( (m_b3DVFlexOrder && isDepthFirst) ? false : m_bUseDMM ); 711 #endif 712 663 713 #if OL_QTLIMIT_PREDCODING_B0068 664 714 m_acTEncDepthTopList[iViewIdx]->setUseQTLPC (m_bUseQTLPC); 665 715 #endif 666 716 #if HHI_MPI 717 #if FLEX_CODING_ORDER_M23723 718 m_acTEncDepthTopList[iViewIdx]->setUseMVI( (m_b3DVFlexOrder && isDepthFirst) ? false : m_bUseMVI ); 719 #else 667 720 m_acTEncDepthTopList[iViewIdx]->setUseMVI( m_bUseMVI ); 721 #endif 668 722 #endif 669 723 #if RWTH_SDC_DLT_B0036 … … 821 875 { 822 876 m_acTEncTopList[iViewIdx]->init( this ); 877 #if QC_MVHEVC_B0046 878 //set setNumDirectRefLayer 879 Int iNumDirectRef = m_acTEncTopList[iViewIdx]->getSPS()->getNumberOfUsableInterViewRefs(); 880 m_acTEncTopList[iViewIdx]->getEncTop()->getVPS()->setNumDirectRefLayer(iNumDirectRef, iViewIdx); 881 for(Int iNumIvRef = 0; iNumIvRef < iNumDirectRef; iNumIvRef ++) 882 { 883 Int iLayerId = m_acTEncTopList[iViewIdx]->getSPS()->getUsableInterViewRef(iNumIvRef); 884 m_acTEncTopList[iViewIdx]->getEncTop()->getVPS()->setDirectRefLayerId( iLayerId + iViewIdx, iViewIdx, iNumIvRef); 885 } 886 #endif 823 887 } 824 888 for(Int iViewIdx=0; iViewIdx<m_iNumberOfViews; iViewIdx++) … … 862 926 TComPicYuv* pcPicYuvOrg = new TComPicYuv; 863 927 TComPicYuv* pcDepthPicYuvOrg = new TComPicYuv; 928 #if !QC_MVHEVC_B0046 864 929 TComPicYuv* pcPdmDepthOrg = new TComPicYuv; 930 #endif 865 931 TComPicYuv* pcPicYuvRec = NULL; 866 932 TComPicYuv* pcDepthPicYuvRec = NULL; … … 963 1029 { 964 1030 Int iNumEncoded = 0; 1031 #if !QC_MVHEVC_B0046 965 1032 UInt iNextPoc = m_acTEncTopList[0] -> getFrameId( gopId ); 966 1033 if ( iNextPoc < m_iFrameToBeEncoded ) … … 968 1035 m_cCameraData.update( iNextPoc ); 969 1036 } 1037 #endif 1038 1039 #if FLEX_CODING_ORDER_M23723 1040 if (m_b3DVFlexOrder) 1041 { 1042 Int iNumDepthEncoded = 0; 1043 iNumEncoded = 0; 1044 Int i=0; 1045 Int iViewIdx=0; 1046 Int iNumberofDepthViews = m_bUsingDepthMaps?m_iNumberOfViews:0; 1047 for (Int j=0; j < (m_iNumberOfViews+ iNumberofDepthViews); j++ ) 1048 { 1049 if (m_pchMVCJointCodingOrder[i]=='T') 1050 { 1051 1052 i++; 1053 assert(isdigit(m_pchMVCJointCodingOrder[i])); 1054 iViewIdx = (Int)(m_pchMVCJointCodingOrder[i]-'0'); 1055 1056 m_acTEncTopList[iViewIdx]->encode( eos[iViewIdx], pcPicYuvOrg, *m_picYuvRec[iViewIdx], outputAccessUnits, iNumEncoded, gopId ); 1057 xWriteOutput(bitstreamFile, iNumEncoded, outputAccessUnits, iViewIdx, false); 1058 outputAccessUnits.clear(); 1059 i++; 1060 } 1061 else if ( m_pchMVCJointCodingOrder[i] == 'D') 1062 { 1063 1064 i++; 1065 if( m_bUsingDepthMaps ) 1066 { 1067 assert(isdigit(m_pchMVCJointCodingOrder[i])); 1068 iViewIdx = (Int)(m_pchMVCJointCodingOrder[i]-'0'); 1069 #if SAIT_VSO_EST_A0033 1070 if( m_bUseVSO && iNextPoc < m_iFrameToBeEncoded ) 1071 { 1072 m_cCameraData.xSetDispCoeff( iNextPoc, iViewIdx ); 1073 m_acTEncDepthTopList[iViewIdx]->setDispCoeff( m_cCameraData.getDispCoeff() ); 1074 } 1075 #endif 1076 m_acTEncDepthTopList[iViewIdx]->encode( depthEos[iViewIdx], pcDepthPicYuvOrg, *m_picYuvDepthRec[iViewIdx], outputAccessUnits, iNumDepthEncoded, gopId ); 1077 xWriteOutput(bitstreamFile, iNumDepthEncoded, outputAccessUnits, iViewIdx, true); 1078 outputAccessUnits.clear(); 1079 i++; 1080 } 1081 } 1082 } 1083 } 1084 else 1085 { 1086 1087 #endif 970 1088 for(Int iViewIdx=0; iViewIdx < m_iNumberOfViews; iViewIdx++ ) 971 1089 { … … 991 1109 } 992 1110 } 1111 1112 #if FLEX_CODING_ORDER_M23723 1113 } 1114 #endif 1115 993 1116 #if HHI_INTERVIEW_SKIP || HHI_INTER_VIEW_MOTION_PRED || HHI_INTER_VIEW_RESIDUAL_PRED 994 1117 for( Int iViewIdx = 0; iViewIdx < m_iNumberOfViews; iViewIdx++ ) … … 1023 1146 pcDepthPicYuvOrg = NULL; 1024 1147 1148 #if !QC_MVHEVC_B0046 1149 #if FIX_DEL_NULLPTR 1150 if ( pcPdmDepthOrg != NULL && m_uiMultiviewMvRegMode ) 1151 #else 1025 1152 if ( pcPdmDepthOrg != NULL ) 1153 #endif 1026 1154 { 1027 1155 pcPdmDepthOrg->destroy(); … … 1029 1157 pcPdmDepthOrg = NULL; 1030 1158 }; 1031 1159 #endif 1032 1160 1033 1161 for(Int iViewIdx=0; iViewIdx < m_iNumberOfViews; iViewIdx++ ) … … 1233 1361 case NAL_UNIT_CODED_SLICE: 1234 1362 #if H0566_TLA 1363 #if !QC_REM_IDV_B0046 1235 1364 case NAL_UNIT_CODED_SLICE_IDV: 1365 #endif 1236 1366 case NAL_UNIT_CODED_SLICE_TLA: 1237 1367 case NAL_UNIT_CODED_SLICE_CRA: -
trunk/source/App/TAppEncoder/TAppEncTop.h
r189 r210 87 87 #endif 88 88 89 #if VIDYO_VPS_INTEGRATION 89 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 90 90 TComVPS m_cVPS; 91 91 #endif … … 139 139 #endif 140 140 141 #if QC_MVHEVC_B0046 142 TComVPS* getVPS() { return &m_cVPS; } 143 #endif 141 144 #if VIDYO_VPS_INTEGRATION 142 145 TComVPS* getVPS() { return &m_cVPS; } -
trunk/source/App/TAppRenderer/RendererMain.cpp
r100 r210 43 43 int main(int argc, char* argv[]) 44 44 { 45 #if !QC_MVHEVC_B0046 45 46 TAppRendererTop cTAppRendererTop; 46 47 … … 78 79 79 80 return 0; 81 #endif 80 82 } 81 83 -
trunk/source/App/TAppRenderer/TAppRendererCfg.cpp
r189 r210 59 59 // Constructor / destructor / initialization / destroy 60 60 // ==================================================================================================================== 61 61 #if !QC_MVHEVC_B0046 62 62 TAppRendererCfg::TAppRendererCfg() 63 63 { … … 516 516 g_uiIBDI_MAX = ((1<<(g_uiBitDepth+g_uiBitIncrement))-1); 517 517 } 518 #endif -
trunk/source/App/TAppRenderer/TAppRendererCfg.h
r100 r210 50 50 #include <string> 51 51 #include <vector> 52 52 #if !QC_MVHEVC_B0046 53 53 // ==================================================================================================================== 54 54 // Class definition … … 134 134 135 135 136 136 #endif 137 137 #endif // __TAppRENDERERCFG__ 138 138 -
trunk/source/App/TAppRenderer/TAppRendererTop.cpp
r189 r210 45 45 // Constructor / destructor / initialization / destroy 46 46 // ==================================================================================================================== 47 47 #if !QC_MVHEVC_B0046 48 48 TAppRendererTop::TAppRendererTop() 49 49 { … … 1034 1034 1035 1035 } 1036 #endif -
trunk/source/App/TAppRenderer/TAppRendererTop.h
r100 r210 50 50 #include "../../Lib/TLibRenderer/TRenModel.h" 51 51 52 52 #if !QC_MVHEVC_B0046 53 53 // ==================================================================================================================== 54 54 // Class definition … … 87 87 };// END CLASS DEFINITION TAppRendererTop 88 88 89 #endif // __TAppRendererTOP__89 #endif 90 90 91 #endif
Note: See TracChangeset for help on using the changeset viewer.