Changeset 110 in SHVCSoftware for branches/HM-10.0-dev-SHM/source/Lib
- Timestamp:
- 3 Apr 2013, 21:34:49 (12 years ago)
- Location:
- branches/HM-10.0-dev-SHM/source/Lib
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HM-10.0-dev-SHM/source/Lib/TLibCommon/TComSlice.cpp
r108 r110 1474 1474 , m_numLayerSets (0) 1475 1475 #endif 1476 #if VPS_EXTN_OP_LAYER_SETS 1477 , m_numOutputLayerSets (0) 1478 #endif 1476 1479 { 1477 1480 … … 1482 1485 m_uiMaxLatencyIncrease[i] = 0; 1483 1486 } 1487 #if VPS_EXTN_OP_LAYER_SETS 1488 ::memset(m_layerIdIncludedFlag, 0, sizeof(m_layerIdIncludedFlag)); 1489 // Consider dynamic allocation for outputLayerSetIdx and outputLayerFlag 1490 ::memset(m_outputLayerSetIdx, 0, sizeof(m_outputLayerSetIdx)); 1491 ::memset(m_outputLayerFlag, 0, sizeof(m_outputLayerFlag)); 1492 #endif 1484 1493 } 1485 1494 -
branches/HM-10.0-dev-SHM/source/Lib/TLibCommon/TComSlice.h
r108 r110 507 507 #endif 508 508 509 // ------------------------------------------ 510 // Variables related to VPS extensions 511 // ------------------------------------------ 512 #if VPS_EXTN_OP_LAYER_SETS 513 // .. More declarations here 514 // Target output layer signalling related 515 UInt m_numOutputLayerSets; 516 UInt m_outputLayerSetIdx[MAX_VPS_LAYER_SETS_PLUS1]; 517 Bool m_outputLayerFlag[MAX_VPS_LAYER_SETS_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; 518 // .. More declarations here 519 #endif 520 509 521 public: 510 522 TComVPS(); … … 570 582 #if L0043_TIMING_INFO 571 583 TimingInfo* getTimingInfo() { return &m_timingInfo; } 584 #endif 585 586 #if VPS_EXTN_OP_LAYER_SETS 587 // Target output layer signalling related 588 UInt getNumOutputLayerSets() { return m_numOutputLayerSets; } 589 Void setNumOutputLayerSets(Int x) { m_numOutputLayerSets = x; } 590 591 UInt getOutputLayerSetIdx(Int idx) { return m_outputLayerSetIdx[idx]; } 592 Void setOutputLayerSetIdx(Int idx, UInt x) { m_outputLayerSetIdx[idx] = x; } 593 594 Bool getOutputLayerFlag(Int layerSet, Int layerId) { return m_outputLayerFlag[layerSet][layerId]; } 595 Void setOutputLayerFlag(Int layerSet, Int layerId, Bool x) { m_outputLayerFlag[layerSet][layerId] = x; } 572 596 #endif 573 597 }; -
branches/HM-10.0-dev-SHM/source/Lib/TLibCommon/TypeDef.h
r109 r110 46 46 #define VPS_RENAME 1 ///< Rename variables max_layer_id and num_layer_sets_minus1 in VPS 47 47 #define VPS_EXTNS 1 ///< Include function structure for VPS extensions 48 #if VPS_EXTNS 49 #define VPS_EXTN_OP_LAYER_SETS 1 ///< Include output layer sets in VPS extension 50 #endif 48 51 #define MAX_LAYERS 2 ///< max number of layers the codec is supposed to handle 49 52 … … 135 138 #if VPS_RENAME 136 139 #define MAX_VPS_LAYER_SETS_PLUS1 1024 137 #define MAX_VPS_LAYER_ID_PLUS1 1140 #define MAX_VPS_LAYER_ID_PLUS1 2 138 141 #else 139 142 #define MAX_VPS_NUM_HRD_PARAMETERS 1 -
branches/HM-10.0-dev-SHM/source/Lib/TLibDecoder/TDecCAVLC.cpp
r109 r110 839 839 Void TDecCavlc::parseVPSExtension(TComVPS *vps) 840 840 { 841 UInt uiCode; 841 842 // ... More syntax elements to be parsed here 842 843 844 // Target output layer signalling 845 READ_UVLC( uiCode, "vps_num_output_layer_sets"); vps->setNumOutputLayerSets(uiCode); 846 for(Int i = 0; i < vps->getNumOutputLayerSets(); i++) 847 { 848 READ_UVLC( uiCode, "vps_output_layer_set_idx[i]"); vps->setOutputLayerSetIdx(i, uiCode); 849 Int lsIdx = vps->getOutputLayerSetIdx(i); 850 for(Int j = 0; j <= vps->getMaxLayerId(); j++) 851 { 852 if(vps->getLayerIdIncludedFlag(lsIdx, j)) 853 { 854 READ_FLAG( uiCode, "vps_output_layer_flag[lsIdx][j]"); vps->setOutputLayerFlag(lsIdx, j, uiCode); 855 } 856 } 857 } 843 858 // ... More syntax elements to be parsed here 844 859 } -
branches/HM-10.0-dev-SHM/source/Lib/TLibEncoder/TEncCavlc.cpp
r109 r110 591 591 assert( pcVPS->getNumHrdParameters() <= MAX_VPS_LAYER_SETS_PLUS1 ); 592 592 assert( pcVPS->getMaxLayerId() < MAX_VPS_LAYER_ID_PLUS1 ); 593 #if !VPS_EXTN_OP_LAYER_SETS // num layer sets set in TAppEncTop.cpp 593 594 pcVPS->setNumLayerSets(1); 595 #endif 594 596 WRITE_CODE( pcVPS->getMaxLayerId(), 6, "vps_max_layer_id" ); 595 597 WRITE_UVLC( pcVPS->getNumLayerSets() - 1, "vps_num_layer_sets_minus1" ); … … 610 612 #endif 611 613 { 614 #if !VPS_EXTN_OP_LAYER_SETS // layer Id include flag set in TAppEncTop.cpp 612 615 // Only applicable for version 1 613 616 pcVPS->setLayerIdIncludedFlag( true, opsIdx, i ); 617 #endif 614 618 WRITE_FLAG( pcVPS->getLayerIdIncludedFlag( opsIdx, i ) ? 1 : 0, "layer_id_included_flag[opsIdx][i]" ); 615 619 } … … 667 671 668 672 // ... More syntax elements to be written here 673 // Target output layer signalling 674 WRITE_UVLC( vps->getNumOutputLayerSets(), "vps_num_output_layer_sets"); 675 for(Int i = 0; i < vps->getNumOutputLayerSets(); i++) 676 { 677 WRITE_UVLC( vps->getOutputLayerSetIdx(i), "vps_output_layer_set_idx[i]"); 678 Int lsIdx = vps->getOutputLayerSetIdx(i); 679 for(Int j = 0; j <= vps->getMaxLayerId(); j++) 680 { 681 if(vps->getLayerIdIncludedFlag(lsIdx, j)) 682 { 683 WRITE_FLAG( vps->getOutputLayerFlag(lsIdx, j), "vps_output_layer_flag[lsIdx][j]"); 684 } 685 } 686 } 669 687 } 670 688 #endif
Note: See TracChangeset for help on using the changeset viewer.