Changeset 213 in 3DVCSoftware for branches/HTM-4.0.1-VSP-dev0/source/App
- Timestamp:
- 31 Dec 2012, 18:33:14 (12 years ago)
- Location:
- branches/HTM-4.0.1-VSP-dev0/source/App
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-4.0.1-VSP-dev0/source/App/TAppDecoder/TAppDecTop.cpp
r193 r213 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 … … 436 596 m_useDepth = true; 437 597 438 #if FIX_DECODING_WO_WRITING439 598 if ( m_pchReconFile ) 440 599 { 441 #endif442 600 while( m_tVideoIOYuvReconFile.size() < newNumberOfViewDepth) 443 601 { 444 602 m_tVideoIOYuvReconFile.push_back(new TVideoIOYuv); 445 603 Char buffer[4]; 446 #if VIDYO_VPS_INTEGRATION 604 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 447 605 sprintf(buffer,"_%i", viewId ); 448 606 #else … … 450 608 #endif 451 609 Char* nextFilename = NULL; 452 #if VIDYO_VPS_INTEGRATION 610 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 453 611 if( isDepth) 454 612 #else … … 465 623 xAppendToFileNameEnd( m_pchReconFile, buffer, nextFilename); 466 624 } 467 #if !VIDYO_VPS_INTEGRATION 625 #if !VIDYO_VPS_INTEGRATION&!QC_MVHEVC_B0046 468 626 if( isDepth || ( !isDepth && (m_tVideoIOYuvReconFile.size() % 2) == 1 ) ) 469 627 #endif … … 473 631 free ( nextFilename ); 474 632 } 475 #if FIX_DECODING_WO_WRITING 476 } 477 #endif 633 } 478 634 479 635 while( m_pocLastDisplay.size() < newNumberOfViewDepth ) … … 484 640 { 485 641 m_tDecTop.push_back(new TDecTop); 486 #if !VIDYO_VPS_INTEGRATION 642 #if !VIDYO_VPS_INTEGRATION&!QC_MVHEVC_B0046 487 643 if( isDepth || ( !isDepth && (m_tVideoIOYuvReconFile.size() % 2) == 1 ) ) 488 644 { … … 494 650 m_tDecTop.back()->setPictureDigestEnabled(m_pictureDigestEnabled); 495 651 m_tDecTop.back()->setCamParsCollector( &m_cCamParsCollector ); 496 #if !VIDYO_VPS_INTEGRATION 652 #if !VIDYO_VPS_INTEGRATION&!QC_MVHEVC_B0046 497 653 } 498 654 #endif … … 502 658 TDecTop* TAppDecTop::getTDecTop( Int viewId, Bool isDepth ) 503 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 504 713 return m_tDecTop[(isDepth ? 1 : 0) + viewId * 2]; // coding order T0D0T1D1T2D2 714 #endif 715 505 716 } 506 717 … … 521 732 assert( ( viewId >= 0 ) ); 522 733 734 #if FLEX_CODING_ORDER_M23723 735 if (getTDecTop(viewId,isDepth)) 736 { 523 737 TComList<TComPic*>* apcListPic = getTDecTop( viewId, isDepth )->getListPic(); 524 738 TComPic* pcPic = NULL; … … 532 746 } 533 747 return pcPic; 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 534 765 } 535 766 … … 557 788 AOF(pcPicYuvAvail); 558 789 559 TComPic* pcPic = getPicFromView( iCodedViewIdx, iCurPoc, bDepth ); 790 //TComPic* pcPic = getPicFromView( iCodedViewIdx, iCurPoc, bDepth ); 791 TComPic* pcPic = NULL; 792 for( Int i=0; i<m_tDecTop.size() && pcPic==NULL; i++) 793 { 794 if( iCodedViewIdx == m_tDecTop[i]->getViewId() && bDepth == m_tDecTop[i]->getIsDepth() ) 795 { 796 797 TComList<TComPic*>* apcListPic = m_tDecTop[i]->getListPic(); 798 for( TComList<TComPic*>::iterator it=apcListPic->begin(); it!=apcListPic->end(); it++ ) 799 { 800 if( (*it)->getPOC() == iCurPoc ) 801 { 802 pcPic = *it; 803 break; 804 } 805 } 806 807 } 808 } 560 809 pcPic->setPicYuvSynth( pcPicYuvVSP ); 561 810 pcPic->setPicYuvAvail( pcPicYuvAvail ); -
branches/HTM-4.0.1-VSP-dev0/source/App/TAppDecoder/TAppDecTop.h
r193 r213 74 74 Bool m_useDepth; 75 75 76 #if FLEX_CODING_ORDER_M23723 77 Int m_fcoViewDepthId; 78 Char m_fcoOrder[MAX_VIEW_NUM*2]; 79 #endif 80 76 81 FILE* m_pScaleOffsetFile; 77 82 CamParsCollector m_cCamParsCollector; 78 83 #if DEPTH_MAP_GENERATION 79 #if VIDYO_VPS_INTEGRATION 84 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 80 85 TComVPSAccess m_cVPSAccess; 81 86 #endif … … 95 100 Void destroy (); ///< destroy internal members 96 101 Void decode (); ///< main decoding function 97 #if VIDYO_VPS_INTEGRATION 102 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 98 103 Void increaseNumberOfViews (UInt layerId, UInt viewId, UInt isDepth); 99 104 #else -
branches/HTM-4.0.1-VSP-dev0/source/App/TAppEncoder/TAppEncCfg.cpp
r193 r213 74 74 { 75 75 m_aidQP = NULL; 76 #if FIXES77 76 m_aidQPdepth = NULL; 78 #endif79 77 } 80 78 … … 86 84 } 87 85 88 #if FIXES89 86 if ( m_aidQPdepth ) 90 87 { 91 88 delete[] m_aidQPdepth; m_aidQPdepth = NULL; 92 89 } 93 #endif94 90 95 91 for(Int i = 0; i< m_pchInputFileList.size(); i++ ) … … 115 111 if (m_pchBitstreamFile != NULL) 116 112 free (m_pchBitstreamFile) ; 113 #if FLEX_CODING_ORDER_M23723 114 if (m_pchMVCJointCodingOrder != NULL) 115 { 116 free(m_pchMVCJointCodingOrder) ; 117 } 118 #endif 117 119 #if HHI_VSO 118 120 if ( m_pchVSOConfig != NULL) … … 120 122 #endif 121 123 122 #if FIX_MEM_LEAKS123 124 if ( m_pchCameraParameterFile != NULL ) 124 125 free ( m_pchCameraParameterFile ); … … 139 140 free ( m_scalingListFile ); 140 141 141 #endif142 142 143 143 } … … 225 225 string cfg_RowHeight; 226 226 string cfg_ScalingListFile; 227 228 #if FLEX_CODING_ORDER_M23723 229 string cfg_JointCodingOrdering; 230 #endif 231 227 232 po::Options opts; 228 233 opts.addOptions() … … 268 273 269 274 ("NumberOfViews", m_iNumberOfViews, 0, "Number of views") 275 #if FLEX_CODING_ORDER_M23723 276 ("FCO", m_b3DVFlexOrder, false, "flexible coding order flag" ) 277 ("FCOCodingOrder", cfg_JointCodingOrdering, string(""), "The coding order for joint texture-depth coding") 278 #endif 270 279 /* Unit definition parameters */ 271 280 ("MaxCUWidth", m_uiMaxCUWidth, 64u) … … 298 307 ("FastSearch", m_iFastSearch, 1, "0:Full search 1:Diamond 2:PMVFAST") 299 308 ("SearchRange,-sr",m_iSearchRange, 96, "motion search range") 309 #if DV_V_RESTRICTION_B0037 310 ("DisparitySearchRangeRestriction",m_bUseDisparitySearchRangeRestriction, false, "restrict disparity search range") 311 ("VerticalDisparitySearchRange",m_iVerticalDisparitySearchRange, 56, "vertical disparity search range") 312 #endif 300 313 ("BipredSearchRange", m_bipredSearchRange, 4, "motion search range for bipred refinement") 301 314 ("HadamardME", m_bUseHADME, true, "hadamard ME for fractional-pel") … … 342 355 ("LoopFilterBetaOffset_div2", m_loopFilterBetaOffsetDiv2, 0 ) 343 356 ("LoopFilterTcOffset_div2", m_loopFilterTcOffsetDiv2, 0 ) 357 #if LGE_ILLUCOMP_B0045 358 ("IlluCompEnable", m_bUseIC , true , "Use illumination compensation for inter-view prediction" ) 359 #endif 344 360 #if DBL_CONTROL 345 #if FIX_DBL_CONTROL_DEFAULT346 361 ("DeblockingFilterControlPresent", m_DeblockingFilterControlPresent, true) 347 #else348 ("DeblockingFilterControlPresent", m_DeblockingFilterControlPresent, false)349 #endif350 362 #endif 351 363 352 364 /* Camera Paremetes */ 353 365 ("CameraParameterFile,cpf", m_pchCameraParameterFile, (Char *) 0, "Camera Parameter File Name") 366 #if QC_MVHEVC_B0046 367 ("BaseViewCameraNumbers" , m_aiVId, std::vector<Int>(1, MAX_VIEW_NUM), "Numbers of base views") 368 #endif 354 369 ("BaseViewCameraNumbers" , m_pchBaseViewCameraNumbers, (Char *) 0, "Numbers of base views") 355 370 … … 362 377 ("LambdaScaleVSO", m_dLambdaScaleVSO , (Double) 1 , "Lambda Scaling for VSO") 363 378 364 #if HHI_VSO_LS_TABLE 379 #if HHI_VSO_LS_TABLE_M23714 365 380 ("VSOLSTable", m_bVSOLSTable , true , "Depth QP dependent video/depth rate allocation by Lagrange multiplier" ) 366 381 #endif … … 377 392 #endif 378 393 #if LGE_WVSO_A0119 379 ("WVSO", m_bUseWVSO , false, "Use depth fidelity term for VSO" )394 ("WVSO", m_bUseWVSO , true , "Use depth fidelity term for VSO" ) 380 395 ("VSOWeight", m_iVSOWeight , 10 , "Synthesized View Distortion Change weight" ) 381 396 ("VSDWeight", m_iVSDWeight , 1 , "View Synthesis Distortion estimate weight" ) … … 383 398 #endif 384 399 385 #if OL_DEPTHLIMIT_A0044 386 ("DPL", m_bDepthPartitionLimiting , false , "Use DepthPartitionLimiting" ) 387 #endif 400 #if OL_QTLIMIT_PREDCODING_B0068 401 ("QTLPC", m_bUseQTLPC , true , "Use depth Quadtree Limitation + Predictive Coding" ) 402 #endif 403 388 404 #endif 389 405 … … 474 490 "\t0: disable") 475 491 492 #if TMVP_DEPTH_SWITCH 493 ("TMVP", m_enableTMVP, std::vector<Bool>(1,true), "Enable TMVP" ) 494 #else 476 495 ("TMVP", m_enableTMVP, true, "Enable TMVP" ) 496 #endif 477 497 478 498 ("FEN", m_bUseFastEnc, false, "fast encoder setting") … … 493 513 #if HHI_MPI 494 514 ("MVI", m_bUseMVI, false, "use motion vector inheritance for depth map coding") 515 #endif 516 #if RWTH_SDC_DLT_B0036 517 ("DLT", m_bUseDLT, true, "use depth lookup table for depth map coding") 518 ("SDC", m_bUseSDC, true, "use simplified depth coding tree") 495 519 #endif 496 520 ; … … 545 569 m_pchBitstreamFile = cfg_BitstreamFile.empty() ? NULL : strdup(cfg_BitstreamFile.c_str()); 546 570 m_pchdQPFile = cfg_dQPFile.empty() ? NULL : strdup(cfg_dQPFile.c_str()); 547 571 #if FLEX_CODING_ORDER_M23723 572 m_pchMVCJointCodingOrder= cfg_JointCodingOrdering.empty()?NULL:strdup(cfg_JointCodingOrdering.c_str()); 573 // If flexible order is enabled and if depth comes before the texture for a view, disable VSO 574 #if HHI_VSO && DISABLE_FCO_FOR_VSO 575 Bool depthComesFirst = false; 576 int iter = 0; 577 if ( m_b3DVFlexOrder ) 578 { 579 for(Int iViewIdx=0; iViewIdx<m_iNumberOfViews; iViewIdx++) 580 { 581 iter = 0; 582 for ( Int ii=1; ii<12; ii+=2 ) 583 { 584 Int iViewIdxCfg = (Int)(m_pchMVCJointCodingOrder[ii]-'0'); 585 if ( iViewIdxCfg == iViewIdx ) 586 { 587 iter ++; 588 if ( m_pchMVCJointCodingOrder[ii-1]=='D' ) // depth comes first for this view 589 { 590 if(iter == 1) 591 { 592 depthComesFirst = true; 593 break; 594 } 595 } 596 else 597 { 598 assert(m_pchMVCJointCodingOrder[ii-1]=='T'); 599 } 600 } 601 } 602 } 603 } 604 if (depthComesFirst) 605 { 606 m_bUseVSO = false; 607 } 608 #endif 609 #endif 548 610 m_pchColumnWidth = cfg_ColumnWidth.empty() ? NULL: strdup(cfg_ColumnWidth.c_str()); 549 611 m_pchRowHeight = cfg_RowHeight.empty() ? NULL : strdup(cfg_RowHeight.c_str()); … … 704 766 xCleanUpVectors(); 705 767 768 769 #if TMVP_DEPTH_SWITCH 770 if ( m_enableTMVP.size() < 2) 771 { 772 m_enableTMVP.push_back( m_enableTMVP[0] ); 773 } 774 #endif 775 776 706 777 #if HHI_VSO 707 778 if ( m_abUseALF .size() < 2) … … 732 803 #if HHI_VSO 733 804 734 #if HHI_VSO_LS_TABLE 805 #if HHI_VSO_LS_TABLE_M23714 735 806 // Q&D 736 807 Double adLambdaScaleTable[] = … … 796 867 } 797 868 #else 869 #if !QC_MVHEVC_B0046 798 870 m_cCameraData .init ( (UInt)m_iNumberOfViews, 799 871 m_uiInputBitDepth, … … 807 879 LOG2_DISP_PREC_LUT ); 808 880 #endif 881 #endif 809 882 810 883 811 884 // check validity of input parameters 812 885 xCheckParameter(); 886 #if !QC_MVHEVC_B0046 813 887 m_cCameraData.check( false, true ); 814 888 #endif 815 889 // print-out parameters 816 890 xPrintParameter(); … … 860 934 xConfirmPara( m_iFastSearch < 0 || m_iFastSearch > 2, "Fast Search Mode is not supported value (0:Full search 1:Diamond 2:PMVFAST)" ); 861 935 xConfirmPara( m_iSearchRange < 0 , "Search Range must be more than 0" ); 936 #if DV_V_RESTRICTION_B0037 937 xConfirmPara( m_iVerticalDisparitySearchRange <= 0 , "Vertical Disparity Search Range must be more than 0" ); 938 #endif 862 939 xConfirmPara( m_bipredSearchRange < 0 , "Search Range must be more than 0" ); 863 940 xConfirmPara( m_iMaxDeltaQP > 7, "Absolute Delta QP exceeds supported range (0 to 7)" ); … … 1650 1727 printf("Min PCM size : %d\n", 1 << m_uiPCMLog2MinSize); 1651 1728 printf("Motion search range : %d\n", m_iSearchRange ); 1729 #if DV_V_RESTRICTION_B0037 1730 printf("Disp search range restriction: %d\n", m_bUseDisparitySearchRangeRestriction ); 1731 printf("Vertical disp search range : %d\n", m_iVerticalDisparitySearchRange ); 1732 #endif 1652 1733 printf("Intra period : %d\n", m_iIntraPeriod ); 1653 1734 printf("Decoding refresh type : %d\n", m_iDecodingRefreshType ); … … 1685 1766 printf("VSO Negative Distortion : %d\n", m_bAllowNegDist ? 1 : 0); 1686 1767 #endif 1687 #if HHI_VSO_LS_TABLE 1768 #if HHI_VSO_LS_TABLE_M23714 1688 1769 printf("VSO LS Table : %d\n", m_bVSOLSTable ? 1 : 0); 1689 1770 #endif … … 1769 1850 printf(" ScalingList:%d ", m_useScalingListId ); 1770 1851 1852 #if !TMVP_DEPTH_SWITCH 1771 1853 printf("TMVP:%d ", m_enableTMVP ); 1854 #endif 1772 1855 1773 1856 #if ADAPTIVE_QP_SELECTION … … 1783 1866 printf("SAO:%d ", (m_abUseSAO [0] ? 1 : 0)); 1784 1867 printf("RDQ:%d ", (m_abUseRDOQ[0] ? 1 : 0) ); 1868 #if TMVP_DEPTH_SWITCH 1869 printf("TMVP:%d ", (m_enableTMVP[0] ? 1 : 0) ); 1870 #endif 1871 #if LGE_ILLUCOMP_B0045 1872 printf("IlluCompEnable: %d ", m_bUseIC); 1873 #endif 1874 1785 1875 printf("\n"); 1786 1876 … … 1789 1879 printf("SAO:%d ", (m_abUseSAO [1] ? 1 : 0)); 1790 1880 printf("RDQ:%d ", (m_abUseRDOQ[1] ? 1 : 0)); 1881 #if TMVP_DEPTH_SWITCH 1882 printf("TMVP:%d ", (m_enableTMVP[1] ? 1 : 0) ); 1883 #endif 1884 #if FLEX_CODING_ORDER_M23723 1885 printf("FCO:%d ", (m_b3DVFlexOrder ? 1: 0)); 1886 1887 if(m_b3DVFlexOrder) 1888 { 1889 printf("CodingOrder: %s ", m_pchMVCJointCodingOrder); 1890 } 1891 #endif 1791 1892 #if HHI_VSO 1792 1893 printf("VSO:%d ", m_bUseVSO ); … … 1795 1896 printf("WVSO:%d ", m_bUseWVSO ); 1796 1897 #endif 1797 #if OL_ DEPTHLIMIT_A00441798 printf(" DPL:%d ", m_bDepthPartitionLimiting);1898 #if OL_QTLIMIT_PREDCODING_B0068 1899 printf("QTLPC:%d ", m_bUseQTLPC); 1799 1900 #endif 1800 1901 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX … … 1804 1905 printf("MVI:%d ", m_bUseMVI ? 1 : 0 ); 1805 1906 #endif 1907 #if RWTH_SDC_DLT_B0036 1908 printf("SDC:%d ", m_bUseSDC ? 1 : 0 ); 1909 printf("DLT:%d ", m_bUseDLT ? 1 : 0 ); 1910 #endif 1806 1911 #if LGE_WVSO_A0119 1807 printf("\nVSO : VSD : SAD weight = %d : %d : %d ", m_iVSOWeight, m_iVSDWeight, m_iDWeight ); 1912 if ( m_bUseWVSO ) 1913 printf("\nVSO : VSD : SAD weight = %d : %d : %d ", m_iVSOWeight, m_iVSDWeight, m_iDWeight ); 1808 1914 #endif 1809 1915 printf("\n\n"); -
branches/HTM-4.0.1-VSP-dev0/source/App/TAppEncoder/TAppEncCfg.h
r193 r213 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) … … 160 169 #endif 161 170 vector<Bool> m_abUseSAO; 171 #if LGE_ILLUCOMP_B0045 172 Bool m_bUseIC; ///< flag for using illumination compensation for inter-view prediction 173 #endif 162 174 #if SAO_UNIT_INTERLEAVING 163 175 Int m_maxNumOffsetsPerPic; ///< SAO maximun number of offset per picture … … 197 209 Int m_iFastSearch; ///< ME mode, 0 = full, 1 = diamond, 2 = PMVFAST 198 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 199 215 Int m_bipredSearchRange; ///< ME search range for bipred refinement 200 216 Bool m_bUseFastEnc; ///< flag for using fast encoder setting … … 258 274 UInt m_uiBiPredIdc; ///< Use of Bi-Directional Weighting Prediction (B_SLICE): explicit(1) or implicit(2) 259 275 276 #if TMVP_DEPTH_SWITCH 277 vector<Bool> m_enableTMVP; ///< Enable TMVP [0] video, [1] depth 278 #else 260 279 Bool m_enableTMVP; 280 #endif 281 261 282 #if MULTIBITS_DATA_HIDING 262 283 Int m_signHideFlag; … … 266 287 Bool m_bUseMVI; ///< flag for using Motion Vector Inheritance for depth map coding 267 288 #endif 289 #if RWTH_SDC_DLT_B0036 290 Bool m_bUseDLT; 291 Bool m_bUseSDC; 292 #endif 268 293 269 294 Int m_useScalingListId; ///< using quantization matrix … … 273 298 Char* m_pchCameraParameterFile; ///< camera parameter file 274 299 Char* m_pchBaseViewCameraNumbers; 300 #if !QC_MVHEVC_B0046 275 301 TAppComCamPara m_cCameraData; 276 302 #endif 277 303 Int m_iCodedCamParPrecision; ///< precision for coding of camera parameters 278 304 … … 280 306 Char* m_pchVSOConfig; 281 307 Bool m_bUseVSO; ///< flag for using View Synthesis Optimization 282 #if HHI_VSO_LS_TABLE 308 #if HHI_VSO_LS_TABLE_M23714 283 309 Bool m_bVSOLSTable; ///< Depth QP dependent Lagrange parameter optimization (m23714) 284 310 #endif … … 313 339 #endif 314 340 315 #if OL_ DEPTHLIMIT_A0044316 Bool m_b DepthPartitionLimiting;341 #if OL_QTLIMIT_PREDCODING_B0068 342 Bool m_bUseQTLPC; ///< flag for using depth QuadTree Limitation + Predictive Coding 317 343 #endif 318 344 -
branches/HTM-4.0.1-VSP-dev0/source/App/TAppEncoder/TAppEncTop.cpp
r193 r213 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 { … … 81 87 for(Int iViewIdx=0; iViewIdx<m_iNumberOfViews; iViewIdx++) 82 88 { 89 #if VSP_N 90 #if FLEX_CODING_ORDER_M23723 91 Bool isTextureFirst = false; 92 if ( m_b3DVFlexOrder ) 93 { 94 for ( Int ii=1; ii<12; ii+=2 ) 95 { 96 Int iViewIdxCfg = (Int)(m_pchMVCJointCodingOrder[ii]-'0'); 97 if ( iViewIdxCfg == iViewIdx ) 98 { 99 if ( m_pchMVCJointCodingOrder[ii-1]=='T' ) 100 { 101 isTextureFirst = true; 102 } 103 else 104 { 105 assert(m_pchMVCJointCodingOrder[ii-1]=='D'); 106 } 107 break; 108 } 109 } 110 } 111 else 112 { 113 isTextureFirst = true; 114 } 115 #endif 116 #endif 83 117 m_frameRcvd.push_back(0); 84 118 m_acTEncTopList.push_back(new TEncTop); … … 101 135 m_acTEncTopList[iViewIdx]->setViewId ( iViewIdx ); 102 136 m_acTEncTopList[iViewIdx]->setIsDepth ( false ); 137 #if QC_MVHEVC_B0046 138 m_acTEncTopList[iViewIdx]->setLayerId ( iViewIdx ); 139 m_cVPS.setViewId ( m_aiVId[ iViewIdx ], iViewIdx ); 140 #else 103 141 m_acTEncTopList[iViewIdx]->setViewOrderIdx ( m_cCameraData.getViewOrderIndex()[ iViewIdx ] ); 104 142 #if VIDYO_VPS_INTEGRATION … … 113 151 #endif 114 152 153 #if VSP_N 115 154 m_acTEncTopList[iViewIdx]->setCamParPrecision ( m_cCameraData.getCamParsCodedPrecision () ); 116 155 m_acTEncTopList[iViewIdx]->setCamParInSliceHeader ( m_cCameraData.getVaryingCameraParameters() ); 117 156 m_acTEncTopList[iViewIdx]->setCodedScale ( m_cCameraData.getCodedScale () ); 118 157 m_acTEncTopList[iViewIdx]->setCodedOffset ( m_cCameraData.getCodedOffset () ); 158 #else 159 m_acTEncTopList[iViewIdx]->setCamParPrecision ( 0 ); 160 m_acTEncTopList[iViewIdx]->setCamParInSliceHeader ( false ); 161 m_acTEncTopList[iViewIdx]->setCodedScale ( 0 ); 162 m_acTEncTopList[iViewIdx]->setCodedOffset ( 0 ); 163 #endif 164 #endif 119 165 120 166 //====== Coding Structure ======== … … 170 216 m_acTEncTopList[iViewIdx]->setSearchRange ( m_iSearchRange ); 171 217 m_acTEncTopList[iViewIdx]->setBipredSearchRange ( m_bipredSearchRange ); 172 218 #if DV_V_RESTRICTION_B0037 219 m_acTEncTopList[iViewIdx]->setUseDisparitySearchRangeRestriction ( m_bUseDisparitySearchRangeRestriction ); 220 m_acTEncTopList[iViewIdx]->setVerticalDisparitySearchRange( m_iVerticalDisparitySearchRange ); 221 #endif 173 222 //====== Quality control ======== 174 223 m_acTEncTopList[iViewIdx]->setMaxDeltaQP ( m_iMaxDeltaQP ); … … 300 349 m_acTEncTopList[iViewIdx]->setLFCrossSliceBoundaryFlag( m_bLFCrossSliceBoundaryFlag ); 301 350 m_acTEncTopList[iViewIdx]->setUseSAO ( m_abUseSAO[0] ); 351 #if LGE_ILLUCOMP_B0045 352 m_acTEncTopList[iViewIdx]->setUseIC ( m_bUseIC ); 353 #endif 302 354 #if SAO_UNIT_INTERLEAVING 303 355 m_acTEncTopList[iViewIdx]->setMaxNumOffsetsPerPic (m_maxNumOffsetsPerPic); … … 342 394 m_acTEncTopList[iViewIdx]->setWaveFrontFlush ( m_iWaveFrontFlush ); 343 395 m_acTEncTopList[iViewIdx]->setWaveFrontSubstreams ( m_iWaveFrontSubstreams ); 396 #if TMVP_DEPTH_SWITCH 397 m_acTEncTopList[iViewIdx]->setEnableTMVP ( m_enableTMVP[0] ); 398 #else 344 399 m_acTEncTopList[iViewIdx]->setEnableTMVP ( m_enableTMVP ); 400 #endif 345 401 m_acTEncTopList[iViewIdx]->setUseScalingListId ( m_useScalingListId ); 346 402 m_acTEncTopList[iViewIdx]->setScalingListFile ( m_scalingListFile ); … … 364 420 m_acTEncTopList[iViewIdx]->setUseDMM ( false ); 365 421 #endif 366 #if OL_ DEPTHLIMIT_A0044367 m_acTEncTopList[iViewIdx]->setUse DPL( false );422 #if OL_QTLIMIT_PREDCODING_B0068 423 m_acTEncTopList[iViewIdx]->setUseQTLPC ( false ); 368 424 #endif 369 425 #if HHI_MPI 370 426 m_acTEncTopList[iViewIdx]->setUseMVI( false ); 427 #endif 428 #if RWTH_SDC_DLT_B0036 429 m_acTEncTopList[iViewIdx]->setUseDLT ( false ); 430 m_acTEncTopList[iViewIdx]->setUseSDC ( false ); 371 431 #endif 372 432 … … 374 434 m_acTEncTopList[iViewIdx]->setUseVSP( m_bUseVSP ); 375 435 m_acTEncTopList[iViewIdx]->setVSPDepthDisable( m_bVSPDepthDisable ); 436 #if FLEX_CODING_ORDER_M23723 437 m_acTEncTopList[iViewIdx]->setIsFirstInView( isTextureFirst ); 438 #else 439 m_acTEncTopList[iViewIdx]->setIsFirstInView( true ); 440 #endif 376 441 #endif 377 442 } … … 380 445 for(Int iViewIdx=0; iViewIdx<m_iNumberOfViews; iViewIdx++) 381 446 { 447 448 #if FLEX_CODING_ORDER_M23723 449 // Detect whether depth comes before than texture for this view 450 Bool isDepthFirst = false; 451 if ( m_b3DVFlexOrder ) 452 { 453 for ( Int ii=1; ii<12; ii+=2 ) 454 { 455 Int iViewIdxCfg = (Int)(m_pchMVCJointCodingOrder[ii]-'0'); 456 if ( iViewIdxCfg == iViewIdx ) 457 { 458 if ( m_pchMVCJointCodingOrder[ii-1]=='D' ) // depth comes first for this view 459 { 460 isDepthFirst = true; 461 } 462 else 463 { 464 assert(m_pchMVCJointCodingOrder[ii-1]=='T'); 465 } 466 break; 467 } 468 } 469 } 470 #endif 471 382 472 m_depthFrameRcvd.push_back(0); 383 473 m_acTEncDepthTopList.push_back(new TEncTop); … … 400 490 m_acTEncDepthTopList[iViewIdx]->setViewId ( iViewIdx ); 401 491 m_acTEncDepthTopList[iViewIdx]->setIsDepth ( true ); 492 #if QC_MVHEVC_B0046 493 m_acTEncDepthTopList[iViewIdx]->setLayerId ( iViewIdx ); 494 #else 402 495 m_acTEncDepthTopList[iViewIdx]->setViewOrderIdx ( m_cCameraData.getViewOrderIndex()[ iViewIdx ] ); 496 #endif 403 497 #if VIDYO_VPS_INTEGRATION 404 498 layerId = iViewIdx * 2 + 1; … … 410 504 m_cVPS.setDependentLayer ( layerId-1, layerId); 411 505 #endif 506 507 #if VSP_N 508 m_acTEncDepthTopList[iViewIdx]->setCamParPrecision ( m_cCameraData.getCamParsCodedPrecision () ); 509 m_acTEncDepthTopList[iViewIdx]->setCamParInSliceHeader ( m_cCameraData.getVaryingCameraParameters() ); 510 m_acTEncDepthTopList[iViewIdx]->setCodedScale ( m_cCameraData.getCodedScale () ); 511 m_acTEncDepthTopList[iViewIdx]->setCodedOffset ( m_cCameraData.getCodedOffset () ); 512 #else 412 513 m_acTEncDepthTopList[iViewIdx]->setCamParPrecision ( 0 ); 413 514 m_acTEncDepthTopList[iViewIdx]->setCamParInSliceHeader ( false ); 414 515 m_acTEncDepthTopList[iViewIdx]->setCodedScale ( 0 ); 415 516 m_acTEncDepthTopList[iViewIdx]->setCodedOffset ( 0 ); 517 #endif 416 518 417 519 //====== Coding Structure ======== … … 467 569 m_acTEncDepthTopList[iViewIdx]->setSearchRange ( m_iSearchRange ); 468 570 m_acTEncDepthTopList[iViewIdx]->setBipredSearchRange ( m_bipredSearchRange ); 469 571 #if DV_V_RESTRICTION_B0037 572 m_acTEncDepthTopList[iViewIdx]->setUseDisparitySearchRangeRestriction ( m_bUseDisparitySearchRangeRestriction ); 573 m_acTEncDepthTopList[iViewIdx]->setVerticalDisparitySearchRange( m_iVerticalDisparitySearchRange ); 574 #endif 470 575 //====== Quality control ======== 471 576 m_acTEncDepthTopList[iViewIdx]->setMaxDeltaQP ( m_iMaxDeltaQP ); … … 584 689 m_acTEncDepthTopList[iViewIdx]->setLFCrossSliceBoundaryFlag( m_bLFCrossSliceBoundaryFlag ); 585 690 m_acTEncDepthTopList[iViewIdx]->setUseSAO ( m_abUseSAO[1] ); 691 #if LGE_ILLUCOMP_B0045 692 m_acTEncDepthTopList[iViewIdx]->setUseIC ( false ); 693 #endif 586 694 #if SAO_UNIT_INTERLEAVING 587 695 m_acTEncDepthTopList[iViewIdx]->setMaxNumOffsetsPerPic (m_maxNumOffsetsPerPic); … … 626 734 m_acTEncDepthTopList[iViewIdx]->setWaveFrontFlush ( m_iWaveFrontFlush ); 627 735 m_acTEncDepthTopList[iViewIdx]->setWaveFrontSubstreams ( m_iWaveFrontSubstreams ); 736 #if TMVP_DEPTH_SWITCH 737 m_acTEncDepthTopList[iViewIdx]->setEnableTMVP ( m_enableTMVP[1] ); 738 #else 628 739 m_acTEncDepthTopList[iViewIdx]->setEnableTMVP ( m_enableTMVP ); 740 #endif 629 741 m_acTEncDepthTopList[iViewIdx]->setUseScalingListId ( m_useScalingListId ); 630 742 m_acTEncDepthTopList[iViewIdx]->setScalingListFile ( m_scalingListFile ); … … 648 760 m_acTEncDepthTopList[iViewIdx]->setUseDMM ( m_bUseDMM ); 649 761 #endif 650 #if OL_DEPTHLIMIT_A0044 651 m_acTEncDepthTopList[iViewIdx]->setUseDPL (m_bDepthPartitionLimiting); 762 #if FLEX_CODING_ORDER_M23723 && HHI_DMM_PRED_TEX 763 m_acTEncDepthTopList[iViewIdx]->setUseDMM34( (m_b3DVFlexOrder && isDepthFirst) ? false : m_bUseDMM ); 764 #endif 765 766 #if OL_QTLIMIT_PREDCODING_B0068 767 m_acTEncDepthTopList[iViewIdx]->setUseQTLPC (m_bUseQTLPC); 652 768 #endif 653 769 #if HHI_MPI 654 m_acTEncDepthTopList[iViewIdx]->setUseMVI( m_bUseMVI ); 770 #if FLEX_CODING_ORDER_M23723 771 m_acTEncDepthTopList[iViewIdx]->setUseMVI( (m_b3DVFlexOrder && isDepthFirst) ? false : m_bUseMVI ); 772 #else 773 m_acTEncDepthTopList[iViewIdx]->setUseMVI( m_bUseMVI ); 774 #endif 775 #endif 776 #if RWTH_SDC_DLT_B0036 777 m_acTEncDepthTopList[iViewIdx]->setUseDLT ( m_bUseDLT ); 778 m_acTEncDepthTopList[iViewIdx]->setUseSDC ( m_bUseSDC ); 655 779 #endif 656 780 … … 658 782 m_acTEncDepthTopList[iViewIdx]->setUseVSP( m_bUseVSP ); 659 783 m_acTEncDepthTopList[iViewIdx]->setVSPDepthDisable( m_bVSPDepthDisable ); 784 #if FLEX_CODING_ORDER_M23723 785 m_acTEncDepthTopList[iViewIdx]->setIsFirstInView( isDepthFirst ); 786 #else 787 m_acTEncDepthTopList[iViewIdx]->setIsFirstInView( false ); 788 #endif 660 789 #endif 661 790 } … … 677 806 if ( m_uiVSOMode == 4 ) 678 807 { 679 #if HHI_VSO_SPEEDUP_A0033680 808 #if LGE_VSO_EARLY_SKIP_A0093 681 809 m_cRendererModel.create( m_cRenModStrParser.getNumOfBaseViews(), m_cRenModStrParser.getNumOfModels(), m_iSourceWidth, g_uiMaxCUHeight , LOG2_DISP_PREC_LUT, 0, m_bVSOEarlySkip ); 682 810 #else 683 811 m_cRendererModel.create( m_cRenModStrParser.getNumOfBaseViews(), m_cRenModStrParser.getNumOfModels(), m_iSourceWidth, g_uiMaxCUHeight , LOG2_DISP_PREC_LUT, 0 ); 684 #endif685 #else686 m_cRendererModel.create( m_cRenModStrParser.getNumOfBaseViews(), m_cRenModStrParser.getNumOfModels(), m_iSourceWidth, m_iSourceHeight, LOG2_DISP_PREC_LUT, 0 );687 812 #endif 688 813 … … 820 945 { 821 946 m_acTEncTopList[iViewIdx]->init( this ); 947 #if QC_MVHEVC_B0046 948 //set setNumDirectRefLayer 949 Int iNumDirectRef = m_acTEncTopList[iViewIdx]->getSPS()->getNumberOfUsableInterViewRefs(); 950 m_acTEncTopList[iViewIdx]->getEncTop()->getVPS()->setNumDirectRefLayer(iNumDirectRef, iViewIdx); 951 for(Int iNumIvRef = 0; iNumIvRef < iNumDirectRef; iNumIvRef ++) 952 { 953 Int iLayerId = m_acTEncTopList[iViewIdx]->getSPS()->getUsableInterViewRef(iNumIvRef); 954 m_acTEncTopList[iViewIdx]->getEncTop()->getVPS()->setDirectRefLayerId( iLayerId + iViewIdx, iViewIdx, iNumIvRef); 955 } 956 #endif 822 957 } 823 958 for(Int iViewIdx=0; iViewIdx<m_iNumberOfViews; iViewIdx++) … … 861 996 TComPicYuv* pcPicYuvOrg = new TComPicYuv; 862 997 TComPicYuv* pcDepthPicYuvOrg = new TComPicYuv; 998 #if !QC_MVHEVC_B0046 863 999 TComPicYuv* pcPdmDepthOrg = new TComPicYuv; 1000 #endif 864 1001 TComPicYuv* pcPicYuvRec = NULL; 865 1002 TComPicYuv* pcDepthPicYuvRec = NULL; 866 1003 867 1004 // initialize internal class & member variables 868 1005 xInitLibCfg(); … … 884 1021 eos.push_back( false ); 885 1022 depthEos.push_back( false ); 1023 1024 #if RWTH_SDC_DLT_B0036 1025 if( m_bUsingDepthMaps && m_bUseDLT ) 1026 xAnalyzeInputBaseDepth(iViewIdx, m_iIntraPeriod); 1027 #endif 886 1028 } 887 1029 … … 957 1099 { 958 1100 Int iNumEncoded = 0; 1101 #if !QC_MVHEVC_B0046 959 1102 UInt iNextPoc = m_acTEncTopList[0] -> getFrameId( gopId ); 960 1103 if ( iNextPoc < m_iFrameToBeEncoded ) … … 962 1105 m_cCameraData.update( iNextPoc ); 963 1106 } 1107 #endif 1108 1109 #if FLEX_CODING_ORDER_M23723 1110 if (m_b3DVFlexOrder) 1111 { 1112 Int iNumDepthEncoded = 0; 1113 iNumEncoded = 0; 1114 Int i=0; 1115 Int iViewIdx=0; 1116 Int iNumberofDepthViews = m_bUsingDepthMaps?m_iNumberOfViews:0; 1117 for (Int j=0; j < (m_iNumberOfViews+ iNumberofDepthViews); j++ ) 1118 { 1119 if (m_pchMVCJointCodingOrder[i]=='T') 1120 { 1121 1122 i++; 1123 assert(isdigit(m_pchMVCJointCodingOrder[i])); 1124 iViewIdx = (Int)(m_pchMVCJointCodingOrder[i]-'0'); 1125 1126 #if VSP_SLICE_HEADER && !VSP_CFG 1127 if( m_acTEncTopList[iViewIdx]->getUseVSP() ) m_acTEncTopList[iViewIdx]->setUseVSP( (gopId%VSP_FRAME_INTERVAL==0) ); 1128 #endif 1129 1130 #if VSP_N 1131 #if VSP_SLICE_HEADER 1132 if( m_acTEncTopList[iViewIdx]->getUseVSP() ) 1133 #endif 1134 if( m_bUsingDepthMaps ) 1135 { 1136 // Forward Warping 1137 xStoreVSPInBuffer( m_acTEncTopList[iViewIdx]->getVSPBuf(), m_acTEncTopList[iViewIdx]->getVSPAvailBuf(), iViewIdx, false, gopId ); 1138 } 1139 #endif 1140 1141 m_acTEncTopList[iViewIdx]->encode( eos[iViewIdx], pcPicYuvOrg, *m_picYuvRec[iViewIdx], outputAccessUnits, iNumEncoded, gopId ); 1142 xWriteOutput(bitstreamFile, iNumEncoded, outputAccessUnits, iViewIdx, false); 1143 outputAccessUnits.clear(); 1144 i++; 1145 } 1146 else if ( m_pchMVCJointCodingOrder[i] == 'D') 1147 { 1148 1149 i++; 1150 if( m_bUsingDepthMaps ) 1151 { 1152 assert(isdigit(m_pchMVCJointCodingOrder[i])); 1153 iViewIdx = (Int)(m_pchMVCJointCodingOrder[i]-'0'); 1154 #if SAIT_VSO_EST_A0033 1155 if( m_bUseVSO && iNextPoc < m_iFrameToBeEncoded ) 1156 { 1157 m_cCameraData.xSetDispCoeff( iNextPoc, iViewIdx ); 1158 m_acTEncDepthTopList[iViewIdx]->setDispCoeff( m_cCameraData.getDispCoeff() ); 1159 } 1160 #endif 1161 1162 #if VSP_SLICE_HEADER && !VSP_CFG 1163 if( m_acTEncDepthTopList[iViewIdx]->getUseVSP() ) m_acTEncDepthTopList[iViewIdx]->setUseVSP( (gopId%VSP_FRAME_INTERVAL==0) ); 1164 #endif 1165 1166 #if VSP_N 1167 #if VSP_SLICE_HEADER 1168 if( m_acTEncDepthTopList[iViewIdx]->getUseVSP() ) 1169 if( !m_acTEncDepthTopList[iViewIdx]->getVSPDepthDisable() ) 1170 #endif 1171 xStoreVSPInBuffer( m_acTEncDepthTopList[iViewIdx]->getVSPBuf(), m_acTEncDepthTopList[iViewIdx]->getVSPAvailBuf(), iViewIdx, true, gopId ); 1172 #endif 1173 1174 m_acTEncDepthTopList[iViewIdx]->encode( depthEos[iViewIdx], pcDepthPicYuvOrg, *m_picYuvDepthRec[iViewIdx], outputAccessUnits, iNumDepthEncoded, gopId ); 1175 xWriteOutput(bitstreamFile, iNumDepthEncoded, outputAccessUnits, iViewIdx, true); 1176 outputAccessUnits.clear(); 1177 i++; 1178 } 1179 } 1180 } 1181 } 1182 else 1183 { 1184 1185 #endif 964 1186 for(Int iViewIdx=0; iViewIdx < m_iNumberOfViews; iViewIdx++ ) 965 1187 { … … 1008 1230 } 1009 1231 } 1232 1233 #if FLEX_CODING_ORDER_M23723 1234 } 1235 #endif 1236 1010 1237 #if HHI_INTERVIEW_SKIP || HHI_INTER_VIEW_MOTION_PRED || HHI_INTER_VIEW_RESIDUAL_PRED 1011 1238 for( Int iViewIdx = 0; iViewIdx < m_iNumberOfViews; iViewIdx++ ) … … 1040 1267 pcDepthPicYuvOrg = NULL; 1041 1268 1042 #if FIX_MEM_LEAKS 1269 #if !QC_MVHEVC_B0046 1270 #if FIX_DEL_NULLPTR 1271 if ( pcPdmDepthOrg != NULL && m_uiMultiviewMvRegMode ) 1272 #else 1043 1273 if ( pcPdmDepthOrg != NULL ) 1274 #endif 1044 1275 { 1045 1276 pcPdmDepthOrg->destroy(); … … 1048 1279 }; 1049 1280 #endif 1050 1051 1281 1052 1282 for(Int iViewIdx=0; iViewIdx < m_iNumberOfViews; iViewIdx++ ) … … 1252 1482 case NAL_UNIT_CODED_SLICE: 1253 1483 #if H0566_TLA 1484 #if !QC_REM_IDV_B0046 1254 1485 case NAL_UNIT_CODED_SLICE_IDV: 1486 #endif 1255 1487 case NAL_UNIT_CODED_SLICE_TLA: 1256 1488 case NAL_UNIT_CODED_SLICE_CRA: … … 1306 1538 #endif 1307 1539 #if HHI_VSO 1308 #if HHI_VSO_SPEEDUP_A00331309 1540 Void TAppEncTop::setupRenModel( Int iPoc, Int iEncViewIdx, Int iEncContent, Int iHorOffset ) 1310 1541 { 1311 #if FIX_VSO_SETUP1312 1542 m_cRendererModel.setupPart( iHorOffset, Min( g_uiMaxCUHeight, m_iSourceHeight - iHorOffset ) ); 1313 #else1314 m_cRendererModel.setHorOffset( iHorOffset );1315 #endif1316 #else1317 Void TAppEncTop::setupRenModel( Int iPoc, Int iEncViewIdx, Int iEncContent )1318 {1319 #endif1320 1543 Int iEncViewSIdx = m_cCameraData.getBaseId2SortedId()[ iEncViewIdx ]; 1321 1544 … … 1455 1678 return pcPic; 1456 1679 }; 1680 1681 #if RWTH_SDC_DLT_B0036 1682 Void TAppEncTop::xAnalyzeInputBaseDepth(Int iViewIdx, UInt uiNumFrames) 1683 { 1684 TComPicYuv* pcDepthPicYuvOrg = new TComPicYuv; 1685 // allocate original YUV buffer 1686 pcDepthPicYuvOrg->create( m_iSourceWidth, m_iSourceHeight, m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth ); 1687 1688 TVideoIOYuv* depthVideoFile = new TVideoIOYuv; 1689 1690 UInt uiMaxDepthValue = g_uiIBDI_MAX; 1691 1692 Bool abValidDepths[256]; 1693 1694 depthVideoFile->open( m_pchDepthInputFileList[iViewIdx], false, m_uiInputBitDepth, m_uiInternalBitDepth ); // read mode 1695 1696 // initialize boolean array 1697 for(Int p=0; p<=uiMaxDepthValue; p++) 1698 abValidDepths[p] = false; 1699 1700 Int iHeight = pcDepthPicYuvOrg->getHeight(); 1701 Int iWidth = pcDepthPicYuvOrg->getWidth(); 1702 Int iStride = pcDepthPicYuvOrg->getStride(); 1703 1704 Pel* pInDM = pcDepthPicYuvOrg->getLumaAddr(); 1705 1706 for(Int uiFrame=0; uiFrame < uiNumFrames; uiFrame++ ) 1707 { 1708 depthVideoFile->read( pcDepthPicYuvOrg, m_aiPad, false ); 1709 1710 // check all pixel values 1711 for (Int i=0; i<iHeight; i++) 1712 { 1713 Int rowOffset = i*iStride; 1714 1715 for (Int j=0; j<iWidth; j++) 1716 { 1717 Pel depthValue = pInDM[rowOffset+j]; 1718 abValidDepths[depthValue] = true; 1719 } 1720 } 1721 } 1722 1723 depthVideoFile->close(); 1724 1725 pcDepthPicYuvOrg->destroy(); 1726 delete pcDepthPicYuvOrg; 1727 1728 // convert boolean array to idx2Depth LUT 1729 UInt* auiIdx2DepthValue = (UInt*) calloc(uiMaxDepthValue, sizeof(UInt)); 1730 UInt uiNumDepthValues = 0; 1731 for(UInt p=0; p<=uiMaxDepthValue; p++) 1732 { 1733 if( abValidDepths[p] == true) 1734 { 1735 auiIdx2DepthValue[uiNumDepthValues++] = p; 1736 } 1737 } 1738 1739 if( uiNumFrames == 0 || ceil(Log2(uiNumDepthValues)) == ceil(Log2(g_uiIBDI_MAX)) ) 1740 { 1741 // don't use DLT 1742 m_acTEncDepthTopList[iViewIdx]->setUseDLT(false); 1743 m_acTEncDepthTopList[iViewIdx]->getSPS()->setUseDLT(false); 1744 } 1745 1746 // assign LUT 1747 if( m_acTEncDepthTopList[iViewIdx]->getUseDLT() ) 1748 m_acTEncDepthTopList[iViewIdx]->getSPS()->setDepthLUTs(auiIdx2DepthValue, uiNumDepthValues); 1749 else 1750 m_acTEncDepthTopList[iViewIdx]->getSPS()->setDepthLUTs(); 1751 1752 // free temporary memory 1753 free(auiIdx2DepthValue); 1754 } 1755 #endif 1457 1756 1458 1757 #if VSP_N -
branches/HTM-4.0.1-VSP-dev0/source/App/TAppEncoder/TAppEncTop.h
r166 r213 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 … … 141 141 #endif 142 142 #if HHI_VSO 143 #if HHI_VSO_SPEEDUP_A0033144 143 Void setupRenModel ( Int iPoc, Int iEncViewIdx, Int iEncContent, Int iHorOffset ); 145 #else146 Void setupRenModel ( Int iPoc, Int iEncViewIdx, Int iEncContent );147 #endif148 144 #endif 149 145 146 #if QC_MVHEVC_B0046 147 TComVPS* getVPS() { return &m_cVPS; } 148 #endif 150 149 #if VIDYO_VPS_INTEGRATION 151 150 TComVPS* getVPS() { return &m_cVPS; } … … 166 165 Void xStoreVSORefPicsInBuffer(); ///< read in External Ref pic from file and store in buffer 167 166 #endif 167 168 #if RWTH_SDC_DLT_B0036 169 Void xAnalyzeInputBaseDepth(Int iViewIdx, UInt uiNumFrames); 170 #endif 168 171 169 172 #if VSP_N -
branches/HTM-4.0.1-VSP-dev0/source/App/TAppRenderer/RendererMain.cpp
r100 r213 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 -
branches/HTM-4.0.1-VSP-dev0/source/App/TAppRenderer/TAppRendererCfg.cpp
r100 r213 59 59 // Constructor / destructor / initialization / destroy 60 60 // ==================================================================================================================== 61 61 #if !QC_MVHEVC_B0046 62 62 TAppRendererCfg::TAppRendererCfg() 63 63 { … … 120 120 121 121 /* File I/O */ 122 ("VideoInputFileBaseName ", m_pchVideoInputFileBaseName, (Char*) 0, "Basename to generate video input file names")123 ("DepthInputFileBaseName ", m_pchDepthInputFileBaseName, (Char*) 0, "Basename to generate depth input file names")124 ("SynthOutputFileBaseName ", m_pchSynthOutputFileBaseName, (Char*) 0, "Basename to generate synthesized output file names")122 ("VideoInputFileBaseName,v", m_pchVideoInputFileBaseName, (Char*) 0, "Basename to generate video input file names") 123 ("DepthInputFileBaseName,d", m_pchDepthInputFileBaseName, (Char*) 0, "Basename to generate depth input file names") 124 ("SynthOutputFileBaseName,s", m_pchSynthOutputFileBaseName, (Char*) 0, "Basename to generate synthesized output file names") 125 125 ("ContOutputFileNumbering", m_bContOutputFileNumbering , false , "Continuous Output File Numbering") 126 126 ("Sweep" , m_bSweep , false , "Store all views in first Output File") … … 137 137 138 138 /* Camera Specification */ 139 ("CameraParameterFile, cpf", m_pchCameraParameterFile, (Char *) 0, "Camera Parameter File Name")139 ("CameraParameterFile,-cpf", m_pchCameraParameterFile, (Char *) 0, "Camera Parameter File Name") 140 140 ("BaseViewCameraNumbers" , m_pchBaseViewCameraNumbers, (Char *) 0, "Numbers of base views") 141 141 ("SynthViewCameraNumbers" , m_pchSynthViewCameraNumbers, (Char *) 0, "Numbers of views to synthesis") … … 516 516 g_uiIBDI_MAX = ((1<<(g_uiBitDepth+g_uiBitIncrement))-1); 517 517 } 518 #endif -
branches/HTM-4.0.1-VSP-dev0/source/App/TAppRenderer/TAppRendererCfg.h
r100 r213 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 -
branches/HTM-4.0.1-VSP-dev0/source/App/TAppRenderer/TAppRendererTop.cpp
r193 r213 45 45 // Constructor / destructor / initialization / destroy 46 46 // ==================================================================================================================== 47 47 #if !QC_MVHEVC_B0046 48 48 TAppRendererTop::TAppRendererTop() 49 49 { … … 532 532 #endif 533 533 534 #if HHI_VSO_SPEEDUP_A0033535 #if FIX_VSO_SETUP536 534 cCurModel.setupPart( 0, m_iSourceHeight ); 537 #else538 cCurModel.setHorOffset( 0 );539 #endif540 #endif541 535 542 536 for ( Int iViewIdx = 0; iViewIdx < m_iNumberOfInputViews; iViewIdx++ ) … … 713 707 714 708 AOT( m_iLog2SamplingFactor != 0 ); 715 #if HHI_VSO_SPEEDUP_A0033716 #if FIX_VSO_SETUP717 709 cCurModel.setupPart( 0, m_iSourceHeight ); 718 #else719 cCurModel.setHorOffset( 0 );720 #endif721 #endif722 710 #if LGE_VSO_EARLY_SKIP_A0093 723 711 cCurModel.create( m_iNumberOfInputViews, m_iNumberOfOutputViews, m_iSourceWidth, m_iSourceHeight, m_iShiftPrecision, m_iBlendHoleMargin, false ); … … 1046 1034 1047 1035 } 1036 #endif -
branches/HTM-4.0.1-VSP-dev0/source/App/TAppRenderer/TAppRendererTop.h
r100 r213 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.