Commit 42929e7c authored by Taoran Lu's avatar Taoran Lu
Browse files

address comments

parent 785bcde6
#======== Shutter Interval Info SEI message =====================
SEIShutterIntervalEnabled : 1
SEISiiTimeScale : 27000000
SEISiiFixedShutterIntervalWithinCLVSFlag : 1
SEISiiNumUnitsInShutterInterval : 1080000
SEISiiInputNumUnitsInShutterInterval : 1080000 # should have at least one entry. if only one entry, the value is assigned to sii_num_units_in_shutter_interval,
# if multiple entries, the values are set to sub_layer_num_units_in_shutter_interval[ ]
\ No newline at end of file
......@@ -772,7 +772,7 @@ Bool TAppEncCfg::parseCfg( Int argc, TChar* argv[] )
UInt cfg_fviSEIFisheyeNumActiveAreasMinus1=0;
#endif
#if SHUTTER_INTERVAL_SEI_MESSAGE
SMultiValueInput<UInt> cfg_siiSEISubLayerNumUnitsInSI (0, MAX_UINT, 0, 7);
SMultiValueInput<UInt> cfg_siiSEIInputNumUnitsInSI (0, MAX_UINT, 0, 7);
#endif
Int warnUnknowParameter = 0;
po::Options opts;
......@@ -1224,10 +1224,7 @@ Bool TAppEncCfg::parseCfg( Int argc, TChar* argv[] )
#if SHUTTER_INTERVAL_SEI_MESSAGE
("SEIShutterIntervalEnabled", m_siiSEIEnabled, false, "Controls if shutter interval information SEI message is enabled")
("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")
("SEISiiInputNumUnitsInShutterInterval", cfg_siiSEIInputNumUnitsInSI, cfg_siiSEIInputNumUnitsInSI, "Specifies sub_layer_num_units_in_shutter_interval")
#endif
#if SEI_ENCODER_CONTROL
// film grain characteristics SEI
......@@ -2065,18 +2062,23 @@ Bool TAppEncCfg::parseCfg( Int argc, TChar* argv[] )
#if SHUTTER_INTERVAL_SEI_MESSAGE
if (m_siiSEIEnabled)
{
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_siiSEIFixedSIwithinCLVS)
UInt arraySize = (UInt)cfg_siiSEIInputNumUnitsInSI.values.size();
assert(arraySize > 0);
if (arraySize > 1)
{
m_siiSEISubLayerNumUnitsInSI.resize(m_siiSEIMaxSubLayersMinus1 + 1);
for (Int i = 0; i <= m_siiSEIMaxSubLayersMinus1; i++)
m_siiSEISubLayerNumUnitsInSI.resize(arraySize);
for (Int i = 0; i < arraySize; i++)
{
m_siiSEISubLayerNumUnitsInSI[i] = cfg_siiSEISubLayerNumUnitsInSI.values[i];
m_siiSEISubLayerNumUnitsInSI[i] = cfg_siiSEIInputNumUnitsInSI.values[i];
assert(m_siiSEISubLayerNumUnitsInSI[i] >= 0 && m_siiSEISubLayerNumUnitsInSI[i] <= MAX_UINT);
}
}
else
{
m_siiSEINumUnitsInShutterInterval = cfg_siiSEIInputNumUnitsInSI.values[0];
assert(m_siiSEINumUnitsInShutterInterval >= 0 && m_siiSEINumUnitsInShutterInterval <= MAX_UINT);
}
}
#endif
if(m_timeCodeSEIEnabled)
......
......@@ -516,8 +516,6 @@ protected:
Bool m_siiSEIEnabled;
UInt m_siiSEINumUnitsInShutterInterval;
UInt m_siiSEITimeScale;
UInt m_siiSEIMaxSubLayersMinus1;
Bool m_siiSEIFixedSIwithinCLVS;
std::vector<UInt> m_siiSEISubLayerNumUnitsInSI;
#endif
#if SEI_ENCODER_CONTROL
......
......@@ -444,8 +444,6 @@ Void TAppEncTop::xInitLibCfg()
m_cTEncTop.setSiiSEIEnabled (m_siiSEIEnabled);
m_cTEncTop.setSiiSEINumUnitsInShutterInterval (m_siiSEINumUnitsInShutterInterval);
m_cTEncTop.setSiiSEITimeScale (m_siiSEITimeScale);
m_cTEncTop.setSiiSEIMaxSubLayersMinus1 (m_siiSEIMaxSubLayersMinus1);
m_cTEncTop.setSiiSEIFixedSIwithinCLVS (m_siiSEIFixedSIwithinCLVS);
m_cTEncTop.setSiiSEISubLayerNumUnitsInSI (m_siiSEISubLayerNumUnitsInSI);
#endif
#if SEI_ENCODER_CONTROL
......
......@@ -462,12 +462,10 @@ protected:
std::string m_regionalNestingSEIFileRoot; // Regional nesting SEI - initialized from external file
#endif
#if SHUTTER_INTERVAL_SEI_MESSAGE
Bool m_siiSEIEnabled;
UInt m_siiSEINumUnitsInShutterInterval;
UInt m_siiSEITimeScale;
UInt m_siiSEIMaxSubLayersMinus1;
Bool m_siiSEIFixedSIwithinCLVS;
std::vector<UInt> m_siiSEISubLayerNumUnitsInSI;
Bool m_siiSEIEnabled;
UInt m_siiSEINumUnitsInShutterInterval;
UInt m_siiSEITimeScale;
std::vector<UInt> m_siiSEISubLayerNumUnitsInSI;
#endif
#if SEI_ENCODER_CONTROL
// film grain characterstics sei
......@@ -1047,12 +1045,10 @@ public:
UInt getSiiSEINumUnitsInShutterInterval() { return m_siiSEINumUnitsInShutterInterval; }
Void setSiiSEITimeScale(UInt value) { m_siiSEITimeScale = value; }
UInt getSiiSEITimeScale() { return m_siiSEITimeScale; }
Void setSiiSEIMaxSubLayersMinus1(UInt value) { m_siiSEIMaxSubLayersMinus1 = value; }
UInt getSiiSEIMaxSubLayersMinus1() { return m_siiSEIMaxSubLayersMinus1; }
Void setSiiSEIFixedSIwithinCLVS(Bool b) { m_siiSEIFixedSIwithinCLVS = b; }
Bool getSiiSEIFixedSIwithinCLVS() { return m_siiSEIFixedSIwithinCLVS; }
UInt getSiiSEIMaxSubLayersMinus1() { return UInt(std::max(1u, UInt(m_siiSEISubLayerNumUnitsInSI.size()))-1 ); }
Bool getSiiSEIFixedSIwithinCLVS() { return m_siiSEISubLayerNumUnitsInSI.empty(); }
Void setSiiSEISubLayerNumUnitsInSI(const std::vector<UInt>& b) { m_siiSEISubLayerNumUnitsInSI = b; }
UInt getSiiSEISubLayerNumUnitsInSI(UInt idx) const { return m_siiSEISubLayerNumUnitsInSI[idx]; }
UInt getSiiSEISubLayerNumUnitsInSI(UInt idx) const { return m_siiSEISubLayerNumUnitsInSI[idx]; }
#endif
#if SEI_ENCODER_CONTROL
// film grain SEI
......
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