Changeset 1096 in SHVCSoftware for branches/SHM-dev/source
- Timestamp:
- 2 Jul 2015, 22:35:17 (9 years ago)
- Location:
- branches/SHM-dev/source/Lib
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/Lib/TLibCommon/SEI.cpp
r1089 r1096 151 151 case SEI::BSP_NESTING: return "Bitstream parition nesting"; 152 152 case SEI::BSP_INITIAL_ARRIVAL_TIME: return "Bitstream parition initial arrival time"; 153 #if !REMOVE_BSP_HRD_SEI154 case SEI::BSP_HRD: return "Bitstream parition HRD parameters";155 #endif156 153 #endif 157 154 #if Q0078_ADD_LAYER_SETS -
branches/SHM-dev/source/Lib/TLibCommon/SEI.h
r1089 r1096 103 103 BSP_NESTING = 145, 104 104 BSP_INITIAL_ARRIVAL_TIME = 146, 105 #if !REMOVE_BSP_HRD_SEI106 BSP_HRD = 147,107 #endif108 105 #endif 109 106 #if Q0074_COLOUR_REMAPPING_SEI … … 909 906 UInt m_vclInitialArrivalDelay[256]; 910 907 }; 911 912 #if !REMOVE_BSP_HRD_SEI913 class SEIBspHrd : public SEI914 {915 public:916 PayloadType payloadType() const { return BSP_HRD; }917 918 SEIBspHrd () {}919 virtual ~SEIBspHrd () {}920 921 UInt m_seiNumBspHrdParametersMinus1;922 Bool m_seiBspCprmsPresentFlag[MAX_VPS_LAYER_SETS_PLUS1];923 UInt m_seiNumBitstreamPartitionsMinus1[MAX_VPS_LAYER_SETS_PLUS1];924 Bool m_seiLayerInBspFlag[MAX_VPS_LAYER_SETS_PLUS1][8][MAX_LAYERS];925 UInt m_seiNumBspSchedCombinationsMinus1[MAX_VPS_LAYER_SETS_PLUS1];926 UInt m_seiBspCombHrdIdx[MAX_VPS_LAYER_SETS_PLUS1][16][16];927 UInt m_seiBspCombScheddx[MAX_VPS_LAYER_SETS_PLUS1][16][16];928 UInt m_vpsMaxLayers;929 Bool m_layerIdIncludedFlag[MAX_VPS_LAYER_SETS_PLUS1][MAX_VPS_LAYER_IDX_PLUS1];930 931 TComHRD *hrd;932 };933 #endif934 935 908 #endif 936 909 -
branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h
r1095 r1096 56 56 #define VPS_VUI_VST_PARAMS 1 ///< JCTVC-R0227: Related to signalling of VST parameters of the base layer. 57 57 #define VPS_VUI_OFFSET 1 ///< N0085: Signal VPS VUI offset in the VPS extension 58 #define REMOVE_BSP_HRD_SEI 1 ///< R0010: Remove bitstream partition HRD SEI message.59 58 #define NESTING_SEI_EXTENSIBILITY 1 ///< R0221: Signalling the number of SEI messages in bitstream partition nesting SEI message 60 59 #define POC_RESET_RESTRICTIONS 1 ///< Restrictions on semantics of POC reset-related syntax elements, including one item from R0223 -
branches/SHM-dev/source/Lib/TLibDecoder/SEIread.cpp
r1037 r1096 350 350 xParseSEIBspInitialArrivalTime((SEIBspInitialArrivalTime&) *sei, vps, sps, *nestingSei, *bspNestingSei, pDecodedMessageOutputStream); 351 351 break; 352 #if !REMOVE_BSP_HRD_SEI353 case SEI::BSP_HRD:354 sei = new SEIBspHrd;355 xParseSEIBspHrd((SEIBspHrd&) *sei, sps, *nestingSei, pDecodedMessageOutputStream);356 break;357 #endif358 352 #endif 359 353 #if Q0078_ADD_LAYER_SETS … … 1664 1658 } 1665 1659 1666 #if !REMOVE_BSP_HRD_SEI1667 Void SEIReader::xParseSEIBspHrd(SEIBspHrd &sei, TComSPS *sps, const SEIScalableNesting &nestingSei, std::ostream *pDecodedMessageOutputStream)1668 {1669 UInt uiCode;1670 sei_read_uvlc( pDecodedMessageOutputStream, uiCode, "sei_num_bsp_hrd_parameters_minus1" ); sei.m_seiNumBspHrdParametersMinus1 = uiCode;1671 for (UInt i = 0; i <= sei.m_seiNumBspHrdParametersMinus1; i++)1672 {1673 if (i > 0)1674 {1675 sei_read_flag( pDecodedMessageOutputStream, uiCode, "sei_bsp_cprms_present_flag" ); sei.m_seiBspCprmsPresentFlag[i] = uiCode;1676 }1677 xParseHrdParameters(sei.hrd, i==0 ? 1 : sei.m_seiBspCprmsPresentFlag[i], nestingSei.m_nestingMaxTemporalIdPlus1[0]-1);1678 }1679 for (UInt h = 0; h <= nestingSei.m_nestingNumOpsMinus1; h++)1680 {1681 UInt lsIdx = nestingSei.m_nestingOpIdx[h];1682 sei_read_uvlc( pDecodedMessageOutputStream, uiCode, "num_sei_bitstream_partitions_minus1[i]"); sei.m_seiNumBitstreamPartitionsMinus1[lsIdx] = uiCode;1683 #if HRD_BPB1684 Int chkPart=0;1685 #endif1686 UInt i;1687 for(i = 0; i <= sei.m_seiNumBitstreamPartitionsMinus1[lsIdx]; i++)1688 {1689 #if HRD_BPB1690 UInt nl=0; UInt j;1691 for(j = 0; j < sei.m_vpsMaxLayers; j++)1692 {1693 if (sei.m_layerIdIncludedFlag[lsIdx][j])1694 {1695 nl++;1696 }1697 }1698 for (j = 0; j < nl; j++)1699 {1700 #else1701 for (UInt j = 0; j < sei.m_vpsMaxLayers; j++)1702 {1703 if (sei.m_layerIdIncludedFlag[lsIdx][j])1704 {1705 #endif1706 sei_read_flag( pDecodedMessageOutputStream, uiCode, "sei_layer_in_bsp_flag[lsIdx][i][j]" ); sei.m_seiLayerInBspFlag[lsIdx][i][j] = uiCode;1707 }1708 #if !HRD_BPB1709 }1710 #endif1711 #if HRD_BPB1712 chkPart+=sei.m_seiLayerInBspFlag[lsIdx][i][j];1713 #endif1714 }1715 #if HRD_BPB1716 assert(chkPart<=1);1717 #endif1718 #if HRD_BPB1719 if(sei.m_seiNumBitstreamPartitionsMinus1[lsIdx]==0)1720 {1721 Int chkPartition1=0; Int chkPartition2=0;1722 for (UInt j = 0; j < sei.m_vpsMaxLayers; j++)1723 {1724 if( sei.m_layerIdIncludedFlag[lsIdx][j] )1725 {1726 chkPartition1+=sei.m_seiLayerInBspFlag[lsIdx][0][j];1727 chkPartition2++;1728 }1729 }1730 assert(chkPartition1!=chkPartition2);1731 }1732 #endif1733 1734 sei_read_uvlc( pDecodedMessageOutputStream, uiCode, "sei_num_bsp_sched_combinations_minus1[i]"); sei.m_seiNumBspSchedCombinationsMinus1[lsIdx] = uiCode;1735 for (i = 0; i <= sei.m_seiNumBspSchedCombinationsMinus1[lsIdx]; i++)1736 {1737 for (UInt j = 0; j <= sei.m_seiNumBitstreamPartitionsMinus1[lsIdx]; j++)1738 {1739 sei_read_uvlc( pDecodedMessageOutputStream, uiCode, "sei_bsp_comb_hrd_idx[lsIdx][i][j]"); sei.m_seiBspCombHrdIdx[lsIdx][i][j] = uiCode;1740 #if HRD_BPB1741 assert(uiCode <= sei.m_seiNumBspHrdParametersMinus1);1742 #endif1743 sei_read_uvlc( pDecodedMessageOutputStream, uiCode, "sei_bsp_comb_sched_idx[lsIdx][i][j]"); sei.m_seiBspCombScheddx[lsIdx][i][j] = uiCode;1744 #if HRD_BPB1745 assert(uiCode <= sei.hrd->getCpbCntMinus1( sps->getMaxTLayers()-1 ));1746 #endif1747 1748 }1749 }1750 }1751 }1752 #endif1753 1754 1660 Void SEIReader::xParseHrdParameters(TComHRD *hrd, Bool commonInfPresentFlag, UInt maxNumSubLayersMinus1, std::ostream *pDecodedMessageOutputStream) 1755 1661 { -
branches/SHM-dev/source/Lib/TLibDecoder/SEIread.h
r1037 r1096 134 134 #endif 135 135 Void xParseSEIBspInitialArrivalTime (SEIBspInitialArrivalTime &sei, TComVPS *vps, TComSPS *sps, const SEIScalableNesting &nestingSei, const SEIBspNesting &bspNestingSei, std::ostream *pDecodedMessageOutputStream); 136 #if !REMOVE_BSP_HRD_SEI137 Void xParseSEIBspHrd(SEIBspHrd &sei, TComSPS *sps, const SEIScalableNesting &nestingSei, std::ostream *pDecodedMessageOutputStream);138 #endif139 136 Void xParseHrdParameters (TComHRD *hrd, Bool commonInfPresentFlag, UInt maxNumSubLayersMinus1, std::ostream *pDecodedMessageOutputStream); 140 137 #endif -
branches/SHM-dev/source/Lib/TLibEncoder/SEIwrite.cpp
r1077 r1096 185 185 xWriteSEIBspInitialArrivalTime(*static_cast<const SEIBspInitialArrivalTime*>(&sei), vps, sps, nestingSei, bspNestingSei); 186 186 break; 187 #if !REMOVE_BSP_HRD_SEI188 case SEI::BSP_HRD:189 xWriteSEIBspHrd(*static_cast<const SEIBspHrd*>(&sei), sps, nestingSei);190 break;191 #endif192 187 #endif 193 188 #if Q0078_ADD_LAYER_SETS … … 1262 1257 } 1263 1258 1264 #if !REMOVE_BSP_HRD_SEI1265 Void SEIWriter::xWriteSEIBspHrd(const SEIBspHrd &sei, TComSPS *sps, const SEIScalableNesting &nestingSei)1266 {1267 WRITE_UVLC( sei.m_seiNumBspHrdParametersMinus1, "sei_num_bsp_hrd_parameters_minus1" );1268 for (UInt i = 0; i <= sei.m_seiNumBspHrdParametersMinus1; i++)1269 {1270 if (i > 0)1271 {1272 WRITE_FLAG( sei.m_seiBspCprmsPresentFlag[i], "sei_bsp_cprms_present_flag" );1273 }1274 xCodeHrdParameters(sei.hrd, i==0 ? 1 : sei.m_seiBspCprmsPresentFlag[i], nestingSei.m_nestingMaxTemporalIdPlus1[0]-1);1275 }1276 for (UInt h = 0; h <= nestingSei.m_nestingNumOpsMinus1; h++)1277 {1278 UInt lsIdx = nestingSei.m_nestingOpIdx[h];1279 WRITE_UVLC( sei.m_seiNumBitstreamPartitionsMinus1[lsIdx], "num_sei_bitstream_partitions_minus1[i]");1280 for (UInt i = 0; i <= sei.m_seiNumBitstreamPartitionsMinus1[lsIdx]; i++)1281 {1282 #if HRD_BPB1283 UInt nl=0;1284 for (UInt j = 0; j < sei.m_vpsMaxLayers; j++)1285 {1286 if (sei.m_layerIdIncludedFlag[lsIdx][j])1287 {1288 nl++;1289 }1290 }1291 for (UInt j = 0; j < nl; j++)1292 {1293 #else1294 for (UInt j = 0; j < sei.m_vpsMaxLayers; j++)1295 {1296 if (sei.m_layerIdIncludedFlag[lsIdx][j])1297 {1298 #endif1299 WRITE_FLAG( sei.m_seiLayerInBspFlag[lsIdx][i][j], "sei_layer_in_bsp_flag[lsIdx][i][j]" );1300 }1301 #if !HRD_BPB1302 }1303 #endif1304 }1305 WRITE_UVLC( sei.m_seiNumBspSchedCombinationsMinus1[lsIdx], "sei_num_bsp_sched_combinations_minus1[i]");1306 for (UInt i = 0; i <= sei.m_seiNumBspSchedCombinationsMinus1[lsIdx]; i++)1307 {1308 for (UInt j = 0; j <= sei.m_seiNumBitstreamPartitionsMinus1[lsIdx]; j++)1309 {1310 WRITE_UVLC( sei.m_seiBspCombHrdIdx[lsIdx][i][j], "sei_bsp_comb_hrd_idx[lsIdx][i][j]");1311 WRITE_UVLC( sei.m_seiBspCombScheddx[lsIdx][i][j], "sei_bsp_comb_sched_idx[lsIdx][i][j]");1312 }1313 }1314 }1315 }1316 #endif1317 1318 1259 Void SEIWriter::xCodeHrdParameters( TComHRD *hrd, Bool commonInfPresentFlag, UInt maxNumSubLayersMinus1 ) 1319 1260 { -
branches/SHM-dev/source/Lib/TLibEncoder/SEIwrite.h
r1037 r1096 122 122 Void xWriteSEIBspNesting(TComBitIf& bs, const SEIBspNesting &sei, TComVPS *vps, TComSPS *sps, const SEIScalableNesting &nestingSei); 123 123 Void xWriteSEIBspInitialArrivalTime(const SEIBspInitialArrivalTime &sei, TComVPS *vps, TComSPS *sps, const SEIScalableNesting &nestingSei, const SEIBspNesting &bspNestingSei); 124 #if !REMOVE_BSP_HRD_SEI125 Void xWriteSEIBspHrd(const SEIBspHrd &sei, TComSPS *sps, const SEIScalableNesting &nestingSei);126 #endif127 124 Void xCodeHrdParameters( TComHRD *hrd, Bool commonInfPresentFlag, UInt maxNumSubLayersMinus1 ); 128 125 #endif
Note: See TracChangeset for help on using the changeset viewer.