Changeset 531 in SHVCSoftware
- Timestamp:
- 31 Dec 2013, 16:50:03 (11 years ago)
- Location:
- branches/SHM-4.1-dev/source
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-4.1-dev/source/App/TAppDecoder/TAppDecTop.cpp
r521 r531 514 514 #endif 515 515 { 516 if (pcListPic->empty()) 517 { 518 return; 519 } 520 516 521 TComList<TComPic*>::iterator iterPic = pcListPic->begin(); 517 522 Int numPicsNotYetDisplayed = 0; … … 733 738 #endif 734 739 { 735 if(!pcListPic )740 if(!pcListPic || pcListPic->empty()) 736 741 { 737 742 return; -
branches/SHM-4.1-dev/source/App/TAppEncoder/TAppEncCfg.cpp
r530 r531 982 982 #if O0153_ALT_OUTPUT_LAYER_FLAG 983 983 ("AltOutputLayerFlag", m_altOutputLayerFlag, false, "Specifies the value of alt_output_layer_flag in VPS extension") 984 #endif 985 #if O0149_CROSS_LAYER_BLA_FLAG 986 ("CrossLayerBLAFlag", m_crossLayerBLAFlag, false, "Specifies the value of cross_layer_bla_flag in VPS") 984 987 #endif 985 988 ; -
branches/SHM-4.1-dev/source/App/TAppEncoder/TAppEncCfg.h
r530 r531 400 400 Bool m_crossLayerIrapAlignFlag; 401 401 #endif 402 #if O0149_CROSS_LAYER_BLA_FLAG 403 bool m_crossLayerBLAFlag; 404 #endif 402 405 public: 403 406 TAppEncCfg(); -
branches/SHM-4.1-dev/source/App/TAppEncoder/TAppEncTop.cpp
r529 r531 625 625 m_acTEncTop[layer].setAltOuputLayerFlag( m_altOutputLayerFlag ); 626 626 #endif 627 #if O0149_CROSS_LAYER_BLA_FLAG 628 m_acTEncTop[layer].setCrossLayerBLAFlag( m_crossLayerBLAFlag ); 629 #endif 627 630 } 628 631 } -
branches/SHM-4.1-dev/source/Lib/TLibCommon/TComSlice.cpp
r530 r531 114 114 #endif 115 115 , m_bDiscardableFlag ( false ) 116 #if O0149_CROSS_LAYER_BLA_FLAG 117 , m_bCrossLayerBLAFlag ( false ) 118 #endif 116 119 #endif //SVC_EXTENSION 117 120 { … … 1052 1055 * If the current picture has a nal_ref_idc that is not 0, it will remain marked as "used for reference". 1053 1056 */ 1057 #if NO_CLRAS_OUTPUT_FLAG 1058 Void TComSlice::decodingRefreshMarking(Int& pocCRA, Bool& bRefreshPending, TComList<TComPic*>& rcListPic, Bool noClrasOutputFlag) 1059 #else 1054 1060 Void TComSlice::decodingRefreshMarking(Int& pocCRA, Bool& bRefreshPending, TComList<TComPic*>& rcListPic) 1061 #endif 1055 1062 { 1056 1063 TComPic* rpcPic; … … 1070 1077 rpcPic = *(iterPic); 1071 1078 rpcPic->setCurrSliceIdx(0); 1079 #if NO_CLRAS_OUTPUT_FLAG 1080 if (noClrasOutputFlag) 1081 { 1082 if (rpcPic->getPOC() != pocCurr) rpcPic->getSlice(0)->setReferenced(false); // all layers 1083 } 1084 else 1085 { 1086 if (rpcPic->getPOC() != pocCurr && rpcPic->getLayerId() == m_layerId) rpcPic->getSlice(0)->setReferenced(false); // only current layer 1087 } 1088 #else 1072 1089 if (rpcPic->getPOC() != pocCurr) rpcPic->getSlice(0)->setReferenced(false); 1090 #endif 1073 1091 iterPic++; 1074 1092 } -
branches/SHM-4.1-dev/source/Lib/TLibCommon/TComSlice.h
r530 r531 1888 1888 #endif 1889 1889 Bool m_bDiscardableFlag; 1890 #if O0149_CROSS_LAYER_BLA_FLAG 1891 Bool m_bCrossLayerBLAFlag; 1892 #endif 1890 1893 #endif //SVC_EXTENSION 1891 1894 … … 1977 1980 Bool isIRAP () const { return (getNalUnitType() >= 16) && (getNalUnitType() <= 23); } 1978 1981 Void checkCRA(TComReferencePictureSet *pReferencePictureSet, Int& pocCRA, NalUnitType& associatedIRAPType, TComList<TComPic *>& rcListPic); 1982 #if NO_CLRAS_OUTPUT_FLAG 1983 Void decodingRefreshMarking(Int& pocCRA, Bool& bRefreshPending, TComList<TComPic*>& rcListPic, Bool noClrasOutputFlag); 1984 #else 1979 1985 Void decodingRefreshMarking(Int& pocCRA, Bool& bRefreshPending, TComList<TComPic*>& rcListPic); 1986 #endif 1980 1987 Void setSliceType ( SliceType e ) { m_eSliceType = e; } 1981 1988 Void setSliceQp ( Int i ) { m_iSliceQp = i; } … … 2204 2211 Bool getDiscardableFlag () { return m_bDiscardableFlag; } 2205 2212 Void setDiscardableFlag (Bool b) { m_bDiscardableFlag = b; } 2213 #if O0149_CROSS_LAYER_BLA_FLAG 2214 Bool getCrossLayerBLAFlag () { return m_bCrossLayerBLAFlag; } 2215 Void setCrossLayerBLAFlag (Bool b) { m_bCrossLayerBLAFlag = b; } 2216 #endif 2206 2217 2207 2218 #if RPL_INIT_N0316_N0082 -
branches/SHM-4.1-dev/source/Lib/TLibCommon/TypeDef.h
r530 r531 207 207 #endif 208 208 #endif 209 210 #define NO_CLRAS_OUTPUT_FLAG 1 211 #define O0149_CROSS_LAYER_BLA_FLAG 1 ///< JCTVC-O0149: signal cross_layer_bla_flag in slice header 212 209 213 #else 210 214 #define SYNTAX_OUTPUT 0 -
branches/SHM-4.1-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r530 r531 1745 1745 iBits++; 1746 1746 } 1747 #if O0149_CROSS_LAYER_BLA_FLAG 1748 if(rpcSlice->getPPS()->getNumExtraSliceHeaderBits() > iBits) 1749 { 1750 READ_FLAG(uiCode, "cross_layer_bla_flag"); rpcSlice->setCrossLayerBLAFlag( uiCode ? true : false ); 1751 iBits++; 1752 } 1753 #endif 1747 1754 for (; iBits < rpcSlice->getPPS()->getNumExtraSliceHeaderBits(); iBits++) 1748 1755 { -
branches/SHM-4.1-dev/source/Lib/TLibDecoder/TDecTop.cpp
r529 r531 79 79 m_prevSliceSkipped = false; 80 80 m_skippedPOC = 0; 81 #if NO_CLRAS_OUTPUT_FLAG 82 m_noClrasOutputFlag = false; 83 m_layerInitializedFlag = false; 84 m_firstPicInLayerDecodedFlag = false; 85 m_noOutputOfPriorPicsFlags = false; 86 m_bRefreshPending = false; 87 #endif 81 88 } 82 89 … … 758 765 { 759 766 TComPic*& pcPic = m_pcPic; 767 #if NO_CLRAS_OUTPUT_FLAG 768 Bool bFirstSliceInSeq; 769 #endif 760 770 #if SVC_EXTENSION 761 771 m_apcSlicePilot->setVPS( m_parameterSetManagerDecoder.getPrefetchedVPS(0) ); … … 887 897 #endif 888 898 } 899 #if NO_CLRAS_OUTPUT_FLAG 900 bFirstSliceInSeq = m_bFirstSliceInSequence; 901 #endif 889 902 m_bFirstSliceInSequence = false; 890 903 #if POC_RESET_FLAG … … 1045 1058 } 1046 1059 } 1060 #endif 1061 1062 #if NO_CLRAS_OUTPUT_FLAG 1063 if (m_layerId == 0 && 1064 (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_LP 1065 || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_RADL 1066 || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_N_LP 1067 || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL 1068 || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP 1069 || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA)) 1070 { 1071 if (bFirstSliceInSeq) 1072 { 1073 setNoClrasOutputFlag(true); 1074 } 1075 else if (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_LP 1076 || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_RADL 1077 || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_N_LP) 1078 { 1079 setNoClrasOutputFlag(true); 1080 } 1081 #if O0149_CROSS_LAYER_BLA_FLAG 1082 else if ((m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP) && 1083 m_apcSlicePilot->getCrossLayerBLAFlag()) 1084 { 1085 setNoClrasOutputFlag(true); 1086 } 1087 #endif 1088 else 1089 { 1090 setNoClrasOutputFlag(false); 1091 } 1092 if (getNoClrasOutputFlag()) 1093 { 1094 for (UInt i = 0; i < m_apcSlicePilot->getVPS()->getMaxLayers(); i++) 1095 { 1096 m_ppcTDecTop[i]->setLayerInitializedFlag(false); 1097 m_ppcTDecTop[i]->setFirstPicInLayerDecodedFlag(false); 1098 } 1099 } 1100 } 1101 #endif 1102 1103 #if NO_CLRAS_OUTPUT_FLAG 1104 m_apcSlicePilot->decodingRefreshMarking(m_pocCRA, m_bRefreshPending, m_cListPic, getNoClrasOutputFlag()); 1047 1105 #endif 1048 1106 -
branches/SHM-4.1-dev/source/Lib/TLibDecoder/TDecTop.h
r528 r531 137 137 #endif 138 138 139 #if NO_CLRAS_OUTPUT_FLAG 140 Bool m_noClrasOutputFlag; 141 Bool m_layerInitializedFlag; 142 Bool m_firstPicInLayerDecodedFlag; 143 Bool m_noOutputOfPriorPicsFlags; 144 145 Bool m_bRefreshPending; 146 #endif 147 139 148 public: 140 149 TDecTop(); … … 239 248 TComPic* getMotionPredIlp(TComSlice* pcSlice); 240 249 #endif 250 251 #if NO_CLRAS_OUTPUT_FLAG 252 Int getNoClrasOutputFlag() { return m_noClrasOutputFlag;} 253 Void setNoClrasOutputFlag(Bool x) { m_noClrasOutputFlag = x; } 254 Int getLayerInitializedFlag() { return m_layerInitializedFlag;} 255 Void setLayerInitializedFlag(Bool x) { m_layerInitializedFlag = x; } 256 Int getFirstPicInLayerDecodedFlag() { return m_firstPicInLayerDecodedFlag;} 257 Void setFirstPicInLayerDecodedFlag(Bool x) { m_firstPicInLayerDecodedFlag = x; } 258 Int getNoOutputOfPriorPicsFlags() { return m_noOutputOfPriorPicsFlags;} 259 Void setNoOutputOfPriorPicsFlags(Bool x) { m_noOutputOfPriorPicsFlags = x; } 260 #endif 241 261 public: 242 262 #if OUTPUT_LAYER_SET_INDEX -
branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
r530 r531 1341 1341 iBits++; 1342 1342 } 1343 #if O0149_CROSS_LAYER_BLA_FLAG 1344 if( pcSlice->getPPS()->getNumExtraSliceHeaderBits() > iBits ) 1345 { 1346 assert(!!"cross_layer_bla_flag"); 1347 WRITE_FLAG(pcSlice->getCrossLayerBLAFlag(), "cross_layer_bla_flag"); 1348 iBits++; 1349 } 1350 #endif 1343 1351 for ( ; iBits < pcSlice->getPPS()->getNumExtraSliceHeaderBits(); iBits++) 1344 1352 { -
branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncCfg.h
r524 r531 398 398 #if HIGHER_LAYER_IRAP_SKIP_FLAG 399 399 Int m_skipPictureAtArcSwitch; 400 #endif 401 #if O0149_CROSS_LAYER_BLA_FLAG 402 Bool m_crossLayerBLAFlag; 400 403 #endif 401 404 #endif … … 952 955 Void setAltOuputLayerFlag(Bool b) { m_altOutputLayerFlag = b; } 953 956 #endif 957 #if O0149_CROSS_LAYER_BLA_FLAG 958 Bool getCrossLayerBLAFlag() const { return m_crossLayerBLAFlag; } 959 Void setCrossLayerBLAFlag(Bool b) { m_crossLayerBLAFlag = b; } 960 #endif 954 961 #endif 955 962 }; -
branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncGOP.cpp
r529 r531 635 635 } 636 636 #endif 637 #if O0149_CROSS_LAYER_BLA_FLAG 638 if( m_layerId == 0 && (getNalUnitType(pocCurr, m_iLastIDR) == NAL_UNIT_CODED_SLICE_IDR_W_RADL || getNalUnitType(pocCurr, m_iLastIDR) == NAL_UNIT_CODED_SLICE_IDR_N_LP) ) 639 { 640 pcSlice->setCrossLayerBLAFlag(m_pcEncTop->getCrossLayerBLAFlag()); 641 } 642 else 643 { 644 pcSlice->setCrossLayerBLAFlag(false); 645 } 646 #endif 647 #if NO_CLRAS_OUTPUT_FLAG 648 if (m_layerId == 0 && 649 (pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_LP 650 || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_RADL 651 || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_N_LP 652 || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL 653 || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP 654 || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA)) 655 { 656 if (m_bFirst) 657 { 658 m_pcEncTop->setNoClrasOutputFlag(true); 659 } 660 else if (pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_LP 661 || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_RADL 662 || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_N_LP) 663 { 664 m_pcEncTop->setNoClrasOutputFlag(true); 665 } 666 #if O0149_CROSS_LAYER_BLA_FLAG 667 else if ((pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP) && 668 pcSlice->getCrossLayerBLAFlag()) 669 { 670 m_pcEncTop->setNoClrasOutputFlag(true); 671 } 672 #endif 673 else 674 { 675 m_pcEncTop->setNoClrasOutputFlag(false); 676 } 677 if (m_pcEncTop->getNoClrasOutputFlag()) 678 { 679 for (UInt i = 0; i < m_pcCfg->getNumLayer(); i++) 680 { 681 m_ppcTEncTop[i]->setLayerInitializedFlag(false); 682 m_ppcTEncTop[i]->setFirstPicInLayerDecodedFlag(false); 683 } 684 } 685 } 686 #endif 637 687 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 638 688 if (m_pcEncTop->getAdaptiveResolutionChange() > 0 && m_layerId == 1 && pocCurr > m_pcEncTop->getAdaptiveResolutionChange()) … … 913 963 914 964 // Do decoding refresh marking if any 965 #if NO_CLRAS_OUTPUT_FLAG 966 pcSlice->decodingRefreshMarking(m_pocCRA, m_bRefreshPending, rcListPic, m_pcEncTop->getNoClrasOutputFlag()); 967 #else 915 968 pcSlice->decodingRefreshMarking(m_pocCRA, m_bRefreshPending, rcListPic); 969 #endif 916 970 m_pcEncTop->selectReferencePictureSet(pcSlice, pocCurr, iGOPid); 917 971 pcSlice->getRPS()->setNumberOfLongtermPictures(0); -
branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncTop.cpp
r529 r531 92 92 m_pocAdjustmentValue = 0; 93 93 #endif 94 #if NO_CLRAS_OUTPUT_FLAG 95 m_noClrasOutputFlag = false; 96 m_layerInitializedFlag = false; 97 m_firstPicInLayerDecodedFlag = false; 98 m_noOutputOfPriorPicsFlags = false; 99 #endif 94 100 #endif //SVC_EXTENSION 95 101 } … … 1232 1238 m_cPPS.setNumExtraSliceHeaderBits( 2 ); 1233 1239 #endif 1240 #if O0149_CROSS_LAYER_BLA_FLAG 1241 if (m_crossLayerBLAFlag) 1242 { 1243 m_cPPS.setNumExtraSliceHeaderBits( 3 ); 1244 } 1245 #endif 1234 1246 } 1235 1247 -
branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncTop.h
r507 r531 148 148 Int m_pocAdjustmentValue; 149 149 #endif 150 #if NO_CLRAS_OUTPUT_FLAG 151 Bool m_noClrasOutputFlag; 152 Bool m_layerInitializedFlag; 153 Bool m_firstPicInLayerDecodedFlag; 154 Bool m_noOutputOfPriorPicsFlags; 155 #endif 150 156 #endif //SVC_EXTENSION 151 157 protected: … … 250 256 Void setPocAdjustmentValue(Int x) { m_pocAdjustmentValue = x; } 251 257 #endif 258 #if NO_CLRAS_OUTPUT_FLAG 259 Int getNoClrasOutputFlag() { return m_noClrasOutputFlag;} 260 Void setNoClrasOutputFlag(Bool x) { m_noClrasOutputFlag = x; } 261 Int getLayerInitializedFlag() { return m_layerInitializedFlag;} 262 Void setLayerInitializedFlag(Bool x) { m_layerInitializedFlag = x; } 263 Int getFirstPicInLayerDecodedFlag() { return m_firstPicInLayerDecodedFlag;} 264 Void setFirstPicInLayerDecodedFlag(Bool x) { m_firstPicInLayerDecodedFlag = x; } 265 Int getNoOutputOfPriorPicsFlags() { return m_noOutputOfPriorPicsFlags;} 266 Void setNoOutputOfPriorPicsFlags(Bool x) { m_noOutputOfPriorPicsFlags = x; } 267 #endif 252 268 #else //SVC_EXTENSION 253 269 Void encode( Bool bEos, TComPicYuv* pcPicYuvOrg, TComList<TComPicYuv*>& rcListPicYuvRecOut,
Note: See TracChangeset for help on using the changeset viewer.