Changeset 1096 in SHVCSoftware for branches/SHM-dev/source


Ignore:
Timestamp:
2 Jul 2015, 22:35:17 (9 years ago)
Author:
seregin
Message:

cleanup macros: REMOVE_BSP_HRD_SEI

Location:
branches/SHM-dev/source/Lib
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/Lib/TLibCommon/SEI.cpp

    r1089 r1096  
    151151    case SEI::BSP_NESTING:                          return "Bitstream parition nesting";
    152152    case SEI::BSP_INITIAL_ARRIVAL_TIME:             return "Bitstream parition initial arrival time";
    153 #if !REMOVE_BSP_HRD_SEI
    154     case SEI::BSP_HRD:                              return "Bitstream parition HRD parameters";
    155 #endif
    156153#endif
    157154#if Q0078_ADD_LAYER_SETS
  • branches/SHM-dev/source/Lib/TLibCommon/SEI.h

    r1089 r1096  
    103103    BSP_NESTING                          = 145,
    104104    BSP_INITIAL_ARRIVAL_TIME             = 146,
    105 #if !REMOVE_BSP_HRD_SEI
    106     BSP_HRD                              = 147,
    107 #endif
    108105#endif
    109106#if Q0074_COLOUR_REMAPPING_SEI
     
    909906  UInt m_vclInitialArrivalDelay[256];
    910907};
    911 
    912 #if !REMOVE_BSP_HRD_SEI
    913 class SEIBspHrd : public SEI
    914 {
    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 #endif
    934 
    935908#endif
    936909
  • branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h

    r1095 r1096  
    5656#define VPS_VUI_VST_PARAMS               1      ///< JCTVC-R0227: Related to signalling of VST parameters of the base layer.
    5757#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.
    5958#define NESTING_SEI_EXTENSIBILITY        1      ///< R0221: Signalling the number of SEI messages in bitstream partition nesting SEI message
    6059#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  
    350350     xParseSEIBspInitialArrivalTime((SEIBspInitialArrivalTime&) *sei, vps, sps, *nestingSei, *bspNestingSei, pDecodedMessageOutputStream);
    351351     break;
    352 #if !REMOVE_BSP_HRD_SEI
    353    case SEI::BSP_HRD:
    354      sei = new SEIBspHrd;
    355      xParseSEIBspHrd((SEIBspHrd&) *sei, sps, *nestingSei, pDecodedMessageOutputStream);
    356      break;
    357 #endif
    358352#endif
    359353#if Q0078_ADD_LAYER_SETS
     
    16641658}
    16651659
    1666 #if !REMOVE_BSP_HRD_SEI
    1667 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_BPB
    1684     Int chkPart=0;
    1685 #endif
    1686     UInt i;
    1687     for(i = 0; i <= sei.m_seiNumBitstreamPartitionsMinus1[lsIdx]; i++)
    1688     {
    1689 #if HRD_BPB
    1690       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 #else
    1701       for (UInt j = 0; j < sei.m_vpsMaxLayers; j++)
    1702       {
    1703         if (sei.m_layerIdIncludedFlag[lsIdx][j])
    1704         {
    1705 #endif
    1706           sei_read_flag( pDecodedMessageOutputStream, uiCode, "sei_layer_in_bsp_flag[lsIdx][i][j]" ); sei.m_seiLayerInBspFlag[lsIdx][i][j] = uiCode;
    1707         }
    1708 #if !HRD_BPB
    1709       }
    1710 #endif
    1711 #if HRD_BPB
    1712       chkPart+=sei.m_seiLayerInBspFlag[lsIdx][i][j];
    1713 #endif
    1714     }
    1715 #if HRD_BPB
    1716     assert(chkPart<=1);
    1717 #endif
    1718 #if HRD_BPB
    1719     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 #endif
    1733      
    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_BPB
    1741         assert(uiCode <= sei.m_seiNumBspHrdParametersMinus1);
    1742 #endif
    1743         sei_read_uvlc( pDecodedMessageOutputStream, uiCode, "sei_bsp_comb_sched_idx[lsIdx][i][j]"); sei.m_seiBspCombScheddx[lsIdx][i][j] = uiCode;
    1744 #if HRD_BPB
    1745         assert(uiCode <= sei.hrd->getCpbCntMinus1( sps->getMaxTLayers()-1 ));
    1746 #endif
    1747 
    1748       }
    1749     }
    1750   }
    1751 }
    1752 #endif
    1753 
    17541660Void SEIReader::xParseHrdParameters(TComHRD *hrd, Bool commonInfPresentFlag, UInt maxNumSubLayersMinus1, std::ostream *pDecodedMessageOutputStream)
    17551661{
  • branches/SHM-dev/source/Lib/TLibDecoder/SEIread.h

    r1037 r1096  
    134134#endif
    135135  Void xParseSEIBspInitialArrivalTime         (SEIBspInitialArrivalTime &sei, TComVPS *vps, TComSPS *sps, const SEIScalableNesting &nestingSei, const SEIBspNesting &bspNestingSei, std::ostream *pDecodedMessageOutputStream);
    136 #if !REMOVE_BSP_HRD_SEI
    137   Void xParseSEIBspHrd(SEIBspHrd &sei, TComSPS *sps, const SEIScalableNesting &nestingSei, std::ostream *pDecodedMessageOutputStream);
    138 #endif
    139136  Void xParseHrdParameters                    (TComHRD *hrd, Bool commonInfPresentFlag, UInt maxNumSubLayersMinus1, std::ostream *pDecodedMessageOutputStream);
    140137#endif
  • branches/SHM-dev/source/Lib/TLibEncoder/SEIwrite.cpp

    r1077 r1096  
    185185     xWriteSEIBspInitialArrivalTime(*static_cast<const SEIBspInitialArrivalTime*>(&sei), vps, sps, nestingSei, bspNestingSei);
    186186     break;
    187 #if !REMOVE_BSP_HRD_SEI
    188    case SEI::BSP_HRD:
    189      xWriteSEIBspHrd(*static_cast<const SEIBspHrd*>(&sei), sps, nestingSei);
    190      break;
    191 #endif
    192187#endif
    193188#if Q0078_ADD_LAYER_SETS
     
    12621257}
    12631258
    1264 #if !REMOVE_BSP_HRD_SEI
    1265 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_BPB
    1283       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 #else
    1294       for (UInt j = 0; j < sei.m_vpsMaxLayers; j++)
    1295       {
    1296         if (sei.m_layerIdIncludedFlag[lsIdx][j])
    1297         {
    1298 #endif
    1299           WRITE_FLAG( sei.m_seiLayerInBspFlag[lsIdx][i][j], "sei_layer_in_bsp_flag[lsIdx][i][j]" );
    1300         }
    1301 #if !HRD_BPB
    1302       }
    1303 #endif
    1304     }
    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 #endif
    1317 
    13181259Void SEIWriter::xCodeHrdParameters( TComHRD *hrd, Bool commonInfPresentFlag, UInt maxNumSubLayersMinus1 )
    13191260{
  • branches/SHM-dev/source/Lib/TLibEncoder/SEIwrite.h

    r1037 r1096  
    122122  Void xWriteSEIBspNesting(TComBitIf& bs, const SEIBspNesting &sei, TComVPS *vps, TComSPS *sps, const SEIScalableNesting &nestingSei);
    123123  Void xWriteSEIBspInitialArrivalTime(const SEIBspInitialArrivalTime &sei, TComVPS *vps, TComSPS *sps, const SEIScalableNesting &nestingSei, const SEIBspNesting &bspNestingSei);
    124 #if !REMOVE_BSP_HRD_SEI
    125   Void xWriteSEIBspHrd(const SEIBspHrd &sei, TComSPS *sps, const SEIScalableNesting &nestingSei);
    126 #endif
    127124  Void xCodeHrdParameters( TComHRD *hrd, Bool commonInfPresentFlag, UInt maxNumSubLayersMinus1 );
    128125#endif
Note: See TracChangeset for help on using the changeset viewer.