Changeset 884 in SHVCSoftware for branches/SHM-dev/source
- Timestamp:
- 11 Sep 2014, 12:48:48 (11 years ago)
- Location:
- branches/SHM-dev/source
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp
r877 r884 2030 2030 } 2031 2031 } 2032 #if R0247_SEI_ACTIVE 2033 if(bFirstFrame) 2034 { 2035 list<AccessUnit>::iterator first_au = outputAccessUnits.begin(); 2036 AccessUnit::iterator it_sps; 2037 for (it_sps = first_au->begin(); it_sps != first_au->end(); it_sps++) 2038 { 2039 if( (*it_sps)->m_nalUnitType == NAL_UNIT_SPS ) 2040 { 2041 break; 2042 } 2043 } 2044 2045 for (list<AccessUnit>::iterator it_au = ++outputAccessUnits.begin(); it_au != outputAccessUnits.end(); it_au++) 2046 { 2047 for (AccessUnit::iterator it_nalu = it_au->begin(); it_nalu != it_au->end(); it_nalu++) 2048 { 2049 if( (*it_nalu)->m_nalUnitType == NAL_UNIT_SPS ) 2050 { 2051 first_au->insert(++it_sps, *it_nalu); 2052 it_nalu = it_au->erase(it_nalu); 2053 } 2054 } 2055 } 2056 } 2057 2058 #endif 2032 2059 2033 2060 #if RC_SHVC_HARMONIZATION -
branches/SHM-dev/source/Lib/TLibCommon/SEI.h
r868 r884 175 175 Int numSpsIdsMinus1; 176 176 std::vector<Int> activeSeqParameterSetId; 177 #if R0247_SEI_ACTIVE 178 std::vector<Int> layerSpsIdx; 179 #endif 177 180 }; 178 181 -
branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h
r880 r884 301 301 #define Q0189_TMVP_CONSTRAINTS 1 ///< JCTVC-Q0189: indicate constraints on TMVP 302 302 #define Q0247_FRAME_FIELD_INFO 1 ///< JCTVC-Q0247: field_frame_info SEI message 303 303 #define R0247_SEI_ACTIVE 1 ///< JCTVC-R0247: active parameter sets SEI message 304 304 305 305 #endif // SVC_EXTENSION -
branches/SHM-dev/source/Lib/TLibDecoder/SEIread.cpp
r871 r884 584 584 585 585 sei.activeSeqParameterSetId.resize(sei.numSpsIdsMinus1 + 1); 586 #if R0247_SEI_ACTIVE 587 sei.layerSpsIdx.resize(sei.numSpsIdsMinus1 + 1); 588 #endif 586 589 for (Int i=0; i < (sei.numSpsIdsMinus1 + 1); i++) 587 590 { 588 591 READ_UVLC(val, "active_seq_parameter_set_id"); sei.activeSeqParameterSetId[i] = val; 589 592 } 590 593 #if R0247_SEI_ACTIVE 594 for (Int i=1; i < (sei.numSpsIdsMinus1 + 1); i++) 595 { 596 READ_UVLC(val, "layer_sps_idx"); sei.layerSpsIdx[i] = val; 597 } 598 #endif 591 599 xParseByteAlign(); 592 600 } -
branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp
r874 r884 2398 2398 { 2399 2399 SEIActiveParameterSets *seiAps = (SEIActiveParameterSets*)(*activeParamSets.begin()); 2400 #if !R0247_SEI_ACTIVE 2400 2401 m_parameterSetManagerDecoder.applyPrefetchedPS(); 2401 2402 assert(seiAps->activeSeqParameterSetId.size()>0); … … 2404 2405 printf ("Warning SPS activation with Active parameter set SEI failed"); 2405 2406 } 2407 #else 2408 getLayerDec(0)->m_parameterSetManagerDecoder.applyPrefetchedPS(); 2409 assert(seiAps->activeSeqParameterSetId.size()>0); 2410 if( !getLayerDec(0)->m_parameterSetManagerDecoder.activateSPSWithSEI( seiAps->activeSeqParameterSetId[0] ) ) 2411 { 2412 printf ("Warning SPS activation with Active parameter set SEI failed"); 2413 } 2414 for (Int c=1 ; c <= seiAps->numSpsIdsMinus1; c++) 2415 { 2416 Int layerIdx = seiAps->layerSpsIdx[c]; 2417 getLayerDec(layerIdx)->m_parameterSetManagerDecoder.applyPrefetchedPS(); 2418 if( !getLayerDec(layerIdx)->m_parameterSetManagerDecoder.activateSPSWithSEI( seiAps->activeSeqParameterSetId[layerIdx] ) ) 2419 { 2420 printf ("Warning SPS activation with Active parameter set SEI failed"); 2421 } 2422 } 2423 #endif 2406 2424 } 2407 2425 } -
branches/SHM-dev/source/Lib/TLibEncoder/SEIwrite.cpp
r871 r884 394 394 WRITE_UVLC(sei.activeSeqParameterSetId[i], "active_seq_parameter_set_id"); 395 395 } 396 #if R0247_SEI_ACTIVE 397 for (Int i = 1; i < sei.activeSeqParameterSetId.size(); i++) 398 { 399 WRITE_UVLC(sei.layerSpsIdx[i], "layer_sps_idx"); 400 } 401 #endif 396 402 xWriteByteAlign(); 397 403 } -
branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp
r880 r884 202 202 seiActiveParameterSets->m_selfContainedCvsFlag = false; 203 203 seiActiveParameterSets->m_noParameterSetUpdateFlag = false; 204 #if !R0247_SEI_ACTIVE 204 205 seiActiveParameterSets->numSpsIdsMinus1 = 0; 205 206 seiActiveParameterSets->activeSeqParameterSetId.resize(seiActiveParameterSets->numSpsIdsMinus1 + 1); 206 207 seiActiveParameterSets->activeSeqParameterSetId[0] = sps->getSPSId(); 208 #else 209 seiActiveParameterSets->numSpsIdsMinus1 = m_pcCfg->getNumLayer()-1; 210 seiActiveParameterSets->activeSeqParameterSetId.resize(seiActiveParameterSets->numSpsIdsMinus1 + 1); 211 seiActiveParameterSets->layerSpsIdx.resize(seiActiveParameterSets->numSpsIdsMinus1+ 1); 212 for (Int c=0; c <= seiActiveParameterSets->numSpsIdsMinus1; c++) 213 { 214 seiActiveParameterSets->activeSeqParameterSetId[c] = c; 215 } 216 for (Int c=1; c <= seiActiveParameterSets->numSpsIdsMinus1; c++) 217 { 218 seiActiveParameterSets->layerSpsIdx[c] = c; 219 } 220 #endif 207 221 return seiActiveParameterSets; 208 222 } … … 429 443 OutputNALUnit nalu(NAL_UNIT_PREFIX_SEI); 430 444 431 if(m_pcCfg->getActiveParameterSetsSEIEnabled()) 445 if(m_pcCfg->getActiveParameterSetsSEIEnabled() 446 #if R0247_SEI_ACTIVE 447 && m_layerId == 0 448 #endif 449 ) 432 450 { 433 451 SEIActiveParameterSets *sei = xCreateSEIActiveParameterSets (sps);
Note: See TracChangeset for help on using the changeset viewer.