Changeset 193 in 3DVCSoftware for branches/HTM-4.0.1-VSP-dev0/source/App
- Timestamp:
- 19 Nov 2012, 21:15:40 (12 years ago)
- Location:
- branches/HTM-4.0.1-VSP-dev0/source/App
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-4.0.1-VSP-dev0/source/App/TAppDecoder/TAppDecCfg.cpp
r100 r193 103 103 if (!m_pchBitstreamFile) 104 104 { 105 fprintf(stderr, "No input file specif ed, aborting\n");105 fprintf(stderr, "No input file specified, aborting\n"); 106 106 return false; 107 107 } -
branches/HTM-4.0.1-VSP-dev0/source/App/TAppDecoder/TAppDecTop.cpp
r166 r193 262 262 } 263 263 } 264 #if DEBUGIMGOUT265 for(Int viewDepthIdx=0; viewDepthIdx<m_tVideoIOYuvReconDbgFile.size() ; viewDepthIdx++)266 {267 if( m_tVideoIOYuvReconDbgFile[viewDepthIdx] )268 {269 m_tVideoIOYuvReconDbgFile[viewDepthIdx]->close();270 delete m_tVideoIOYuvReconDbgFile[viewDepthIdx];271 m_tVideoIOYuvReconDbgFile[viewDepthIdx] = NULL ;272 }273 }274 #endif275 264 276 265 for(Int viewDepthIdx=0; viewDepthIdx<m_tDecTop.size() ; viewDepthIdx++) … … 341 330 #endif 342 331 } 343 #if DEBUGIMGOUT344 #if PIC_CROPPING345 m_tVideoIOYuvReconDbgFile[viewDepthId]->write( pcPic->getPicYuvRecDbg(), sps->getPicCropLeftOffset(), sps->getPicCropRightOffset(), sps->getPicCropTopOffset(), sps->getPicCropBottomOffset() );346 #else347 m_tVideoIOYuvReconDbgFile[viewDepthId]->write( pcPic->getPicYuvRecDbg(), pcPic->getSlice(0)->getSPS()->getPad() );348 #endif349 #endif350 332 351 333 // update POC of display order … … 406 388 #endif 407 389 } 408 #if DEBUGIMGOUT409 #if PIC_CROPPING410 m_tVideoIOYuvReconDbgFile[viewDepthId]->write( pcPic->getPicYuvRecDbg(), sps->getPicCropLeftOffset(), sps->getPicCropRightOffset(), sps->getPicCropTopOffset(), sps->getPicCropBottomOffset() );411 #else412 m_tVideoIOYuvReconDbgFile[viewDepthId]->write( pcPic->getPicYuvRecDbg(), pcPic->getSlice(0)->getSPS()->getPad() );413 #endif414 #endif415 390 416 391 // update POC of display order … … 501 476 } 502 477 #endif 503 #if DEBUGIMGOUT 504 while( m_tVideoIOYuvReconDbgFile.size() < newNumberOfViewDepth) 505 { 506 m_tVideoIOYuvReconDbgFile.push_back(new TVideoIOYuv); 507 Char buffer[4]; 508 sprintf(buffer,"_%i", (Int)(m_tVideoIOYuvReconDbgFile.size()-1) / 2 ); 509 Char* nextFilename = NULL; 510 if( (m_tVideoIOYuvReconDbgFile.size() % 2) == 0 ) 511 { 512 Char* pchTempFilename = NULL; 513 xAppendToFileNameEnd( "DebugImg.yuv", "_depth", pchTempFilename); 514 xAppendToFileNameEnd( pchTempFilename, buffer, nextFilename); 515 free ( pchTempFilename ); 516 } 517 else 518 { 519 xAppendToFileNameEnd( "DebugImg.yuv", buffer, nextFilename); 520 } 521 if( isDepth || ( !isDepth && (m_tVideoIOYuvReconDbgFile.size() % 2) == 1 ) ) 522 { 523 m_tVideoIOYuvReconDbgFile.back()->open( nextFilename, true, m_outputBitDepth, g_uiBitDepth + g_uiBitIncrement ); 524 } 525 free ( nextFilename ); 526 } 527 #endif 478 528 479 while( m_pocLastDisplay.size() < newNumberOfViewDepth ) 529 480 { … … 587 538 { 588 539 //first view does not have VSP 589 #if VSP_TEXT_ONLY590 if((iCodedViewIdx == 0)||(bDepth))591 #else592 540 if((iCodedViewIdx == 0)) 593 #endif594 541 return; 595 542 pcPicVSP->getSlice(0)->setPOC( iCurPoc ); 543 pcPicVSP->getSlice(0)->setViewId( iCodedViewIdx ); 596 544 Int iNeighborViewId = 0; 597 545 Bool bRenderFromLeft; -
branches/HTM-4.0.1-VSP-dev0/source/App/TAppDecoder/TAppDecTop.h
r166 r193 68 68 69 69 std::vector<TVideoIOYuv*> m_tVideoIOYuvReconFile; ///< reconstruction YUV class 70 #if DEBUGIMGOUT71 std::vector<TVideoIOYuv*> m_tVideoIOYuvReconDbgFile; ///< debug YUV class72 #endif73 70 74 71 // for output control -
branches/HTM-4.0.1-VSP-dev0/source/App/TAppEncoder/TAppEncCfg.cpp
r166 r193 120 120 #endif 121 121 122 #if FIX_MEM_LEAKS 123 if ( m_pchCameraParameterFile != NULL ) 124 free ( m_pchCameraParameterFile ); 125 126 if ( m_pchBaseViewCameraNumbers != NULL ) 127 free ( m_pchBaseViewCameraNumbers ); 128 129 if ( m_pchdQPFile != NULL ) 130 free ( m_pchdQPFile ); 131 132 if ( m_pchColumnWidth != NULL ) 133 free ( m_pchColumnWidth ); 134 135 if ( m_pchRowHeight != NULL ) 136 free ( m_pchRowHeight ); 137 138 if ( m_scalingListFile != NULL ) 139 free ( m_scalingListFile ); 140 141 #endif 142 122 143 } 123 144 … … 168 189 in>>entry.m_interViewRefPosL1[i]; 169 190 } 191 #if VSP_CFG 192 in>>entry.m_numVSPRefPics; 193 for( Int i = 0; i < entry.m_numVSPRefPics; i++ ) 194 { 195 in>>entry.m_VSPRefPics[i]; 196 } 197 for( Int i = 0; i < entry.m_numVSPRefPics; i++ ) 198 { 199 in>>entry.m_VSPRefPosL0[i]; 200 } 201 for( Int i = 0; i < entry.m_numVSPRefPics; i++ ) 202 { 203 in>>entry.m_VSPRefPosL1[i]; 204 } 205 #endif 206 170 207 return in; 171 208 } … … 339 376 ("AllowNegDist", m_bAllowNegDist , true , "Allow negative Distortion in VSO") 340 377 #endif 341 378 #if LGE_WVSO_A0119 379 ("WVSO", m_bUseWVSO , false , "Use depth fidelity term for VSO" ) 380 ("VSOWeight", m_iVSOWeight , 10 , "Synthesized View Distortion Change weight" ) 381 ("VSDWeight", m_iVSDWeight , 1 , "View Synthesis Distortion estimate weight" ) 382 ("DWeight", m_iDWeight , 1 , "Depth Distortion weight" ) 383 #endif 384 385 #if OL_DEPTHLIMIT_A0044 386 ("DPL", m_bDepthPartitionLimiting , false , "Use DepthPartitionLimiting" ) 387 #endif 388 #endif 389 390 #if VSP_N 391 ("VSP", m_bUseVSP , false , "Use VSP" ) 392 ("VSPDepthDisable", m_bVSPDepthDisable , false , "Use VSP Depth Disable" ) 342 393 #endif 343 394 … … 498 549 m_pchRowHeight = cfg_RowHeight.empty() ? NULL : strdup(cfg_RowHeight.c_str()); 499 550 m_scalingListFile = cfg_ScalingListFile.empty() ? NULL : strdup(cfg_ScalingListFile.c_str()); 500 551 501 552 if ( m_bUsingDepthMaps ) 502 553 { … … 648 699 #endif 649 700 701 #if LGE_WVSO_A0119 702 m_bUseWVSO = m_bUseVSO && m_bUseWVSO && m_bUsingDepthMaps; 703 #endif 650 704 xCleanUpVectors(); 651 705 … … 1107 1161 } 1108 1162 xConfirmPara( bErrorIvpEnhV, "Invalid inter-view coding structure for enhancement views given" ); 1163 1164 #if VSP_CFG 1165 // validate vsp refs 1166 Bool bErrorVspEnhV = false; 1167 if( m_iNumberOfViews > 1 ) 1168 { 1169 for( Int k = 1; k < m_iNumberOfViews; k++ ) 1170 { 1171 for( Int i = 0; i < MAX_GOP+1; i++ ) 1172 { 1173 if( m_GOPListsMvc[k][i].m_numVSPRefPics < 0 || m_GOPListsMvc[k][i].m_numVSPRefPics > 1 ) 1174 { 1175 printf( "\nError: m_numVSPRefPics < 0 or m_numVSPRefPics > 1 \n" ); 1176 bErrorVspEnhV = true; 1177 } 1178 1179 for( Int j = 0; j < m_GOPListsMvc[k][i].m_numVSPRefPics; j++ ) 1180 { 1181 Int iAbsViewId = m_GOPListsMvc[k][i].m_VSPRefPics[j] + k; 1182 if( iAbsViewId != 0 ) 1183 { 1184 printf( "\nError: VSP is allowed to reference only base view\n" ); 1185 bErrorVspEnhV = true; 1186 } 1187 if( m_GOPListsMvc[k][i].m_sliceType == 'P' && m_GOPListsMvc[k][i].m_VSPRefPosL1[j] != 0 ) 1188 { 1189 printf( "\nError: m_sliceType == P and m_VSPRefPosL1 != 0\n" ); 1190 bErrorVspEnhV = true; 1191 } 1192 } 1193 1194 for( Int j = 0; j < m_GOPListsMvc[k][i].m_numVSPRefPics || j < m_GOPListsMvc[k][i].m_numInterViewRefPics; j++ ) 1195 { 1196 if( (m_GOPListsMvc[k][i].m_VSPRefPosL0[j] != 0 && m_GOPListsMvc[k][i].m_VSPRefPosL0[j] == m_GOPListsMvc[k][i].m_interViewRefPosL0[j]) 1197 || (m_GOPListsMvc[k][i].m_VSPRefPosL1[j] != 0 && m_GOPListsMvc[k][i].m_VSPRefPosL1[j] == m_GOPListsMvc[k][i].m_interViewRefPosL1[j]) ) 1198 { 1199 printf( "\nError: vsp_ref_list_pos[%d] == IV ref list pos[%d]\n", j, j ); 1200 bErrorVspEnhV = true; 1201 } 1202 } 1203 } 1204 } 1205 } 1206 xConfirmPara( bErrorVspEnhV, "Invalid VSP coding structure for enhancement views given" ); 1207 #endif 1109 1208 1110 1209 // validate temporal coding structure … … 1692 1791 #if HHI_VSO 1693 1792 printf("VSO:%d ", m_bUseVSO ); 1694 #endif 1793 #endif 1794 #if LGE_WVSO_A0119 1795 printf("WVSO:%d ", m_bUseWVSO ); 1796 #endif 1797 #if OL_DEPTHLIMIT_A0044 1798 printf("DPL:%d ", m_bDepthPartitionLimiting); 1799 #endif 1695 1800 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 1696 1801 printf("DMM:%d ", m_bUseDMM ); … … 1698 1803 #if HHI_MPI 1699 1804 printf("MVI:%d ", m_bUseMVI ? 1 : 0 ); 1805 #endif 1806 #if LGE_WVSO_A0119 1807 printf("\nVSO : VSD : SAD weight = %d : %d : %d ", m_iVSOWeight, m_iVSDWeight, m_iDWeight ); 1700 1808 #endif 1701 1809 printf("\n\n"); -
branches/HTM-4.0.1-VSP-dev0/source/App/TAppEncoder/TAppEncCfg.h
r102 r193 297 297 Bool m_bUseEstimatedVSD; ///< Flag for using model based VSD estimation instead of VSO for some encoder decisions (JCT3V-A0033 modification 3) 298 298 #endif 299 #if LGE_WVSO_A0119 300 Bool m_bUseWVSO; ///< flag for using View Synthesis Optimization 301 Int m_iVSOWeight; 302 Int m_iVSDWeight; 303 Int m_iDWeight; 304 #endif 305 #if VSP_N 306 Bool m_bUseVSP; 307 Bool m_bVSPDepthDisable; 308 #endif 299 309 300 310 // coding tools (depth intra modes) 301 311 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 302 312 Bool m_bUseDMM; ///< flag for using DMM 313 #endif 314 315 #if OL_DEPTHLIMIT_A0044 316 Bool m_bDepthPartitionLimiting; 303 317 #endif 304 318 -
branches/HTM-4.0.1-VSP-dev0/source/App/TAppEncoder/TAppEncTop.cpp
r166 r193 207 207 m_acTEncTopList[iViewIdx]->setUseEstimatedVSD ( false ); 208 208 #endif 209 #if LGE_WVSO_A0119 210 m_acTEncTopList[iViewIdx]->setUseWVSO ( false ); 211 #endif 209 212 #endif 210 213 … … 361 364 m_acTEncTopList[iViewIdx]->setUseDMM ( false ); 362 365 #endif 366 #if OL_DEPTHLIMIT_A0044 367 m_acTEncTopList[iViewIdx]->setUseDPL ( false ); 368 #endif 363 369 #if HHI_MPI 364 370 m_acTEncTopList[iViewIdx]->setUseMVI( false ); 371 #endif 372 373 #if VSP_N 374 m_acTEncTopList[iViewIdx]->setUseVSP( m_bUseVSP ); 375 m_acTEncTopList[iViewIdx]->setVSPDepthDisable( m_bVSPDepthDisable ); 365 376 #endif 366 377 } … … 524 535 m_acTEncDepthTopList[iViewIdx]->setUseEstimatedVSD ( m_bUseEstimatedVSD ); 525 536 #endif 537 #if LGE_WVSO_A0119 538 m_acTEncDepthTopList[iViewIdx]->setUseWVSO ( m_bUseWVSO ); 539 #endif 526 540 #endif 527 541 … … 634 648 m_acTEncDepthTopList[iViewIdx]->setUseDMM ( m_bUseDMM ); 635 649 #endif 650 #if OL_DEPTHLIMIT_A0044 651 m_acTEncDepthTopList[iViewIdx]->setUseDPL (m_bDepthPartitionLimiting); 652 #endif 636 653 #if HHI_MPI 637 654 m_acTEncDepthTopList[iViewIdx]->setUseMVI( m_bUseMVI ); 655 #endif 656 657 #if VSP_N 658 m_acTEncDepthTopList[iViewIdx]->setUseVSP( m_bUseVSP ); 659 m_acTEncDepthTopList[iViewIdx]->setVSPDepthDisable( m_bVSPDepthDisable ); 638 660 #endif 639 661 } … … 690 712 AOT(true); 691 713 } 714 #if LGE_WVSO_A0119 715 for ( Int iViewNum = 0; iViewNum < m_iNumberOfViews; iViewNum++ ) 716 { 717 for (Int iContent = 0; iContent < 2; iContent++ ) 718 { 719 TEncTop* pcEncTop = ( iContent == 0 ) ? m_acTEncTopList[iViewNum] : m_acTEncDepthTopList[iViewNum]; 720 pcEncTop->setUseWVSO ( m_bUseWVSO ); 721 pcEncTop->setVSOWeight( m_iVSOWeight ); 722 pcEncTop->setVSDWeight( m_iVSDWeight ); 723 pcEncTop->setDWeight ( m_iDWeight ); 724 } 725 } 726 #endif 692 727 } 693 728 #endif … … 938 973 iNumEncoded = 0; 939 974 940 #if VSP_SLICE_HEADER 941 m_acTEncTopList [iViewIdx]->setUseVSP( (gopId%VSP_FRAME_INTERVAL==0) );942 m_acTEncDepthTopList[iViewIdx]->setUseVSP( (gopId%VSP_FRAME_INTERVAL==0) );975 #if VSP_SLICE_HEADER && !VSP_CFG 976 if( m_acTEncTopList [iViewIdx]->getUseVSP() ) m_acTEncTopList [iViewIdx]->setUseVSP( (gopId%VSP_FRAME_INTERVAL==0) ); 977 if( m_acTEncDepthTopList[iViewIdx]->getUseVSP() ) m_acTEncDepthTopList[iViewIdx]->setUseVSP( (gopId%VSP_FRAME_INTERVAL==0) ); 943 978 #endif 944 979 … … 963 998 #if VSP_SLICE_HEADER 964 999 if( m_acTEncDepthTopList[iViewIdx]->getUseVSP() ) 1000 if( !m_acTEncDepthTopList[iViewIdx]->getVSPDepthDisable() ) 965 1001 #endif 966 1002 xStoreVSPInBuffer(m_acTEncDepthTopList[iViewIdx]->getVSPBuf(), m_acTEncDepthTopList[iViewIdx]->getVSPAvailBuf(), iViewIdx, true, gopId); … … 1003 1039 delete pcDepthPicYuvOrg; 1004 1040 pcDepthPicYuvOrg = NULL; 1041 1042 #if FIX_MEM_LEAKS 1043 if ( pcPdmDepthOrg != NULL ) 1044 { 1045 pcPdmDepthOrg->destroy(); 1046 delete pcPdmDepthOrg; 1047 pcPdmDepthOrg = NULL; 1048 }; 1049 #endif 1050 1005 1051 1006 1052 for(Int iViewIdx=0; iViewIdx < m_iNumberOfViews; iViewIdx++ ) … … 1263 1309 Void TAppEncTop::setupRenModel( Int iPoc, Int iEncViewIdx, Int iEncContent, Int iHorOffset ) 1264 1310 { 1311 #if FIX_VSO_SETUP 1312 m_cRendererModel.setupPart( iHorOffset, Min( g_uiMaxCUHeight, m_iSourceHeight - iHorOffset ) ); 1313 #else 1265 1314 m_cRendererModel.setHorOffset( iHorOffset ); 1315 #endif 1266 1316 #else 1267 1317 Void TAppEncTop::setupRenModel( Int iPoc, Int iEncViewIdx, Int iEncContent ) … … 1410 1460 { 1411 1461 //first view does not have VSP 1412 #if VSP_TEXT_ONLY1413 if((iCodedViewIdx == 0)||(bDepth))1414 #else1415 1462 if((iCodedViewIdx == 0)) 1416 #endif1417 1463 return; 1418 1464 … … 1439 1485 } 1440 1486 pcPicVSP->getSlice(0)->setPOC( iCurPoc ); 1441 1442 Int iNeighborViewId = 0; 1487 pcPicVSP->getSlice(0)->setViewId( iCodedViewIdx ); 1488 1489 Int iNeighborViewId = 0; //iCodedViewIdx + m_GOPListsMvc[iCodedViewIdx][gopId].m_VSPRefPics[0]; 1443 1490 Bool bRenderFromLeft; 1444 1491 //check if the neighboring view is situated to the left of the current view -
branches/HTM-4.0.1-VSP-dev0/source/App/TAppRenderer/TAppRendererTop.cpp
r101 r193 533 533 534 534 #if HHI_VSO_SPEEDUP_A0033 535 #if FIX_VSO_SETUP 536 cCurModel.setupPart( 0, m_iSourceHeight ); 537 #else 535 538 cCurModel.setHorOffset( 0 ); 539 #endif 536 540 #endif 537 541 … … 710 714 AOT( m_iLog2SamplingFactor != 0 ); 711 715 #if HHI_VSO_SPEEDUP_A0033 716 #if FIX_VSO_SETUP 717 cCurModel.setupPart( 0, m_iSourceHeight ); 718 #else 712 719 cCurModel.setHorOffset( 0 ); 720 #endif 713 721 #endif 714 722 #if LGE_VSO_EARLY_SKIP_A0093
Note: See TracChangeset for help on using the changeset viewer.