...
 
Commits (20)
......@@ -257,7 +257,11 @@ void EncApp::xInitLibCfg()
#endif
m_cEncLib.setOnePictureOnlyConstraintFlag ( m_onePictureOnlyConstraintFlag );
m_cEncLib.setIntraOnlyConstraintFlag ( m_intraConstraintFlag ); // NOTE: This setting is not used, and is confused with setIntraConstraintFlag
#if JVET_S0094_CHROMAFORMAT_BITDEPTH_CONSTRAINT
m_cEncLib.setMaxBitDepthConstraintIdc ( m_bitDepthConstraint );
#else
m_cEncLib.setMaxBitDepthConstraintIdc ( m_bitDepthConstraint - 8 );
#endif
m_cEncLib.setMaxChromaFormatConstraintIdc ( m_chromaFormatConstraint );
m_cEncLib.setFrameConstraintFlag ( m_bFrameConstraintFlag ); // NOTE: This setting is neither used nor setup, and is confused with setFrameOnlyConstraintFlag
m_cEncLib.setNoQtbttDualTreeIntraConstraintFlag ( !m_dualTree );
......
......@@ -1806,9 +1806,20 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] )
}
else // m_profile == Profile::NONE
{
#if JVET_S0094_CHROMAFORMAT_BITDEPTH_CONSTRAINT
m_bitDepthConstraint = 16; // max value - unconstrained.
#else
m_bitDepthConstraint = 8+15; // max value - unconstrained.
#endif
}
}
#if JVET_S0094_CHROMAFORMAT_BITDEPTH_CONSTRAINT
CHECK(m_bitDepthConstraint < m_internalBitDepth[CHANNEL_TYPE_LUMA], "MaxBitDepthConstraint setting does not allow the specified luma bit depth to be coded.");
CHECK(m_bitDepthConstraint < m_internalBitDepth[CHANNEL_TYPE_CHROMA], "MaxBitDepthConstraint setting does not allow the specified chroma bit depth to be coded.");
CHECK(m_chromaFormatConstraint < m_chromaFormatIDC, "MaxChromaFormatConstraint setting does not allow the specified chroma format to be coded.");
CHECK(m_chromaFormatConstraint >= NUM_CHROMA_FORMAT, "Bad value given for MaxChromaFormatConstraint setting.")
CHECK(m_bitDepthConstraint < 8 || m_bitDepthConstraint>16, "MaxBitDepthConstraint setting must be in the range 8 to 16 (inclusive)");
#endif
}
......
......@@ -221,8 +221,12 @@ static const int NUM_APS_TYPE_LEN = 3; //Curren
static const int MAX_NUM_APS_TYPE = 8; //Currently APS Type has 3 bits so the max type is 8
static const int MAX_TILE_COLS = 20; ///< Maximum number of tile columns
#if JVET_S0156_LEVEL_DEFINITION
static const int MAX_TILES = 440; ///< Maximum number of tiles
#else
static const int MAX_TILE_ROWS = 22; ///< Maximum number of tile rows
static const int MAX_TILES = MAX_TILE_COLS * MAX_TILE_ROWS; ///< Maximum number of tiles
#endif
static const int MAX_SLICES = 600; ///< Maximum number of slices per picture
static const int MLS_GRP_NUM = 1024; ///< Max number of coefficient groups, max(16, 256)
......@@ -307,10 +311,6 @@ static const int RExt__PREDICTION_WEIGHTING_ANALYSIS_DC_PRECISION = 0; ///< Addi
static const int MAX_TIMECODE_SEI_SETS = 3; ///< Maximum number of time sets
#if JVET_S0177_SCALABLE_NESTING_SEI
static const int VCL_ASSOCIATED_SEI_LIST_SIZE = 17;
#endif
static const int MAX_CU_DEPTH = 7; ///< log2(CTUSize)
static const int MAX_CU_SIZE = 1<<MAX_CU_DEPTH;
static const int MIN_CU_LOG2 = 2;
......
......@@ -63,8 +63,8 @@ static const LevelTierFeatures mainLevelTierInfo[] =
{ Level::LEVEL2_1, 245760, { 3000, 0 }, 20, 1, 1, 7372800ULL, { 3000, 0 }, { 2, 2} },
{ Level::LEVEL3 , 552960, { 6000, 0 }, 30, 4, 2, 16588800ULL, { 6000, 0 }, { 2, 2} },
{ Level::LEVEL3_1, 983040, { 10000, 0 }, 40, 9, 3, 33177600ULL, { 10000, 0 }, { 2, 2} },
{ Level::LEVEL4 , 2228224, { 12000, 30000 }, 75, 2, 5, 66846720ULL, { 12000, 30000 }, { 4, 4} },
{ Level::LEVEL4_1, 2228224, { 20000, 50000 }, 75, 2, 5, 133693440ULL, { 20000, 50000 }, { 4, 4} },
{ Level::LEVEL4 , 2228224, { 12000, 30000 }, 75, 25, 5, 66846720ULL, { 12000, 30000 }, { 4, 4} },
{ Level::LEVEL4_1, 2228224, { 20000, 50000 }, 75, 25, 5, 133693440ULL, { 20000, 50000 }, { 4, 4} },
{ Level::LEVEL5 , 8912896, { 25000, 100000 }, 200, 110, 10, 267386880ULL, { 25000, 100000 }, { 6, 4} },
{ Level::LEVEL5_1, 8912896, { 40000, 160000 }, 200, 110, 10, 534773760ULL, { 40000, 160000 }, { 8, 4} },
{ Level::LEVEL5_2, 8912896, { 60000, 240000 }, 200, 110, 10, 1069547520ULL, { 60000, 240000 }, { 8, 4} },
......
......@@ -3097,7 +3097,9 @@ void PPS::initTiles()
uint32_t uniformTileRowHeight = m_tileRowHeight[rowIdx - 1];
while( remainingHeightInCtu > 0 )
{
#if !JVET_S0156_LEVEL_DEFINITION
CHECK(rowIdx >= MAX_TILE_ROWS, "Number of tile rows exceeds valid range");
#endif
uniformTileRowHeight = std::min(remainingHeightInCtu, uniformTileRowHeight);
m_tileRowHeight.push_back( uniformTileRowHeight );
remainingHeightInCtu -= uniformTileRowHeight;
......
......@@ -326,8 +326,13 @@ public:
, m_oneSubpicPerPicConstraintFlag(false)
, m_frameOnlyConstraintFlag (false)
, m_intraOnlyConstraintFlag (false)
#if JVET_S0094_CHROMAFORMAT_BITDEPTH_CONSTRAINT
, m_maxBitDepthConstraintIdc ( 16)
, m_maxChromaFormatConstraintIdc(CHROMA_444)
#else
, m_maxBitDepthConstraintIdc ( 0)
, m_maxChromaFormatConstraintIdc(CHROMA_420)
#endif
, m_onePictureOnlyConstraintFlag (false)
, m_lowerBitRateConstraintFlag (false )
......@@ -2146,7 +2151,11 @@ public:
void setTileColumnWidths( std::vector<uint32_t> widths ) { m_tileColWidth = widths; }
void setTileRowHeights( std::vector<uint32_t> heights ) { m_tileRowHeight = heights; }
void addTileColumnWidth( uint32_t u ) { CHECK( m_tileColWidth.size() >= MAX_TILE_COLS, "Number of tile columns exceeds valid range" ); m_tileColWidth.push_back(u); }
#if JVET_S0156_LEVEL_DEFINITION
void addTileRowHeight( uint32_t u ) { m_tileRowHeight.push_back(u); }
#else
void addTileRowHeight( uint32_t u ) { CHECK( m_tileRowHeight.size() >= MAX_TILE_ROWS, "Number of tile rows exceeds valid range" ); m_tileRowHeight.push_back(u); }
#endif
uint32_t getTileColumnWidth( int idx ) const { CHECK( idx >= m_tileColWidth.size(), "Tile column index exceeds valid range" ); return m_tileColWidth[idx]; }
uint32_t getTileRowHeight( int idx ) const { CHECK( idx >= m_tileRowHeight.size(), "Tile row index exceeds valid range" ); return m_tileRowHeight[idx]; }
uint32_t getTileColumnBd( int idx ) const { CHECK( idx >= m_tileColBd.size(), "Tile column index exceeds valid range" ); return m_tileColBd[idx]; }
......
......@@ -51,6 +51,9 @@
#include <cassert>
//########### place macros to be removed in next cycle below this line ###############
#define JVET_S0081_NON_REFERENCED_PIC 1 // JVET-S0081: exclude non-referenced picture to be used as prevTid0 picture
#define JVET_R0433 1 // JVET-R0433: APS signaling and semantics cleanup
#define JVET_S0076_ASPECT1 1 // JVET-S0076: aspect 1: Move ph_non_ref_pic_flag to earlier position
......@@ -68,6 +71,9 @@
#define JVET_S0074_SPS_REORDER 1 // JVET-S0074: aspect 1, rearrange some syntax elements in SPS
#define JVET_S0234_ACT_CRS_FIX 1 // JVET-S0234: perform chroma residual scaling in RGB domain when ACT is on
#define JVET_S0094_CHROMAFORMAT_BITDEPTH_CONSTRAINT 1 // JVET-S0094: 0 for constraint flags for chroma format and bit depth mean unconstrained, by coding these constraints as subtractive
#define JVET_S0132_HLS_REORDER 1 // Rearrange syntax elements in SPS and PPS
#define JVET_S0221_NUM_VB_CHECK 1 // JVET_S0221: Constraints on the number of virtual boundaries
......@@ -91,6 +97,8 @@
#define JVET_S0156_LEVEL_DEFINITION 1 // JVET-S0156: On level definitions
#define JVET_S0064_SEI_BUFFERING_PERIOD_CLEANUP 1 // JVET-S0064: Conditionally signal bp_sublayer_dpb_output_offsets_present_flag
#define JVET_S0185_PROPOSAL2_SEI_CLEANUP 1 // JVET-S0185_PROPOSAL2: Move signalling of syntax element bp_alt_cpb_params_present_flag
#define JVET_S0181_PROPOSAL1 1 // JVET-0181_Proposal1: Conditionally signal bp_sublayer_initial_cpb_removal_delay_present_flag
......@@ -111,6 +119,12 @@
// Constrain the value of one_subpic_per_pic_constraint_flag, one_slice_per_pic_constraint_flag and no_aps_constraint_flag
// Remove all constraints that require GCI fields to be equal to a value that imposes a constraint
#define JVET_S0182_RPL_SIGNALLING 1 // JVET-S0182: modifications to rpl information signalling
#define JVET_S0185_PROPOSAl1_PICTURE_TIMING_CLEANUP 1 // JVET-S0185: Proposal 1, put syntax element pt_cpb_removal_delay_minus1[] first, followed by similar information for sub-layers, followed by pt_dpb_output_delay
#define JVET_S0184_VIRTUAL_BOUNDARY_CONSTRAINT 1 // JVET-S0184: Conformance constraints regarding virtual boundary signalling when subpictures are present
//########### place macros to be be kept below this line ###############
#define JVET_S0257_DUMP_360SEI_MESSAGE 1 // Software support of 360 SEI messages
......
......@@ -42,6 +42,7 @@
#include "CommonLib/dtrace_buffer.h"
#include "CommonLib/Buffer.h"
#include "CommonLib/UnitTools.h"
#include "CommonLib/ProfileLevelTier.h"
#include <fstream>
#include <set>
......@@ -1857,6 +1858,13 @@ void DecLib::xCheckParameterSetConstraints(const int layerId)
{
CHECK( !sps->getPtlDpbHrdParamsPresentFlag(), "When sps_video_parameter_set_id is greater than 0 and there is an OLS that contains only one layer with nuh_layer_id equal to the nuh_layer_id of the SPS, the value of sps_ptl_dpb_hrd_params_present_flag shall be equal to 1" );
}
#if JVET_S0156_LEVEL_DEFINITION
ProfileLevelTierFeatures ptlFeature;
ptlFeature.extractPTLInformation(*sps);
CHECK(pps->getNumTileColumns() > ptlFeature.getLevelTierFeatures()->maxTileCols, "Num tile columns signaled in PPS exceed level limits");
CHECK(pps->getNumTiles() > ptlFeature.getLevelTierFeatures()->maxTilesPerAu, "Num tiles signaled in PPS exceed level limits");
#endif
}
......
......@@ -290,7 +290,17 @@ protected:
void xDecodeSPS( InputNALUnit& nalu );
void xDecodePPS( InputNALUnit& nalu );
void xDecodeAPS(InputNALUnit& nalu);
#if JVET_S0081_NON_REFERENCED_PIC
void xUpdatePreviousTid0POC(Slice *pSlice)
{
if( (pSlice->getTLayer() == 0) && (pSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_RASL) && (pSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_RADL) && !pSlice->getPicHeader()->getNonReferencePictureFlag() )
{
m_prevTid0POC = pSlice->getPOC();
}
}
#else
void xUpdatePreviousTid0POC(Slice *pSlice) { if ((pSlice->getTLayer() == 0) && (pSlice->getNalUnitType()!=NAL_UNIT_CODED_SLICE_RASL) && (pSlice->getNalUnitType()!=NAL_UNIT_CODED_SLICE_RADL)) { m_prevTid0POC = pSlice->getPOC(); } }
#endif
void xParsePrefixSEImessages();
void xParsePrefixSEIsForUnknownVCLNal();
......
......@@ -559,8 +559,18 @@ void SEIReader::xParseSEIScalableNesting(SEIScalableNesting& sei, const NalUnitT
tmpSEIs.clear();
}
xCheckScalableNestingConstraints(sei, nalUnitType, vps);
if (decodedMessageOutputStream)
{
(*decodedMessageOutputStream) << "End of scalable nesting SEI message\n";
}
}
void SEIReader::xCheckScalableNestingConstraints(const SEIScalableNesting& sei, const NalUnitType nalUnitType, const VPS* vps)
{
#if JVET_S0177_SCALABLE_NESTING_SEI
int vclAssociatedSeiList[VCL_ASSOCIATED_SEI_LIST_SIZE] = { 3, 19, 45, 129, 137, 144, 145, 147, 148, 149, 150, 153, 154, 155, 156, 168, 204 };
const std::vector<int> vclAssociatedSeiList { 3, 19, 45, 129, 137, 144, 145, 147, 148, 149, 150, 153, 154, 155, 156, 168, 204 };
bool containBPorPTorDUIorSLI = false;
bool containNoBPorPTorDUIorSLI = false;
......@@ -569,15 +579,19 @@ void SEIReader::xParseSEIScalableNesting(SEIScalableNesting& sei, const NalUnitT
{
CHECK(nestedsei->payloadType() == SEI::FILLER_PAYLOAD || nestedsei->payloadType() == SEI::SCALABLE_NESTING, "An SEI message that has payloadType equal to filler payload or scalable nesting shall not be contained in a scalable nesting SEI message");
CHECK(nestedsei->payloadType() != SEI::FILLER_PAYLOAD && nestedsei->payloadType() != SEI::DECODED_PICTURE_HASH && nalUnitType != NAL_UNIT_PREFIX_SEI, "When a scalable nesting SEI message contains an SEI message that has payloadType not equal to filler payload or decoded picture harsh, the SEI NAL unit containing the scalable nesting SEI message shall have nal_unit_type equal to PREFIX_SEI_NUT");
CHECK(nestedsei->payloadType() != SEI::FILLER_PAYLOAD && nestedsei->payloadType() != SEI::DECODED_PICTURE_HASH && nalUnitType != NAL_UNIT_PREFIX_SEI, "When a scalable nesting SEI message contains an SEI message that has payloadType not equal to filler payload or decoded picture hash, the SEI NAL unit containing the scalable nesting SEI message shall have nal_unit_type equal to PREFIX_SEI_NUT");
CHECK(nestedsei->payloadType() == SEI::DECODED_PICTURE_HASH && nalUnitType != NAL_UNIT_SUFFIX_SEI, "When a scalable nesting SEI message contains an SEI message that has payloadType equal to decoded picture harsh, the SEI NAL unit containing the scalable nesting SEI message shall have nal_unit_type equal to SUFFIX_SEI_NUT");
CHECK(nestedsei->payloadType() == SEI::DECODED_PICTURE_HASH && nalUnitType != NAL_UNIT_SUFFIX_SEI, "When a scalable nesting SEI message contains an SEI message that has payloadType equal to decoded picture hash, the SEI NAL unit containing the scalable nesting SEI message shall have nal_unit_type equal to SUFFIX_SEI_NUT");
CHECK(nestedsei->payloadType() == SEI::DECODED_PICTURE_HASH && !sei.m_snSubpicFlag, "When the scalable nesting SEI message contains an SEI message that has payloadType equal to decoded picture hash, the value of sn_subpic_flag shall be equal to 1");
CHECK(nestedsei->payloadType() == SEI::SUBPICTURE_LEVEL_INFO && sei.m_snSubpicFlag, "When the scalable nesting SEI message contains an SEI message that has payloadType equal to SLI, the value of sn_subpic_flag shall be equal to 0");
for (int i = 0; i < VCL_ASSOCIATED_SEI_LIST_SIZE; i++)
#if JVET_S0178_GENERAL_SEI_CHECK
CHECK(vps->getGeneralHrdParameters()->getGeneralSamePicTimingInAllOlsFlag() && nestedsei->payloadType() == SEI::PICTURE_TIMING, "When general_same_pic_timing_in_all_ols_flag is equal to 1, there shall be no SEI NAL unit that contain a scalable-nested SEI message with payloadType equal to PT");
#endif
for (int i = 0; i < vclAssociatedSeiList.size(); i++)
{
CHECK(nestedsei->payloadType() == vclAssociatedSeiList[i] && sei.m_snOlsFlag, "When the scalable nesting SEI message contains an SEI message that has payloadType equal to a value in vclAssociatedSeiList, the value of sn_ols_flag shall be equal to 0");
}
......@@ -612,11 +626,6 @@ void SEIReader::xParseSEIScalableNesting(SEIScalableNesting& sei, const NalUnitT
}
CHECK(containBPorPTorDUI && containNoBPorPTorDUI, "Scalable Nesting SEI cannot contain timing-related SEI and none-timing-related SEIs at the same time");
#endif
if (decodedMessageOutputStream)
{
(*decodedMessageOutputStream) << "End of scalable nesting SEI message\n";
}
}
void SEIReader::xParseSEIDecodingUnitInfo(SEIDecodingUnitInfo& sei, uint32_t payloadSize, const SEIBufferingPeriod& bp, const uint32_t temporalId, std::ostream *pDecodedMessageOutputStream)
......@@ -760,8 +769,8 @@ void SEIReader::xParseSEIBufferingPeriod(SEIBufferingPeriod& sei, uint32_t paylo
}
#else
sei_read_flag(pDecodedMessageOutputStream, code, "sublayer_initial_cpb_removal_delay_present_flag");
#endif
sei.m_sublayerInitialCpbRemovalDelayPresentFlag = code;
#endif
for (i = (sei.m_sublayerInitialCpbRemovalDelayPresentFlag ? 0 : sei.m_bpMaxSubLayers - 1); i < sei.m_bpMaxSubLayers; i++)
{
for( nalOrVcl = 0; nalOrVcl < 2; nalOrVcl ++ )
......@@ -779,8 +788,20 @@ void SEIReader::xParseSEIBufferingPeriod(SEIBufferingPeriod& sei, uint32_t paylo
}
}
}
#if JVET_S0064_SEI_BUFFERING_PERIOD_CLEANUP
if (sei.m_bpMaxSubLayers-1 > 0)
{
sei_read_flag(pDecodedMessageOutputStream, code, "bp_sublayer_dpb_output_offsets_present_flag");
sei.m_sublayerDpbOutputOffsetsPresentFlag = code;
}
else
{
sei.m_sublayerDpbOutputOffsetsPresentFlag = false;
}
#else
sei_read_flag( pDecodedMessageOutputStream, code, "sublayer_dpb_output_offsets_present_flag" );
sei.m_sublayerDpbOutputOffsetsPresentFlag = code;
#endif
if(sei.m_sublayerDpbOutputOffsetsPresentFlag)
{
for(int i = 0; i < sei.m_bpMaxSubLayers - 1; i++)
......@@ -807,8 +828,49 @@ void SEIReader::xParseSEIPictureTiming(SEIPictureTiming& sei, uint32_t payloadSi
output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize);
uint32_t symbol;
#if JVET_S0185_PROPOSAl1_PICTURE_TIMING_CLEANUP
sei_read_code( pDecodedMessageOutputStream, bp.m_cpbRemovalDelayLength, symbol, "pt_cpb_removal_delay_minus1[bp_max_sub_layers_minus1]" );
sei.m_auCpbRemovalDelay[bp.m_bpMaxSubLayers - 1] = symbol + 1;
for (int i = temporalId; i < bp.m_bpMaxSubLayers - 1; i++)
{
sei_read_flag(pDecodedMessageOutputStream, symbol, "pt_sub_layer_delays_present_flag[i]");
sei.m_ptSubLayerDelaysPresentFlag[i] = (symbol == 1);
if (sei.m_ptSubLayerDelaysPresentFlag[i])
{
if (bp.m_cpbRemovalDelayDeltasPresentFlag)
{
sei_read_flag(pDecodedMessageOutputStream, symbol, "pt_cpb_removal_delay_delta_enabled_flag[i]");
sei.m_cpbRemovalDelayDeltaEnabledFlag[i] = (symbol == 1);
}
else
{
sei.m_cpbRemovalDelayDeltaEnabledFlag[i] = false;
}
if (sei.m_cpbRemovalDelayDeltaEnabledFlag[i])
{
if ((bp.m_numCpbRemovalDelayDeltas - 1) > 0)
{
sei_read_code(pDecodedMessageOutputStream, ceilLog2(bp.m_numCpbRemovalDelayDeltas), symbol, "pt_cpb_removal_delay_delta_idx[i]");
sei.m_cpbRemovalDelayDeltaIdx[i] = symbol;
}
else
{
sei.m_cpbRemovalDelayDeltaIdx[i] = 0;
}
}
else
{
sei_read_code(pDecodedMessageOutputStream, bp.m_cpbRemovalDelayLength, symbol, "pt_cpb_removal_delay_minus1[i]");
sei.m_auCpbRemovalDelay[i] = symbol + 1;
}
}
}
sei_read_code(pDecodedMessageOutputStream, bp.m_dpbOutputDelayLength, symbol, "pt_dpb_output_delay");
sei.m_picDpbOutputDelay = symbol;
#else
sei_read_code( pDecodedMessageOutputStream, bp.m_cpbRemovalDelayLength, symbol, "cpb_removal_delay_minus1[bp_max_sub_layers_minus1]" );
sei.m_auCpbRemovalDelay[bp.m_bpMaxSubLayers - 1] = symbol + 1;
#endif
if( bp.m_altCpbParamsPresentFlag )
{
......@@ -902,6 +964,7 @@ void SEIReader::xParseSEIPictureTiming(SEIPictureTiming& sei, uint32_t payloadSi
}
}
#if !JVET_S0185_PROPOSAl1_PICTURE_TIMING_CLEANUP
for( int i = temporalId; i < bp.m_bpMaxSubLayers - 1; i ++ )
{
sei_read_flag( pDecodedMessageOutputStream, symbol, "pt_sub_layer_delays_present_flag[i]" ); sei.m_ptSubLayerDelaysPresentFlag[i] = (symbol == 1);
......@@ -937,6 +1000,7 @@ void SEIReader::xParseSEIPictureTiming(SEIPictureTiming& sei, uint32_t payloadSi
}
sei_read_code( pDecodedMessageOutputStream, bp.m_dpbOutputDelayLength, symbol, "dpb_output_delay" );
sei.m_picDpbOutputDelay = symbol;
#endif
if ( bp.m_bpDecodingUnitHrdParamsPresentFlag && bp.m_decodingUnitDpbDuParamsInPicTimingSeiFlag )
{
sei_read_code( pDecodedMessageOutputStream, bp.getDpbOutputDelayDuLength(), symbol, "pic_dpb_output_du_delay" );
......
......@@ -65,6 +65,7 @@ protected:
void xParseSEIBufferingPeriod (SEIBufferingPeriod& sei, uint32_t payloadSize, std::ostream *pDecodedMessageOutputStream);
void xParseSEIPictureTiming (SEIPictureTiming& sei, uint32_t payloadSize, const uint32_t temporalId, const SEIBufferingPeriod& bp, std::ostream *pDecodedMessageOutputStream);
void xParseSEIScalableNesting (SEIScalableNesting& sei, const NalUnitType nalUnitType, const uint32_t nuhLayerId, uint32_t payloadSize, const VPS *vps, const SPS *sps, std::ostream *decodedMessageOutputStream);
void xCheckScalableNestingConstraints (const SEIScalableNesting& sei, const NalUnitType nalUnitType, const VPS* vps);
void xParseSEIFrameFieldinfo (SEIFrameFieldInfo& sei, const SEIPictureTiming& pt, uint32_t payloadSize, std::ostream *pDecodedMessageOutputStream);
void xParseSEIDependentRAPIndication (SEIDependentRAPIndication& sei, uint32_t payLoadSize, std::ostream *pDecodedMessageOutputStream);
void xParseSEIFramePacking (SEIFramePacking& sei, uint32_t payloadSize, std::ostream *pDecodedMessageOutputStream);
......
......@@ -325,7 +325,11 @@ void HLSyntaxReader::parseRefPicList(SPS* sps, ReferencePictureList* rpl, int rp
uint32_t numLtrp = 0;
uint32_t numIlrp = 0;
#if JVET_S0182_RPL_SIGNALLING
if (sps->getLongTermRefsPresent() && numRefPic > 0 && rplIdx != -1)
#else
if (sps->getLongTermRefsPresent() && rplIdx != -1)
#endif
{
READ_FLAG(code, "ltrp_in_slice_header_flag[ listIdx ][ rplsIdx ]");
rpl->setLtrpInSliceHeaderFlag(code);
......@@ -496,7 +500,9 @@ void HLSyntaxReader::parsePPS( PPS* pcPPS )
READ_UVLC( uiCode, "num_exp_tile_columns_minus1" ); pcPPS->setNumExpTileColumns( uiCode + 1 );
READ_UVLC( uiCode, "num_exp_tile_rows_minus1" ); pcPPS->setNumExpTileRows( uiCode + 1 );
CHECK(pcPPS->getNumExpTileColumns() > MAX_TILE_COLS, "Number of explicit tile columns exceeds valid range");
#if !JVET_S0156_LEVEL_DEFINITION
CHECK(pcPPS->getNumExpTileRows() > MAX_TILE_ROWS, "Number of explicit tile rows exceeds valid range");
#endif
// tile sizes
for( colIdx = 0; colIdx < pcPPS->getNumExpTileColumns(); colIdx++ )
......@@ -2813,7 +2819,9 @@ void HLSyntaxReader::parsePictureHeader( PicHeader* picHeader, ParameterSetManag
{
READ_FLAG( uiCode, "ph_virtual_boundaries_present_flag" );
picHeader->setVirtualBoundariesPresentFlag( uiCode != 0 );
#if !JVET_S0184_VIRTUAL_BOUNDARY_CONSTRAINT
CHECK( sps->getSubPicInfoPresentFlag() && picHeader->getVirtualBoundariesPresentFlag(), "When the subpicture info is present, the signalling of the virtual boundary position, if present, shall be in SPS" );
#endif
if( picHeader->getVirtualBoundariesPresentFlag() )
{
READ_CODE( 2, uiCode, "ph_num_ver_virtual_boundaries"); picHeader->setNumVerVirtualBoundaries( uiCode );
......@@ -3503,6 +3511,10 @@ void HLSyntaxReader::parseSliceHeader (Slice* pcSlice, PicHeader* picHeader, Par
#if !JVET_S0052_RM_SEPARATE_COLOUR_PLANE
CHECK(pcSlice->getPictureHeaderInSliceHeader() && sps->getSeparateColourPlaneFlag() == 1, "when separate_colour_plane_flag is equal to 1, the value of picture_header_in_slice_header_flag shall be equal to 0");
#endif
#if JVET_S0184_VIRTUAL_BOUNDARY_CONSTRAINT
CHECK(sps->getSubPicInfoPresentFlag() == 1 && sps->getVirtualBoundariesEnabledFlag() == 1 && sps->getVirtualBoundariesPresentFlag() == 0,
"when sps_subpic_info_present_flag is equal to 1 and sps_virtual_boundaries_enabled_flag is equal to 1, sps_virtual_boundaries_present_flag shall be equal 1");
#endif
const ChromaFormat chFmt = sps->getChromaFormatIdc();
const uint32_t numValidComp=getNumberValidComponents(chFmt);
......@@ -4481,8 +4493,15 @@ void HLSyntaxReader::parseConstraintInfo(ConstraintInfo *cinfo)
READ_FLAG(symbol, "general_one_picture_only_constraint_flag" ); cinfo->setOnePictureOnlyConstraintFlag(symbol ? true : false);
READ_FLAG(symbol, "intra_only_constraint_flag" ); cinfo->setIntraOnlyConstraintFlag(symbol ? true : false);
#if JVET_S0094_CHROMAFORMAT_BITDEPTH_CONSTRAINT
READ_CODE(4, symbol, "gci_sixteen_minus_max_bitdepth_constraint_idc" ); cinfo->setMaxBitDepthConstraintIdc(symbol>8 ? 16 : (16-symbol));
CHECK(symbol>8, "gci_sixteen_minus_max_bitdepth_constraint_idc shall be in the range 0 to 8, inclusive");
READ_CODE(2, symbol, "gci_three_minus_max_chroma_format_constraint_idc" ); cinfo->setMaxChromaFormatConstraintIdc((ChromaFormat)(3-symbol));
printf("Decoded %d, %d\n", cinfo->getMaxBitDepthConstraintIdc(), cinfo->getMaxChromaFormatConstraintIdc());
#else
READ_CODE(4, symbol, "max_bitdepth_constraint_idc" ); cinfo->setMaxBitDepthConstraintIdc(symbol);
READ_CODE(2, symbol, "max_chroma_format_constraint_idc" ); cinfo->setMaxChromaFormatConstraintIdc((ChromaFormat)symbol);
#endif
READ_FLAG(symbol, "single_layer_constraint_flag"); cinfo->setSingleLayerConstraintFlag(symbol ? true : false);
READ_FLAG(symbol, "all_layers_independent_constraint_flag"); cinfo->setAllLayersIndependentConstraintFlag(symbol ? true : false);
#if !JVET_S0050_GCI
......
......@@ -429,7 +429,7 @@ void EncGOP::xWriteAccessUnitDelimiter (AccessUnit &accessUnit, Slice *slice)
}
// write SEI list into one NAL unit and add it to the Access unit at auPos
void EncGOP::xWriteSEI (NalUnitType naluType, SEIMessages& seiMessages, AccessUnit &accessUnit, AccessUnit::iterator &auPos, int temporalId, const SPS *sps)
void EncGOP::xWriteSEI (NalUnitType naluType, SEIMessages& seiMessages, AccessUnit &accessUnit, AccessUnit::iterator &auPos, int temporalId)
{
// don't do anything, if we get an empty list
if (seiMessages.empty())
......@@ -437,12 +437,12 @@ void EncGOP::xWriteSEI (NalUnitType naluType, SEIMessages& seiMessages, AccessUn
return;
}
OutputNALUnit nalu( naluType, m_pcEncLib->getLayerId(), temporalId );
m_seiWriter.writeSEImessages(nalu.m_Bitstream, seiMessages, sps, *m_HRD, false, temporalId);
m_seiWriter.writeSEImessages(nalu.m_Bitstream, seiMessages, *m_HRD, false, temporalId);
auPos = accessUnit.insert(auPos, new NALUnitEBSP(nalu));
auPos++;
}
void EncGOP::xWriteSEISeparately (NalUnitType naluType, SEIMessages& seiMessages, AccessUnit &accessUnit, AccessUnit::iterator &auPos, int temporalId, const SPS *sps)
void EncGOP::xWriteSEISeparately (NalUnitType naluType, SEIMessages& seiMessages, AccessUnit &accessUnit, AccessUnit::iterator &auPos, int temporalId)
{
// don't do anything, if we get an empty list
if (seiMessages.empty())
......@@ -454,7 +454,7 @@ void EncGOP::xWriteSEISeparately (NalUnitType naluType, SEIMessages& seiMessages
SEIMessages tmpMessages;
tmpMessages.push_back(*sei);
OutputNALUnit nalu( naluType, m_pcEncLib->getLayerId(), temporalId );
m_seiWriter.writeSEImessages(nalu.m_Bitstream, tmpMessages, sps, *m_HRD, false, temporalId);
m_seiWriter.writeSEImessages(nalu.m_Bitstream, tmpMessages, *m_HRD, false, temporalId);
auPos = accessUnit.insert(auPos, new NALUnitEBSP(nalu));
auPos++;
}
......@@ -473,7 +473,7 @@ void EncGOP::xClearSEIs(SEIMessages& seiMessages, bool deleteMessages)
}
// write SEI messages as separate NAL units ordered
void EncGOP::xWriteLeadingSEIOrdered (SEIMessages& seiMessages, SEIMessages& duInfoSeiMessages, AccessUnit &accessUnit, int temporalId, const SPS *sps, bool testWrite)
void EncGOP::xWriteLeadingSEIOrdered (SEIMessages& seiMessages, SEIMessages& duInfoSeiMessages, AccessUnit &accessUnit, int temporalId, bool testWrite)
{
AccessUnit::iterator itNalu = accessUnit.begin();
......@@ -500,13 +500,13 @@ void EncGOP::xWriteLeadingSEIOrdered (SEIMessages& seiMessages, SEIMessages& duI
// Buffering period SEI must always be following active parameter sets
currentMessages = extractSeisByType(localMessages, SEI::BUFFERING_PERIOD);
CHECK(!(currentMessages.size() <= 1), "Unspecified error");
xWriteSEI(NAL_UNIT_PREFIX_SEI, currentMessages, accessUnit, itNalu, temporalId, sps);
xWriteSEI(NAL_UNIT_PREFIX_SEI, currentMessages, accessUnit, itNalu, temporalId);
xClearSEIs(currentMessages, !testWrite);
// Picture timing SEI must always be following buffering period
currentMessages = extractSeisByType(localMessages, SEI::PICTURE_TIMING);
CHECK(!(currentMessages.size() <= 1), "Unspecified error");
xWriteSEI(NAL_UNIT_PREFIX_SEI, currentMessages, accessUnit, itNalu, temporalId, sps);
xWriteSEI(NAL_UNIT_PREFIX_SEI, currentMessages, accessUnit, itNalu, temporalId);
xClearSEIs(currentMessages, !testWrite);
// Decoding unit info SEI must always be following picture timing
......@@ -517,7 +517,7 @@ void EncGOP::xWriteLeadingSEIOrdered (SEIMessages& seiMessages, SEIMessages& duI
{
duInfoSeiMessages.pop_front();
}
xWriteSEI(NAL_UNIT_PREFIX_SEI, currentMessages, accessUnit, itNalu, temporalId, sps);
xWriteSEI(NAL_UNIT_PREFIX_SEI, currentMessages, accessUnit, itNalu, temporalId);
xClearSEIs(currentMessages, !testWrite);
}
......@@ -525,13 +525,13 @@ void EncGOP::xWriteLeadingSEIOrdered (SEIMessages& seiMessages, SEIMessages& duI
{
// Scalable nesting SEI must always be the following DU info
currentMessages = extractSeisByType(localMessages, SEI::SCALABLE_NESTING);
xWriteSEISeparately(NAL_UNIT_PREFIX_SEI, currentMessages, accessUnit, itNalu, temporalId, sps);
xWriteSEISeparately(NAL_UNIT_PREFIX_SEI, currentMessages, accessUnit, itNalu, temporalId);
xClearSEIs(currentMessages, !testWrite);
}
// And finally everything else one by one
xWriteSEISeparately(NAL_UNIT_PREFIX_SEI, localMessages, accessUnit, itNalu, temporalId, sps);
xWriteSEISeparately(NAL_UNIT_PREFIX_SEI, localMessages, accessUnit, itNalu, temporalId);
xClearSEIs(localMessages, !testWrite);
if (!testWrite)
......@@ -549,26 +549,26 @@ void EncGOP::xWriteLeadingSEIMessages (SEIMessages& seiMessages, SEIMessages& du
SEIPictureTiming * picTiming = picTimingSEIs.empty() ? NULL : (SEIPictureTiming*) picTimingSEIs.front();
// test writing
xWriteLeadingSEIOrdered(seiMessages, duInfoSeiMessages, testAU, temporalId, sps, true);
xWriteLeadingSEIOrdered(seiMessages, duInfoSeiMessages, testAU, temporalId, true);
// update Timing and DU info SEI
xUpdateDuData(testAU, duData);
xUpdateTimingSEI(picTiming, duData, sps);
xUpdateDuInfoSEI(duInfoSeiMessages, picTiming, sps->getMaxTLayers());
// actual writing
xWriteLeadingSEIOrdered(seiMessages, duInfoSeiMessages, accessUnit, temporalId, sps, false);
xWriteLeadingSEIOrdered(seiMessages, duInfoSeiMessages, accessUnit, temporalId, false);
// testAU will automatically be cleaned up when losing scope
}
void EncGOP::xWriteTrailingSEIMessages (SEIMessages& seiMessages, AccessUnit &accessUnit, int temporalId, const SPS *sps)
void EncGOP::xWriteTrailingSEIMessages (SEIMessages& seiMessages, AccessUnit &accessUnit, int temporalId)
{
// Note: using accessUnit.end() works only as long as this function is called after slice coding and before EOS/EOB NAL units
AccessUnit::iterator pos = accessUnit.end();
xWriteSEISeparately(NAL_UNIT_SUFFIX_SEI, seiMessages, accessUnit, pos, temporalId, sps);
xWriteSEISeparately(NAL_UNIT_SUFFIX_SEI, seiMessages, accessUnit, pos, temporalId);
deleteSEIs(seiMessages);
}
void EncGOP::xWriteDuSEIMessages (SEIMessages& duInfoSeiMessages, AccessUnit &accessUnit, int temporalId, const SPS *sps, std::deque<DUData> &duData)
void EncGOP::xWriteDuSEIMessages (SEIMessages& duInfoSeiMessages, AccessUnit &accessUnit, int temporalId, std::deque<DUData> &duData)
{
if( m_pcCfg->getDecodingUnitInfoSEIEnabled() && m_HRD->getBufferingPeriodSEI()->m_decodingUnitCpbParamsInPicTimingSeiFlag )
{
......@@ -595,7 +595,7 @@ void EncGOP::xWriteDuSEIMessages (SEIMessages& duInfoSeiMessages, AccessUnit &ac
// write the next SEI
SEIMessages tmpSEI;
tmpSEI.push_back(*duSEI);
xWriteSEI(NAL_UNIT_PREFIX_SEI, tmpSEI, accessUnit, nalu, temporalId, sps);
xWriteSEI(NAL_UNIT_PREFIX_SEI, tmpSEI, accessUnit, nalu, temporalId);
// nalu points to the position after the SEI, so we have to increase the index as well
naluIdx++;
while ((naluIdx < duData[duIdx].accumNalsDU) && nalu!=accessUnit.end())
......@@ -3512,7 +3512,7 @@ void EncGOP::compressGOP( int iPOCLast, int iNumPicRcvd, PicList& rcListPic,
xCalculateAddPSNRs(isField, isTff, iGOPid, pcPic, accessUnit, rcListPic, encTime, snr_conversion, printFrameMSE, &PSNR_Y, isEncodeLtRef );
xWriteTrailingSEIMessages(trailingSeiMessages, accessUnit, pcSlice->getTLayer(), pcSlice->getSPS());
xWriteTrailingSEIMessages(trailingSeiMessages, accessUnit, pcSlice->getTLayer());
printHash(m_pcCfg->getDecodedPictureHashSEIType(), digestStr);
......@@ -3581,7 +3581,7 @@ void EncGOP::compressGOP( int iPOCLast, int iNumPicRcvd, PicList& rcListPic,
}
xWriteLeadingSEIMessages( leadingSeiMessages, duInfoSeiMessages, accessUnit, pcSlice->getTLayer(), pcSlice->getSPS(), duData );
xWriteDuSEIMessages( duInfoSeiMessages, accessUnit, pcSlice->getTLayer(), pcSlice->getSPS(), duData );
xWriteDuSEIMessages( duInfoSeiMessages, accessUnit, pcSlice->getTLayer(), duData );
m_AUWriterIf->outputAU( accessUnit );
......
......@@ -308,13 +308,13 @@ protected:
void xUpdateTimingSEI(SEIPictureTiming *pictureTimingSEI, std::deque<DUData> &duData, const SPS *sps);
void xUpdateDuInfoSEI(SEIMessages &duInfoSeiMessages, SEIPictureTiming *pictureTimingSEI, int maxSubLayers);
void xCreateScalableNestingSEI(SEIMessages& seiMessages, SEIMessages& nestedSeiMessages, const std::vector<uint16_t>& subpicIDs);
void xWriteSEI (NalUnitType naluType, SEIMessages& seiMessages, AccessUnit &accessUnit, AccessUnit::iterator &auPos, int temporalId, const SPS *sps);
void xWriteSEISeparately (NalUnitType naluType, SEIMessages& seiMessages, AccessUnit &accessUnit, AccessUnit::iterator &auPos, int temporalId, const SPS *sps);
void xWriteSEI (NalUnitType naluType, SEIMessages& seiMessages, AccessUnit &accessUnit, AccessUnit::iterator &auPos, int temporalId);
void xWriteSEISeparately (NalUnitType naluType, SEIMessages& seiMessages, AccessUnit &accessUnit, AccessUnit::iterator &auPos, int temporalId);
void xClearSEIs(SEIMessages& seiMessages, bool deleteMessages);
void xWriteLeadingSEIOrdered (SEIMessages& seiMessages, SEIMessages& duInfoSeiMessages, AccessUnit &accessUnit, int temporalId, const SPS *sps, bool testWrite);
void xWriteLeadingSEIOrdered (SEIMessages& seiMessages, SEIMessages& duInfoSeiMessages, AccessUnit &accessUnit, int temporalId, bool testWrite);
void xWriteLeadingSEIMessages (SEIMessages& seiMessages, SEIMessages& duInfoSeiMessages, AccessUnit &accessUnit, int temporalId, const SPS *sps, std::deque<DUData> &duData);
void xWriteTrailingSEIMessages (SEIMessages& seiMessages, AccessUnit &accessUnit, int temporalId, const SPS *sps);
void xWriteDuSEIMessages (SEIMessages& duInfoSeiMessages, AccessUnit &accessUnit, int temporalId, const SPS *sps, std::deque<DUData> &duData);
void xWriteTrailingSEIMessages (SEIMessages& seiMessages, AccessUnit &accessUnit, int temporalId);
void xWriteDuSEIMessages (SEIMessages& duInfoSeiMessages, AccessUnit &accessUnit, int temporalId, std::deque<DUData> &duData);
int xWriteVPS (AccessUnit &accessUnit, const VPS *vps);
int xWriteDCI (AccessUnit &accessUnit, const DCI *dci);
......
......@@ -41,7 +41,7 @@
//! \ingroup EncoderLib
//! \{
void SEIWriter::xWriteSEIpayloadData(OutputBitstream &bs, const SEI& sei, const SPS *sps, HRD &hrd, const uint32_t temporalId)
void SEIWriter::xWriteSEIpayloadData(OutputBitstream &bs, const SEI& sei, HRD &hrd, const uint32_t temporalId)
{
const SEIBufferingPeriod *bp = NULL;
switch (sei.payloadType())
......@@ -55,7 +55,7 @@ void SEIWriter::xWriteSEIpayloadData(OutputBitstream &bs, const SEI& sei, const
xWriteSEIDecodingUnitInfo(*static_cast<const SEIDecodingUnitInfo*>(& sei), *bp, temporalId);
break;
case SEI::SCALABLE_NESTING:
xWriteSEIScalableNesting(bs, *static_cast<const SEIScalableNesting*>(&sei), sps);
xWriteSEIScalableNesting(bs, *static_cast<const SEIScalableNesting*>(&sei));
break;
case SEI::DECODED_PICTURE_HASH:
xWriteSEIDecodedPictureHash(*static_cast<const SEIDecodedPictureHash*>(&sei));
......@@ -137,7 +137,7 @@ void SEIWriter::xWriteSEIpayloadData(OutputBitstream &bs, const SEI& sei, const
/**
* marshal all SEI messages in provided list into one bitstream bs
*/
void SEIWriter::writeSEImessages(OutputBitstream& bs, const SEIMessages &seiList, const SPS *sps, HRD &hrd, bool isNested, const uint32_t temporalId)
void SEIWriter::writeSEImessages(OutputBitstream& bs, const SEIMessages &seiList, HRD &hrd, bool isNested, const uint32_t temporalId)
{
#if ENABLE_TRACING
if (g_HLSTraceEnable)
......@@ -157,7 +157,7 @@ void SEIWriter::writeSEImessages(OutputBitstream& bs, const SEIMessages &seiList
bool traceEnable = g_HLSTraceEnable;
g_HLSTraceEnable = false;
#endif
xWriteSEIpayloadData(bs_count, **sei, sps, hrd, temporalId);
xWriteSEIpayloadData(bs_count, **sei, hrd, temporalId);
#if ENABLE_TRACING
g_HLSTraceEnable = traceEnable;
#endif
......@@ -185,7 +185,7 @@ void SEIWriter::writeSEImessages(OutputBitstream& bs, const SEIMessages &seiList
xTraceSEIMessageType((*sei)->payloadType());
#endif
xWriteSEIpayloadData(bs, **sei, sps, hrd, temporalId);
xWriteSEIpayloadData(bs, **sei, hrd, temporalId);
}
if (!isNested)
{
......@@ -345,7 +345,15 @@ void SEIWriter::xWriteSEIBufferingPeriod(const SEIBufferingPeriod& sei)
}
}
}
#if JVET_S0064_SEI_BUFFERING_PERIOD_CLEANUP
if (sei.m_bpMaxSubLayers-1 > 0)
{
WRITE_FLAG(sei.m_sublayerDpbOutputOffsetsPresentFlag, "bp_sublayer_dpb_output_offsets_present_flag");
}
#else
WRITE_FLAG(sei.m_sublayerDpbOutputOffsetsPresentFlag, "sublayer_dpb_output_offsets_present_flag");
#endif
if(sei.m_sublayerDpbOutputOffsetsPresentFlag)
{
for(int i = 0; i < sei.m_bpMaxSubLayers - 1; i++)
......@@ -366,7 +374,34 @@ void SEIWriter::xWriteSEIBufferingPeriod(const SEIBufferingPeriod& sei)
void SEIWriter::xWriteSEIPictureTiming(const SEIPictureTiming& sei, const SEIBufferingPeriod &bp, const uint32_t temporalId)
{
#if JVET_S0185_PROPOSAl1_PICTURE_TIMING_CLEANUP
WRITE_CODE( sei.m_auCpbRemovalDelay[bp.m_bpMaxSubLayers - 1] - 1, bp.m_cpbRemovalDelayLength, "pt_cpb_removal_delay_minus1[bp_max_sub_layers_minus1]" );
for (int i = temporalId; i < bp.m_bpMaxSubLayers - 1; i++)
{
WRITE_FLAG(sei.m_ptSubLayerDelaysPresentFlag[i], "pt_sub_layer_delays_present_flag[i]");
if (sei.m_ptSubLayerDelaysPresentFlag[i])
{
if (bp.m_cpbRemovalDelayDeltasPresentFlag)
{
WRITE_FLAG(sei.m_cpbRemovalDelayDeltaEnabledFlag[i], "pt_cpb_removal_delay_delta_enabled_flag[i]");
}
if (sei.m_cpbRemovalDelayDeltaEnabledFlag[i])
{
if ((bp.m_numCpbRemovalDelayDeltas - 1) > 0)
{
WRITE_CODE(sei.m_cpbRemovalDelayDeltaIdx[i], ceilLog2(bp.m_numCpbRemovalDelayDeltas), "pt_cpb_removal_delay_delta_idx[i]");
}
}
else
{
WRITE_CODE(sei.m_auCpbRemovalDelay[i] - 1, bp.m_cpbRemovalDelayLength, "pt_cpb_removal_delay_minus1[i]");
}
}
}
WRITE_CODE(sei.m_picDpbOutputDelay, bp.m_dpbOutputDelayLength, "pt_dpb_output_delay");
#else
WRITE_CODE( sei.m_auCpbRemovalDelay[bp.m_bpMaxSubLayers - 1] - 1, bp.m_cpbRemovalDelayLength, "cpb_removal_delay_minus1[bp_max_sub_layers_minus1]" );
#endif
if( bp.m_altCpbParamsPresentFlag )
{
WRITE_FLAG( sei.m_cpbAltTimingInfoPresentFlag, "cpb_alt_timing_info_present_flag" );
......@@ -406,6 +441,7 @@ void SEIWriter::xWriteSEIPictureTiming(const SEIPictureTiming& sei, const SEIBuf
}
}
}
#if !JVET_S0185_PROPOSAl1_PICTURE_TIMING_CLEANUP
for( int i = temporalId; i < bp.m_bpMaxSubLayers - 1; i ++ )
{
WRITE_FLAG( sei.m_ptSubLayerDelaysPresentFlag[i], "pt_sub_layer_delays_present_flag[i]" );
......@@ -429,6 +465,7 @@ void SEIWriter::xWriteSEIPictureTiming(const SEIPictureTiming& sei, const SEIBuf
}
}
WRITE_CODE( sei.m_picDpbOutputDelay, bp.m_dpbOutputDelayLength, "dpb_output_delay" );
#endif
if (bp.m_bpDecodingUnitHrdParamsPresentFlag && bp.m_decodingUnitDpbDuParamsInPicTimingSeiFlag)
{
......@@ -495,7 +532,7 @@ void SEIWriter::xWriteSEIDependentRAPIndication(const SEIDependentRAPIndication&
// intentionally empty
}
void SEIWriter::xWriteSEIScalableNesting(OutputBitstream& bs, const SEIScalableNesting& sei, const SPS *sps)
void SEIWriter::xWriteSEIScalableNesting(OutputBitstream& bs, const SEIScalableNesting& sei)
{
CHECK (sei.m_nestedSEIs.size()<1, "There must be at lease one SEI message nested in the scalable nesting SEI.")
......@@ -548,7 +585,7 @@ void SEIWriter::xWriteSEIScalableNesting(OutputBitstream& bs, const SEIScalableN
}
// write nested SEI messages
writeSEImessages(bs, sei.m_nestedSEIs, sps, m_nestingHrd, true, 0);
writeSEImessages(bs, sei.m_nestedSEIs, m_nestingHrd, true, 0);
}
void SEIWriter::xWriteSEIFramePacking(const SEIFramePacking& sei)
......
......@@ -49,7 +49,7 @@ public:
SEIWriter() {};
virtual ~SEIWriter() {};
void writeSEImessages(OutputBitstream& bs, const SEIMessages &seiList, const SPS *sps, HRD &hrd, bool isNested, const uint32_t temporalId);
void writeSEImessages(OutputBitstream& bs, const SEIMessages &seiList, HRD &hrd, bool isNested, const uint32_t temporalId);
protected:
void xWriteSEIuserDataUnregistered(const SEIuserDataUnregistered &sei);
......@@ -59,7 +59,7 @@ protected:
void xWriteSEIPictureTiming(const SEIPictureTiming& sei, const SEIBufferingPeriod& bp, const uint32_t temporalId);
void xWriteSEIFrameFieldInfo(const SEIFrameFieldInfo& sei);
void xWriteSEIDependentRAPIndication(const SEIDependentRAPIndication& sei);
void xWriteSEIScalableNesting(OutputBitstream& bs, const SEIScalableNesting& sei, const SPS *sps);
void xWriteSEIScalableNesting(OutputBitstream& bs, const SEIScalableNesting& sei);
void xWriteSEIFramePacking(const SEIFramePacking& sei);
void xWriteSEIParameterSetsInclusionIndication(const SEIParameterSetsInclusionIndication& sei);
void xWriteSEIMasteringDisplayColourVolume( const SEIMasteringDisplayColourVolume& sei);
......@@ -79,7 +79,7 @@ protected:
void xWriteSEIContentLightLevelInfo(const SEIContentLightLevelInfo& sei);
void xWriteSEIAmbientViewingEnvironment(const SEIAmbientViewingEnvironment& sei);
void xWriteSEIContentColourVolume(const SEIContentColourVolume &sei);
void xWriteSEIpayloadData(OutputBitstream &bs, const SEI& sei, const SPS *sps, HRD &hrd, const uint32_t temporalId);
void xWriteSEIpayloadData(OutputBitstream &bs, const SEI& sei, HRD &hrd, const uint32_t temporalId);
void xWriteByteAlign();
protected:
HRD m_nestingHrd;
......
......@@ -185,7 +185,11 @@ void HLSWriter::xCodeRefPicList( const ReferencePictureList* rpl, bool isLongTer
uint32_t numRefPic = rpl->getNumberOfShorttermPictures() + rpl->getNumberOfLongtermPictures() + rpl->getNumberOfInterLayerPictures();
WRITE_UVLC( numRefPic, "num_ref_entries[ listIdx ][ rplsIdx ]" );
#if JVET_S0182_RPL_SIGNALLING
if (isLongTermPresent && numRefPic > 0 && rplIdx != -1)
#else
if (isLongTermPresent && rplIdx != -1)
#endif
{
WRITE_FLAG(rpl->getLtrpInSliceHeaderFlag(), "ltrp_in_slice_header_flag[ listIdx ][ rplsIdx ]");
}
......@@ -2611,8 +2615,13 @@ void HLSWriter::codeConstraintInfo ( const ConstraintInfo* cinfo )
WRITE_FLAG(cinfo->getOnePictureOnlyConstraintFlag(), "general_one_picture_only_constraint_flag" );
WRITE_FLAG(cinfo->getIntraOnlyConstraintFlag(), "intra_only_constraint_flag" );
#if JVET_S0094_CHROMAFORMAT_BITDEPTH_CONSTRAINT
WRITE_CODE(16-cinfo->getMaxBitDepthConstraintIdc(), 4, "gci_sixteen_minus_max_bitdepth_constraint_idc" );
WRITE_CODE(3-cinfo->getMaxChromaFormatConstraintIdc(), 2, "gci_three_minus_max_chroma_format_constraint_idc" );
#else
WRITE_CODE(cinfo->getMaxBitDepthConstraintIdc(), 4, "max_bitdepth_constraint_idc" );
WRITE_CODE(cinfo->getMaxChromaFormatConstraintIdc(), 2, "max_chroma_format_constraint_idc" );
#endif
WRITE_FLAG(cinfo->getSingleLayerConstraintFlag(), "single_layer_constraint_flag");
WRITE_FLAG(cinfo->getAllLayersIndependentConstraintFlag(), "all_layers_independent_constraint_flag");
WRITE_FLAG(cinfo->getNoResChangeInClvsConstraintFlag(), "no_res_change_in_clvs_constraint_flag");
......