Changeset 532 in SHVCSoftware for branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncTop.cpp
- Timestamp:
- 2 Jan 2014, 07:21:30 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncTop.cpp
r531 r532 129 129 if (m_bUseSAO) 130 130 { 131 #if HM_CLEANUP_SAO 132 #if AUXILIARY_PICTURES 133 m_cEncSAO.create( getSourceWidth(), getSourceHeight(), m_chromaFormatIDC, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth ); 134 #else 135 m_cEncSAO.create( getSourceWidth(), getSourceHeight(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth ); 136 #endif 137 #if SAO_ENCODE_ALLOW_USE_PREDEBLOCK 138 m_cEncSAO.createEncData(getSaoLcuBoundary()); 139 #else 140 m_cEncSAO.createEncData(); 141 #endif 142 #else 131 143 m_cEncSAO.setSaoLcuBoundary(getSaoLcuBoundary()); 132 144 m_cEncSAO.setSaoLcuBasedOptimization(getSaoLcuBasedOptimization()); … … 134 146 m_cEncSAO.create( getSourceWidth(), getSourceHeight(), g_uiMaxCUWidth, g_uiMaxCUHeight ); 135 147 m_cEncSAO.createEncBuffer(); 148 #endif 136 149 } 137 150 #if ADAPTIVE_QP_SELECTION … … 143 156 m_cLoopFilter. create( g_uiMaxCUDepth ); 144 157 145 #if RATE_CONTROL_LAMBDA_DOMAIN146 158 if ( m_RCEnableRateControl ) 147 159 { … … 149 161 g_uiMaxCUWidth, g_uiMaxCUHeight, m_RCKeepHierarchicalBit, m_RCUseLCUSeparateModel, m_GOPList ); 150 162 } 151 #else152 m_cRateCtrl.create(getIntraPeriod(), getGOPSize(), getFrameRate(), getTargetBitrate(), getQP(), getNumLCUInUnit(), getSourceWidth(), getSourceHeight(), g_uiMaxCUWidth, g_uiMaxCUHeight);153 #endif154 163 // if SBAC-based RD optimization is used 155 164 if( m_bUseSBACRD ) … … 250 259 if (m_cSPS.getUseSAO()) 251 260 { 261 #if HM_CLEANUP_SAO 262 m_cEncSAO.destroyEncData(); 263 m_cEncSAO.destroy(); 264 #else 252 265 m_cEncSAO.destroy(); 253 266 m_cEncSAO.destroyEncBuffer(); 267 #endif 254 268 } 255 269 m_cLoopFilter. destroy(); … … 401 415 { 402 416 // compress GOP 403 #if RATE_CONTROL_LAMBDA_DOMAIN404 417 #if !RC_SHVC_HARMONIZATION 405 418 if ( m_RCEnableRateControl ) … … 408 421 } 409 422 #endif 410 #endif411 423 412 424 // compress GOP 413 425 m_cGOPEncoder.compressGOP(iPicIdInGOP, m_iPOCLast, m_iNumPicRcvd, m_cListPic, rcListPicYuvRecOut, accessUnitsOut, false, false); 414 426 415 #if RATE_CONTROL_LAMBDA_DOMAIN416 427 #if !RC_SHVC_HARMONIZATION 417 428 if ( m_RCEnableRateControl ) … … 419 430 m_cRateCtrl.destroyRCGOP(); 420 431 } 421 #endif422 432 #endif 423 433 … … 463 473 } 464 474 465 #if RATE_CONTROL_LAMBDA_DOMAIN466 475 if ( m_RCEnableRateControl ) 467 476 { 468 477 m_cRateCtrl.initRCGOP( m_iNumPicRcvd ); 469 478 } 470 #endif471 479 472 480 // compress GOP … … 474 482 m_cGOPEncoder.compressGOP(m_iPOCLast, m_iNumPicRcvd, m_cListPic, rcListPicYuvRecOut, accessUnitsOut, false, false); 475 483 476 #if RATE_CONTROL_LAMBDA_DOMAIN477 484 if ( m_RCEnableRateControl ) 478 485 { 479 486 m_cRateCtrl.destroyRCGOP(); 480 487 } 481 #endif482 488 483 489 iNumEncoded = m_iNumPicRcvd; … … 519 525 TComPic *pcTopField; 520 526 xGetNewPicBuffer( pcTopField ); 527 #if !HM_CLEANUP_SAO 521 528 pcTopField->getPicSym()->allocSaoParam(&m_cEncSAO); 529 #endif 522 530 pcTopField->setReconMark (false); 523 531 … … 540 548 Pel * pcTopFieldU = pcTopField->getPicYuvOrg()->getCbAddr(); 541 549 Pel * pcTopFieldV = pcTopField->getPicYuvOrg()->getCrAddr(); 542 550 543 551 // compute image characteristics 544 552 if ( getUseAdaptiveQP() ) 545 553 { 546 554 m_cPreanalyzer.xPreanalyze( dynamic_cast<TEncPic*>( pcTopField ) ); 547 } 548 555 } 556 549 557 /* -- Defield -- */ 550 558 … … 560 568 TComPic* pcBottomField; 561 569 xGetNewPicBuffer( pcBottomField ); 570 #if !HM_CLEANUP_SAO 562 571 pcBottomField->getPicSym()->allocSaoParam(&m_cEncSAO); 572 #endif 563 573 pcBottomField->setReconMark (false); 564 574 … … 581 591 Pel * pcBottomFieldU = pcBottomField->getPicYuvOrg()->getCbAddr(); 582 592 Pel * pcBottomFieldV = pcBottomField->getPicYuvOrg()->getCrAddr(); 583 584 // Compute image characteristics593 594 // compute image characteristics 585 595 if ( getUseAdaptiveQP() ) 586 596 { 587 597 m_cPreanalyzer.xPreanalyze( dynamic_cast<TEncPic*>( pcBottomField ) ); 588 } 589 598 } 599 590 600 /* -- Defield -- */ 591 601 … … 642 652 TComPic *pcTopField; 643 653 xGetNewPicBuffer( pcTopField ); 654 #if !HM_CLEANUP_SAO 644 655 pcTopField->getPicSym()->allocSaoParam(&m_cEncSAO); 656 #endif 645 657 pcTopField->setReconMark (false); 646 658 … … 694 706 TComPic* pcBottomField; 695 707 xGetNewPicBuffer( pcBottomField ); 708 #if !HM_CLEANUP_SAO 696 709 pcBottomField->getPicSym()->allocSaoParam(&m_cEncSAO); 710 #endif 697 711 pcBottomField->setReconMark (false); 698 712 699 TComPicYuv* rpcPicYuvRec = new TComPicYuv;713 TComPicYuv* rpcPicYuvRec; 700 714 if ( rcListPicYuvRecOut.size() == (UInt)m_iGOPSize ) 701 715 { … … 704 718 else 705 719 { 720 rpcPicYuvRec = new TComPicYuv; 706 721 rpcPicYuvRec->create( m_iSourceWidth, m_iSourceHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth ); 707 722 } … … 897 912 #endif 898 913 } 899 914 #if !HM_CLEANUP_SAO 900 915 if (getUseSAO()) 901 916 { 902 917 rpcPic->getPicSym()->allocSaoParam(&m_cEncSAO); 903 918 } 919 #endif 904 920 m_cListPic.pushBack( rpcPic ); 905 921 } … … 1147 1163 } 1148 1164 1149 #if RATE_CONTROL_LAMBDA_DOMAIN1150 1165 if ( m_RCEnableRateControl ) 1151 1166 { … … 1154 1169 m_cPPS.setMinCuDQPSize( m_cPPS.getSPS()->getMaxCUWidth() >> ( m_cPPS.getMaxCuDQPDepth()) ); 1155 1170 } 1156 #endif1157 1171 1158 1172 m_cPPS.setChromaCbQpOffset( m_chromaCbQpOffset );
Note: See TracChangeset for help on using the changeset viewer.