Changeset 368 in 3DVCSoftware for branches/HTM-DEV-0.1-dev/source/Lib/TLibEncoder
- Timestamp:
- 3 May 2013, 17:16:12 (12 years ago)
- Location:
- branches/HTM-DEV-0.1-dev/source/Lib/TLibEncoder
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-DEV-0.1-dev/source/Lib/TLibEncoder/NALwrite.cpp
r367 r368 53 53 bsNALUHeader.write(0,1); // forbidden_zero_bit 54 54 bsNALUHeader.write(nalu.m_nalUnitType, 6); // nal_unit_type 55 #if H_MV 56 bsNALUHeader.write(nalu.m_layerId, 6); // layerId 57 #else 55 58 bsNALUHeader.write(nalu.m_reservedZero6Bits, 6); // nuh_reserved_zero_6bits 59 #endif 56 60 bsNALUHeader.write(nalu.m_temporalId+1, 3); // nuh_temporal_id_plus1 57 61 … … 142 146 { 143 147 naluDest.m_nalUnitType = naluSrc.m_nalUnitType; 148 #if H_MV 149 naluDest.m_layerId = naluSrc.m_layerId; 150 #else 144 151 naluDest.m_reservedZero6Bits = naluSrc.m_reservedZero6Bits; 152 #endif 145 153 naluDest.m_temporalId = naluSrc.m_temporalId; 146 154 naluDest.m_Bitstream = naluSrc.m_Bitstream; -
branches/HTM-DEV-0.1-dev/source/Lib/TLibEncoder/NALwrite.h
r367 r368 57 57 NalUnitType nalUnitType, 58 58 UInt temporalID = 0, 59 #if H_MV 60 Int layerId = 0) 61 #else 59 62 UInt reserved_zero_6bits = 0) 63 #endif 64 #if H_MV 65 : NALUnit(nalUnitType, temporalID, layerId) 66 #else 60 67 : NALUnit(nalUnitType, temporalID, reserved_zero_6bits) 68 #endif 61 69 , m_Bitstream() 62 70 {} -
branches/HTM-DEV-0.1-dev/source/Lib/TLibEncoder/TEncAnalyze.cpp
r367 r368 36 36 */ 37 37 38 #if !H_MV 38 39 #include "TEncAnalyze.h" 40 #endif 39 41 40 42 //! \ingroup TLibEncoder … … 45 47 ////////////////////////////////////////////////////////////////////// 46 48 49 #if !H_MV 47 50 TEncAnalyze m_gcAnalyzeAll; 48 51 TEncAnalyze m_gcAnalyzeI; 49 52 TEncAnalyze m_gcAnalyzeP; 50 53 TEncAnalyze m_gcAnalyzeB; 54 #endif 51 55 52 56 //! \} -
branches/HTM-DEV-0.1-dev/source/Lib/TLibEncoder/TEncAnalyze.h
r367 r368 150 150 }; 151 151 152 #if !H_MV 152 153 extern TEncAnalyze m_gcAnalyzeAll; 153 154 extern TEncAnalyze m_gcAnalyzeI; 154 155 extern TEncAnalyze m_gcAnalyzeP; 155 156 extern TEncAnalyze m_gcAnalyzeB; 157 #endif 156 158 157 159 //! \} -
branches/HTM-DEV-0.1-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
r367 r368 549 549 } 550 550 551 #if H_MV 552 WRITE_FLAG( 1, "sps_extension_flag" ); 553 554 WRITE_FLAG( pcSPS->getInterViewMvVertConstraintFlag() ? 1 : 0, "inter_view_mv_vert_constraint_flag" ); 555 #else 551 556 WRITE_FLAG( 0, "sps_extension_flag" ); 557 #endif 552 558 } 553 559 … … 556 562 WRITE_CODE( pcVPS->getVPSId(), 4, "vps_video_parameter_set_id" ); 557 563 WRITE_CODE( 3, 2, "vps_reserved_three_2bits" ); 564 #if H_MV 565 WRITE_CODE( pcVPS->getMaxLayers() - 1, 6, "vps_max_layers_minus1" ); 566 #else 558 567 WRITE_CODE( 0, 6, "vps_reserved_zero_6bits" ); 568 #endif 559 569 WRITE_CODE( pcVPS->getMaxTLayers() - 1, 3, "vps_max_sub_layers_minus1" ); 560 570 WRITE_FLAG( pcVPS->getTemporalNestingFlag(), "vps_temporal_id_nesting_flag" ); 561 571 assert (pcVPS->getMaxTLayers()>1||pcVPS->getTemporalNestingFlag()); 572 #if H_MV 573 WRITE_CODE( 0xffff, 16, "vps_extension_offset" ); 574 #else 562 575 WRITE_CODE( 0xffff, 16, "vps_reserved_ffff_16bits" ); 576 #endif 563 577 codePTL( pcVPS->getPTL(), true, pcVPS->getMaxTLayers() - 1 ); 564 578 #if SIGNAL_BITRATE_PICRATE_IN_VPS … … 583 597 584 598 assert( pcVPS->getNumHrdParameters() <= MAX_VPS_NUM_HRD_PARAMETERS ); 599 #if H_MV 600 assert( pcVPS->getMaxNuhLayerId() < MAX_VPS_NUH_LAYER_ID_PLUS1 ); 601 WRITE_CODE( pcVPS->getMaxNuhLayerId(), 6, "vps_max_nuh_layer_id" ); 602 #else 585 603 assert( pcVPS->getMaxNuhReservedZeroLayerId() < MAX_VPS_NUH_RESERVED_ZERO_LAYER_ID_PLUS1 ); 586 604 WRITE_CODE( pcVPS->getMaxNuhReservedZeroLayerId(), 6, "vps_max_nuh_reserved_zero_layer_id" ); 605 #endif 587 606 pcVPS->setMaxOpSets(1); 588 607 WRITE_UVLC( pcVPS->getMaxOpSets() - 1, "vps_max_op_sets_minus1" ); … … 590 609 { 591 610 // Operation point set 611 #if H_MV 612 for( UInt i = 0; i <= pcVPS->getMaxNuhLayerId(); i ++ ) 613 #else 592 614 for( UInt i = 0; i <= pcVPS->getMaxNuhReservedZeroLayerId(); i ++ ) 615 #endif 593 616 { 594 617 // Only applicable for version 1 … … 631 654 } 632 655 #endif 656 #if H_MV 657 WRITE_FLAG( 1, "vps_extension_flag" ); 658 659 m_pcBitIf->writeAlignOne(); 660 661 WRITE_FLAG( pcVPS->getAvcBaseLayerFlag() ? 1 : 0, "avc_base_layer_flag" ); 662 WRITE_FLAG( pcVPS->getSplittingFlag() ? 1 : 0, "splitting_flag" ); 663 664 for( Int type = 0; type < MAX_NUM_SCALABILITY_TYPES; type++ ) 665 { 666 WRITE_FLAG( pcVPS->getScalabilityMask( type ) ? 1 : 0, "scalability_mask[i]" ); 667 } 668 669 for( Int sIdx = 0; sIdx < pcVPS->getNumScalabilityTypes( ); sIdx++ ) 670 { 671 WRITE_CODE( pcVPS->getDimensionIdLen( sIdx ) - 1 , 3, "dimension_id_len_minus1[j]"); 672 } 673 674 WRITE_FLAG( pcVPS->getVpsNuhLayerIdPresentFlag() ? 1 : 0, "vps_nuh_layer_id_present_flag"); 675 676 for( Int layer = 1; layer <= pcVPS->getMaxLayers() - 1; layer++ ) 677 { 678 if (pcVPS->getVpsNuhLayerIdPresentFlag() ) 679 WRITE_CODE( pcVPS->getLayerIdInNuh( layer ), 6, "layer_id_in_nuh[i]"); 680 for( Int sIdx = 0; sIdx < pcVPS->getNumScalabilityTypes() ; sIdx++ ) 681 { 682 WRITE_CODE( pcVPS->getDimensionId( layer, sIdx ), pcVPS->getDimensionIdLen( sIdx ), "dimension_id[i][j]"); 683 } 684 } 685 686 for( Int layerSet = 1; layerSet <= pcVPS->getMaxOpSets() - 1; layerSet++ ) 687 { 688 WRITE_FLAG( pcVPS->getVpsProfilePresentFlag( layerSet ) ? 1 : 0, "vps_profile_present_flag[lsIdx]" ); 689 if( pcVPS->getVpsProfilePresentFlag( layerSet ) == false ) 690 { 691 WRITE_UVLC( pcVPS->getProfileLayerSetRefMinus1( layerSet ), "profile_layer_set_ref_minus1[lsIdx]" ); 692 } 693 codePTL( pcVPS->getPTL( layerSet ), pcVPS->getVpsProfilePresentFlag( layerSet ), pcVPS->getMaxTLayers() - 1 ); 694 } 695 696 WRITE_UVLC( pcVPS->getNumOutputLayerSets(), "num_output_layer_sets" ); 697 698 for( Int layerSet = 0; layerSet < pcVPS->getNumOutputLayerSets(); layerSet++ ) 699 { 700 WRITE_UVLC( pcVPS->getOutputLayerSetIdx( layerSet ), "output_layer_set_idx[i]" ); 701 for( Int layer = 0; layer <= pcVPS->getMaxNuhLayerId(); layer++ ) 702 { 703 if( pcVPS->getLayerIdIncludedFlag( pcVPS->getOutputLayerSetIdx( layerSet ), layer ) == true ) 704 { 705 WRITE_FLAG( pcVPS->getOutputLayerFlag( layerSet, layer ) ? 1 : 0, "output_layer_flag" ); 706 } 707 } 708 } 709 710 for( Int i = 1; i <= pcVPS->getMaxLayers() - 1; i++ ) 711 { 712 for( Int j = 0; j < i; j++ ) 713 { 714 WRITE_FLAG( pcVPS->getDirectDependencyFlag( i, j ), "direct_dependency_flag[i][j]" ); 715 } 716 } 717 WRITE_FLAG( 0, "vps_extension2_flag" ); 718 #else 633 719 WRITE_FLAG( 0, "vps_extension_flag" ); 720 #endif 634 721 635 722 //future extensions here.. … … 1004 1091 for (Int i = 0; i < maxNumSubLayersMinus1; i++) 1005 1092 { 1093 #if !H_MV 1006 1094 if(profilePresentFlag) 1007 1095 { 1096 #endif 1008 1097 WRITE_FLAG( pcPTL->getSubLayerProfilePresentFlag(i), "sub_layer_profile_present_flag[i]" ); 1009 } 1098 #if !H_MV 1099 } 1100 #endif 1010 1101 1011 1102 WRITE_FLAG( pcPTL->getSubLayerLevelPresentFlag(i), "sub_layer_level_present_flag[i]" ); -
branches/HTM-DEV-0.1-dev/source/Lib/TLibEncoder/TEncCfg.h
r367 r368 69 69 Int m_numRefIdc; 70 70 Int m_refIdc[MAX_NUM_REF_PICS+1]; 71 #if H_MV 72 Int m_numInterViewRefPics; 73 Int m_interViewRefs [MAX_NUM_REF_PICS]; 74 Int m_interViewRefPosL[2][MAX_NUM_REF_PICS]; 75 #endif 71 76 GOPEntry() 72 77 : m_POC(-1) … … 83 88 , m_deltaRPS(0) 84 89 , m_numRefIdc(0) 90 #if H_MV 91 , m_numInterViewRefPics(0) 92 #endif 85 93 { 86 94 ::memset( m_referencePics, 0, sizeof(m_referencePics) ); 87 95 ::memset( m_usedByCurrPic, 0, sizeof(m_usedByCurrPic) ); 88 96 ::memset( m_refIdc, 0, sizeof(m_refIdc) ); 97 #if H_MV 98 ::memset( m_interViewRefs, 0, sizeof(m_interViewRefs) ); 99 ::memset( m_interViewRefPosL[0], -1, sizeof(m_interViewRefPosL[0]) ); ::memset( m_interViewRefPosL[1], -1, sizeof(m_interViewRefPosL[1]) ); 100 #endif 89 101 } 90 102 }; … … 127 139 UInt m_uiDecodingRefreshType; ///< the type of decoding refresh employed for the random access. 128 140 Int m_iGOPSize; 141 #if H_MV 142 GOPEntry m_GOPList[MAX_GOP+1]; 143 #else 129 144 GOPEntry m_GOPList[MAX_GOP]; 145 #endif 130 146 Int m_extraRPSs; 131 147 Int m_maxDecPicBuffering[MAX_TLAYER]; … … 337 353 Bool m_useStrongIntraSmoothing; ///< enable the use of strong intra smoothing (bi_linear interpolation) for 32x32 blocks when reference samples are flat. 338 354 355 #if H_MV 356 Int m_layerId; 357 Int m_layerIdInVps; 358 Int m_viewId; 359 #if H_3D 360 Bool m_isDepth; 361 #endif 362 #endif 339 363 public: 340 364 TEncCfg() 341 365 : m_puiColumnWidth() 342 366 , m_puiRowHeight() 367 #if H_MV 368 , m_layerId(-1) 369 , m_layerIdInVps(-1) 370 , m_viewId(-1) 371 #if H_3D 372 , m_isDepth(false) 373 #endif 374 #endif 343 375 {} 344 376 … … 362 394 Void setFramesToBeEncoded ( Int i ) { m_framesToBeEncoded = i; } 363 395 396 #if H_MV 397 Void setLayerId ( Int layerId ) { m_layerId = layerId; } 398 Int getLayerId () { return m_layerId; } 399 Int getLayerIdInVps () { return m_layerIdInVps; } 400 Void setLayerIdInVps ( Int layerIdInVps) { m_layerIdInVps = layerIdInVps; } 401 Void setViewId ( Int viewId ) { m_viewId = viewId; } 402 Int getViewId () { return m_viewId; } 403 #if H_3D 404 Void setIsDepth ( Bool isDepth ) { m_isDepth = isDepth; } 405 Bool getIsDepth () { return m_isDepth; } 406 #endif 407 #endif 364 408 //====== Coding Structure ======== 365 409 Void setIntraPeriod ( Int i ) { m_uiIntraPeriod = (UInt)i; } 366 410 Void setDecodingRefreshType ( Int i ) { m_uiDecodingRefreshType = (UInt)i; } 367 411 Void setGOPSize ( Int i ) { m_iGOPSize = i; } 412 #if H_MV 413 Void setGopList ( GOPEntry* GOPList ) { for ( Int i = 0; i < MAX_GOP+1; i++ ) m_GOPList[i] = GOPList[i]; } 414 #else 368 415 Void setGopList ( GOPEntry* GOPList ) { for ( Int i = 0; i < MAX_GOP; i++ ) m_GOPList[i] = GOPList[i]; } 416 #endif 369 417 Void setExtraRPSs ( Int i ) { m_extraRPSs = i; } 370 418 GOPEntry getGOPEntry ( Int i ) { return m_GOPList[i]; } -
branches/HTM-DEV-0.1-dev/source/Lib/TLibEncoder/TEncGOP.cpp
r367 r368 100 100 #endif 101 101 #endif 102 #if H_MV 103 m_layerId = 0; 104 m_viewId = 0; 105 m_pocLastCoded = -1; 106 #if H_3D 107 m_isDepth = false; 108 #endif 109 #endif 102 110 return; 103 111 } … … 139 147 m_totalCoded = 0; 140 148 149 #if H_MV 150 m_ivPicLists = pcTEncTop->getIvPicLists(); 151 m_layerId = pcTEncTop->getLayerId(); 152 m_viewId = pcTEncTop->getViewId(); 153 #if H_3D 154 m_isDepth = pcTEncTop->getIsDepth(); 155 #endif 156 #endif 141 157 } 142 158 … … 342 358 // Public member functions 343 359 // ==================================================================================================================== 360 #if H_MV 361 Void TEncGOP::initGOP( Int iPOCLast, Int iNumPicRcvd, TComList<TComPic*>& rcListPic, TComList<TComPicYuv*>& rcListPicYuvRecOut, std::list<AccessUnit>& accessUnitsInGOP) 362 { 363 xInitGOP( iPOCLast, iNumPicRcvd, rcListPic, rcListPicYuvRecOut ); 364 m_iNumPicCoded = 0; 365 } 366 #endif 367 #if H_MV 368 Void TEncGOP::compressPicInGOP( Int iPOCLast, Int iNumPicRcvd, TComList<TComPic*>& rcListPic, TComList<TComPicYuv*>& rcListPicYuvRecOut, std::list<AccessUnit>& accessUnitsInGOP, Int iGOPid) 369 #else 344 370 Void TEncGOP::compressGOP( Int iPOCLast, Int iNumPicRcvd, TComList<TComPic*>& rcListPic, TComList<TComPicYuv*>& rcListPicYuvRecOut, std::list<AccessUnit>& accessUnitsInGOP) 371 #endif 345 372 { 346 373 TComPic* pcPic; … … 354 381 TComOutputBitstream* pcSubstreamsOut = NULL; 355 382 383 #if !H_MV 356 384 xInitGOP( iPOCLast, iNumPicRcvd, rcListPic, rcListPicYuvRecOut ); 357 385 358 386 m_iNumPicCoded = 0; 387 #endif 359 388 SEIPictureTiming pictureTimingSEI; 360 389 #if L0208_SOP_DESCRIPTION_SEI … … 379 408 UInt *accumNalsDU = NULL; 380 409 SEIDecodingUnitInfo decodingUnitInfoSEI; 410 #if !H_MV 381 411 for ( Int iGOPid=0; iGOPid < m_iGopSize; iGOPid++ ) 412 #endif 382 413 { 383 414 UInt uiColDir = 1; … … 438 469 if(pocCurr>=m_pcCfg->getFramesToBeEncoded()) 439 470 { 471 #if H_MV 472 delete pcBitstreamRedirect; 473 return; 474 #else 440 475 continue; 476 #endif 441 477 } 442 478 … … 459 495 pcSlice->setLastIDR(m_iLastIDR); 460 496 pcSlice->setSliceIdx(0); 497 #if H_MV 498 pcPic ->setLayerId ( getLayerId() ); 499 pcPic ->setViewId ( getViewId() ); 500 pcSlice->setLayerId ( getLayerId() ); 501 pcSlice->setViewId ( getViewId() ); 502 pcSlice->setVPS ( m_pcEncTop->getVPS() ); 503 #if H_3D 504 pcPic ->setIsDepth( getIsDepth() ); 505 pcSlice->setIsDepth( getIsDepth() ); 506 #endif 507 #endif 461 508 //set default slice level flag to the same as SPS level flag 462 509 pcSlice->setLFCrossSliceBoundaryFlag( pcSlice->getPPS()->getLoopFilterAcrossSlicesEnabledFlag() ); … … 496 543 } 497 544 498 if(pcSlice->getSliceType()==B_SLICE&&m_pcCfg->getGOPEntry(iGOPid).m_sliceType=='P') 499 { 500 pcSlice->setSliceType(P_SLICE); 501 } 545 #if H_MV 502 546 // Set the nal unit type 503 547 pcSlice->setNalUnitType(getNalUnitType(pocCurr, m_iLastIDR)); 548 if( pcSlice->getSliceType() == B_SLICE ) 549 { 550 if( m_pcCfg->getGOPEntry( ( pcSlice->getRapPicFlag() && getLayerId() > 0 ) ? MAX_GOP : iGOPid ).m_sliceType == 'P' ) 551 { 552 pcSlice->setSliceType( P_SLICE ); 553 } 554 } 555 #else 556 if(pcSlice->getSliceType()==B_SLICE&&m_pcCfg->getGOPEntry(iGOPid).m_sliceType=='P') 557 { 558 pcSlice->setSliceType(P_SLICE); 559 } 560 // Set the nal unit type 561 pcSlice->setNalUnitType(getNalUnitType(pocCurr, m_iLastIDR)); 562 #endif 504 563 if(pcSlice->getTemporalLayerNonReferenceFlag()) 505 564 { … … 589 648 refPicListModification->setRefPicListModificationFlagL0(0); 590 649 refPicListModification->setRefPicListModificationFlagL1(0); 650 #if H_MV 651 pcSlice->createAndApplyIvReferencePictureSet( m_ivPicLists, m_refPicSetInterLayer ); 652 pcSlice->setNumRefIdx(REF_PIC_LIST_0,min(m_pcCfg->getGOPEntry( (pcSlice->getRapPicFlag() && getLayerId() > 0) ? MAX_GOP : iGOPid ).m_numRefPicsActive,( pcSlice->getRPS()->getNumberOfPictures() + (Int) m_refPicSetInterLayer.size() ) ) ); 653 pcSlice->setNumRefIdx(REF_PIC_LIST_1,min(m_pcCfg->getGOPEntry( (pcSlice->getRapPicFlag() && getLayerId() > 0) ? MAX_GOP : iGOPid ).m_numRefPicsActive,( pcSlice->getRPS()->getNumberOfPictures() + (Int) m_refPicSetInterLayer.size() ) ) ); 654 xSetRefPicListModificationsMvc( pcSlice, pocCurr, iGOPid ); 655 #else 591 656 pcSlice->setNumRefIdx(REF_PIC_LIST_0,min(m_pcCfg->getGOPEntry(iGOPid).m_numRefPicsActive,pcSlice->getRPS()->getNumberOfPictures())); 592 657 pcSlice->setNumRefIdx(REF_PIC_LIST_1,min(m_pcCfg->getGOPEntry(iGOPid).m_numRefPicsActive,pcSlice->getRPS()->getNumberOfPictures())); 658 #endif 593 659 594 660 #if ADAPTIVE_QP_SELECTION … … 597 663 598 664 // Set reference list 665 #if H_MV 666 pcSlice->setRefPicList( rcListPic, m_refPicSetInterLayer ); 667 #else 599 668 pcSlice->setRefPicList ( rcListPic ); 669 #endif 600 670 601 671 // Slice info. refinement 672 #if H_MV 673 if ( pcSlice->getSliceType() == B_SLICE ) 674 { 675 if( m_pcCfg->getGOPEntry( ( pcSlice->getRapPicFlag() == true && getLayerId() > 0 ) ? MAX_GOP : iGOPid ).m_sliceType == 'P' ) 676 { 677 pcSlice->setSliceType( P_SLICE ); 678 } 679 } 680 #else 602 681 if ( (pcSlice->getSliceType() == B_SLICE) && (pcSlice->getNumRefIdx(REF_PIC_LIST_1) == 0) ) 603 682 { 604 683 pcSlice->setSliceType ( P_SLICE ); 605 684 } 685 #endif 606 686 #if !L0034_COMBINED_LIST_CLEANUP 607 687 if (pcSlice->getSliceType() != B_SLICE || !pcSlice->getSPS()->getUseLComb()) … … 1020 1100 { 1021 1101 OutputNALUnit nalu(NAL_UNIT_VPS); 1102 #if H_MV 1103 if( getLayerId() == 0 ) 1104 { 1105 #endif 1022 1106 m_pcEntropyCoder->setBitstream(&nalu.m_Bitstream); 1023 1107 m_pcEntropyCoder->encodeVPS(m_pcEncTop->getVPS()); … … 1028 1112 #endif 1029 1113 1114 #if H_MV 1115 } 1116 nalu = NALUnit(NAL_UNIT_SPS, 0, getLayerId()); 1117 #else 1030 1118 nalu = NALUnit(NAL_UNIT_SPS); 1119 #endif 1031 1120 m_pcEntropyCoder->setBitstream(&nalu.m_Bitstream); 1032 1121 if (m_bSeqFirst) … … 1061 1150 #endif 1062 1151 1152 #if H_MV 1153 nalu = NALUnit(NAL_UNIT_PPS, 0, getLayerId()); 1154 #else 1063 1155 nalu = NALUnit(NAL_UNIT_PPS); 1156 #endif 1064 1157 m_pcEntropyCoder->setBitstream(&nalu.m_Bitstream); 1065 1158 m_pcEntropyCoder->encodePPS(pcSlice->getPPS()); … … 1383 1476 m_pcEntropyCoder->resetEntropy (); 1384 1477 /* start slice NALunit */ 1478 #if H_MV 1479 OutputNALUnit nalu( pcSlice->getNalUnitType(), pcSlice->getTLayer(), getLayerId() ); 1480 #else 1385 1481 OutputNALUnit nalu( pcSlice->getNalUnitType(), pcSlice->getTLayer() ); 1482 #endif 1386 1483 Bool sliceSegment = (!pcSlice->isNextSlice()); 1387 1484 if (!sliceSegment) … … 1610 1707 } 1611 1708 1709 #if !H_3D 1612 1710 pcPic->compressMotion(); 1711 #endif 1712 #if H_MV 1713 m_pocLastCoded = pcPic->getPOC(); 1714 #endif 1613 1715 //-- For time output for each slice 1614 1716 Double dEncTime = (Double)(clock()-iBeforeTime) / CLOCKS_PER_SEC; … … 1921 2023 1922 2024 pcPic->setReconMark ( true ); 2025 #if H_MV 2026 TComSlice::markIvRefPicsAsShortTerm( m_refPicSetInterLayer ); 2027 std::vector<Int> temp; 2028 TComSlice::markIvRefPicsAsUnused ( m_ivPicLists, temp, pcPic->getSlice(0)->getVPS(), m_layerId, pcPic->getPOC() ); 2029 #endif 1923 2030 m_bFirst = false; 1924 2031 m_iNumPicCoded++; … … 1941 2048 if( accumNalsDU != NULL) delete accumNalsDU; 1942 2049 2050 #if !H_MV 1943 2051 assert ( m_iNumPicCoded == iNumPicRcvd ); 2052 #endif 1944 2053 } 1945 2054 2055 #if !H_MV 1946 2056 Void TEncGOP::printOutSummary(UInt uiNumAllPicCoded) 1947 2057 { … … 1979 2089 printf("\nRVM: %.3lf\n" , xCalculateRVM()); 1980 2090 } 2091 #endif 1981 2092 1982 2093 Void TEncGOP::preLoopFilterPicAll( TComPic* pcPic, UInt64& ruiDist, UInt64& ruiBits ) … … 2254 2365 2255 2366 //===== add PSNR ===== 2367 #if H_MV 2368 m_pcEncTop->getAnalyzeAll()->addResult (dYPSNR, dUPSNR, dVPSNR, (Double)uibits); 2369 #else 2256 2370 m_gcAnalyzeAll.addResult (dYPSNR, dUPSNR, dVPSNR, (Double)uibits); 2371 #endif 2257 2372 TComSlice* pcSlice = pcPic->getSlice(0); 2258 2373 if (pcSlice->isIntra()) 2259 2374 { 2375 #if H_MV 2376 m_pcEncTop->getAnalyzeI()->addResult (dYPSNR, dUPSNR, dVPSNR, (Double)uibits); 2377 #else 2260 2378 m_gcAnalyzeI.addResult (dYPSNR, dUPSNR, dVPSNR, (Double)uibits); 2379 #endif 2261 2380 } 2262 2381 if (pcSlice->isInterP()) 2263 2382 { 2383 #if H_MV 2384 m_pcEncTop->getAnalyzeP()->addResult (dYPSNR, dUPSNR, dVPSNR, (Double)uibits); 2385 #else 2264 2386 m_gcAnalyzeP.addResult (dYPSNR, dUPSNR, dVPSNR, (Double)uibits); 2387 #endif 2265 2388 } 2266 2389 if (pcSlice->isInterB()) 2267 2390 { 2391 #if H_MV 2392 m_pcEncTop->getAnalyzeB()->addResult (dYPSNR, dUPSNR, dVPSNR, (Double)uibits); 2393 #else 2268 2394 m_gcAnalyzeB.addResult (dYPSNR, dUPSNR, dVPSNR, (Double)uibits); 2395 #endif 2269 2396 } 2270 2397 … … 2273 2400 2274 2401 #if ADAPTIVE_QP_SELECTION 2402 #if H_MV 2403 printf("Layer %3d POC %4d TId: %1d ( %c-SLICE, nQP %d QP %d ) %10d bits", 2404 pcSlice->getLayerId(), 2405 pcSlice->getPOC(), 2406 pcSlice->getTLayer(), 2407 c, 2408 pcSlice->getSliceQpBase(), 2409 pcSlice->getSliceQp(), 2410 uibits ); 2411 #else 2275 2412 printf("POC %4d TId: %1d ( %c-SLICE, nQP %d QP %d ) %10d bits", 2276 2413 pcSlice->getPOC(), … … 2280 2417 pcSlice->getSliceQp(), 2281 2418 uibits ); 2419 #endif 2420 #else 2421 #if H_MV 2422 printf("Layer %3d POC %4d TId: %1d ( %c-SLICE, QP %d ) %10d bits", 2423 pcSlice->getLayerId(), 2424 pcSlice->getPOC()-pcSlice->getLastIDR(), 2425 pcSlice->getTLayer(), 2426 c, 2427 pcSlice->getSliceQp(), 2428 uibits ); 2282 2429 #else 2283 2430 printf("POC %4d TId: %1d ( %c-SLICE, QP %d ) %10d bits", … … 2287 2434 pcSlice->getSliceQp(), 2288 2435 uibits ); 2436 #endif 2289 2437 2290 2438 #endif … … 2297 2445 for (Int iRefIndex = 0; iRefIndex < pcSlice->getNumRefIdx(RefPicList(iRefList)); iRefIndex++) 2298 2446 { 2447 #if H_MV 2448 if( pcSlice->getLayerId() != pcSlice->getRefLayerId( RefPicList(iRefList), iRefIndex ) ) 2449 { 2450 printf( "V%d ", pcSlice->getRefLayerId( RefPicList(iRefList), iRefIndex ) ); 2451 } 2452 else 2453 { 2454 #endif 2299 2455 printf ("%d ", pcSlice->getRefPOC(RefPicList(iRefList), iRefIndex)-pcSlice->getLastIDR()); 2456 #if H_MV 2457 } 2458 #endif 2300 2459 } 2301 2460 printf("]"); … … 2663 2822 } 2664 2823 #endif 2824 #if H_MV 2825 Void TEncGOP::xSetRefPicListModificationsMvc( TComSlice* pcSlice, UInt uiPOCCurr, UInt iGOPid ) 2826 { 2827 TComVPS* vps = pcSlice->getVPS(); 2828 Int layer = pcSlice->getLayerIdInVps( ); 2829 2830 if( pcSlice->getSliceType() == I_SLICE || !(pcSlice->getPPS()->getListsModificationPresentFlag()) || vps->getNumDirectRefLayers( layer ) == 0 ) 2831 { 2832 return; 2833 } 2834 2835 // analyze inter-view modifications 2836 GOPEntry ge = m_pcCfg->getGOPEntry( (pcSlice->getRapPicFlag() && ( layer > 0) ) ? MAX_GOP : iGOPid ); 2837 2838 TComRefPicListModification* refPicListModification = pcSlice->getRefPicListModification(); 2839 2840 Int maxRefListSize = pcSlice->getNumRpsCurrTempList(); 2841 Int numTemporalRefs = maxRefListSize - vps->getNumDirectRefLayers( layer ); 2842 2843 2844 for (Int li = 0; li < 2; li ++) // Loop over lists L0 and L1 2845 { 2846 Int numModifications = 0; 2847 2848 for( Int k = 0; k < ge.m_numInterViewRefPics; k++ ) 2849 { 2850 numModifications += ( ge.m_interViewRefPosL[li][k] >= 0 ) ? 1 : 0; 2851 } 2852 2853 // set inter-view modifications 2854 if( (maxRefListSize > 1) && (numModifications > 0) ) 2855 { 2856 refPicListModification->setRefPicListModificationFlagL( li, true ); 2857 Int tempList[16]; 2858 for( Int k = 0; k < 16; k++ ) { tempList[k] = -1; } 2859 2860 Bool isModified = false; 2861 for( Int k = 0; k < ge.m_numInterViewRefPics; k++ ) 2862 { 2863 if( ge.m_interViewRefPosL[li][k] >= 0 ) 2864 { 2865 Int orgIdx = numTemporalRefs; 2866 Int targetIdx = ge.m_interViewRefPosL[ li ][ k ]; 2867 for( Int idx = 0; idx < vps->getNumDirectRefLayers( layer ); idx++ ) 2868 { 2869 Int refLayer = vps->getLayerIdInVps( vps->getRefLayerId( layer, idx ) ); 2870 if( ( layer + ge.m_interViewRefs[ k ]) == refLayer ) 2871 { 2872 tempList[ targetIdx ] = orgIdx; 2873 isModified = ( targetIdx != orgIdx ); 2874 } 2875 orgIdx++; 2876 } 2877 } 2878 } 2879 if( isModified ) 2880 { 2881 Int temporalRefIdx = 0; 2882 for( Int i = 0; i < pcSlice->getNumRefIdx( ( li == 0 ) ? REF_PIC_LIST_0 : REF_PIC_LIST_1 ); i++ ) 2883 { 2884 if( tempList[i] >= 0 ) 2885 { 2886 refPicListModification->setRefPicSetIdxL( li, i, tempList[i] ); 2887 } 2888 else 2889 { 2890 refPicListModification->setRefPicSetIdxL( li, i, temporalRefIdx ); 2891 temporalRefIdx++; 2892 } 2893 } 2894 } 2895 else 2896 { 2897 refPicListModification->setRefPicListModificationFlagL( li, false ); 2898 } 2899 } 2900 } 2901 } 2902 #endif 2665 2903 //! \} -
branches/HTM-DEV-0.1-dev/source/Lib/TLibEncoder/TEncGOP.h
r367 r368 97 97 SEIWriter m_seiWriter; 98 98 99 #if H_MV 100 TComPicLists* m_ivPicLists; 101 std::vector<TComPic*> m_refPicSetInterLayer; 102 103 Int m_pocLastCoded; 104 Int m_layerId; 105 Int m_viewId; 106 #if H_3D 107 Bool m_isDepth; 108 #endif 109 #endif 99 110 //--Adaptive Loop filter 100 111 TEncSampleAdaptiveOffset* m_pcSAO; … … 133 144 134 145 Void init ( TEncTop* pcTEncTop ); 146 #if H_MV 147 Void initGOP ( Int iPOCLast, Int iNumPicRcvd, TComList<TComPic*>& rcListPic, TComList<TComPicYuv*>& rcListPicYuvRecOut, std::list<AccessUnit>& accessUnitsInGOP); 148 Void compressPicInGOP ( Int iPOCLast, Int iNumPicRcvd, TComList<TComPic*>& rcListPic, TComList<TComPicYuv*>& rcListPicYuvRecOut, std::list<AccessUnit>& accessUnitsInGOP, Int iGOPid ); 149 #else 135 150 Void compressGOP( Int iPOCLast, Int iNumPicRcvd, TComList<TComPic*>& rcListPic, TComList<TComPicYuv*>& rcListPicYuvRec, std::list<AccessUnit>& accessUnitsInGOP ); 151 #endif 136 152 Void xAttachSliceDataToNalUnit (OutputNALUnit& rNalu, TComOutputBitstream*& rpcBitstreamRedirect); 137 153 154 #if H_MV 155 Int getPocLastCoded () { return m_pocLastCoded; } 156 Int getLayerId () { return m_layerId; } 157 Int getViewId () { return m_viewId; } 158 #if H_3D 159 Bool getIsDepth () { return m_isDepth; } 160 #endif 161 #endif 138 162 139 163 Int getGOPSize() { return m_iGopSize; } … … 141 165 TComList<TComPic*>* getListPic() { return m_pcListPic; } 142 166 167 #if !H_MV 143 168 Void printOutSummary ( UInt uiNumAllPicCoded ); 169 #endif 144 170 Void preLoopFilterPicAll ( TComPic* pcPic, UInt64& ruiDist, UInt64& ruiBits ); 145 171 … … 185 211 #endif 186 212 #endif 213 #if H_MV 214 Void xSetRefPicListModificationsMvc( TComSlice* pcSlice, UInt uiPOCCurr, UInt iGOPid ); 215 #endif 187 216 #if L0386_DB_METRIC 188 217 Void dblMetric( TComPic* pcPic, UInt uiNumSlices ); -
branches/HTM-DEV-0.1-dev/source/Lib/TLibEncoder/TEncSlice.cpp
r367 r368 219 219 220 220 // slice type 221 #if H_MV 222 SliceType eSliceTypeBaseView; 223 if( pocLast == 0 || pocCurr % m_pcCfg->getIntraPeriod() == 0 || m_pcGOPEncoder->getGOPSize() == 0 ) 224 { 225 eSliceTypeBaseView = I_SLICE; 226 } 227 else 228 { 229 eSliceTypeBaseView = B_SLICE; 230 } 231 SliceType eSliceType = eSliceTypeBaseView; 232 if( eSliceTypeBaseView == I_SLICE && m_pcCfg->getGOPEntry(MAX_GOP).m_POC == 0 && m_pcCfg->getGOPEntry(MAX_GOP).m_sliceType != 'I' ) 233 { 234 eSliceType = B_SLICE; 235 } 236 #else 221 237 SliceType eSliceType; 222 238 … … 225 241 226 242 rpcSlice->setSliceType ( eSliceType ); 243 #endif 227 244 228 245 // ------------------------------------------------------------------------------------------------------------------ … … 253 270 if (!(( m_pcCfg->getMaxDeltaQP() == 0 ) && (dQP == -rpcSlice->getSPS()->getQpBDOffsetY() ) && (rpcSlice->getSPS()->getUseLossless()))) 254 271 { 272 #if H_MV 273 dQP += m_pcCfg->getGOPEntry( (eSliceTypeBaseView == I_SLICE) ? MAX_GOP : iGOPid ).m_QPOffset; 274 #else 255 275 dQP += m_pcCfg->getGOPEntry(iGOPid).m_QPOffset; 276 #endif 256 277 } 257 278 } … … 296 317 #endif 297 318 // Case #1: I or P-slices (key-frame) 319 #if H_MV 320 Double dQPFactor; 321 if( eSliceType != I_SLICE ) 322 { 323 dQPFactor = m_pcCfg->getGOPEntry( (eSliceTypeBaseView == I_SLICE) ? MAX_GOP : iGOPid ).m_QPFactor; 324 } 325 else 326 #else 298 327 Double dQPFactor = m_pcCfg->getGOPEntry(iGOPid).m_QPFactor; 299 328 if ( eSliceType==I_SLICE ) 329 #endif 300 330 { 301 331 dQPFactor=0.57*dLambda_scale; … … 332 362 if( rpcSlice->getSliceType( ) != I_SLICE ) 333 363 { 364 #if H_MV 365 dLambda *= m_pcCfg->getLambdaModifier( m_pcCfg->getGOPEntry((eSliceTypeBaseView == I_SLICE) ? MAX_GOP : iGOPid).m_temporalId ); 366 #else 334 367 dLambda *= m_pcCfg->getLambdaModifier( m_pcCfg->getGOPEntry(iGOPid).m_temporalId ); 368 #endif 335 369 } 336 370 … … 371 405 #if HB_LAMBDA_FOR_LDC 372 406 // restore original slice type 407 #if H_MV 408 eSliceType = eSliceTypeBaseView; 409 if( eSliceTypeBaseView == I_SLICE && m_pcCfg->getGOPEntry(MAX_GOP).m_POC == 0 && m_pcCfg->getGOPEntry(MAX_GOP).m_sliceType != 'I' ) 410 { 411 eSliceType = B_SLICE; 412 } 413 #else 373 414 eSliceType = (pocLast == 0 || pocCurr % m_pcCfg->getIntraPeriod() == 0 || m_pcGOPEncoder->getGOPSize() == 0) ? I_SLICE : eSliceType; 415 #endif 374 416 375 417 rpcSlice->setSliceType ( eSliceType ); … … 389 431 rpcSlice->setSliceQpDeltaCb ( 0 ); 390 432 rpcSlice->setSliceQpDeltaCr ( 0 ); 433 #if H_MV 434 rpcSlice->setNumRefIdx(REF_PIC_LIST_0,m_pcCfg->getGOPEntry( (eSliceTypeBaseView == I_SLICE) ? MAX_GOP : iGOPid ).m_numRefPicsActive); 435 rpcSlice->setNumRefIdx(REF_PIC_LIST_1,m_pcCfg->getGOPEntry( (eSliceTypeBaseView == I_SLICE) ? MAX_GOP : iGOPid ).m_numRefPicsActive); 436 #else 391 437 rpcSlice->setNumRefIdx(REF_PIC_LIST_0,m_pcCfg->getGOPEntry(iGOPid).m_numRefPicsActive); 392 438 rpcSlice->setNumRefIdx(REF_PIC_LIST_1,m_pcCfg->getGOPEntry(iGOPid).m_numRefPicsActive); 439 #endif 393 440 394 441 #if L0386_DB_METRIC … … 411 458 if ( !m_pcCfg->getLoopFilterOffsetInPPS() && eSliceType!=I_SLICE) 412 459 { 460 #if H_MV 461 rpcSlice->getPPS()->setDeblockingFilterBetaOffsetDiv2( m_pcCfg->getGOPEntry((eSliceTypeBaseView == I_SLICE) ? MAX_GOP : iGOPid).m_betaOffsetDiv2 + m_pcCfg->getLoopFilterBetaOffset() ); 462 rpcSlice->getPPS()->setDeblockingFilterTcOffsetDiv2( m_pcCfg->getGOPEntry((eSliceTypeBaseView == I_SLICE) ? MAX_GOP : iGOPid).m_tcOffsetDiv2 + m_pcCfg->getLoopFilterTcOffset() ); 463 rpcSlice->setDeblockingFilterBetaOffsetDiv2( m_pcCfg->getGOPEntry((eSliceTypeBaseView == I_SLICE) ? MAX_GOP : iGOPid).m_betaOffsetDiv2 + m_pcCfg->getLoopFilterBetaOffset() ); 464 rpcSlice->setDeblockingFilterTcOffsetDiv2( m_pcCfg->getGOPEntry((eSliceTypeBaseView == I_SLICE) ? MAX_GOP : iGOPid).m_tcOffsetDiv2 + m_pcCfg->getLoopFilterTcOffset() ); 465 #else 413 466 rpcSlice->getPPS()->setDeblockingFilterBetaOffsetDiv2( m_pcCfg->getGOPEntry(iGOPid).m_betaOffsetDiv2 + m_pcCfg->getLoopFilterBetaOffset() ); 414 467 rpcSlice->getPPS()->setDeblockingFilterTcOffsetDiv2( m_pcCfg->getGOPEntry(iGOPid).m_tcOffsetDiv2 + m_pcCfg->getLoopFilterTcOffset() ); 415 468 rpcSlice->setDeblockingFilterBetaOffsetDiv2( m_pcCfg->getGOPEntry(iGOPid).m_betaOffsetDiv2 + m_pcCfg->getLoopFilterBetaOffset() ); 416 469 rpcSlice->setDeblockingFilterTcOffsetDiv2( m_pcCfg->getGOPEntry(iGOPid).m_tcOffsetDiv2 + m_pcCfg->getLoopFilterTcOffset() ); 470 #endif 417 471 } 418 472 else … … 435 489 rpcSlice->setDepth ( depth ); 436 490 491 #if H_MV 492 pcPic->setTLayer( m_pcCfg->getGOPEntry( (eSliceTypeBaseView == I_SLICE) ? MAX_GOP : iGOPid ).m_temporalId ); 493 #else 437 494 pcPic->setTLayer( m_pcCfg->getGOPEntry(iGOPid).m_temporalId ); 495 #endif 438 496 if(eSliceType==I_SLICE) 439 497 { -
branches/HTM-DEV-0.1-dev/source/Lib/TLibEncoder/TEncTop.cpp
r367 r368 42 42 #include "TLibCommon/ContextModel.h" 43 43 #endif 44 #if H_MV 45 #include "../../App/TAppEncoder/TAppEncTop.h" 46 #endif 44 47 45 48 //! \ingroup TLibEncoder … … 78 81 m_pcBitCounters = NULL; 79 82 m_pcRdCosts = NULL; 83 #if H_MV 84 m_ivPicLists = NULL; 85 #endif 80 86 } 81 87 … … 89 95 Void TEncTop::create () 90 96 { 97 #if !H_MV 91 98 // initialize global variables 92 99 initROM(); 100 #endif 93 101 94 102 // create processing unit classes … … 268 276 delete[] m_pcRdCosts; 269 277 278 #if !H_MV 270 279 // destroy ROM 271 280 destroyROM(); 281 #endif 272 282 273 283 return; … … 319 329 // ==================================================================================================================== 320 330 331 #if H_MV 332 Void TEncTop::initNewPic( TComPicYuv* pcPicYuvOrg ) 333 { 334 TComPic* pcPicCurr = NULL; 335 336 // get original YUV 337 xGetNewPicBuffer( pcPicCurr ); 338 pcPicYuvOrg->copyToPic( pcPicCurr->getPicYuvOrg() ); 339 340 // compute image characteristics 341 if ( getUseAdaptiveQP() ) 342 { 343 m_cPreanalyzer.xPreanalyze( dynamic_cast<TEncPic*>( pcPicCurr ) ); 344 } 345 } 346 #endif 321 347 Void TEncTop::deletePicBuffer() 322 348 { … … 345 371 \retval iNumEncoded number of encoded pictures 346 372 */ 373 #if H_MV 374 Void TEncTop::encode(Bool flush, TComPicYuv* pcPicYuvOrg, TComList<TComPicYuv*>& rcListPicYuvRecOut, std::list<AccessUnit>& accessUnitsOut, Int& iNumEncoded , Int gopId ) 375 { 376 #else 347 377 Void TEncTop::encode(Bool flush, TComPicYuv* pcPicYuvOrg, TComList<TComPicYuv*>& rcListPicYuvRecOut, std::list<AccessUnit>& accessUnitsOut, Int& iNumEncoded ) 348 378 { 379 #endif 380 #if H_3D 381 TComPic* picLastCoded = getPic( getGOPEncoder()->getPocLastCoded() ); 382 if( picLastCoded ) 383 { 384 picLastCoded->compressMotion(); 385 } 386 #endif 387 #if H_MV 388 if( gopId == 0) 389 { 390 m_cGOPEncoder.initGOP(m_iPOCLast, m_iNumPicRcvd, m_cListPic, rcListPicYuvRecOut, accessUnitsOut); 391 #else 349 392 if (pcPicYuvOrg) { 350 393 // get original YUV … … 365 408 return; 366 409 } 410 #endif 367 411 368 412 #if RATE_CONTROL_LAMBDA_DOMAIN … … 373 417 #endif 374 418 419 #if H_MV 420 } 421 m_cGOPEncoder.compressPicInGOP(m_iPOCLast, m_iNumPicRcvd, m_cListPic, rcListPicYuvRecOut, accessUnitsOut, gopId ); 422 423 if( gopId + 1 == m_cGOPEncoder.getGOPSize() ) 424 { 425 #else 375 426 // compress GOP 376 427 m_cGOPEncoder.compressGOP(m_iPOCLast, m_iNumPicRcvd, m_cListPic, rcListPicYuvRecOut, accessUnitsOut); 428 #endif 377 429 378 430 #if RATE_CONTROL_LAMBDA_DOMAIN … … 386 438 m_iNumPicRcvd = 0; 387 439 m_uiNumAllPicCoded += iNumEncoded; 440 #if H_MV 441 } 442 #endif 388 443 } 389 444 … … 450 505 Void TEncTop::xInitSPS() 451 506 { 507 #if H_MV 508 m_cSPS.setSPSId( getLayerIdInVps() ); 509 #endif 452 510 ProfileTierLevel& profileTierLevel = *m_cSPS.getPTL()->getGeneralPTL(); 453 511 profileTierLevel.setLevelIdc(m_level); … … 594 652 Void TEncTop::xInitPPS() 595 653 { 654 #if H_MV 655 if( m_cVPS.getNumDirectRefLayers( getLayerIdInVps() ) > 0 ) 656 { 657 m_cPPS.setListsModificationPresentFlag( true ); 658 } 659 m_cPPS.setPPSId( getLayerIdInVps() ); 660 m_cPPS.setSPSId( getLayerIdInVps() ); 661 #endif 596 662 m_cPPS.setConstrainedIntraPred( m_bUseConstrainedIntraPred ); 597 663 Bool bUseDQP = (getMaxCuDQPDepth() > 0)? true : false; … … 897 963 Void TEncTop::selectReferencePictureSet(TComSlice* slice, Int POCCurr, Int GOPid ) 898 964 { 965 #if H_MV 966 if( slice->getRapPicFlag() == true && getLayerId() > 0 && POCCurr == 0 ) 967 { 968 TComReferencePictureSet* rps = slice->getLocalRPS(); 969 rps->setNumberOfNegativePictures(0); 970 rps->setNumberOfPositivePictures(0); 971 rps->setNumberOfLongtermPictures(0); 972 rps->setNumberOfPictures(0); 973 slice->setRPS(rps); 974 } 975 else 976 { 977 #endif 899 978 slice->setRPSidx(GOPid); 900 979 … … 924 1003 slice->setRPS(getSPS()->getRPSList()->getReferencePictureSet(slice->getRPSidx())); 925 1004 slice->getRPS()->setNumberOfPictures(slice->getRPS()->getNumberOfNegativePictures()+slice->getRPS()->getNumberOfPositivePictures()); 1005 #if H_MV 1006 } 1007 #endif 926 1008 927 1009 } … … 1038 1120 } 1039 1121 } 1122 #if H_MV 1123 Void TEncTop::printSummary( Int numAllPicCoded ) 1124 { 1125 assert (numAllPicCoded == m_cAnalyzeAll.getNumPic()); 1126 1127 //--CFG_KDY 1128 m_cAnalyzeAll.setFrmRate( getFrameRate() ); 1129 m_cAnalyzeI.setFrmRate( getFrameRate() ); 1130 m_cAnalyzeP.setFrmRate( getFrameRate() ); 1131 m_cAnalyzeB.setFrmRate( getFrameRate() ); 1132 1133 //-- all 1134 printf( "\n\nSUMMARY ------------------------------------------- LayerId %2d\n", m_layerId ); 1135 1136 m_cAnalyzeAll.printOut('a'); 1137 1138 printf( "\n\nI Slices--------------------------------------------------------\n" ); 1139 m_cAnalyzeI.printOut('i'); 1140 1141 printf( "\n\nP Slices--------------------------------------------------------\n" ); 1142 m_cAnalyzeP.printOut('p'); 1143 1144 printf( "\n\nB Slices--------------------------------------------------------\n" ); 1145 m_cAnalyzeB.printOut('b'); 1146 1147 #if _SUMMARY_OUT_ 1148 m_cAnalyzeAll.printSummaryOut(); 1149 #endif 1150 #if _SUMMARY_PIC_ 1151 m_cAnalyzeI.printSummary('I'); 1152 m_cAnalyzeP.printSummary('P'); 1153 m_cAnalyzeB.printSummary('B'); 1154 #endif 1155 } 1156 1157 Int TEncTop::getFrameId(Int iGOPid) 1158 { 1159 if(m_iPOCLast == 0) 1160 { 1161 return(0 ); 1162 } 1163 else 1164 { 1165 return m_iPOCLast -m_iNumPicRcvd+ getGOPEntry(iGOPid).m_POC ; 1166 } 1167 } 1168 1169 TComPic* TEncTop::getPic( Int poc ) 1170 { 1171 TComList<TComPic*>* listPic = getListPic(); 1172 TComPic* pcPic = NULL; 1173 for(TComList<TComPic*>::iterator it=listPic->begin(); it!=listPic->end(); it++) 1174 { 1175 if( (*it)->getPOC() == poc ) 1176 { 1177 pcPic = *it ; 1178 break ; 1179 } 1180 } 1181 return pcPic; 1182 } 1183 #endif 1040 1184 //! \} -
branches/HTM-DEV-0.1-dev/source/Lib/TLibEncoder/TEncTop.h
r367 r368 74 74 TComList<TComPic*> m_cListPic; ///< dynamic list of pictures 75 75 76 #if H_MV 77 TComPicLists* m_ivPicLists; ///< access to picture lists of other layers 78 #endif 76 79 // encoder search 77 80 TEncSearch m_cSearch; ///< encoder search class … … 122 125 TEncRateCtrl m_cRateCtrl; ///< Rate control class 123 126 127 #if H_MV 128 TEncAnalyze m_cAnalyzeAll; 129 TEncAnalyze m_cAnalyzeI; 130 TEncAnalyze m_cAnalyzeP; 131 TEncAnalyze m_cAnalyzeB; 132 #endif 124 133 protected: 125 134 Void xGetNewPicBuffer ( TComPic*& rpcPic ); ///< get picture buffer which will be processed … … 137 146 Void destroy (); 138 147 Void init (); 148 #if H_MV 149 TComPicLists* getIvPicLists() { return m_ivPicLists; } 150 #endif 139 151 Void deletePicBuffer (); 140 152 141 153 Void createWPPCoders(Int iNumSubstreams); 142 154 155 #if H_MV 156 Void initNewPic(TComPicYuv* pcPicYuvOrg); 157 #endif 143 158 // ------------------------------------------------------------------------------------------------------------------- 144 159 // member access functions … … 177 192 #endif 178 193 TComScalingList* getScalingList () { return &m_scalingList; } 194 #if H_MV 195 TEncAnalyze* getAnalyzeAll () { return &m_cAnalyzeAll; } 196 TEncAnalyze* getAnalyzeI () { return &m_cAnalyzeI; } 197 TEncAnalyze* getAnalyzeP () { return &m_cAnalyzeP; } 198 TEncAnalyze* getAnalyzeB () { return &m_cAnalyzeB; } 199 200 Int getNumAllPicCoded () { return m_uiNumAllPicCoded; } 201 202 Int getFrameId (Int iGOPid); 203 204 TComPic* getPic ( Int poc ); 205 Void setIvPicLists ( TComPicLists* picLists) { m_ivPicLists = picLists; } 206 #endif 179 207 // ------------------------------------------------------------------------------------------------------------------- 180 208 // encoder function … … 182 210 183 211 /// encode several number of pictures until end-of-sequence 212 #if H_MV 213 Void encode( Bool bEos, TComPicYuv* pcPicYuvOrg, TComList<TComPicYuv*>& rcListPicYuvRecOut, std::list<AccessUnit>& accessUnitsOut, Int& iNumEncoded , Int gopId ); 214 #else 184 215 Void encode( Bool bEos, TComPicYuv* pcPicYuvOrg, TComList<TComPicYuv*>& rcListPicYuvRecOut, 185 216 std::list<AccessUnit>& accessUnitsOut, Int& iNumEncoded ); 186 217 #endif 218 219 #if H_MV 220 Void printSummary ( Int numAllPicCoded ); 221 #else 187 222 void printSummary() { m_cGOPEncoder.printOutSummary (m_uiNumAllPicCoded); } 223 #endif 188 224 }; 189 225
Note: See TracChangeset for help on using the changeset viewer.