Changeset 1055 in 3DVCSoftware for branches/HTM-12.0-dev1/source/Lib
- Timestamp:
- 26 Sep 2014, 19:29:56 (10 years ago)
- Location:
- branches/HTM-12.0-dev1/source/Lib
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-12.0-dev1/source/Lib/TLibCommon/TComSlice.cpp
r1054 r1055 103 103 , m_temporalLayerNonReferenceFlag ( false ) 104 104 , m_enableTMVPFlag ( true ) 105 #if I0044_SLICE_TMVP 106 , m_availableForTMVPRefFlag ( true ) 107 #endif 105 108 #if H_MV 106 109 , m_refPicSetInterLayer0 ( NULL ) … … 725 728 726 729 assert( rpsCurrList[li][ orgIdx ] != NULL ); 730 #if DISCARDABLE_PIC_RPS 731 assert( rpsCurrList[li][ orgIdx ]->getSlice(0)->getDiscardableFlag() == 0 ); // Inter-layer RPS shall not contain picture with discardable_flag = 1. 732 #endif 727 733 m_apcRefPicList [li][rIdx] = rpsCurrList [li][ orgIdx ]; 728 734 m_bIsUsedAsLongTerm[li][rIdx] = usedAsLongTerm [li][ orgIdx ] ; -
branches/HTM-12.0-dev1/source/Lib/TLibCommon/TComSlice.h
r1054 r1055 589 589 Void setHrdParametermeters( Int k, TComHRD* val ) { m_hrdParameters[k] = val; }; 590 590 TComHRD* getHrdParametermeters( Int k ) { return m_hrdParameters[k]; }; 591 #endif ;591 #endif 592 592 }; 593 593 … … 1204 1204 Void setLayerSetIdxForOlsMinus1( Int outLayerSetIdx, Int val ) { m_layerSetIdxForOlsMinus1[ outLayerSetIdx ] = val; } 1205 1205 Int getLayerSetIdxForOlsMinus1( Int outLayerSetIdx ) { return m_layerSetIdxForOlsMinus1[ outLayerSetIdx ]; } 1206 #if VPS_MISC_UPDATES 1207 Int getLayerSetIdxForOlsMinus1Len( Int outLayerSetIdx ) { return gCeilLog2( getNumLayerSets() ); } 1208 #endif 1206 1209 1207 1210 Void setOutputLayerFlag( Int outLayerSetIdx, Int i, Bool flag ) { m_outputLayerFlag[ outLayerSetIdx ][ i ] = flag; } … … 1421 1424 std::vector<Int> idx; 1422 1425 std::vector<Int> num; 1423 std::vector< std::vector<Int>> ptlInfo;1426 std::vector< std::vector<Int> > ptlInfo; 1424 1427 1425 1428 std::cout << std::right << std::setw(60) << std::setfill('-') << " " << std::setfill(' ') << std::endl << "PTLI" << std::endl; … … 2688 2691 2689 2692 Bool m_enableTMVPFlag; 2693 #if I0044_SLICE_TMVP 2694 Bool m_availableForTMVPRefFlag; 2695 #endif 2696 2690 2697 #if H_MV 2691 2698 std::vector<TComPic*>* m_refPicSetInterLayer0; … … 3024 3031 Void setEnableTMVPFlag ( Bool b ) { m_enableTMVPFlag = b; } 3025 3032 Bool getEnableTMVPFlag () { return m_enableTMVPFlag;} 3033 #if I0044_SLICE_TMVP 3034 Void setAvailableForTMVPRefFlag ( Bool b ) { m_availableForTMVPRefFlag = b; } 3035 Bool getAvailableForTMVPRefFlag () { return m_availableForTMVPRefFlag;} 3036 #endif 3026 3037 3027 3038 #if H_MV -
branches/HTM-12.0-dev1/source/Lib/TLibCommon/TypeDef.h
r1054 r1055 388 388 // TBD: Check if integration is necessary. 389 389 390 391 392 //Added by Qualcomm for HLS 393 #define DISCARDABLE_PIC_RPS 1 ///< JCT3V-G0131: Inter-layer RPS and temporal RPS should not contain picture with discardable_flag equal to 1 394 #define VPS_MISC_UPDATES 1 ///< Misc updates:JCT3V-0240, 395 #define NON_REF_NAL_TYPE_DISCARDABLE 1 ///< JCT3V-G0031: If discardable picture is a non-IRAP, it must be a non-referenced sub-layer picture 396 #define INFERENCE_POC_MSB_VAL_PRESENT 1 ///< JCT3V-H0042: poc_msb_val_present_flag shall be equal to 0 when slice_header_extension_length is (inferred to be ) equal to 0 397 #define INFERENCE_POC_RESET_INFO_PRESENT 1 ///< JCT3V-H0042: Infer the value of poc_reset_info_present_flag to be equal to 0 when no pps extension / pps extension for multilayer. 398 #define I0044_SLICE_TMVP 1 ///< JCT3V-I0044: Regarding slice_temporal_mvp_enabled_flag 399 #define I0045_BR_PR_ADD_LAYER_SET 1 ///< JCT3V-I0045: Signalling of bit-rate and picture rate for additional layer set 400 #define I0045_VPS_VUI_VST_PARAMS 1 ///< JCT3V-I0045: Related to signalling of VST parameters of the base layer. 390 401 391 402 -
branches/HTM-12.0-dev1/source/Lib/TLibDecoder/TDecCAVLC.cpp
r1054 r1055 1438 1438 } 1439 1439 } 1440 #endif // H_MV_HLS10_GEN1440 #endif 1441 1441 1442 1442 if (pcVPS->getNumLayerSets() > 1) … … 1461 1461 if( i >= pcVPS->getNumLayerSets( ) ) 1462 1462 { 1463 #if !VPS_MISC_UPDATES 1463 1464 READ_UVLC( uiCode, "layer_set_idx_for_ols_minus1[i]" ); pcVPS->setLayerSetIdxForOlsMinus1( i, uiCode ); 1465 #else 1466 READ_CODE( pcVPS->getLayerSetIdxForOlsMinus1Len( i ), uiCode, "layer_set_idx_for_ols_minus1[i]" ); pcVPS->setLayerSetIdxForOlsMinus1( i, uiCode ); 1467 #endif 1464 1468 } 1465 1469 … … 1709 1713 } 1710 1714 1715 #if I0045_VPS_VUI_VST_PARAMS 1711 1716 if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() && pcVPSVUI->getVpsNumVideoSignalInfoMinus1() > 0 ) 1712 1717 { 1713 #if H_MV_HLS10_VPS_VUI1714 1718 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1715 #else 1719 { 1720 READ_CODE( 4, uiCode, "vps_video_signal_info_idx" ); pcVPSVUI->setVpsVideoSignalInfoIdx( i, uiCode ); 1721 } 1722 } 1723 else if ( !pcVPSVUI->getVideoSignalInfoIdxPresentFlag() ) 1724 { 1725 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1726 { 1727 pcVPSVUI->setVpsVideoSignalInfoIdx( i, i ); 1728 } 1729 } 1730 else 1731 { 1732 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1733 { 1734 pcVPSVUI->setVpsVideoSignalInfoIdx( i, 0 ); 1735 } 1736 } 1737 #else 1738 if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() && pcVPSVUI->getVpsNumVideoSignalInfoMinus1() > 0 ) 1739 { 1716 1740 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1717 #endif1718 1741 { 1719 1742 READ_CODE( 4, uiCode, "vps_video_signal_info_idx" ); pcVPSVUI->setVpsVideoSignalInfoIdx( i, uiCode ); … … 1728 1751 } 1729 1752 } 1753 #endif 1730 1754 READ_FLAG( uiCode, "tiles_not_in_use_flag" ); pcVPSVUI->setTilesNotInUseFlag( uiCode == 1 ); 1731 1755 if( !pcVPSVUI->getTilesNotInUseFlag() ) … … 1802 1826 if ( pcVPSVUI->getVpsVuiBspHrdPresentFlag( ) ) 1803 1827 { 1828 #if VPS_MISC_UPDATES 1829 assert(pcVPS->getTimingInfo()->getTimingInfoPresentFlag() == 1); 1830 #endif 1804 1831 parseVpsVuiBspHrdParameters( pcVPS ); 1805 1832 } … … 2287 2314 esb++; 2288 2315 READ_FLAG( uiCode, "discardable_flag" ); rpcSlice->setDiscardableFlag( uiCode == 1 ); 2316 #if NON_REF_NAL_TYPE_DISCARDABLE 2317 if ( uiCode == 1 ) 2318 { 2319 assert(rpcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_TRAIL_R && 2320 rpcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_TSA_R && 2321 rpcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_STSA_R && 2322 rpcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_RADL_R && 2323 rpcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_RASL_R); 2324 } 2325 #endif 2289 2326 } 2290 2327 … … 2574 2611 if (rpcSlice->getSPS()->getTMVPFlagsPresent()) 2575 2612 { 2613 #if I0044_SLICE_TMVP 2614 READ_FLAG( uiCode, "slice_temporal_mvp_enabled_flag" ); 2615 #else 2576 2616 READ_FLAG( uiCode, "slice_temporal_mvp_enable_flag" ); 2617 #endif 2577 2618 rpcSlice->setEnableTMVPFlag( uiCode == 1 ? true : false ); 2578 2619 } … … 3014 3055 #endif 3015 3056 } 3057 #if INFERENCE_POC_MSB_VAL_PRESENT 3058 else 3059 { 3060 rpcSlice->setSliceSegmentHeaderExtensionLength( 0 ); 3061 rpcSlice->setPocMsbValPresentFlag( false ); 3062 } 3063 #endif 3016 3064 3017 3065 -
branches/HTM-12.0-dev1/source/Lib/TLibDecoder/TDecTop.cpp
r1054 r1055 938 938 } 939 939 #endif 940 941 #if I0044_SLICE_TMVP 942 if ( m_apcSlicePilot->getTLayer() == 0 && m_apcSlicePilot->getEnableTMVPFlag() == 0 ) 943 { 944 //update all pics in the DPB such that they cannot be used for TMPV ref 945 TComList<TComPic*>::iterator iterRefPic = m_cListPic.begin(); 946 while( iterRefPic != m_cListPic.end() ) 947 { 948 TComPic *refPic = *iterRefPic; 949 if( ( refPic->getLayerId() == m_apcSlicePilot->getLayerId() ) && refPic->getReconMark() ) 950 { 951 for(Int i = refPic->getNumAllocatedSlice()-1; i >= 0; i--) 952 { 953 954 TComSlice *refSlice = refPic->getSlice(i); 955 refSlice->setAvailableForTMVPRefFlag( false ); 956 } 957 } 958 iterRefPic++; 959 } 960 } 961 m_apcSlicePilot->setAvailableForTMVPRefFlag( true ); 962 #endif 963 940 964 xActivateParameterSets(); 941 965 … … 1161 1185 #endif 1162 1186 #endif 1187 // For generalized B 1188 #if I0044_SLICE_TMVP 1189 if( m_layerId > 0 && !pcSlice->isIntra() && pcSlice->getEnableTMVPFlag() ) 1190 { 1191 TComPic* refPic = pcSlice->getRefPic(RefPicList(1 - pcSlice->getColFromL0Flag()), pcSlice->getColRefIdx()); 1192 1193 assert ( refPic ); 1194 assert ( refPic->getPicSym()->getSlice(0)->getAvailableForTMVPRefFlag() == true ); 1195 } 1196 #endif 1197 1163 1198 // For generalized B 1164 1199 // note: maybe not existed case (always L0 is copied to L1 if L1 is empty) -
branches/HTM-12.0-dev1/source/Lib/TLibEncoder/TEncCavlc.cpp
r1054 r1055 1229 1229 } 1230 1230 } 1231 #endif // H_MV_HLS10_GEN1231 #endif 1232 1232 1233 1233 if (pcVPS->getNumLayerSets() > 1) … … 1247 1247 if( i >= pcVPS->getNumLayerSets( ) ) 1248 1248 { 1249 #if !VPS_MISC_UPDATES 1249 1250 WRITE_UVLC( pcVPS->getLayerSetIdxForOlsMinus1( i ), "layer_set_idx_for_ols_minus1[i]" ); 1251 #else 1252 WRITE_CODE( pcVPS->getLayerSetIdxForOlsMinus1( i ), pcVPS->getLayerSetIdxForOlsMinus1Len( i ) , "layer_set_idx_for_ols_minus1[i]" ); 1253 #endif 1250 1254 } 1251 1255 … … 1562 1566 if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() && pcVPSVUI->getVpsNumVideoSignalInfoMinus1() > 0 ) 1563 1567 { 1564 #if H_MV_HLS10_VPS_VUI1568 #if I0045_VPS_VUI_VST_PARAMS 1565 1569 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1570 { 1571 WRITE_CODE( pcVPSVUI->getVpsVideoSignalInfoIdx( i ), 4, "vps_video_signal_info_idx" ); 1572 } 1566 1573 #else 1567 1574 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1568 #endif1569 1575 { 1570 1576 WRITE_CODE( pcVPSVUI->getVpsVideoSignalInfoIdx( i ), 4, "vps_video_signal_info_idx" ); … … 1578 1584 assert( pcVPSVUI->getVpsVideoSignalInfoIdx( i ) == ( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() ? 0 : i ) ); 1579 1585 } 1586 #endif 1580 1587 } 1581 1588 WRITE_FLAG( pcVPSVUI->getTilesNotInUseFlag( ) ? 1 : 0 , "tiles_not_in_use_flag" ); … … 1941 1948 esb++; 1942 1949 WRITE_FLAG( pcSlice->getDiscardableFlag( ) ? 1 : 0 , "discardable_flag" ); 1950 #if NON_REF_NAL_TYPE_DISCARDABLE 1951 if (pcSlice->getDiscardableFlag( )) 1952 { 1953 assert(pcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_TRAIL_R && 1954 pcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_TSA_R && 1955 pcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_STSA_R && 1956 pcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_RADL_R && 1957 pcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_RASL_R); 1958 } 1959 #endif 1943 1960 } 1944 1961 … … 2101 2118 if (pcSlice->getSPS()->getTMVPFlagsPresent()) 2102 2119 { 2120 #if I0044_SLICE_TMVP 2121 WRITE_FLAG( pcSlice->getEnableTMVPFlag() ? 1 : 0, "slice_temporal_mvp_enabled_flag" ); 2122 #else 2103 2123 WRITE_FLAG( pcSlice->getEnableTMVPFlag() ? 1 : 0, "slice_temporal_mvp_enable_flag" ); 2124 #endif 2104 2125 } 2105 2126 }
Note: See TracChangeset for help on using the changeset viewer.