Commit 785bcde6 authored by Taoran Lu's avatar Taoran Lu
Browse files

update to aligh with JCTVC-AL0023

parent e6802485
#======== Shutter Interval Info SEI message =====================
SEIShutterIntervalEnabled : 1
SEISiiNumUnitsInShutterInterval : 1080000
SEISiiTimeScale : 27000000
SEISiiMaxSubLayersMinus1 : 0
SEISiiFixedShutterIntervalWithinCVSFlag : 1
SEIShutterIntervalEnabled : 1
SEISiiTimeScale : 27000000
SEISiiFixedShutterIntervalWithinCLVSFlag : 1
SEISiiNumUnitsInShutterInterval : 1080000
......@@ -1223,10 +1223,10 @@ Bool TAppEncCfg::parseCfg( Int argc, TChar* argv[] )
#endif
#if SHUTTER_INTERVAL_SEI_MESSAGE
("SEIShutterIntervalEnabled", m_siiSEIEnabled, false, "Controls if shutter interval information SEI message is enabled")
("SEISiiNumUnitsInShutterInterval", m_siiSEINumUnitsInShutterInterval, 1080000u, "Specifies sii_num_units_in_shutter_interval ")
("SEISiiTimeScale", m_siiSEITimeScale, 27000000u, "Specifies sii_time_scale ")
("SEISiiMaxSubLayersMinus1", m_siiSEIMaxSubLayersMinus1, 0u, "Specifies sii_max_sub_layers_minus1 ")
("SEISiiFixedShutterIntervalWithinCVSFlag", m_siiSEIFixedSIwithinCVS, false, "Specifies fixed_shutter_interval_within_cvs_flag")
("SEISiiTimeScale", m_siiSEITimeScale, 27000000u, "Specifies sii_time_scale")
("SEISiiFixedShutterIntervalWithinCLVSFlag", m_siiSEIFixedSIwithinCLVS, true, "Specifies fixed_shutter_interval_within_clvs_flag")
("SEISiiNumUnitsInShutterInterval", m_siiSEINumUnitsInShutterInterval, 1080000u, "Specifies sii_num_units_in_shutter_interval")
("SEISiiMaxSubLayersMinus1", m_siiSEIMaxSubLayersMinus1, 0u, "Specifies sii_max_sub_layers_minus1")
("SEISiiSubLayerNumUnitsInShutterInterval", cfg_siiSEISubLayerNumUnitsInSI, cfg_siiSEISubLayerNumUnitsInSI, "Specifies sub_layer_num_units_in_shutter_interval")
#endif
#if SEI_ENCODER_CONTROL
......@@ -2068,7 +2068,7 @@ Bool TAppEncCfg::parseCfg( Int argc, TChar* argv[] )
assert(m_siiSEINumUnitsInShutterInterval >= 0 && m_siiSEINumUnitsInShutterInterval <= MAX_UINT);
assert(m_siiSEITimeScale >= 0 && m_siiSEITimeScale <= MAX_UINT);
assert(m_siiSEIMaxSubLayersMinus1 >=0 && m_siiSEIMaxSubLayersMinus1 <= 6);
if (!m_siiSEIFixedSIwithinCVS)
if (!m_siiSEIFixedSIwithinCLVS)
{
m_siiSEISubLayerNumUnitsInSI.resize(m_siiSEIMaxSubLayersMinus1 + 1);
for (Int i = 0; i <= m_siiSEIMaxSubLayersMinus1; i++)
......
......@@ -517,7 +517,7 @@ protected:
UInt m_siiSEINumUnitsInShutterInterval;
UInt m_siiSEITimeScale;
UInt m_siiSEIMaxSubLayersMinus1;
Bool m_siiSEIFixedSIwithinCVS;
Bool m_siiSEIFixedSIwithinCLVS;
std::vector<UInt> m_siiSEISubLayerNumUnitsInSI;
#endif
#if SEI_ENCODER_CONTROL
......
......@@ -445,7 +445,7 @@ Void TAppEncTop::xInitLibCfg()
m_cTEncTop.setSiiSEINumUnitsInShutterInterval (m_siiSEINumUnitsInShutterInterval);
m_cTEncTop.setSiiSEITimeScale (m_siiSEITimeScale);
m_cTEncTop.setSiiSEIMaxSubLayersMinus1 (m_siiSEIMaxSubLayersMinus1);
m_cTEncTop.setSiiSEIFixedSIwithinCVS (m_siiSEIFixedSIwithinCVS);
m_cTEncTop.setSiiSEIFixedSIwithinCLVS (m_siiSEIFixedSIwithinCLVS);
m_cTEncTop.setSiiSEISubLayerNumUnitsInSI (m_siiSEISubLayerNumUnitsInSI);
#endif
#if SEI_ENCODER_CONTROL
......
......@@ -990,7 +990,7 @@ public:
UInt m_siiNumUnitsInShutterInterval;
UInt m_siiTimeScale;
UInt m_siiMaxSubLayersMinus1;
Bool m_siiFixedSIwithinCVS;
Bool m_siiFixedSIwithinCLVS;
std::vector<UInt> m_siiSubLayerNumUnitsInSI;
};
#endif
......
......@@ -1585,13 +1585,15 @@ Void SEIReader::xParseSEIShutterInterval(SEIShutterIntervalInfo& sei, UInt paylo
Int i;
UInt val;
output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize);
sei_read_code(pDecodedMessageOutputStream, 32, val, "sii_num_units_in_shutter_interval"); sei.m_siiNumUnitsInShutterInterval = val;
sei_read_code(pDecodedMessageOutputStream, 32, val, "sii_time_scale"); sei.m_siiTimeScale = val;
sei_read_code(pDecodedMessageOutputStream, 3, val, "sii_max_sub_layers_minus1 "); sei.m_siiMaxSubLayersMinus1 = val;
sei_read_flag(pDecodedMessageOutputStream, val, "fixed_shutter_interval_within_clvs_flag"); sei.m_siiFixedSIwithinCVS = val;
if (!sei.m_siiFixedSIwithinCVS)
sei_read_flag(pDecodedMessageOutputStream, val, "fixed_shutter_interval_within_clvs_flag"); sei.m_siiFixedSIwithinCLVS = val;
if (sei.m_siiFixedSIwithinCLVS)
{
sei_read_code(pDecodedMessageOutputStream, 32, val, "sii_num_units_in_shutter_interval"); sei.m_siiNumUnitsInShutterInterval = val;
}
else
{
sei_read_code(pDecodedMessageOutputStream, 3, val, "sii_max_sub_layers_minus1 "); sei.m_siiMaxSubLayersMinus1 = val;
sei.m_siiSubLayerNumUnitsInSI.resize(sei.m_siiMaxSubLayersMinus1 + 1);
for (i = 0; i <= sei.m_siiMaxSubLayersMinus1; i++)
{
......
......@@ -559,12 +559,15 @@ Void SEIEncoder::initSEIShutterIntervalInfo(SEIShutterIntervalInfo *seiShutterIn
{
assert(m_isInitialized);
assert(seiShutterIntervalInfo != NULL);
seiShutterIntervalInfo->m_siiNumUnitsInShutterInterval = m_pcCfg->getSiiSEINumUnitsInShutterInterval();
seiShutterIntervalInfo->m_siiTimeScale = m_pcCfg->getSiiSEITimeScale();
seiShutterIntervalInfo->m_siiMaxSubLayersMinus1 = m_pcCfg->getSiiSEIMaxSubLayersMinus1();
seiShutterIntervalInfo->m_siiFixedSIwithinCVS = m_pcCfg->getSiiSEIFixedSIwithinCVS();
if (seiShutterIntervalInfo->m_siiFixedSIwithinCVS == false)
seiShutterIntervalInfo->m_siiFixedSIwithinCLVS = m_pcCfg->getSiiSEIFixedSIwithinCLVS();
if (seiShutterIntervalInfo->m_siiFixedSIwithinCLVS == true)
{
seiShutterIntervalInfo->m_siiNumUnitsInShutterInterval = m_pcCfg->getSiiSEINumUnitsInShutterInterval();
}
else
{
seiShutterIntervalInfo->m_siiMaxSubLayersMinus1 = m_pcCfg->getSiiSEIMaxSubLayersMinus1();
seiShutterIntervalInfo->m_siiSubLayerNumUnitsInSI.resize(seiShutterIntervalInfo->m_siiMaxSubLayersMinus1+1);
for (Int i = 0; i <= seiShutterIntervalInfo->m_siiMaxSubLayersMinus1; i++)
{
......
......@@ -1148,12 +1148,15 @@ Void SEIWriter::xWriteSEIContentColourVolume(const SEIContentColourVolume &sei)
#if SHUTTER_INTERVAL_SEI_MESSAGE
Void SEIWriter::xWriteSEIShutterInterval(const SEIShutterIntervalInfo &sei)
{
WRITE_CODE(sei.m_siiNumUnitsInShutterInterval, 32, "sii_num_units_in_shutter_interval");
WRITE_CODE(sei.m_siiTimeScale, 32, "sii_time_scale");
WRITE_CODE(sei.m_siiMaxSubLayersMinus1, 3, "sii_max_sub_layers_minus1");
WRITE_FLAG(sei.m_siiFixedSIwithinCVS, "fixed_shutter_interval_within_clvs_flag");
if (!sei.m_siiFixedSIwithinCVS)
WRITE_FLAG(sei.m_siiFixedSIwithinCLVS, "fixed_shutter_interval_within_clvs_flag");
if (sei.m_siiFixedSIwithinCLVS)
{
WRITE_CODE(sei.m_siiNumUnitsInShutterInterval, 32, "sii_num_units_in_shutter_interval");
}
else
{
WRITE_CODE(sei.m_siiMaxSubLayersMinus1, 3, "sii_max_sub_layers_minus1");
for (UInt i = 0; i <= sei.m_siiMaxSubLayersMinus1; i++)
{
WRITE_CODE(sei.m_siiSubLayerNumUnitsInSI[i], 32, "sub_layer_num_units_in_shutter_interval[ i ]");
......
......@@ -466,7 +466,7 @@ protected:
UInt m_siiSEINumUnitsInShutterInterval;
UInt m_siiSEITimeScale;
UInt m_siiSEIMaxSubLayersMinus1;
Bool m_siiSEIFixedSIwithinCVS;
Bool m_siiSEIFixedSIwithinCLVS;
std::vector<UInt> m_siiSEISubLayerNumUnitsInSI;
#endif
#if SEI_ENCODER_CONTROL
......@@ -1049,8 +1049,8 @@ public:
UInt getSiiSEITimeScale() { return m_siiSEITimeScale; }
Void setSiiSEIMaxSubLayersMinus1(UInt value) { m_siiSEIMaxSubLayersMinus1 = value; }
UInt getSiiSEIMaxSubLayersMinus1() { return m_siiSEIMaxSubLayersMinus1; }
Void setSiiSEIFixedSIwithinCVS(Bool b) { m_siiSEIFixedSIwithinCVS = b; }
Bool getSiiSEIFixedSIwithinCVS() { return m_siiSEIFixedSIwithinCVS; }
Void setSiiSEIFixedSIwithinCLVS(Bool b) { m_siiSEIFixedSIwithinCLVS = b; }
Bool getSiiSEIFixedSIwithinCLVS() { return m_siiSEIFixedSIwithinCLVS; }
Void setSiiSEISubLayerNumUnitsInSI(const std::vector<UInt>& b) { m_siiSEISubLayerNumUnitsInSI = b; }
UInt getSiiSEISubLayerNumUnitsInSI(UInt idx) const { return m_siiSEISubLayerNumUnitsInSI[idx]; }
#endif
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment