Changeset 435 in SHVCSoftware for branches/SHM-3.1-dev/source/Lib
- Timestamp:
- 14 Oct 2013, 16:04:33 (11 years ago)
- Location:
- branches/SHM-3.1-dev/source/Lib
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-3.1-dev/source/Lib/TLibCommon/SEI.h
r313 r435 75 75 LAYERS_PRESENT = 137, 76 76 #endif 77 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI 78 INTER_LAYER_CONSTRAINED_TILE_SETS = 138 79 #endif 77 80 }; 78 81 … … 381 384 }; 382 385 386 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI 387 class SEIInterLayerConstrainedTileSets : public SEI 388 { 389 public: 390 PayloadType payloadType() const { return INTER_LAYER_CONSTRAINED_TILE_SETS; } 391 392 SEIInterLayerConstrainedTileSets() {} 393 virtual ~SEIInterLayerConstrainedTileSets() {} 394 395 Bool m_ilAllTilesExactSampleValueMatchFlag; 396 Bool m_ilOneTilePerTileSetFlag; 397 UInt m_ilNumSetsInMessageMinus1; 398 Bool m_skippedTileSetPresentFlag; 399 UInt m_ilctsId[256]; 400 UInt m_ilNumTileRectsInSetMinus1[256]; 401 UInt m_ilTopLeftTileIndex[256][440]; 402 UInt m_ilBottomRightTileIndex[256][440]; 403 UInt m_ilcIdc[256]; 404 Bool m_ilExactSampleValueMatchFlag[256]; 405 UInt m_allTilesIlcIdc; 406 }; 407 #endif 408 409 383 410 typedef std::list<SEI*> SEIMessages; 384 411 -
branches/SHM-3.1-dev/source/Lib/TLibCommon/TComPicSym.cpp
r431 r435 115 115 m_puiCUOrderMap = new UInt[m_uiNumCUsInFrame+1]; 116 116 m_puiTileIdxMap = new UInt[m_uiNumCUsInFrame]; 117 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI 118 m_piTileSetIdxMap = new Int[m_uiNumCUsInFrame]; 119 m_pucTileSetType = new UChar[m_uiNumCUsInFrame]; 120 m_pbSkippedTileSetFlag = new Bool[m_uiNumCUsInFrame]; 121 #endif 117 122 m_puiInverseCUOrderMap = new UInt[m_uiNumCUsInFrame+1]; 118 123 … … 166 171 delete [] m_puiTileIdxMap; 167 172 m_puiTileIdxMap = NULL; 173 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI 174 delete [] m_piTileSetIdxMap; 175 m_piTileSetIdxMap = NULL; 176 delete [] m_pucTileSetType; 177 m_pucTileSetType = NULL; 178 delete [] m_pbSkippedTileSetFlag; 179 m_pbSkippedTileSetFlag = NULL; 180 #endif 168 181 169 182 delete [] m_puiInverseCUOrderMap; -
branches/SHM-3.1-dev/source/Lib/TLibCommon/TComPicSym.h
r431 r435 105 105 UInt* m_puiCUOrderMap; //the map of LCU raster scan address relative to LCU encoding order 106 106 UInt* m_puiTileIdxMap; //the map of the tile index relative to LCU raster scan address 107 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI 108 Int* m_piTileSetIdxMap; //the map of the tile set index relative to LCU raster scan address 109 UChar* m_pucTileSetType; 110 Bool* m_pbSkippedTileSetFlag; 111 #endif 107 112 UInt* m_puiInverseCUOrderMap; 108 113 … … 143 148 UInt getCUOrderMap( Int encCUOrder ) { return *(m_puiCUOrderMap + (encCUOrder>=m_uiNumCUsInFrame ? m_uiNumCUsInFrame : encCUOrder)); } 144 149 UInt getTileIdxMap( Int i ) { return *(m_puiTileIdxMap + i); } 150 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI 151 Void setTileSetIdxMap( Int i, Int tileSetIdx, UChar setType, Bool skipFlag ) 152 { 153 m_piTileSetIdxMap[i] = tileSetIdx; 154 m_pucTileSetType[i] = setType; 155 m_pbSkippedTileSetFlag[i] = skipFlag; 156 } 157 Int getTileSetIdxMap( Int i ) { return *(m_piTileSetIdxMap + i); } 158 UChar getTileSetType( Int i ) { return *(m_pucTileSetType + i); } 159 Bool getSkippedTileSetFlag( Int i ) { return *(m_pbSkippedTileSetFlag + i); } 160 #endif 145 161 Void setInverseCUOrderMap( Int cuAddr, Int encCUOrder ) { *(m_puiInverseCUOrderMap + cuAddr) = encCUOrder; } 146 162 UInt getInverseCUOrderMap( Int cuAddr ) { return *(m_puiInverseCUOrderMap + (cuAddr>=m_uiNumCUsInFrame ? m_uiNumCUsInFrame : cuAddr)); } -
branches/SHM-3.1-dev/source/Lib/TLibCommon/TypeDef.h
r431 r435 157 157 #define VIEW_ID_RELATED_SIGNALING 1 ///< Introduce syntax elements view_id_len_minus1 and view_id_val 158 158 #define M0043_LAYERS_PRESENT_SEI 0 ///< JCTVC-M0043: add layers present SEI. Macro shall be equal to 0 according to the JCTVC-N0174 discussion. The code is to be removed. 159 #define N0383_IL_CONSTRAINED_TILE_SETS_SEI 1 159 160 #else 160 161 #define SYNTAX_OUTPUT 0 -
branches/SHM-3.1-dev/source/Lib/TLibDecoder/SEIread.cpp
r431 r435 101 101 fprintf( g_hTrace, "=========== SOP Description SEI message ===========\n"); 102 102 break; 103 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI 104 case SEI::INTER_LAYER_CONSTRAINED_TILE_SETS: 105 fprintf( g_hTrace, "=========== Inter Layer Constrained Tile Sets SEI message ===========\n"); 106 break; 107 #endif 103 108 case SEI::SCALABLE_NESTING: 104 109 fprintf( g_hTrace, "=========== Scalable Nesting SEI message ===========\n"); … … 266 271 xParseSEISOPDescription((SEISOPDescription&) *sei, payloadSize); 267 272 break; 273 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI 274 case SEI::INTER_LAYER_CONSTRAINED_TILE_SETS: 275 sei = new SEIInterLayerConstrainedTileSets; 276 xParseSEIInterLayerConstrainedTileSets((SEIInterLayerConstrainedTileSets&) *sei, payloadSize); 277 break; 278 #endif 268 279 case SEI::SCALABLE_NESTING: 269 280 sei = new SEIScalableNesting; … … 775 786 } 776 787 788 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI 789 Void SEIReader::xParseSEIInterLayerConstrainedTileSets (SEIInterLayerConstrainedTileSets &sei, UInt payloadSize) 790 { 791 UInt uiCode; 792 793 READ_FLAG( uiCode, "il_all_tiles_exact_sample_value_match_flag" ); sei.m_ilAllTilesExactSampleValueMatchFlag = uiCode; 794 READ_FLAG( uiCode, "il_one_tile_per_tile_set_flag" ); sei.m_ilOneTilePerTileSetFlag = uiCode; 795 if( !sei.m_ilOneTilePerTileSetFlag ) 796 { 797 READ_UVLC( uiCode, "il_num_sets_in_message_minus1" ); sei.m_ilNumSetsInMessageMinus1 = uiCode; 798 if( sei.m_ilNumSetsInMessageMinus1 ) 799 { 800 READ_FLAG( uiCode, "skipped_tile_set_present_flag" ); sei.m_skippedTileSetPresentFlag = uiCode; 801 } 802 else 803 { 804 sei.m_skippedTileSetPresentFlag = false; 805 } 806 UInt numSignificantSets = sei.m_ilNumSetsInMessageMinus1 + (sei.m_skippedTileSetPresentFlag ? 1 : 0) + 1; 807 for( UInt i = 0; i <= numSignificantSets; i++ ) 808 { 809 READ_UVLC( uiCode, "ilcts_id" ); sei.m_ilctsId[i] = uiCode; 810 READ_UVLC( uiCode, "il_num_tile_rects_in_set_minus1" ) ;sei.m_ilNumTileRectsInSetMinus1[i] = uiCode; 811 for( UInt j = 0; j <= sei.m_ilNumTileRectsInSetMinus1[i]; j++ ) 812 { 813 READ_UVLC( uiCode, "il_top_left_tile_index" ); sei.m_ilTopLeftTileIndex[i][j] = uiCode; 814 READ_UVLC( uiCode, "il_bottom_right_tile_index" ); sei.m_ilBottomRightTileIndex[i][j] = uiCode; 815 } 816 READ_CODE( 2, uiCode, "ilc_idc" ); sei.m_ilcIdc[i] = uiCode; 817 if( sei.m_ilAllTilesExactSampleValueMatchFlag ) 818 { 819 READ_FLAG( uiCode, "il_exact_sample_value_match_flag" ); sei.m_ilExactSampleValueMatchFlag[i] = uiCode; 820 } 821 } 822 } 823 else 824 { 825 READ_CODE( 2, uiCode, "all_tiles_ilc_idc" ); sei.m_allTilesIlcIdc = uiCode; 826 } 827 828 xParseByteAlign(); 829 } 830 #endif 831 777 832 #if M0043_LAYERS_PRESENT_SEI 778 833 Void SEIReader::xParseSEIScalableNesting(SEIScalableNesting& sei, const NalUnitType nalUnitType, UInt payloadSize, TComVPS *vps, TComSPS *sps) -
branches/SHM-3.1-dev/source/Lib/TLibDecoder/SEIread.h
r313 r435 80 80 Void xParseSEIToneMappingInfo (SEIToneMappingInfo& sei, UInt payloadSize); 81 81 Void xParseSEISOPDescription (SEISOPDescription &sei, UInt payloadSize); 82 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI 83 Void xParseSEIInterLayerConstrainedTileSets (SEIInterLayerConstrainedTileSets &sei, UInt payloadSize); 84 #endif 82 85 #if M0043_LAYERS_PRESENT_SEI 83 86 Void xParseSEILayersPresent (SEILayersPresent &sei, UInt payloadSize, TComVPS *vps); -
branches/SHM-3.1-dev/source/Lib/TLibEncoder/SEIwrite.cpp
r313 r435 95 95 fprintf( g_hTrace, "=========== SOP Description SEI message ===========\n"); 96 96 break; 97 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI 98 case SEI::INTER_LAYER_CONSTRAINED_TILE_SETS: 99 fprintf( g_hTrace, "=========== Inter Layer Constrained Tile Sets SEI message ===========\n"); 100 break; 101 #endif 97 102 case SEI::SCALABLE_NESTING: 98 103 fprintf( g_hTrace, "=========== Scalable Nesting SEI message ===========\n"); … … 153 158 xWriteSEISOPDescription(*static_cast<const SEISOPDescription*>(&sei)); 154 159 break; 160 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI 161 case SEI::INTER_LAYER_CONSTRAINED_TILE_SETS: 162 xWriteSEIInterLayerConstrainedTileSets(*static_cast<const SEIInterLayerConstrainedTileSets*>(&sei)); 163 break; 164 #endif 155 165 case SEI::SCALABLE_NESTING: 156 166 xWriteSEIScalableNesting(bs, *static_cast<const SEIScalableNesting*>(&sei), sps); … … 559 569 } 560 570 571 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI 572 Void SEIWriter::xWriteSEIInterLayerConstrainedTileSets(const SEIInterLayerConstrainedTileSets& sei) 573 { 574 WRITE_FLAG( sei.m_ilAllTilesExactSampleValueMatchFlag, "il_all_tiles_exact_sample_value_match_flag" ); 575 WRITE_FLAG( sei.m_ilOneTilePerTileSetFlag, "il_one_tile_per_tile_set_flag" ); 576 if( !sei.m_ilOneTilePerTileSetFlag ) 577 { 578 WRITE_UVLC( sei.m_ilNumSetsInMessageMinus1, "il_num_sets_in_message_minus1" ); 579 if( sei.m_ilNumSetsInMessageMinus1 ) 580 { 581 WRITE_FLAG( sei.m_skippedTileSetPresentFlag, "skipped_tile_set_present_flag" ); 582 } 583 UInt numSignificantSets = sei.m_ilNumSetsInMessageMinus1 + (sei.m_skippedTileSetPresentFlag ? 1 : 0) + 1; 584 for( UInt i = 0; i <= numSignificantSets; i++ ) 585 { 586 WRITE_UVLC( sei.m_ilctsId[i], "ilcts_id" ); 587 WRITE_UVLC( sei.m_ilNumTileRectsInSetMinus1[i], "il_num_tile_rects_in_set_minus1" ); 588 for( UInt j = 0; j <= sei.m_ilNumTileRectsInSetMinus1[i]; j++ ) 589 { 590 WRITE_UVLC( sei.m_ilTopLeftTileIndex[i][j], "il_top_left_tile_index" ); 591 WRITE_UVLC( sei.m_ilBottomRightTileIndex[i][j], "il_bottom_right_tile_index" ); 592 } 593 WRITE_CODE( sei.m_ilcIdc[i], 2, "ilc_idc" ); 594 if( sei.m_ilAllTilesExactSampleValueMatchFlag ) 595 { 596 WRITE_FLAG( sei.m_ilExactSampleValueMatchFlag[i], "il_exact_sample_value_match_flag" ); 597 } 598 } 599 } 600 else 601 { 602 WRITE_CODE( sei.m_allTilesIlcIdc, 2, "all_tiles_ilc_idc" ); 603 } 604 605 xWriteByteAlign(); 606 } 607 #endif 608 561 609 Void SEIWriter::xWriteSEIScalableNesting(TComBitIf& bs, const SEIScalableNesting& sei, TComSPS *sps) 562 610 { -
branches/SHM-3.1-dev/source/Lib/TLibEncoder/SEIwrite.h
r313 r435 68 68 #endif 69 69 Void xWriteSEISOPDescription(const SEISOPDescription& sei); 70 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI 71 Void xWriteSEIInterLayerConstrainedTileSets(const SEIInterLayerConstrainedTileSets& sei); 72 #endif 70 73 Void xWriteSEIScalableNesting(TComBitIf& bs, const SEIScalableNesting& sei, TComSPS *sps); 71 74 Void xWriteByteAlign(); -
branches/SHM-3.1-dev/source/Lib/TLibEncoder/TEncCfg.h
r397 r435 318 318 Int m_SOPDescriptionSEIEnabled; 319 319 Int m_scalableNestingSEIEnabled; 320 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI 321 Bool m_interLayerConstrainedTileSetsSEIEnabled; 322 UInt m_ilNumSetsInMessage; 323 Bool m_skippedTileSetPresentFlag; 324 UInt m_topLeftTileIndex[1024]; 325 UInt m_bottomRightTileIndex[1024]; 326 UInt m_ilcIdc[1024]; 327 #endif 320 328 //====== Weighted Prediction ======== 321 329 Bool m_useWeightedPred; //< Use of Weighting Prediction (P_SLICE) … … 757 765 Void setScalableNestingSEIEnabled(Int b) { m_scalableNestingSEIEnabled = b; } 758 766 Int getScalableNestingSEIEnabled() { return m_scalableNestingSEIEnabled; } 767 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI 768 Void setInterLayerConstrainedTileSetsSEIEnabled(Bool b) { m_interLayerConstrainedTileSetsSEIEnabled = b; } 769 Bool getInterLayerConstrainedTileSetsSEIEnabled() { return m_interLayerConstrainedTileSetsSEIEnabled; } 770 Void setIlNumSetsInMessage(UInt b) { m_ilNumSetsInMessage = b; } 771 Int getIlNumSetsInMessage() { return m_ilNumSetsInMessage; } 772 Void setSkippedTileSetPresentFlag(Bool b) { m_skippedTileSetPresentFlag = b; } 773 Bool getSkippedTileSetPresentFlag() { return m_skippedTileSetPresentFlag; } 774 Void setTopLeftTileIndex(UInt *b) 775 { 776 for (UInt i = 0; i < m_ilNumSetsInMessage; i++) 777 { 778 m_topLeftTileIndex[i] = b[i]; 779 } 780 } 781 UInt getTopLeftTileIndex(UInt b) { return m_topLeftTileIndex[b]; } 782 Void setBottomRightTileIndex(UInt *b) 783 { 784 for (UInt i = 0; i < m_ilNumSetsInMessage; i++) 785 { 786 m_bottomRightTileIndex[i] = b[i]; 787 } 788 } 789 UInt getBottomRightTileIndex(UInt b) { return m_bottomRightTileIndex[b]; } 790 Void setIlcIdc(UInt *b) 791 { 792 for (UInt i = 0; i < m_ilNumSetsInMessage; i++) 793 { 794 m_ilcIdc[i] = b[i]; 795 } 796 } 797 UInt getIlcIdc(UInt b) { return m_ilcIdc[b]; } 798 #endif 759 799 Void setUseWP ( Bool b ) { m_useWeightedPred = b; } 760 800 Void setWPBiPred ( Bool b ) { m_useWeightedBiPred = b; } -
branches/SHM-3.1-dev/source/Lib/TLibEncoder/TEncGOP.cpp
r434 r435 307 307 } 308 308 309 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI 310 SEIInterLayerConstrainedTileSets* TEncGOP::xCreateSEIInterLayerConstrainedTileSets() 311 { 312 SEIInterLayerConstrainedTileSets *seiInterLayerConstrainedTileSets = new SEIInterLayerConstrainedTileSets(); 313 seiInterLayerConstrainedTileSets->m_ilAllTilesExactSampleValueMatchFlag = false; 314 seiInterLayerConstrainedTileSets->m_ilOneTilePerTileSetFlag = false; 315 if (!seiInterLayerConstrainedTileSets->m_ilOneTilePerTileSetFlag) 316 { 317 seiInterLayerConstrainedTileSets->m_ilNumSetsInMessageMinus1 = m_pcCfg->getIlNumSetsInMessage() - 1; 318 if (seiInterLayerConstrainedTileSets->m_ilNumSetsInMessageMinus1) 319 { 320 seiInterLayerConstrainedTileSets->m_skippedTileSetPresentFlag = m_pcCfg->getSkippedTileSetPresentFlag(); 321 } 322 else 323 { 324 seiInterLayerConstrainedTileSets->m_skippedTileSetPresentFlag = false; 325 } 326 UInt numSignificantSets = seiInterLayerConstrainedTileSets->m_ilNumSetsInMessageMinus1 - (seiInterLayerConstrainedTileSets->m_skippedTileSetPresentFlag ? 1 : 0) + 1; 327 for (UInt i = 0; i < numSignificantSets; i++) 328 { 329 seiInterLayerConstrainedTileSets->m_ilctsId[i] = i; 330 seiInterLayerConstrainedTileSets->m_ilNumTileRectsInSetMinus1[i] = 0; 331 for( UInt j = 0; j <= seiInterLayerConstrainedTileSets->m_ilNumTileRectsInSetMinus1[i]; j++) 332 { 333 seiInterLayerConstrainedTileSets->m_ilTopLeftTileIndex[i][j] = m_pcCfg->getTopLeftTileIndex(i); 334 seiInterLayerConstrainedTileSets->m_ilBottomRightTileIndex[i][j] = m_pcCfg->getBottomRightTileIndex(i); 335 } 336 seiInterLayerConstrainedTileSets->m_ilcIdc[i] = m_pcCfg->getIlcIdc(i); 337 if (seiInterLayerConstrainedTileSets->m_ilAllTilesExactSampleValueMatchFlag) 338 { 339 seiInterLayerConstrainedTileSets->m_ilExactSampleValueMatchFlag[i] = false; 340 } 341 } 342 } 343 344 return seiInterLayerConstrainedTileSets; 345 } 346 #endif 347 309 348 Void TEncGOP::xCreateLeadingSEIMessages (/*SEIMessages seiMessages,*/ AccessUnit &accessUnit, TComSPS *sps) 310 349 { … … 369 408 delete sei; 370 409 } 410 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI 411 if(m_pcCfg->getInterLayerConstrainedTileSetsSEIEnabled()) 412 { 413 SEIInterLayerConstrainedTileSets *sei = xCreateSEIInterLayerConstrainedTileSets (); 414 415 nalu = NALUnit(NAL_UNIT_PREFIX_SEI, 0, m_pcCfg->getNumLayer()-1); // For highest layer 416 m_pcEntropyCoder->setBitstream(&nalu.m_Bitstream); 417 m_seiWriter.writeSEImessage(nalu.m_Bitstream, *sei, sps); 418 writeRBSPTrailingBits(nalu.m_Bitstream); 419 accessUnit.push_back(new NALUnitEBSP(nalu)); 420 delete sei; 421 } 422 #endif 371 423 } 372 424 … … 1472 1524 pcPic->getPicSym()->xInitTiles(); 1473 1525 1526 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI 1527 if (m_pcCfg->getInterLayerConstrainedTileSetsSEIEnabled()) 1528 { 1529 xBuildTileSetsMap(pcPic->getPicSym()); 1530 } 1531 #endif 1532 1474 1533 // Allocate some coders, now we know how many tiles there are. 1475 1534 Int iNumSubstreams = pcSlice->getPPS()->getNumSubstreams(); … … 3448 3507 } 3449 3508 3509 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI 3510 Void TEncGOP::xBuildTileSetsMap(TComPicSym* picSym) 3511 { 3512 Int numCUs = picSym->getFrameWidthInCU() * picSym->getFrameHeightInCU(); 3513 3514 for (Int i = 0; i < numCUs; i++) 3515 { 3516 picSym->setTileSetIdxMap(i, -1, 0, false); 3517 } 3518 3519 for (Int i = 0; i < m_pcCfg->getIlNumSetsInMessage(); i++) 3520 { 3521 TComTile* topLeftTile = picSym->getTComTile(m_pcCfg->getTopLeftTileIndex(i)); 3522 TComTile* bottomRightTile = picSym->getTComTile(m_pcCfg->getBottomRightTileIndex(i)); 3523 Int tileSetLeftEdgePosInCU = topLeftTile->getRightEdgePosInCU() - topLeftTile->getTileWidth() + 1; 3524 Int tileSetRightEdgePosInCU = bottomRightTile->getRightEdgePosInCU(); 3525 Int tileSetTopEdgePosInCU = topLeftTile->getBottomEdgePosInCU() - topLeftTile->getTileHeight() + 1; 3526 Int tileSetBottomEdgePosInCU = bottomRightTile->getBottomEdgePosInCU(); 3527 assert(tileSetLeftEdgePosInCU < tileSetRightEdgePosInCU && tileSetTopEdgePosInCU < tileSetBottomEdgePosInCU); 3528 for (Int j = tileSetTopEdgePosInCU; j <= tileSetBottomEdgePosInCU; j++) 3529 { 3530 for (Int k = tileSetLeftEdgePosInCU; k <= tileSetRightEdgePosInCU; k++) 3531 { 3532 picSym->setTileSetIdxMap(j * picSym->getFrameWidthInCU() + k, i, m_pcCfg->getIlcIdc(i), false); 3533 } 3534 } 3535 } 3536 3537 if (m_pcCfg->getSkippedTileSetPresentFlag()) 3538 { 3539 Int skippedTileSetIdx = m_pcCfg->getIlNumSetsInMessage(); 3540 for (Int i = 0; i < numCUs; i++) 3541 { 3542 if (picSym->getTileSetIdxMap(i) < 0) 3543 { 3544 picSym->setTileSetIdxMap(i, skippedTileSetIdx, 0, true); 3545 } 3546 } 3547 } 3548 } 3549 #endif 3550 3450 3551 Void TEncGOP::dblMetric( TComPic* pcPic, UInt uiNumSlices ) 3451 3552 { -
branches/SHM-3.1-dev/source/Lib/TLibEncoder/TEncGOP.h
r431 r435 189 189 SEIToneMappingInfo* xCreateSEIToneMappingInfo(); 190 190 191 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI 192 SEIInterLayerConstrainedTileSets* xCreateSEIInterLayerConstrainedTileSets(); 193 #endif 194 191 195 Void xCreateLeadingSEIMessages (/*SEIMessages seiMessages,*/ AccessUnit &accessUnit, TComSPS *sps); 192 196 Int xGetFirstSeiLocation (AccessUnit &accessUnit); … … 202 206 m_nestedPictureTimingSEIPresentInAU = false; 203 207 } 208 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI 209 Void xBuildTileSetsMap(TComPicSym* picSym); 210 #endif 204 211 Void dblMetric( TComPic* pcPic, UInt uiNumSlices ); 205 212 #if M0457_COL_PICTURE_SIGNALING && !REMOVE_COL_PICTURE_SIGNALING -
branches/SHM-3.1-dev/source/Lib/TLibEncoder/TEncSearch.cpp
r389 r435 3221 3221 Int numValidMergeCand = 0 ; 3222 3222 3223 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI 3224 Bool disableILP = false; 3225 if (pcCU->getPic()->getLayerId() > 0 && m_pcEncCfg->getInterLayerConstrainedTileSetsSEIEnabled() && pcCU->getPic()->getPicSym()->getTileIdxMap(pcCU->getAddr()) >= 0) 3226 { 3227 if (pcCU->getPic()->getPicSym()->getTileSetType(pcCU->getAddr()) == 2) 3228 { 3229 disableILP = true; 3230 } 3231 if (pcCU->getPic()->getPicSym()->getTileSetType(pcCU->getAddr()) == 1) 3232 { 3233 Int currCUaddr = pcCU->getAddr(); 3234 Int frameWitdhInCU = pcCU->getPic()->getPicSym()->getFrameWidthInCU(); 3235 Int frameHeightInCU = pcCU->getPic()->getPicSym()->getFrameHeightInCU(); 3236 Bool leftCUExists = (currCUaddr % frameWitdhInCU) > 0; 3237 Bool aboveCUExists = (currCUaddr / frameWitdhInCU) > 0; 3238 Bool rightCUExists = (currCUaddr % frameWitdhInCU) < (frameWitdhInCU - 1); 3239 Bool belowCUExists = (currCUaddr / frameWitdhInCU) < (frameHeightInCU - 1); 3240 Int currTileSetIdx = pcCU->getPic()->getPicSym()->getTileIdxMap(currCUaddr); 3241 // Check if CU is at tile set boundary 3242 if ( (leftCUExists && pcCU->getPic()->getPicSym()->getTileIdxMap(currCUaddr-1) != currTileSetIdx) || 3243 (leftCUExists && aboveCUExists && pcCU->getPic()->getPicSym()->getTileIdxMap(currCUaddr-frameWitdhInCU-1) != currTileSetIdx) || 3244 (aboveCUExists && pcCU->getPic()->getPicSym()->getTileIdxMap(currCUaddr-frameWitdhInCU) != currTileSetIdx) || 3245 (aboveCUExists && rightCUExists && pcCU->getPic()->getPicSym()->getTileIdxMap(currCUaddr-frameWitdhInCU+1) != currTileSetIdx) || 3246 (rightCUExists && pcCU->getPic()->getPicSym()->getTileIdxMap(currCUaddr+1) != currTileSetIdx) || 3247 (rightCUExists && belowCUExists && pcCU->getPic()->getPicSym()->getTileIdxMap(currCUaddr+frameWitdhInCU+1) != currTileSetIdx) || 3248 (belowCUExists && pcCU->getPic()->getPicSym()->getTileIdxMap(currCUaddr+frameWitdhInCU) != currTileSetIdx) || 3249 (belowCUExists && leftCUExists && pcCU->getPic()->getPicSym()->getTileIdxMap(currCUaddr+frameWitdhInCU-1) != currTileSetIdx) ) 3250 { 3251 disableILP = true; // Disable ILP in tile set boundary CU 3252 } 3253 } 3254 } 3255 #endif 3256 3223 3257 for ( Int iPartIdx = 0; iPartIdx < iNumPart; iPartIdx++ ) 3224 3258 { … … 3270 3304 for ( Int iRefIdxTemp = 0; iRefIdxTemp < pcCU->getSlice()->getNumRefIdx(eRefPicList); iRefIdxTemp++ ) 3271 3305 { 3306 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI 3307 if (pcCU->getSlice()->getRefPic( eRefPicList, iRefIdxTemp )->isILR(pcCU->getLayerId()) && disableILP) 3308 { 3309 continue; 3310 } 3311 #endif 3272 3312 #if (ENCODER_FAST_MODE) 3273 3313 TComPic* pcPic = pcCU->getSlice()->getRefPic( eRefPicList, iRefIdxTemp ); … … 3488 3528 testIter = false; //the fixed part is ILR, skip this iteration 3489 3529 } 3530 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI 3531 if (pcPic->isILR(pcCU->getLayerId()) && disableILP) 3532 { 3533 testIter = false; 3534 } 3535 #endif 3490 3536 if(testIter) 3491 3537 { … … 3503 3549 testRefIdx = false; //the refined part is ILR, skip this reference pic 3504 3550 } 3551 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI 3552 if (pcPic->isILR(pcCU->getLayerId()) && disableILP) 3553 { 3554 testRefIdx = false; 3555 } 3556 #endif 3505 3557 if(testRefIdx) 3506 3558 {
Note: See TracChangeset for help on using the changeset viewer.