Commit 195bdab4 authored by Karl Sharman's avatar Karl Sharman
Browse files

remove macro RNSEI

parent 49be64ee
......@@ -1310,9 +1310,7 @@ Bool TAppEncCfg::parseCfg( Int argc, TChar* argv[] )
("SEIFviFieldOfView", cfg_fviSEIFisheyeFieldOfView, cfg_fviSEIFisheyeFieldOfView, "Specifies the field of view of the lens that corresponds to the i-th active area")
("SEIFviNumPolynomialCoeffs", cfg_fviSEIFisheyeNumPolynomialCoeffs, cfg_fviSEIFisheyeNumPolynomialCoeffs, "Specifies the number of polynomial coefficients for the circular region")
("SEIFviPolynomialCoeff", cfg_fviSEIFisheyePolynomialCoeff, cfg_fviSEIFisheyePolynomialCoeff, "Specifies the j-th polynomial coefficient value of the curve function that maps the normalized distance of a luma sample from the centre of the circular region corresponding to the i-th active area to the angular value of a sphere coordinate from the normal vector of a nominal imaging plane that passes through the centre of the sphere coordinate system for the i-th active region.")
#if RNSEI
("SEIRegionalNestingFileRoot,-rns", m_regionalNestingSEIFileRoot, string(""), "Regional nesting SEI parameters root file name (wo num ext); only the file name base is to be added. Underscore and POC would be automatically addded to . E.g. \"-rns rns\" will search for files rns_0.txt, rns_1.txt, ...")
#endif
#if AR_SEI_MESSAGE
("SEIAnnotatedRegionsFileRoot,-ar", m_arSEIFileRoot, string(""), "Annotated region SEI parameters root file name (wo num ext); only the file name base is to be added. Underscore and POC would be automatically addded to . E.g. \"-ar ar\" will search for files ar_0.txt, ar_1.txt, ...")
#endif
......
......@@ -487,9 +487,7 @@ protected:
Int m_log2MaxMvLengthHorizontal; ///< Indicate the maximum absolute value of a decoded horizontal MV component in quarter-pel luma units
Int m_log2MaxMvLengthVertical; ///< Indicate the maximum absolute value of a decoded vertical MV component in quarter-pel luma units
std::string m_colourRemapSEIFileRoot;
#if RNSEI
std::string m_regionalNestingSEIFileRoot;
#endif
#if SHUTTER_INTERVAL_SEI_MESSAGE
Bool m_siiSEIEnabled;
UInt m_siiSEINumUnitsInShutterInterval;
......
......@@ -469,9 +469,7 @@ Void TAppEncTop::xInitLibCfg()
m_cTEncTop.setSEIGreenMetadataInfoSEIEnable ( m_greenMetadataType > 0 );
m_cTEncTop.setSEIGreenMetadataType ( UChar(m_greenMetadataType) );
m_cTEncTop.setSEIXSDMetricType ( UChar(m_xsdMetricType) );
#if RNSEI
m_cTEncTop.setRegionalNestingSEIFileRoot ( m_regionalNestingSEIFileRoot );
#endif
#if AR_SEI_MESSAGE
m_cTEncTop.setAnnotatedRegionSEIFileRoot (m_arSEIFileRoot);
#endif
......
......@@ -84,9 +84,7 @@ const std::vector<SEI::PayloadType> SEI::prefix_sei_messages({
, SEI::CUBEMAP_PROJECTION
, SEI::REGION_WISE_PACKING
, SEI::FISHEYE_VIDEO_INFO
#if RNSEI
, SEI::REGIONAL_NESTING
#endif
#if SHUTTER_INTERVAL_SEI_MESSAGE
, SEI::SHUTTER_INTERVAL_INFO
#endif
......@@ -189,7 +187,6 @@ void SEIPictureTiming::copyTo (SEIPictureTiming& target)
target.m_duCpbRemovalDelayMinus1 = m_duCpbRemovalDelayMinus1;
}
#if RNSEI
std::ostream& operator<<(std::ostream &os, RNSEIWindow const &region)
{
os << region.getRegionId() << " " << region.getWindowLeftOffset() <<
......@@ -255,7 +252,6 @@ Void SEIRegionalNesting::addRegionalSEI(RegionalSEI *regSEI)
SEIListOfIndices seiWithListOfIndices(listOfIndices, regSEI->dissociateSEIObject());
addRegionalSEI(seiWithListOfIndices);
}
#endif
// Static member
const TChar *SEI::getSEIMessageString(SEI::PayloadType payloadType)
......@@ -307,9 +303,7 @@ const TChar *SEI::getSEIMessageString(SEI::PayloadType payloadType)
case SEI::CUBEMAP_PROJECTION: return "Cubemap projection";
case SEI::REGION_WISE_PACKING: return "Region wise packing information";
case SEI::FISHEYE_VIDEO_INFO: return "Fisheye video information";
#if RNSEI
case SEI::REGIONAL_NESTING: return "Regional nesting";
#endif
#if MCTS_EXTRACTION
case SEI::MCTS_EXTRACTION_INFO_SET: return "MCTS extraction information";
#endif
......
......@@ -100,9 +100,7 @@ public:
CUBEMAP_PROJECTION = 151,
FISHEYE_VIDEO_INFO = 152,
REGION_WISE_PACKING = 155,
#if RNSEI
REGIONAL_NESTING = 157,
#endif
#if MCTS_EXTRACTION
MCTS_EXTRACTION_INFO_SET = 158,
#endif
......@@ -1119,7 +1117,6 @@ public:
#endif
#endif
#if RNSEI
// Class that associates an SEI with one more regions
class RegionalSEI
{
......@@ -1208,5 +1205,4 @@ private:
RNSEIWindowVec m_regions;
std::vector< SEIListOfIndices > m_rnSeiMessages;
};
#endif
//! \}
......@@ -99,7 +99,6 @@
#define MCTS_ENC_CHECK 1 ///< Temporal MCTS encoder constraint and decoder checks. Also requires SEITMCTSTileConstraint to be enabled to enforce constraint
#define RNSEI 1 ///< Support for signalling regional nesting SEI message
#define AR_SEI_MESSAGE 1 ///< Annotated Region SEI message
......@@ -990,7 +989,6 @@ public:
}
};
#if RNSEI
class RNSEIWindow : public Window
{
private:
......@@ -1017,7 +1015,6 @@ public:
friend std::ostream& operator<<(std::ostream &os, RNSEIWindow const &region);
};
typedef std::vector<RNSEIWindow> RNSEIWindowVec;
#endif
//! \}
#endif
......
......@@ -381,12 +381,10 @@ Void SEIReader::xReadSEIPayloadData(Int const payloadType, Int const payloadSize
sei = new SEIFisheyeVideoInfo;
xParseSEIFisheyeVideoInfo((SEIFisheyeVideoInfo&)*sei, payloadSize, pDecodedMessageOutputStream);
break;
#if RNSEI
case SEI::REGIONAL_NESTING:
sei = new SEIRegionalNesting;
xParseSEIRegionalNesting((SEIRegionalNesting&) *sei, payloadSize, sps, pDecodedMessageOutputStream);
break;
#endif
#if SHUTTER_INTERVAL_SEI_MESSAGE
case SEI::SHUTTER_INTERVAL_INFO:
sei = new SEIShutterIntervalInfo;
......@@ -2060,7 +2058,6 @@ Void SEIReader::xParseSEIAmbientViewingEnvironment( SEIAmbientViewingEnvironment
sei_read_code(pDecodedMessageOutputStream, 16, code, "ambient_light_x"); sei.m_ambientLightX = (UShort)code;
sei_read_code(pDecodedMessageOutputStream, 16, code, "ambient_light_y"); sei.m_ambientLightY = (UShort)code;
}
#if RNSEI
Void SEIReader::xParseSEIRegionalNesting( SEIRegionalNesting& sei, UInt payloadSize, const TComSPS *sps, std::ostream *pDecodedMessageOutputStream )
{
UInt uiCode;
......@@ -2103,7 +2100,6 @@ Void SEIReader::xParseSEIRegionalNesting( SEIRegionalNesting& sei, UInt payloadS
sei.addRegionalSEI( seiWithRegionIndices ) ;
}
}
#endif
//! \}
......@@ -111,9 +111,7 @@ protected:
Void xParseSEICodedRegionCompletion (SEICodedRegionCompletion& sei, UInt payLoadSize, std::ostream *pDecodedMessageOutputStream);
Void xParseSEIAlternativeTransferCharacteristics(SEIAlternativeTransferCharacteristics& sei, UInt payLoadSize, std::ostream *pDecodedMessageOutputStream);
Void xParseSEIAmbientViewingEnvironment (SEIAmbientViewingEnvironment& sei, UInt payLoadSize, std::ostream *pDecodedMessageOutputStream);
#if RNSEI
Void xParseSEIRegionalNesting ( SEIRegionalNesting& sei, UInt payloadSize, const TComSPS* sps, std::ostream *pDecodedMessageOutputStream );
#endif
#if SHUTTER_INTERVAL_SEI_MESSAGE
Void xParseSEIShutterInterval (SEIShutterIntervalInfo& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream);
#endif
......
......@@ -940,7 +940,6 @@ static Void readTokenValueAndValidate(Bool &returnedValue, /// value ret
#if RNSEI
template <typename T>
static Void readTokenValue(std::vector<T> &returnedValue, /// value returned
Bool &failed, /// used and updated
......@@ -1016,7 +1015,6 @@ static Void readTokenValueAndValidate(std::vector<T> &returnedValue, /// value r
}
}
}
#endif
Bool SEIEncoder::initSEIColourRemappingInfo(SEIColourRemappingInfo* seiColourRemappingInfo, Int currPOC) // returns true on success, false on failure.
{
......@@ -1044,68 +1042,7 @@ Bool SEIEncoder::initSEIColourRemappingInfo(SEIColourRemappingInfo* seiColourRem
}
// TODO: identify and remove duplication with decoder parsing through abstraction.
#if RNSEI
readColourRemapSEI(fic, seiColourRemappingInfo, failed );
#else
readTokenValueAndValidate(seiColourRemappingInfo->m_colourRemapId, failed, fic, "colour_remap_id", UInt(0), UInt(0x7fffffff) );
readTokenValueAndValidate(seiColourRemappingInfo->m_colourRemapCancelFlag, failed, fic, "colour_remap_cancel_flag" );
if( !seiColourRemappingInfo->m_colourRemapCancelFlag )
{
readTokenValueAndValidate(seiColourRemappingInfo->m_colourRemapPersistenceFlag, failed, fic, "colour_remap_persistence_flag" );
readTokenValueAndValidate(seiColourRemappingInfo->m_colourRemapVideoSignalInfoPresentFlag, failed, fic, "colour_remap_video_signal_info_present_flag");
if( seiColourRemappingInfo->m_colourRemapVideoSignalInfoPresentFlag )
{
readTokenValueAndValidate(seiColourRemappingInfo->m_colourRemapFullRangeFlag, failed, fic, "colour_remap_full_range_flag" );
readTokenValueAndValidate(seiColourRemappingInfo->m_colourRemapPrimaries, failed, fic, "colour_remap_primaries", Int(0), Int(255) );
readTokenValueAndValidate(seiColourRemappingInfo->m_colourRemapTransferFunction, failed, fic, "colour_remap_transfer_function", Int(0), Int(255) );
readTokenValueAndValidate(seiColourRemappingInfo->m_colourRemapMatrixCoefficients, failed, fic, "colour_remap_matrix_coefficients", Int(0), Int(255) );
}
readTokenValueAndValidate(seiColourRemappingInfo->m_colourRemapInputBitDepth, failed, fic, "colour_remap_input_bit_depth", Int(8), Int(16) );
readTokenValueAndValidate(seiColourRemappingInfo->m_colourRemapBitDepth, failed, fic, "colour_remap_bit_depth", Int(8), Int(16) );
const Int maximumInputValue = (1 << (((seiColourRemappingInfo->m_colourRemapInputBitDepth + 7) >> 3) << 3)) - 1;
const Int maximumRemappedValue = (1 << (((seiColourRemappingInfo->m_colourRemapBitDepth + 7) >> 3) << 3)) - 1;
for( Int c=0 ; c<3 ; c++ )
{
readTokenValueAndValidate(seiColourRemappingInfo->m_preLutNumValMinus1[c], failed, fic, "pre_lut_num_val_minus1[c]", Int(0), Int(32) );
if( seiColourRemappingInfo->m_preLutNumValMinus1[c]>0 )
{
seiColourRemappingInfo->m_preLut[c].resize(seiColourRemappingInfo->m_preLutNumValMinus1[c]+1);
for( Int i=0 ; i<=seiColourRemappingInfo->m_preLutNumValMinus1[c] ; i++ )
{
readTokenValueAndValidate(seiColourRemappingInfo->m_preLut[c][i].codedValue, failed, fic, "pre_lut_coded_value[c][i]", Int(0), maximumInputValue );
readTokenValueAndValidate(seiColourRemappingInfo->m_preLut[c][i].targetValue, failed, fic, "pre_lut_target_value[c][i]", Int(0), maximumRemappedValue );
}
}
}
readTokenValueAndValidate(seiColourRemappingInfo->m_colourRemapMatrixPresentFlag, failed, fic, "colour_remap_matrix_present_flag" );
if( seiColourRemappingInfo->m_colourRemapMatrixPresentFlag )
{
readTokenValueAndValidate(seiColourRemappingInfo->m_log2MatrixDenom, failed, fic, "log2_matrix_denom", Int(0), Int(15) );
for( Int c=0 ; c<3 ; c++ )
{
for( Int i=0 ; i<3 ; i++ )
{
readTokenValueAndValidate(seiColourRemappingInfo->m_colourRemapCoeffs[c][i], failed, fic, "colour_remap_coeffs[c][i]", -32768, 32767 );
}
}
}
for( Int c=0 ; c<3 ; c++ )
{
readTokenValueAndValidate(seiColourRemappingInfo->m_postLutNumValMinus1[c], failed, fic, "post_lut_num_val_minus1[c]", Int(0), Int(32) );
if( seiColourRemappingInfo->m_postLutNumValMinus1[c]>0 )
{
seiColourRemappingInfo->m_postLut[c].resize(seiColourRemappingInfo->m_postLutNumValMinus1[c]+1);
for( Int i=0 ; i<=seiColourRemappingInfo->m_postLutNumValMinus1[c] ; i++ )
{
readTokenValueAndValidate(seiColourRemappingInfo->m_postLut[c][i].codedValue, failed, fic, "post_lut_coded_value[c][i]", Int(0), maximumRemappedValue );
readTokenValueAndValidate(seiColourRemappingInfo->m_postLut[c][i].targetValue, failed, fic, "post_lut_target_value[c][i]", Int(0), maximumRemappedValue );
}
}
}
}
#endif
if( failed )
{
......@@ -1116,7 +1053,6 @@ Bool SEIEncoder::initSEIColourRemappingInfo(SEIColourRemappingInfo* seiColourRem
return true;
}
#if RNSEI
Void SEIEncoder::readRNSEIWindow(std::istream &fic, RNSEIWindowVec::iterator regionIter, Bool &failed )
{
Int regionId;
......@@ -1401,7 +1337,6 @@ Bool SEIEncoder::initSEIRegionalNesting(SEIRegionalNesting* seiRegionalNesting,
return true;
}
#endif
#if AR_SEI_MESSAGE
Void SEIEncoder::readAnnotatedRegionSEI(std::istream &fic, SEIAnnotatedRegions *seiAnnoRegion, Bool &failed)
......
......@@ -100,7 +100,6 @@ public:
Void initSEITimeCode(SEITimeCode *sei);
Bool initSEIColourRemappingInfo(SEIColourRemappingInfo *sei, Int currPOC); // returns true on success, false on failure.
Void initSEIAlternativeTransferCharacteristics(SEIAlternativeTransferCharacteristics *sei);
#if RNSEI
Void readToneMappingInfoSEI(std::istream &fic, SEIToneMappingInfo *seiToneMappingInfo , Bool &failed );
Void readChromaResamplingFilterHintSEI(std::istream &fic, SEIChromaResamplingFilterHint *seiChromaResamplingFilterHint, Bool &failed );
Void readKneeFunctionInfoSEI(std::istream &fic, SEIKneeFunctionInfo *seiKneeFunctionInfo, Bool &failed );
......@@ -108,7 +107,6 @@ public:
Void readContentColourVolumeSEI(std::istream &fic, SEIContentColourVolume *seiContentColourVolume, Bool &failed );
Bool initSEIRegionalNesting(SEIRegionalNesting *sei, Int currPOC); // returns true on success, false on failure.
Void readRNSEIWindow(std::istream &fic, RNSEIWindowVec::iterator regionIter, Bool &failed );
#endif
#if AR_SEI_MESSAGE
Bool initSEIAnnotatedRegions(SEIAnnotatedRegions *sei, Int currPOC);
Void readAnnotatedRegionSEI(std::istream &fic, SEIAnnotatedRegions *seiAnnoRegion, Bool &failed);
......
......@@ -197,11 +197,9 @@ Void SEIWriter::xWriteSEIpayloadData(TComBitIf& bs, const SEI& sei, const TComSP
case SEI::FISHEYE_VIDEO_INFO:
xWriteSEIFisheyeVideoInfo(*static_cast<const SEIFisheyeVideoInfo*>(&sei));
break;
#if RNSEI
case SEI::REGIONAL_NESTING:
xWriteSEIRegionalNesting(bs, *static_cast<const SEIRegionalNesting*>(&sei), sps);
break;
#endif
#if AR_SEI_MESSAGE
case SEI::ANNOTATED_REGIONS:
......@@ -1397,7 +1395,6 @@ Void SEIWriter::xWriteSEIAmbientViewingEnvironment(const SEIAmbientViewingEnviro
WRITE_CODE(sei.m_ambientLightY, 16, "ambient_light_y" );
}
#if RNSEI
Void SEIWriter::xWriteSEIRegionalNesting(TComBitIf& bs, const SEIRegionalNesting& sei, const TComSPS *sps)
{
WRITE_CODE(sei.getRNId(), 16, "regional_nesting_id");
......@@ -1428,7 +1425,6 @@ Void SEIWriter::xWriteSEIRegionalNesting(TComBitIf& bs, const SEIRegionalNesting
xWriteSEImessage(bs, nestedSEI, sps);
}
}
#endif
#if AR_SEI_MESSAGE
Void SEIWriter::xWriteSEIAnnotatedRegions(const SEIAnnotatedRegions &sei, const TComSPS *sps)
......
......@@ -102,9 +102,7 @@ protected:
Void xWriteSEICodedRegionCompletion (const SEICodedRegionCompletion& sei);
Void xWriteSEIAlternativeTransferCharacteristics(const SEIAlternativeTransferCharacteristics& sei);
Void xWriteSEIAmbientViewingEnvironment (const SEIAmbientViewingEnvironment& sei);
#if RNSEI
Void xWriteSEIRegionalNesting (TComBitIf& bs, const SEIRegionalNesting& sei, const TComSPS *sps);
#endif
#if AR_SEI_MESSAGE
Void xWriteSEIAnnotatedRegions (const SEIAnnotatedRegions& sei, const TComSPS *sps);
......
......@@ -442,9 +442,7 @@ protected:
#endif
Bool m_fviSEIEnabled;
TComSEIFisheyeVideoInfo m_fisheyeVideoInfo;
#if RNSEI
std::string m_regionalNestingSEIFileRoot; // Regional nesting SEI - initialized from external file
#endif
#if SHUTTER_INTERVAL_SEI_MESSAGE
Bool m_siiSEIEnabled;
UInt m_siiSEINumUnitsInShutterInterval;
......@@ -1180,10 +1178,8 @@ public:
UChar getSEIGreenMetadataType() const { return m_greenMetadataType; }
Void setSEIXSDMetricType(UChar v) { m_xsdMetricType = v; }
UChar getSEIXSDMetricType() const { return m_xsdMetricType; }
#if RNSEI
Void setRegionalNestingSEIFileRoot( const std::string &s ) { m_regionalNestingSEIFileRoot = s; }
const std::string &getRegionalNestingSEIFileRoot() const { return m_regionalNestingSEIFileRoot; }
#endif
#if AR_SEI_MESSAGE
Void setAnnotatedRegionSEIFileRoot(const std::string &s) { m_arSEIFileRoot = s; }
......
......@@ -671,7 +671,6 @@ Void TEncGOP::xCreatePerPictureSEIMessages (Int picInGOP, SEIMessages& seiMessag
}
}
#endif
#if RNSEI
// insert one Regional Nesting SEI for the picture (if the file exists)
if (!m_pcCfg->getRegionalNestingSEIFileRoot().empty())
{
......@@ -687,7 +686,6 @@ Void TEncGOP::xCreatePerPictureSEIMessages (Int picInGOP, SEIMessages& seiMessag
delete seiRegionalNesting;
}
}
#endif
}
Void TEncGOP::xCreateScalableNestingSEI (SEIMessages& seiMessages, SEIMessages& nestedSeiMessages)
......
Markdown is supported
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