Commit 71b3b716 authored by Karl Sharman's avatar Karl Sharman
Browse files

remove macro AR_SEI_MESSAGE

parent 195bdab4
...@@ -86,9 +86,7 @@ Bool TAppDecCfg::parseCfg( Int argc, TChar* argv[] ) ...@@ -86,9 +86,7 @@ Bool TAppDecCfg::parseCfg( Int argc, TChar* argv[] )
("TarDecLayerIdSetFile,l", cfg_TargetDecLayerIdSetFile, string(""), "targetDecLayerIdSet file name. The file should include white space separated LayerId values to be decoded. Omitting the option or a value of -1 in the file decodes all layers.") ("TarDecLayerIdSetFile,l", cfg_TargetDecLayerIdSetFile, string(""), "targetDecLayerIdSet file name. The file should include white space separated LayerId values to be decoded. Omitting the option or a value of -1 in the file decodes all layers.")
("RespectDefDispWindow,w", m_respectDefDispWindow, 0, "Only output content inside the default display window\n") ("RespectDefDispWindow,w", m_respectDefDispWindow, 0, "Only output content inside the default display window\n")
("SEIColourRemappingInfoFilename", m_colourRemapSEIFileName, string(""), "Colour Remapping YUV output file name. If empty, no remapping is applied (ignore SEI message)\n") ("SEIColourRemappingInfoFilename", m_colourRemapSEIFileName, string(""), "Colour Remapping YUV output file name. If empty, no remapping is applied (ignore SEI message)\n")
#if AR_SEI_MESSAGE
("SEIAnnotatedRegionsInfoFilename", m_annotatedRegionsSEIFileName, string(""), "Annotated regions output file name. If empty, no object information will be saved (ignore SEI message)\n") ("SEIAnnotatedRegionsInfoFilename", m_annotatedRegionsSEIFileName, string(""), "Annotated regions output file name. If empty, no object information will be saved (ignore SEI message)\n")
#endif
#if O0043_BEST_EFFORT_DECODING #if O0043_BEST_EFFORT_DECODING
("ForceDecodeBitDepth", m_forceDecodeBitDepth, 0U, "Force the decoder to operate at a particular bit-depth (best effort decoding)") ("ForceDecodeBitDepth", m_forceDecodeBitDepth, 0U, "Force the decoder to operate at a particular bit-depth (best effort decoding)")
#endif #endif
......
...@@ -66,9 +66,7 @@ protected: ...@@ -66,9 +66,7 @@ protected:
Int m_decodedPictureHashSEIEnabled; ///< Checksum(3)/CRC(2)/MD5(1)/disable(0) acting on decoded picture hash SEI message Int m_decodedPictureHashSEIEnabled; ///< Checksum(3)/CRC(2)/MD5(1)/disable(0) acting on decoded picture hash SEI message
Bool m_decodedNoDisplaySEIEnabled; ///< Enable(true)/disable(false) writing only pictures that get displayed based on the no display SEI message Bool m_decodedNoDisplaySEIEnabled; ///< Enable(true)/disable(false) writing only pictures that get displayed based on the no display SEI message
std::string m_colourRemapSEIFileName; ///< output Colour Remapping file name std::string m_colourRemapSEIFileName; ///< output Colour Remapping file name
#if AR_SEI_MESSAGE
std::string m_annotatedRegionsSEIFileName; ///< annotated regions file name std::string m_annotatedRegionsSEIFileName; ///< annotated regions file name
#endif
std::vector<Int> m_targetDecLayerIdSet; ///< set of LayerIds to be included in the sub-bitstream extraction process. std::vector<Int> m_targetDecLayerIdSet; ///< set of LayerIds to be included in the sub-bitstream extraction process.
Int m_respectDefDispWindow; ///< Only output content inside the default display window Int m_respectDefDispWindow; ///< Only output content inside the default display window
#if O0043_BEST_EFFORT_DECODING #if O0043_BEST_EFFORT_DECODING
...@@ -91,9 +89,7 @@ public: ...@@ -91,9 +89,7 @@ public:
, m_decodedPictureHashSEIEnabled(0) , m_decodedPictureHashSEIEnabled(0)
, m_decodedNoDisplaySEIEnabled(false) , m_decodedNoDisplaySEIEnabled(false)
, m_colourRemapSEIFileName() , m_colourRemapSEIFileName()
#if AR_SEI_MESSAGE
, m_annotatedRegionsSEIFileName() , m_annotatedRegionsSEIFileName()
#endif
, m_targetDecLayerIdSet() , m_targetDecLayerIdSet()
, m_respectDefDispWindow(0) , m_respectDefDispWindow(0)
#if O0043_BEST_EFFORT_DECODING #if O0043_BEST_EFFORT_DECODING
......
...@@ -123,7 +123,6 @@ Void TAppDecTop::decode() ...@@ -123,7 +123,6 @@ Void TAppDecTop::decode()
} }
} }
#if AR_SEI_MESSAGE
// clear contents of annotated-Regions-SEI output file // clear contents of annotated-Regions-SEI output file
if (!m_annotatedRegionsSEIFileName.empty()) if (!m_annotatedRegionsSEIFileName.empty())
{ {
...@@ -134,7 +133,6 @@ Void TAppDecTop::decode() ...@@ -134,7 +133,6 @@ Void TAppDecTop::decode()
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
} }
#endif
// main decoder loop // main decoder loop
Bool openedReconFile = false; // reconstruction file not yet opened. (must be performed after SPS is seen) Bool openedReconFile = false; // reconstruction file not yet opened. (must be performed after SPS is seen)
...@@ -297,10 +295,8 @@ Void TAppDecTop::xDestroyDecLib() ...@@ -297,10 +295,8 @@ Void TAppDecTop::xDestroyDecLib()
delete m_pcSeiColourRemappingInfoPrevious; delete m_pcSeiColourRemappingInfoPrevious;
m_pcSeiColourRemappingInfoPrevious = NULL; m_pcSeiColourRemappingInfoPrevious = NULL;
} }
#if AR_SEI_MESSAGE
m_arObjects.clear(); m_arObjects.clear();
m_arLabels.clear(); m_arLabels.clear();
#endif
} }
Void TAppDecTop::xInitDecLib() Void TAppDecTop::xInitDecLib()
...@@ -324,10 +320,8 @@ Void TAppDecTop::xInitDecLib() ...@@ -324,10 +320,8 @@ Void TAppDecTop::xInitDecLib()
delete m_pcSeiColourRemappingInfoPrevious; delete m_pcSeiColourRemappingInfoPrevious;
m_pcSeiColourRemappingInfoPrevious = NULL; m_pcSeiColourRemappingInfoPrevious = NULL;
} }
#if AR_SEI_MESSAGE
m_arObjects.clear(); m_arObjects.clear();
m_arLabels.clear(); m_arLabels.clear();
#endif
} }
/** \param pcListPic list of pictures to be written to file /** \param pcListPic list of pictures to be written to file
...@@ -483,12 +477,10 @@ Void TAppDecTop::xWriteOutput( TComList<TComPic*>* pcListPic, UInt tId ) ...@@ -483,12 +477,10 @@ Void TAppDecTop::xWriteOutput( TComList<TComPic*>* pcListPic, UInt tId )
NUM_CHROMA_FORMAT, m_bClipOutputVideoToRec709Range ); NUM_CHROMA_FORMAT, m_bClipOutputVideoToRec709Range );
} }
#if AR_SEI_MESSAGE
if (!m_annotatedRegionsSEIFileName.empty()) if (!m_annotatedRegionsSEIFileName.empty())
{ {
xOutputAnnotatedRegions(pcPic); xOutputAnnotatedRegions(pcPic);
} }
#endif
if (!m_colourRemapSEIFileName.empty()) if (!m_colourRemapSEIFileName.empty())
{ {
...@@ -618,12 +610,10 @@ Void TAppDecTop::xFlushOutput( TComList<TComPic*>* pcListPic ) ...@@ -618,12 +610,10 @@ Void TAppDecTop::xFlushOutput( TComList<TComPic*>* pcListPic )
xOutputColourRemapPic(pcPic); xOutputColourRemapPic(pcPic);
} }
#if AR_SEI_MESSAGE
if (!m_annotatedRegionsSEIFileName.empty()) if (!m_annotatedRegionsSEIFileName.empty())
{ {
xOutputAnnotatedRegions(pcPic); xOutputAnnotatedRegions(pcPic);
} }
#endif
// update POC of display order // update POC of display order
m_iPOCLastDisplay = pcPic->getPOC(); m_iPOCLastDisplay = pcPic->getPOC();
...@@ -704,7 +694,6 @@ Void TAppDecTop::xOutputColourRemapPic(TComPic* pcPic) ...@@ -704,7 +694,6 @@ Void TAppDecTop::xOutputColourRemapPic(TComPic* pcPic)
} }
} }
#if AR_SEI_MESSAGE
Void TAppDecTop::xOutputAnnotatedRegions(TComPic* pcPic) Void TAppDecTop::xOutputAnnotatedRegions(TComPic* pcPic)
{ {
...@@ -836,7 +825,6 @@ Void TAppDecTop::xOutputAnnotatedRegions(TComPic* pcPic) ...@@ -836,7 +825,6 @@ Void TAppDecTop::xOutputAnnotatedRegions(TComPic* pcPic)
} }
} }
} }
#endif
// compute lut from SEI // compute lut from SEI
......
...@@ -69,11 +69,9 @@ private: ...@@ -69,11 +69,9 @@ private:
SEIColourRemappingInfo* m_pcSeiColourRemappingInfoPrevious; SEIColourRemappingInfo* m_pcSeiColourRemappingInfoPrevious;
#if AR_SEI_MESSAGE
SEIAnnotatedRegions::AnnotatedRegionHeader m_arHeader; SEIAnnotatedRegions::AnnotatedRegionHeader m_arHeader;
std::map<UInt, SEIAnnotatedRegions::AnnotatedRegionObject> m_arObjects; std::map<UInt, SEIAnnotatedRegions::AnnotatedRegionObject> m_arObjects;
std::map<UInt, std::string> m_arLabels; std::map<UInt, std::string> m_arLabels;
#endif
public: public:
TAppDecTop(); TAppDecTop();
...@@ -96,9 +94,7 @@ protected: ...@@ -96,9 +94,7 @@ protected:
private: private:
Void applyColourRemapping(const TComPicYuv& pic, SEIColourRemappingInfo& pCriSEI, const TComSPS &activeSPS); Void applyColourRemapping(const TComPicYuv& pic, SEIColourRemappingInfo& pCriSEI, const TComSPS &activeSPS);
Void xOutputColourRemapPic(TComPic* pcPic); Void xOutputColourRemapPic(TComPic* pcPic);
#if AR_SEI_MESSAGE
Void xOutputAnnotatedRegions(TComPic* pcPic); Void xOutputAnnotatedRegions(TComPic* pcPic);
#endif
}; };
//! \} //! \}
......
...@@ -1311,9 +1311,7 @@ Bool TAppEncCfg::parseCfg( Int argc, TChar* argv[] ) ...@@ -1311,9 +1311,7 @@ Bool TAppEncCfg::parseCfg( Int argc, TChar* argv[] )
("SEIFviNumPolynomialCoeffs", cfg_fviSEIFisheyeNumPolynomialCoeffs, cfg_fviSEIFisheyeNumPolynomialCoeffs, "Specifies the number of polynomial coefficients for the circular region") ("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.") ("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.")
("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, ...") ("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, ...")
#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, ...") ("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
; ;
opts.addOptions() opts.addOptions()
......
...@@ -416,9 +416,7 @@ protected: ...@@ -416,9 +416,7 @@ protected:
Bool m_gopBasedTemporalFilterFutureReference; ///< Enable/disable future frame references in the GOP-based Temporal Filter Bool m_gopBasedTemporalFilterFutureReference; ///< Enable/disable future frame references in the GOP-based Temporal Filter
std::map<Int, Double> m_gopBasedTemporalFilterStrengths; ///< Filter strength per frame for the GOP-based Temporal Filter std::map<Int, Double> m_gopBasedTemporalFilterStrengths; ///< Filter strength per frame for the GOP-based Temporal Filter
#if AR_SEI_MESSAGE
std::string m_arSEIFileRoot; std::string m_arSEIFileRoot;
#endif
Bool m_fisheyeVIdeoInfoSEIEnabled; Bool m_fisheyeVIdeoInfoSEIEnabled;
TComSEIFisheyeVideoInfo m_fisheyeVideoInfoSEI; TComSEIFisheyeVideoInfo m_fisheyeVideoInfoSEI;
// weighted prediction // weighted prediction
......
...@@ -470,9 +470,7 @@ Void TAppEncTop::xInitLibCfg() ...@@ -470,9 +470,7 @@ Void TAppEncTop::xInitLibCfg()
m_cTEncTop.setSEIGreenMetadataType ( UChar(m_greenMetadataType) ); m_cTEncTop.setSEIGreenMetadataType ( UChar(m_greenMetadataType) );
m_cTEncTop.setSEIXSDMetricType ( UChar(m_xsdMetricType) ); m_cTEncTop.setSEIXSDMetricType ( UChar(m_xsdMetricType) );
m_cTEncTop.setRegionalNestingSEIFileRoot ( m_regionalNestingSEIFileRoot ); m_cTEncTop.setRegionalNestingSEIFileRoot ( m_regionalNestingSEIFileRoot );
#if AR_SEI_MESSAGE
m_cTEncTop.setAnnotatedRegionSEIFileRoot (m_arSEIFileRoot); m_cTEncTop.setAnnotatedRegionSEIFileRoot (m_arSEIFileRoot);
#endif
m_cTEncTop.setTileUniformSpacingFlag ( m_tileUniformSpacingFlag ); m_cTEncTop.setTileUniformSpacingFlag ( m_tileUniformSpacingFlag );
m_cTEncTop.setNumColumnsMinus1 ( m_numTileColumnsMinus1 ); m_cTEncTop.setNumColumnsMinus1 ( m_numTileColumnsMinus1 );
m_cTEncTop.setNumRowsMinus1 ( m_numTileRowsMinus1 ); m_cTEncTop.setNumRowsMinus1 ( m_numTileRowsMinus1 );
......
...@@ -307,9 +307,7 @@ const TChar *SEI::getSEIMessageString(SEI::PayloadType payloadType) ...@@ -307,9 +307,7 @@ const TChar *SEI::getSEIMessageString(SEI::PayloadType payloadType)
#if MCTS_EXTRACTION #if MCTS_EXTRACTION
case SEI::MCTS_EXTRACTION_INFO_SET: return "MCTS extraction information"; case SEI::MCTS_EXTRACTION_INFO_SET: return "MCTS extraction information";
#endif #endif
#if AR_SEI_MESSAGE
case SEI::ANNOTATED_REGIONS: return "Annotated Region"; case SEI::ANNOTATED_REGIONS: return "Annotated Region";
#endif
#if SHUTTER_INTERVAL_SEI_MESSAGE #if SHUTTER_INTERVAL_SEI_MESSAGE
case SEI::SHUTTER_INTERVAL_INFO: return "Shutter interval information"; case SEI::SHUTTER_INTERVAL_INFO: return "Shutter interval information";
#endif #endif
......
...@@ -104,9 +104,7 @@ public: ...@@ -104,9 +104,7 @@ public:
#if MCTS_EXTRACTION #if MCTS_EXTRACTION
MCTS_EXTRACTION_INFO_SET = 158, MCTS_EXTRACTION_INFO_SET = 158,
#endif #endif
#if AR_SEI_MESSAGE
ANNOTATED_REGIONS = 202, ANNOTATED_REGIONS = 202,
#endif
#if SHUTTER_INTERVAL_SEI_MESSAGE #if SHUTTER_INTERVAL_SEI_MESSAGE
SHUTTER_INTERVAL_INFO = 203, SHUTTER_INTERVAL_INFO = 203,
#endif #endif
...@@ -839,7 +837,6 @@ public: ...@@ -839,7 +837,6 @@ public:
std::vector<OmniViewport> m_omniViewportRegions; std::vector<OmniViewport> m_omniViewportRegions;
}; };
#if AR_SEI_MESSAGE
class SEIAnnotatedRegions : public SEI class SEIAnnotatedRegions : public SEI
{ {
public: public:
...@@ -903,7 +900,6 @@ public: ...@@ -903,7 +900,6 @@ public:
std::vector<std::pair<AnnotatedRegionObjectIndex, AnnotatedRegionObject> > m_annotatedRegions; std::vector<std::pair<AnnotatedRegionObjectIndex, AnnotatedRegionObject> > m_annotatedRegions;
std::vector<std::pair<AnnotatedRegionLabelIndex, AnnotatedRegionLabel> > m_annotatedLabels; std::vector<std::pair<AnnotatedRegionLabelIndex, AnnotatedRegionLabel> > m_annotatedLabels;
}; };
#endif
class SEICubemapProjection : public SEI class SEICubemapProjection : public SEI
{ {
......
...@@ -100,7 +100,6 @@ ...@@ -100,7 +100,6 @@
#define AR_SEI_MESSAGE 1 ///< Annotated Region SEI message
#define SHUTTER_INTERVAL_SEI_MESSAGE 1 ///< support for shutter interval SEI message #define SHUTTER_INTERVAL_SEI_MESSAGE 1 ///< support for shutter interval SEI message
#define SEI_ENCODER_CONTROL 1 ///< add encoder control for the following SEI: film grain characteristics, content light level, ambient viewing environment #define SEI_ENCODER_CONTROL 1 ///< add encoder control for the following SEI: film grain characteristics, content light level, ambient viewing environment
......
...@@ -371,12 +371,10 @@ Void SEIReader::xReadSEIPayloadData(Int const payloadType, Int const payloadSize ...@@ -371,12 +371,10 @@ Void SEIReader::xReadSEIPayloadData(Int const payloadType, Int const payloadSize
xParseSEIRegionWisePacking((SEIRegionWisePacking&) *sei, payloadSize, pDecodedMessageOutputStream); xParseSEIRegionWisePacking((SEIRegionWisePacking&) *sei, payloadSize, pDecodedMessageOutputStream);
break; break;
#if AR_SEI_MESSAGE
case SEI::ANNOTATED_REGIONS: case SEI::ANNOTATED_REGIONS:
sei = new SEIAnnotatedRegions; sei = new SEIAnnotatedRegions;
xParseSEIAnnotatedRegions((SEIAnnotatedRegions&)*sei, payloadSize, pDecodedMessageOutputStream); xParseSEIAnnotatedRegions((SEIAnnotatedRegions&)*sei, payloadSize, pDecodedMessageOutputStream);
break; break;
#endif
case SEI::FISHEYE_VIDEO_INFO: case SEI::FISHEYE_VIDEO_INFO:
sei = new SEIFisheyeVideoInfo; sei = new SEIFisheyeVideoInfo;
xParseSEIFisheyeVideoInfo((SEIFisheyeVideoInfo&)*sei, payloadSize, pDecodedMessageOutputStream); xParseSEIFisheyeVideoInfo((SEIFisheyeVideoInfo&)*sei, payloadSize, pDecodedMessageOutputStream);
...@@ -1656,7 +1654,6 @@ Void SEIReader::xParseSEIOmniViewport(SEIOmniViewport& sei, UInt payloadSize, st ...@@ -1656,7 +1654,6 @@ Void SEIReader::xParseSEIOmniViewport(SEIOmniViewport& sei, UInt payloadSize, st
} }
} }
#if AR_SEI_MESSAGE
Void SEIReader::xParseSEIAnnotatedRegions(SEIAnnotatedRegions& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream) Void SEIReader::xParseSEIAnnotatedRegions(SEIAnnotatedRegions& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream)
{ {
output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize); output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize);
...@@ -1777,7 +1774,6 @@ Void SEIReader::xParseSEIAnnotatedRegions(SEIAnnotatedRegions& sei, UInt payload ...@@ -1777,7 +1774,6 @@ Void SEIReader::xParseSEIAnnotatedRegions(SEIAnnotatedRegions& sei, UInt payload
} }
} }
} }
#endif
Void SEIReader::xParseSEICubemapProjection(SEICubemapProjection& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream) Void SEIReader::xParseSEICubemapProjection(SEICubemapProjection& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream)
{ {
......
...@@ -99,9 +99,7 @@ protected: ...@@ -99,9 +99,7 @@ protected:
Void xParseSEISphereRotation (SEISphereRotation &sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream); Void xParseSEISphereRotation (SEISphereRotation &sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream);
Void xParseSEIOmniViewport (SEIOmniViewport& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream); Void xParseSEIOmniViewport (SEIOmniViewport& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream);
Void xParseSEICubemapProjection (SEICubemapProjection& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream); Void xParseSEICubemapProjection (SEICubemapProjection& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream);
#if AR_SEI_MESSAGE
Void xParseSEIAnnotatedRegions (SEIAnnotatedRegions& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream); Void xParseSEIAnnotatedRegions (SEIAnnotatedRegions& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream);
#endif
Void xParseSEIRegionWisePacking (SEIRegionWisePacking& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream); Void xParseSEIRegionWisePacking (SEIRegionWisePacking& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream);
Void xParseSEIFisheyeVideoInfo(SEIFisheyeVideoInfo& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream); Void xParseSEIFisheyeVideoInfo(SEIFisheyeVideoInfo& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream);
Void xParseSEIColourRemappingInfo (SEIColourRemappingInfo& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream); Void xParseSEIColourRemappingInfo (SEIColourRemappingInfo& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream);
......
...@@ -742,7 +742,6 @@ Void SEIEncoder::initSEIFisheyeVideoInfo(SEIFisheyeVideoInfo *seiFisheyeVideoInf ...@@ -742,7 +742,6 @@ Void SEIEncoder::initSEIFisheyeVideoInfo(SEIFisheyeVideoInfo *seiFisheyeVideoInf
seiFisheyeVideoInfo->values = m_pcCfg->getFviSEIData(); seiFisheyeVideoInfo->values = m_pcCfg->getFviSEIData();
} }
#if AR_SEI_MESSAGE
template <typename T> template <typename T>
static Void readTokenValue(T &returnedValue, /// value returned static Void readTokenValue(T &returnedValue, /// value returned
Bool &failed, /// used and updated Bool &failed, /// used and updated
...@@ -859,56 +858,6 @@ static Void readTokenValue(T &returnedValue, /// value returned ...@@ -859,56 +858,6 @@ static Void readTokenValue(T &returnedValue, /// value returned
{ {
readTokenValue(returnedValue, failed, is, pToken, readTokenValueParsing); readTokenValue(returnedValue, failed, is, pToken, readTokenValueParsing);
} }
#else
template <typename T>
static Void readTokenValue(T &returnedValue, /// value returned
Bool &failed, /// used and updated
std::istream &is, /// stream to read token from
const TChar *pToken) /// token string
{
returnedValue=T();
if (failed)
{
return;
}
Int c;
// Ignore any whitespace
while ((c=is.get())!=EOF && isspace(c));
// test for comment mark
while (c=='#')
{
// Ignore to the end of the line
while ((c=is.get())!=EOF && (c!=10 && c!=13));
// Ignore any white space at the start of the next line
while ((c=is.get())!=EOF && isspace(c));
}
// test first character of token
failed=(c!=pToken[0]);
// test remaining characters of token
Int pos;
for(pos=1;!failed && pToken[pos]!=0 && is.get()==pToken[pos]; pos++);
failed|=(pToken[pos]!=0);
// Ignore any whitespace before the ':'
while (!failed && (c=is.get())!=EOF && isspace(c));
failed|=(c!=':');
// Now read the value associated with the token:
if (!failed)
{
is >> returnedValue;
failed=!is.good();
if (!failed)
{
c=is.get();
failed=(c!=EOF && !isspace(c));
}
}
if (failed)
{
std::cerr << "Unable to read token '" << pToken << "'\n";
}
}
#endif
template <typename T> template <typename T>
static Void readTokenValueAndValidate(T &returnedValue, /// value returned static Void readTokenValueAndValidate(T &returnedValue, /// value returned
...@@ -1338,7 +1287,6 @@ Bool SEIEncoder::initSEIRegionalNesting(SEIRegionalNesting* seiRegionalNesting, ...@@ -1338,7 +1287,6 @@ Bool SEIEncoder::initSEIRegionalNesting(SEIRegionalNesting* seiRegionalNesting,
} }
#if AR_SEI_MESSAGE
Void SEIEncoder::readAnnotatedRegionSEI(std::istream &fic, SEIAnnotatedRegions *seiAnnoRegion, Bool &failed) Void SEIEncoder::readAnnotatedRegionSEI(std::istream &fic, SEIAnnotatedRegions *seiAnnoRegion, Bool &failed)
{ {
readTokenValueAndValidate(seiAnnoRegion->m_hdr.m_cancelFlag, failed, fic, "SEIArCancelFlag"); readTokenValueAndValidate(seiAnnoRegion->m_hdr.m_cancelFlag, failed, fic, "SEIArCancelFlag");
...@@ -1450,7 +1398,6 @@ Bool SEIEncoder::initSEIAnnotatedRegions(SEIAnnotatedRegions* SEIAnnoReg, Int cu ...@@ -1450,7 +1398,6 @@ Bool SEIEncoder::initSEIAnnotatedRegions(SEIAnnotatedRegions* SEIAnnoReg, Int cu
} }
return true; return true;
} }
#endif
Void SEIEncoder::initSEIChromaResamplingFilterHint(SEIChromaResamplingFilterHint *seiChromaResamplingFilterHint, Int iHorFilterIndex, Int iVerFilterIndex) Void SEIEncoder::initSEIChromaResamplingFilterHint(SEIChromaResamplingFilterHint *seiChromaResamplingFilterHint, Int iHorFilterIndex, Int iVerFilterIndex)
{ {
assert (m_isInitialized); assert (m_isInitialized);
......
...@@ -107,10 +107,8 @@ public: ...@@ -107,10 +107,8 @@ public:
Void readContentColourVolumeSEI(std::istream &fic, SEIContentColourVolume *seiContentColourVolume, Bool &failed ); Void readContentColourVolumeSEI(std::istream &fic, SEIContentColourVolume *seiContentColourVolume, Bool &failed );
Bool initSEIRegionalNesting(SEIRegionalNesting *sei, Int currPOC); // returns true on success, false on failure. Bool initSEIRegionalNesting(SEIRegionalNesting *sei, Int currPOC); // returns true on success, false on failure.
Void readRNSEIWindow(std::istream &fic, RNSEIWindowVec::iterator regionIter, Bool &failed ); Void readRNSEIWindow(std::istream &fic, RNSEIWindowVec::iterator regionIter, Bool &failed );
#if AR_SEI_MESSAGE
Bool initSEIAnnotatedRegions(SEIAnnotatedRegions *sei, Int currPOC); Bool initSEIAnnotatedRegions(SEIAnnotatedRegions *sei, Int currPOC);
Void readAnnotatedRegionSEI(std::istream &fic, SEIAnnotatedRegions *seiAnnoRegion, Bool &failed); Void readAnnotatedRegionSEI(std::istream &fic, SEIAnnotatedRegions *seiAnnoRegion, Bool &failed);
#endif
// trailing SEIs // trailing SEIs
Void initDecodedPictureHashSEI(SEIDecodedPictureHash *sei, TComPic *pcPic, std::string &rHashString, const BitDepths &bitDepths); Void initDecodedPictureHashSEI(SEIDecodedPictureHash *sei, TComPic *pcPic, std::string &rHashString, const BitDepths &bitDepths);
Void initTemporalLevel0IndexSEI(SEITemporalLevel0Index *sei, TComSlice *slice); Void initTemporalLevel0IndexSEI(SEITemporalLevel0Index *sei, TComSlice *slice);
......
...@@ -201,11 +201,9 @@ Void SEIWriter::xWriteSEIpayloadData(TComBitIf& bs, const SEI& sei, const TComSP ...@@ -201,11 +201,9 @@ Void SEIWriter::xWriteSEIpayloadData(TComBitIf& bs, const SEI& sei, const TComSP
xWriteSEIRegionalNesting(bs, *static_cast<const SEIRegionalNesting*>(&sei), sps); xWriteSEIRegionalNesting(bs, *static_cast<const SEIRegionalNesting*>(&sei), sps);
break; break;
#if AR_SEI_MESSAGE
case SEI::ANNOTATED_REGIONS: case SEI::ANNOTATED_REGIONS:
xWriteSEIAnnotatedRegions(*static_cast<const SEIAnnotatedRegions*>(&sei), sps); xWriteSEIAnnotatedRegions(*static_cast<const SEIAnnotatedRegions*>(&sei), sps);
break; break;
#endif
#if SHUTTER_INTERVAL_SEI_MESSAGE #if SHUTTER_INTERVAL_SEI_MESSAGE
case SEI::SHUTTER_INTERVAL_INFO: case SEI::SHUTTER_INTERVAL_INFO:
...@@ -1426,7 +1424,6 @@ Void SEIWriter::xWriteSEIRegionalNesting(TComBitIf& bs, const SEIRegionalNesting ...@@ -1426,7 +1424,6 @@ Void SEIWriter::xWriteSEIRegionalNesting(TComBitIf& bs, const SEIRegionalNesting
} }
} }
#if AR_SEI_MESSAGE
Void SEIWriter::xWriteSEIAnnotatedRegions(const SEIAnnotatedRegions &sei, const TComSPS *sps) Void SEIWriter::xWriteSEIAnnotatedRegions(const SEIAnnotatedRegions &sei, const TComSPS *sps)
{ {
WRITE_FLAG(sei.m_hdr.m_cancelFlag, "ar_cancel_flag"); WRITE_FLAG(sei.m_hdr.m_cancelFlag, "ar_cancel_flag");
...@@ -1517,7 +1514,6 @@ Void SEIWriter::xWriteSEIAnnotatedRegions(const SEIAnnotatedRegions &sei, const ...@@ -1517,7 +1514,6 @@ Void SEIWriter::xWriteSEIAnnotatedRegions(const SEIAnnotatedRegions &sei, const
} }
} }
} }
#endif
Void SEIWriter::xWriteByteAlign() Void SEIWriter::xWriteByteAlign()
{ {
if( m_pcBitIf->getNumberOfWrittenBits() % 8 != 0) if( m_pcBitIf->getNumberOfWrittenBits() % 8 != 0)
......
...@@ -104,9 +104,7 @@ protected: ...@@ -104,9 +104,7 @@ protected:
Void xWriteSEIAmbientViewingEnvironment (const SEIAmbientViewingEnvironment& sei); Void xWriteSEIAmbientViewingEnvironment (const SEIAmbientViewingEnvironment& sei);
Void xWriteSEIRegionalNesting (TComBitIf& bs, const SEIRegionalNesting& sei, const TComSPS *sps); Void xWriteSEIRegionalNesting (TComBitIf& bs, const SEIRegionalNesting& sei, const TComSPS *sps);
#if AR_SEI_MESSAGE
Void xWriteSEIAnnotatedRegions (const SEIAnnotatedRegions& sei, const TComSPS *sps); Void xWriteSEIAnnotatedRegions (const SEIAnnotatedRegions& sei, const TComSPS *sps);
#endif
#if SHUTTER_INTERVAL_SEI_MESSAGE #if SHUTTER_INTERVAL_SEI_MESSAGE
Void xWriteSEIShutterInterval (const SEIShutterIntervalInfo& sei); Void xWriteSEIShutterInterval (const SEIShutterIntervalInfo& sei);
#endif #endif
......
...@@ -437,9 +437,7 @@ protected: ...@@ -437,9 +437,7 @@ protected:
std::vector<UChar> m_rwpSEIRwpBottomGuardBandHeight; std::vector<UChar> m_rwpSEIRwpBottomGuardBandHeight;
std::vector<Bool> m_rwpSEIRwpGuardBandNotUsedForPredFlag; std::vector<Bool> m_rwpSEIRwpGuardBandNotUsedForPredFlag;
std::vector<UChar> m_rwpSEIRwpGuardBandType; std::vector<UChar> m_rwpSEIRwpGuardBandType;
#if AR_SEI_MESSAGE
std::string m_arSEIFileRoot; // Annotated region SEI - initialized from external file std::string m_arSEIFileRoot; // Annotated region SEI - initialized from external file
#endif
Bool m_fviSEIEnabled; Bool m_fviSEIEnabled;
TComSEIFisheyeVideoInfo m_fisheyeVideoInfo; TComSEIFisheyeVideoInfo m_fisheyeVideoInfo;
std::string m_regionalNestingSEIFileRoot; // Regional nesting SEI - initialized from external file std::string m_regionalNestingSEIFileRoot; // Regional nesting SEI - initialized from external file
...@@ -1181,10 +1179,8 @@ public: ...@@ -1181,10 +1179,8 @@ public:
Void setRegionalNestingSEIFileRoot( const std::string &s ) { m_regionalNestingSEIFileRoot = s; } Void setRegionalNestingSEIFileRoot( const std::string &s ) { m_regionalNestingSEIFileRoot = s; }
const std::string &getRegionalNestingSEIFileRoot() const { return m_regionalNestingSEIFileRoot; } const std::string &getRegionalNestingSEIFileRoot() const { return m_regionalNestingSEIFileRoot; }
#if AR_SEI_MESSAGE
Void