Changeset 1211 in SHVCSoftware for branches/SHM-dev/source
- Timestamp:
- 8 Jul 2015, 23:11:18 (9 years ago)
- Location:
- branches/SHM-dev/source
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp
r1203 r1211 1659 1659 #endif 1660 1660 #endif 1661 #if Q0108_TSA_STSA1662 1661 ("InheritCodingStruct%d",m_inheritCodingStruct, 0, MAX_LAYERS, "Predicts the GOP structure of one layer for another layer") 1663 #endif1664 1662 #endif //SVC_EXTENSION 1665 1663 ; … … 1671 1669 } 1672 1670 1673 #if Q0108_TSA_STSA1671 #if SVC_EXTENSION 1674 1672 for (Int i=1; i<MAX_LAYERS; i++) 1675 1673 { … … 1686 1684 const list<const Char*>& argv_unhandled = po::scanArgv(opts, argc, (const Char**) argv); 1687 1685 1688 #if Q0108_TSA_STSA1686 #if SVC_EXTENSION 1689 1687 for (Int i=1; i<MAX_LAYERS; i++) 1690 1688 { … … 3232 3230 * This permits the ability to omit a GOP structure specification */ 3233 3231 #if SVC_EXTENSION 3234 #if Q0108_TSA_STSA3235 3232 if( m_acLayerCfg[0].m_iIntraPeriod == 1 && m_GOPList[0].m_POC == -1 ) 3236 3233 { … … 3260 3257 } 3261 3258 #else 3262 for(UInt layer = 0; layer < MAX_LAYERS; layer++)3263 {3264 Int m_iIntraPeriod = m_acLayerCfg[layer].m_iIntraPeriod;3265 if (m_iIntraPeriod == 1 && m_GOPList[0].m_POC == -1) {3266 m_GOPList[0] = GOPEntry();3267 m_GOPList[0].m_QPFactor = 1;3268 m_GOPList[0].m_betaOffsetDiv2 = 0;3269 m_GOPList[0].m_tcOffsetDiv2 = 0;3270 m_GOPList[0].m_POC = 1;3271 m_GOPList[0].m_numRefPicsActive = 4;3272 }3273 else3274 {3275 xConfirmPara( m_intraConstraintFlag, "IntraConstraintFlag cannot be 1 for inter sequences");3276 }3277 }3278 #endif3279 #else3280 3259 if (m_iIntraPeriod == 1 && m_GOPList[0].m_POC == -1) 3281 3260 { … … 3352 3331 } 3353 3332 3354 #if !Q0108_TSA_STSA 3333 #if SVC_EXTENSION 3334 memset( m_extraRPSs, 0, sizeof( m_extraRPSs ) ); 3335 #else 3355 3336 m_extraRPSs=0; 3356 #else 3357 memset( m_extraRPSs, 0, sizeof( m_extraRPSs ) ); 3358 #endif 3337 #endif 3338 3359 3339 //start looping through frames in coding order until we can verify that the GOP structure is correct. 3360 3340 while(!verifiedGOP&&!errorGOP) … … 3422 3402 { 3423 3403 //create a new GOPEntry for this frame containing all the reference pictures that were available (POC > 0) 3424 #if !Q0108_TSA_STSA 3404 #if SVC_EXTENSION 3405 m_GOPList[m_iGOPSize+m_extraRPSs[0]]=m_GOPList[curGOP]; 3406 #else 3425 3407 m_GOPList[m_iGOPSize+m_extraRPSs]=m_GOPList[curGOP]; 3426 #else3427 m_GOPList[m_iGOPSize+m_extraRPSs[0]]=m_GOPList[curGOP];3428 3408 #endif 3429 3409 Int newRefs=0; … … 3433 3413 if(absPOC>=0) 3434 3414 { 3435 #if !Q0108_TSA_STSA 3415 #if SVC_EXTENSION 3416 m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_referencePics[newRefs]=m_GOPList[curGOP].m_referencePics[i]; 3417 m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_usedByCurrPic[newRefs]=m_GOPList[curGOP].m_usedByCurrPic[i]; 3418 #else 3436 3419 m_GOPList[m_iGOPSize+m_extraRPSs].m_referencePics[newRefs]=m_GOPList[curGOP].m_referencePics[i]; 3437 3420 m_GOPList[m_iGOPSize+m_extraRPSs].m_usedByCurrPic[newRefs]=m_GOPList[curGOP].m_usedByCurrPic[i]; 3438 #else3439 m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_referencePics[newRefs]=m_GOPList[curGOP].m_referencePics[i];3440 m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_usedByCurrPic[newRefs]=m_GOPList[curGOP].m_usedByCurrPic[i];3441 3421 #endif 3442 3422 newRefs++; … … 3462 3442 for(Int i=0; i<newRefs; i++) 3463 3443 { 3464 #if !Q0108_TSA_STSA 3444 #if SVC_EXTENSION 3445 if( m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_referencePics[i] == offPOC-curPOC ) 3446 #else 3465 3447 if(m_GOPList[m_iGOPSize+m_extraRPSs].m_referencePics[i]==offPOC-curPOC) 3466 #else3467 if(m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_referencePics[i]==offPOC-curPOC)3468 3448 #endif 3469 3449 { … … 3481 3461 for(Int j=0; j<newRefs; j++) 3482 3462 { 3483 #if !Q0108_TSA_STSA 3463 #if SVC_EXTENSION 3464 if( m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_referencePics[j] < offPOC-curPOC || m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_referencePics[j] > 0 ) 3465 #else 3484 3466 if(m_GOPList[m_iGOPSize+m_extraRPSs].m_referencePics[j]<offPOC-curPOC||m_GOPList[m_iGOPSize+m_extraRPSs].m_referencePics[j]>0) 3485 #else3486 if(m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_referencePics[j]<offPOC-curPOC||m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_referencePics[j]>0)3487 3467 #endif 3488 3468 { … … 3495 3475 for(Int j=insertPoint; j<newRefs+1; j++) 3496 3476 { 3497 #if !Q0108_TSA_STSA 3477 #if SVC_EXTENSION 3478 Int newPrev = m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_referencePics[j]; 3479 Int newUsed = m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_usedByCurrPic[j]; 3480 m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_referencePics[j]=prev; 3481 m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_usedByCurrPic[j]=prevUsed; 3482 #else 3498 3483 Int newPrev = m_GOPList[m_iGOPSize+m_extraRPSs].m_referencePics[j]; 3499 3484 Int newUsed = m_GOPList[m_iGOPSize+m_extraRPSs].m_usedByCurrPic[j]; 3500 3485 m_GOPList[m_iGOPSize+m_extraRPSs].m_referencePics[j]=prev; 3501 3486 m_GOPList[m_iGOPSize+m_extraRPSs].m_usedByCurrPic[j]=prevUsed; 3502 #else3503 Int newPrev = m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_referencePics[j];3504 Int newUsed = m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_usedByCurrPic[j];3505 m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_referencePics[j]=prev;3506 m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_usedByCurrPic[j]=prevUsed;3507 3487 #endif 3508 3488 … … 3518 3498 } 3519 3499 } 3520 #if !Q0108_TSA_STSA 3521 m_GOPList[m_iGOPSize+m_extraRPSs].m_numRefPics=newRefs; 3522 m_GOPList[m_iGOPSize+m_extraRPSs].m_POC = curPOC; 3523 #else 3500 3501 #if SVC_EXTENSION 3524 3502 m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_numRefPics=newRefs; 3525 3503 m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_POC = curPOC; 3526 #endif 3527 #if !Q0108_TSA_STSA 3528 if (m_extraRPSs == 0) 3529 #else 3530 if (m_extraRPSs[0] == 0) 3531 #endif 3504 3505 if( m_extraRPSs[0] == 0 ) 3532 3506 { 3533 #if !Q0108_TSA_STSA3534 m_GOPList[m_iGOPSize+m_extraRPSs].m_interRPSPrediction = 0;3535 m_GOPList[m_iGOPSize+m_extraRPSs].m_numRefIdc = 0;3536 #else3537 3507 m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_interRPSPrediction = 0; 3538 3508 m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_numRefIdc = 0; 3539 #endif3540 3509 } 3541 3510 else 3542 3511 { 3543 #if !Q0108_TSA_STSA 3512 Int rIdx = m_iGOPSize + m_extraRPSs[0] - 1; 3513 #else 3514 m_GOPList[m_iGOPSize+m_extraRPSs].m_numRefPics=newRefs; 3515 m_GOPList[m_iGOPSize+m_extraRPSs].m_POC = curPOC; 3516 3517 if (m_extraRPSs == 0) 3518 { 3519 m_GOPList[m_iGOPSize+m_extraRPSs].m_interRPSPrediction = 0; 3520 m_GOPList[m_iGOPSize+m_extraRPSs].m_numRefIdc = 0; 3521 } 3522 else 3523 { 3544 3524 Int rIdx = m_iGOPSize + m_extraRPSs - 1; 3545 #else3546 Int rIdx = m_iGOPSize + m_extraRPSs[0] - 1;3547 3525 #endif 3548 3526 Int refPOC = m_GOPList[rIdx].m_POC; … … 3554 3532 Int absPOCref = refPOC+deltaPOC; 3555 3533 Int refIdc = 0; 3556 #if !Q0108_TSA_STSA 3534 3535 #if SVC_EXTENSION 3536 for (Int j = 0; j < m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_numRefPics; j++) 3537 { 3538 if ( (absPOCref - curPOC) == m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_referencePics[j]) 3539 { 3540 if (m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_usedByCurrPic[j]) 3541 { 3542 refIdc = 1; 3543 } 3544 else 3545 { 3546 refIdc = 2; 3547 } 3548 } 3549 } 3550 m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_refIdc[newIdc]=refIdc; 3551 newIdc++; 3552 } 3553 m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_interRPSPrediction = 1; 3554 m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_numRefIdc = newIdc; 3555 m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_deltaRPS = refPOC - m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_POC; 3556 } 3557 curGOP=m_iGOPSize+m_extraRPSs[0]; 3558 m_extraRPSs[0]++; 3559 } 3560 #else 3557 3561 for (Int j = 0; j < m_GOPList[m_iGOPSize+m_extraRPSs].m_numRefPics; j++) 3558 3562 { … … 3579 3583 m_extraRPSs++; 3580 3584 } 3581 #else3582 for (Int j = 0; j < m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_numRefPics; j++)3583 {3584 if ( (absPOCref - curPOC) == m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_referencePics[j])3585 {3586 if (m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_usedByCurrPic[j])3587 {3588 refIdc = 1;3589 }3590 else3591 {3592 refIdc = 2;3593 }3594 }3595 }3596 m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_refIdc[newIdc]=refIdc;3597 newIdc++;3598 }3599 m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_interRPSPrediction = 1;3600 m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_numRefIdc = newIdc;3601 m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_deltaRPS = refPOC - m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_POC;3602 }3603 curGOP=m_iGOPSize+m_extraRPSs[0];3604 m_extraRPSs[0]++;3605 }3606 3585 #endif 3607 3586 … … 3623 3602 xConfirmPara(errorGOP,"Invalid GOP structure given"); 3624 3603 3625 #if SVC_EXTENSION && Q0108_TSA_STSA3604 #if SVC_EXTENSION 3626 3605 if( layerIdx > 0 ) 3627 3606 { … … 3872 3851 } 3873 3852 3874 #if Q0108_TSA_STSA3853 #if SVC_EXTENSION 3875 3854 if( layerIdx > 0 ) 3876 3855 { -
branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h
r1203 r1211 158 158 Int m_iGOPSize; ///< GOP size of hierarchical structure 159 159 160 #if !Q0108_TSA_STSA 161 Int m_extraRPSs; ///< extra RPSs added to handle CRA 162 #else 160 #if SVC_EXTENSION 163 161 Int m_extraRPSs[MAX_LAYERS]; ///< extra RPSs added to handle CRA 164 #endif165 166 GOPEntry m_GOPList[MAX_GOP]; ///< the coding structure entries from the config file167 #if Q0108_TSA_STSA168 162 GOPEntry m_EhGOPList[MAX_LAYERS][MAX_GOP]; ///< the enhancement layer coding structure entries from the config file 169 163 Int m_inheritCodingStruct[MAX_LAYERS]; 170 #endif 164 Int m_EhMaxTempLayer[MAX_LAYERS]; ///< Max temporal layer 165 #else 166 Int m_extraRPSs; ///< extra RPSs added to handle CRA 167 #endif 168 169 GOPEntry m_GOPList[MAX_GOP]; ///< the coding structure entries from the config file 171 170 172 171 Int m_numReorderPics[MAX_TLAYER]; ///< total number of reorder pictures … … 209 208 210 209 Int m_maxTempLayer; ///< Max temporal layer 211 #if Q0108_TSA_STSA212 Int m_EhMaxTempLayer[MAX_LAYERS]; ///< Max temporal layer213 #endif214 210 215 211 #if !LAYER_CTB -
branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp
r1203 r1211 269 269 m_acTEncTop[layer].setDecodingRefreshType ( m_iDecodingRefreshType ); 270 270 m_acTEncTop[layer].setGOPSize ( m_iGOPSize ); 271 #if Q0108_TSA_STSA 271 272 272 m_acTEncTop[layer].setGopList ( layer ? m_EhGOPList[layer] : m_GOPList ); 273 #else274 m_acTEncTop[layer].setGopList ( m_GOPList );275 #endif276 277 #if !Q0108_TSA_STSA278 m_acTEncTop[layer].setExtraRPSs ( m_extraRPSs );279 #else280 273 m_acTEncTop[layer].setExtraRPSs ( m_extraRPSs[layer] ); 281 #endif 274 282 275 for(Int i = 0; i < MAX_TLAYER; i++) 283 276 { … … 292 285 293 286 m_acTEncTop[layer].setPad ( m_acLayerCfg[layer].getPad() ); 294 #if !Q0108_TSA_STSA 295 m_acTEncTop[layer].setMaxTempLayer ( m_maxTempLayer ); 296 #else 287 297 288 if (layer== 0) 298 289 { … … 303 294 m_acTEncTop[layer].setMaxTempLayer ( m_EhMaxTempLayer[layer] ); 304 295 } 305 #endif 296 306 297 m_acTEncTop[layer].setUseAMP( m_enableAMP ); 307 298 -
branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h
r1210 r1211 48 48 #define BSP_INIT_ARRIVAL_SEI 1 ///< JCTVC-R0231: Make signalling of vcl_initial_arrival_delay independent of NalHrdBpPresentFlag 49 49 50 #define Q0108_TSA_STSA 1 ///< JCTVC-Q0108, Remove cross-layer alignment constraints of TSA and STSA pictures, enable to have different prediction structures in different layers51 50 #define Q0177_EOS_CHECKS 1 ///< JCTVC-Q0177; Put checks on handling EOS 52 51 #define P0130_EOB 1 ///< JCTVC-P0130, set layer Id of EOB NALU to be fixed to 0 -
branches/SHM-dev/source/Lib/TLibDecoder/NALread.cpp
r1029 r1211 123 123 if ( nalu.m_temporalId ) 124 124 { 125 #if !Q0108_TSA_STSA 125 #if SVC_EXTENSION 126 assert( nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_BLA_W_LP 127 && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_BLA_W_RADL 128 && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_BLA_N_LP 129 && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_IDR_W_RADL 130 && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_IDR_N_LP 131 && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_CRA 132 && nalu.m_nalUnitType != NAL_UNIT_VPS 133 && nalu.m_nalUnitType != NAL_UNIT_SPS 134 && nalu.m_nalUnitType != NAL_UNIT_EOS); 135 #else 126 136 assert( nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_BLA_W_LP 127 137 && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_BLA_W_RADL … … 133 143 && nalu.m_nalUnitType != NAL_UNIT_SPS 134 144 && nalu.m_nalUnitType != NAL_UNIT_EOS 135 && nalu.m_nalUnitType != NAL_UNIT_EOB ); 136 #else 137 assert( nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_BLA_W_LP 138 && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_BLA_W_RADL 139 && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_BLA_N_LP 140 && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_IDR_W_RADL 141 && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_IDR_N_LP 142 && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_CRA 143 && nalu.m_nalUnitType != NAL_UNIT_VPS 144 && nalu.m_nalUnitType != NAL_UNIT_SPS 145 && nalu.m_nalUnitType != NAL_UNIT_EOS); 145 && nalu.m_nalUnitType != NAL_UNIT_EOB ); 146 146 #endif 147 147 } 148 148 else 149 149 { 150 #if !Q0108_TSA_STSA 150 #if SVC_EXTENSION 151 assert( nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_TSA_R 152 && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_TSA_N 153 ); 154 #else 151 155 assert( nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_TSA_R 152 156 && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_TSA_N 153 157 && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_STSA_R 154 158 && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_STSA_N ); 155 #else156 assert( nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_TSA_R157 && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_TSA_N158 );159 159 #endif 160 160 } -
branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp
r1210 r1211 1188 1188 m_bFirstSliceInBitstream = false; 1189 1189 1190 // Alignment of TSA and STSA pictures across AU1191 #if !Q0108_TSA_STSA1192 if( m_apcSlicePilot->getLayerId() > 0 )1193 {1194 // Check for TSA alignment1195 if( m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_TSA_N ||1196 m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_TSA_R1197 )1198 {1199 for(Int dependentLayerIdx = 0; dependentLayerIdx < m_apcSlicePilot->getVPS()->getNumDirectRefLayers(m_layerId); dependentLayerIdx++)1200 {1201 TComList<TComPic*> *cListPic = getRefLayerDec( dependentLayerIdx )->getListPic();1202 TComPic* refpicLayer = m_apcSlicePilot->getRefPic(*cListPic, m_apcSlicePilot->getPOC() );1203 if( refpicLayer )1204 {1205 assert( m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_TSA_N ||1206 m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_TSA_R ); // TSA pictures should be aligned among depenedent layers1207 }1208 }1209 }1210 // Check for STSA alignment1211 if( m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_STSA_N ||1212 m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_STSA_R1213 )1214 {1215 for(Int dependentLayerIdx = 0; dependentLayerIdx < m_apcSlicePilot->getVPS()->getNumDirectRefLayers(m_layerId); dependentLayerIdx++)1216 {1217 TComList<TComPic*> *cListPic = getRefLayerDec( dependentLayerIdx )->getListPic();1218 TComPic* refpicLayer = m_apcSlicePilot->getRefPic(*cListPic, m_apcSlicePilot->getPOC() ); // STSA pictures should be aligned among dependent layers1219 if( refpicLayer )1220 1221 {1222 assert( m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_STSA_N ||1223 m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_STSA_R );1224 }1225 }1226 }1227 }1228 #endif1229 1230 1190 #else //SVC_EXTENSION 1231 1191 //we should only get a different poc for a new picture (with CTU address==0) … … 1260 1220 m_bFirstSliceInBitstream = false; 1261 1221 #endif //SVC_EXTENSION 1222 1262 1223 //detect lost reference picture and insert copy of earlier frame. 1263 1224 Int lostPoc; -
branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp
r1209 r1211 1592 1592 if(pcSlice->isTemporalLayerSwitchingPoint(rcListPic) || pcSlice->getSPS()->getTemporalIdNestingFlag()) 1593 1593 { 1594 #if SVC_EXTENSION && !Q0108_TSA_STSA1595 if( pcSlice->getLayerId() > 0 )1596 {1597 Bool oneRefLayerTSA = false, oneRefLayerNotTSA = false;1598 for( Int i = 0; i < pcSlice->getLayerId(); i++)1599 {1600 TComList<TComPic *> *cListPic = m_ppcTEncTop[i]->getListPic();1601 TComPic *lowerLayerPic = pcSlice->getRefPic(*cListPic, pcSlice->getPOC());1602 if( lowerLayerPic && pcSlice->getVPS()->getDirectDependencyFlag(pcSlice->getLayerId(), i) )1603 {1604 if( ( lowerLayerPic->getSlice(0)->getNalUnitType() == NAL_UNIT_CODED_SLICE_TSA_N ) ||1605 ( lowerLayerPic->getSlice(0)->getNalUnitType() == NAL_UNIT_CODED_SLICE_TSA_R )1606 )1607 {1608 if(pcSlice->getTemporalLayerNonReferenceFlag() )1609 {1610 pcSlice->setNalUnitType(NAL_UNIT_CODED_SLICE_TSA_N);1611 }1612 else1613 {1614 pcSlice->setNalUnitType(NAL_UNIT_CODED_SLICE_TSA_R );1615 }1616 oneRefLayerTSA = true;1617 }1618 else1619 {1620 oneRefLayerNotTSA = true;1621 }1622 }1623 }1624 assert( !( oneRefLayerNotTSA && oneRefLayerTSA ) ); // Only one variable should be true - failure of this assert means1625 // that two independent reference layers that are not dependent on1626 // each other, but are reference for current layer have inconsistency1627 if( oneRefLayerNotTSA /*&& !oneRefLayerTSA*/ ) // No reference layer is TSA - set current as TRAIL1628 {1629 if(pcSlice->getTemporalLayerNonReferenceFlag() )1630 {1631 pcSlice->setNalUnitType( NAL_UNIT_CODED_SLICE_TRAIL_N );1632 }1633 else1634 {1635 pcSlice->setNalUnitType( NAL_UNIT_CODED_SLICE_TRAIL_R );1636 }1637 }1638 else // This means there is no reference layer picture for current picture in this AU1639 {1640 if(pcSlice->getTemporalLayerNonReferenceFlag() )1641 {1642 pcSlice->setNalUnitType(NAL_UNIT_CODED_SLICE_TSA_N);1643 }1644 else1645 {1646 pcSlice->setNalUnitType(NAL_UNIT_CODED_SLICE_TSA_R );1647 }1648 }1649 }1650 #else1651 1594 if(pcSlice->getTemporalLayerNonReferenceFlag()) 1652 1595 { … … 1657 1600 pcSlice->setNalUnitType(NAL_UNIT_CODED_SLICE_TSA_R); 1658 1601 } 1659 #endif1660 1602 } 1661 1603 else if(pcSlice->isStepwiseTemporalLayerSwitchingPointCandidate(rcListPic)) … … 1691 1633 if(isSTSA==true) 1692 1634 { 1693 #if SVC_EXTENSION && !Q0108_TSA_STSA1694 if( pcSlice->getLayerId() > 0 )1695 {1696 Bool oneRefLayerSTSA = false, oneRefLayerNotSTSA = false;1697 for( Int i = 0; i < pcSlice->getLayerId(); i++)1698 {1699 TComList<TComPic *> *cListPic = m_ppcTEncTop[i]->getListPic();1700 TComPic *lowerLayerPic = pcSlice->getRefPic(*cListPic, pcSlice->getPOC());1701 if( lowerLayerPic && pcSlice->getVPS()->getDirectDependencyFlag(pcSlice->getLayerId(), i) )1702 {1703 if( ( lowerLayerPic->getSlice(0)->getNalUnitType() == NAL_UNIT_CODED_SLICE_STSA_N ) ||1704 ( lowerLayerPic->getSlice(0)->getNalUnitType() == NAL_UNIT_CODED_SLICE_STSA_R )1705 )1706 {1707 if(pcSlice->getTemporalLayerNonReferenceFlag() )1708 {1709 pcSlice->setNalUnitType(NAL_UNIT_CODED_SLICE_STSA_N);1710 }1711 else1712 {1713 pcSlice->setNalUnitType(NAL_UNIT_CODED_SLICE_STSA_R );1714 }1715 oneRefLayerSTSA = true;1716 }1717 else1718 {1719 oneRefLayerNotSTSA = true;1720 }1721 }1722 }1723 assert( !( oneRefLayerNotSTSA && oneRefLayerSTSA ) ); // Only one variable should be true - failure of this assert means1724 // that two independent reference layers that are not dependent on1725 // each other, but are reference for current layer have inconsistency1726 if( oneRefLayerNotSTSA /*&& !oneRefLayerSTSA*/ ) // No reference layer is STSA - set current as TRAIL1727 {1728 if(pcSlice->getTemporalLayerNonReferenceFlag() )1729 {1730 pcSlice->setNalUnitType( NAL_UNIT_CODED_SLICE_TRAIL_N );1731 }1732 else1733 {1734 pcSlice->setNalUnitType( NAL_UNIT_CODED_SLICE_TRAIL_R );1735 }1736 }1737 else // This means there is no reference layer picture for current picture in this AU1738 {1739 if(pcSlice->getTemporalLayerNonReferenceFlag() )1740 {1741 pcSlice->setNalUnitType(NAL_UNIT_CODED_SLICE_STSA_N);1742 }1743 else1744 {1745 pcSlice->setNalUnitType(NAL_UNIT_CODED_SLICE_STSA_R );1746 }1747 }1748 }1749 #else1750 1635 if(pcSlice->getTemporalLayerNonReferenceFlag()) 1751 1636 { … … 1756 1641 pcSlice->setNalUnitType(NAL_UNIT_CODED_SLICE_STSA_R); 1757 1642 } 1758 #endif1759 1643 } 1760 1644 } … … 1809 1693 } 1810 1694 } 1811 #endif //SVC_EXTENSION 1812 1813 #if Q0108_TSA_STSA 1695 1814 1696 if( ( pcSlice->getTLayer() == 0 && pcSlice->getLayerId() > 0 ) // only for enhancement layer and with temporal layer 0 1815 1697 && !( pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_RADL_N … … 1880 1762 } 1881 1763 } 1882 #endif 1764 #endif //SVC_EXTENSION 1883 1765 1884 1766 #if ADAPTIVE_QP_SELECTION
Note: See TracChangeset for help on using the changeset viewer.