Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • jvet/VVCSoftware_VTM
  • chenhuanbang/VVCSoftware_VTM
  • ezhizng/VVCSoftware_VTM
  • XZheng/VVCSoftware_VTM
  • YanZhang/VVCSoftware_VTM
  • xiaozhongxu/VVCSoftware_VTM
  • bossen/VVCSoftware_VTM
  • XiangLi/VVCSoftware_VTM
  • s.iwamura/VVCSoftware_VTM
  • yuling.hsiao/VVCSoftware_VTM
  • ccc2384823/VVCSoftware_VTM
  • yuchisu/VVCSoftware_VTM
  • schwarz/VVCSoftware_VTM
  • philippe.hanhart/VVCSoftware_VTM
  • nanh/VVCSoftware_VTM
  • guillaume.laroche/VVCSoftware_VTM
  • Kenneth/VVCSoftware_VTM
  • jonatan/VVCSoftware_VTM
  • Alexey/VVCSoftware_VTM
  • saintspear/VVCSoftware_VTM
  • xinzhao/VVCSoftware_VTM
  • Seungsoo/VVCSoftware_VTM
  • jamesxxiu/VVCSoftware_VTM
  • leolzhao/VVCSoftware_VTM
  • ywchen/VVCSoftware_VTM
  • kevin625/VVCSoftware_VTM
  • Zhang/VVCSoftware_VTM
  • zhangkai/VVCSoftware_VTM
  • YCSun/VVCSoftware_VTM
  • ksuehring/VVCSoftware_VTM
  • AbeKiyo/VVCSoftware_VTM
  • naeri.park/VVCSoftware_VTM
  • ling/VVCSoftware_VTM
  • aikiho/VVCSoftware_VTM
  • JangwonChoi/VVCSoftware_VTM
  • Shelly/VVCSoftware_VTM
  • blaeser/VVCSoftware_VTM
  • crhelmrich/VVCSoftware_VTM
  • keydel/VVCSoftware_VTM
  • adam_wieckowski/VVCSoftware_VTM
  • hashimry/VVCSoftware_VTM
  • yimingli/VVCSoftware_VTM
  • zhipin/VVCSoftware_VTM
  • chernyak/VVCSoftware_VTM
  • jvet-l-ahg-14/VVCSoftware_VTM
  • sauer/VVCSoftware_VTM
  • fbarbier/VVCSoftware_VTM
  • misrak/VVCSoftware_VTM
  • ikai/VVCSoftware_VTM
  • tlu/VVCSoftware_VTM
  • Yasugi/VVCSoftware_VTM
  • peterchuang/VVCSoftware_VTM
  • wanght99/VVCSoftware_VTM
  • yuhan/VVCSoftware_VTM
  • hongbin/VVCSoftware_VTM
  • jiahaoli/VVCSoftware_VTM
  • cfd/VVCSoftware_VTM
  • ruoyangyu/VVCSoftware_VTM
  • chujoh/VVCSoftware_VTM
  • lijingya/VVCSoftware_VTM
  • hinz/VVCSoftware_VTM
  • tamse.anish/VVCSoftware_VTM
  • mcoban/VVCSoftware_VTM
  • george/VVCSoftware_VTM
  • jeeva.raj/VVCSoftware_VTM
  • antoine/VVCSoftware_VTM
  • moonmo.koo/VVCSoftware_VTM
  • deluxan/VVCSoftware_VTM
  • bheng/VVCSoftware_VTM
  • lzz8246/VVCSoftware_VTM
  • delagrangep/VVCSoftware_VTM
  • jiechen/VVCSoftware_VTM
  • hendry197/VVCSoftware_VTM
  • LGE_VCC/VVCSoftware_VTM
  • asegall/VVCSoftware_VTM
  • pbcowan/VVCSoftware_VTM
  • forayr/VVCSoftware_VTM
  • JT/VVCSoftware_VTM
  • Zhou/VVCSoftware_VTM
  • yjpiao/VVCSoftware_VTM
  • fabrice.leleannec/VVCSoftware_VTM
  • tpoirier/VVCSoftware_VTM
  • PoHan.Lin/VVCSoftware_VTM
  • jzxu/VVCSoftware_VTM
  • junghak.nam/VVCSoftware_VTM
  • guichunli/VVCSoftware_VTM
  • xianglinwang/VVCSoftware_VTM
  • chunchic/VVCSoftware_VTM
  • chrisr12/VVCSoftware_VTM
  • ks_kashyap/VVCSoftware_VTM
  • minhua/VVCSoftware_VTM
  • Sheng-Yen.Lin/VVCSoftware_VTM
  • hegilmez/VVCSoftware_VTM
  • swongah/VVCSoftware_VTM
  • merkle/VVCSoftware_VTM
  • sunyucheng/VVCSoftware_VTM
  • kirchhoffer/VVCSoftware_VTM
  • vdrugeon/VVCSoftware_VTM
  • jennylai/VVCSoftware_VTM
  • rickxu/VVCSoftware_VTM
  • seuhong/VVCSoftware_VTM
  • chollmann/VVCSoftware_VTM
  • jvet-n-ce8-public/VVCSoftware_VTM
  • martin.m.pettersson/VVCSoftware_VTM
  • siekmann/VVCSoftware_VTM
  • aramasub/VVCSoftware_VTM
  • zhiyilin/VVCSoftware_VTM
  • EricLin/VVCSoftware_VTM
  • mengwang/VVCSoftware_VTM
  • m.sarwer/VVCSoftware_VTM
  • agnesedong/VVCSoftware_VTM
  • geonjungko/VVCSoftware_VTM
  • bray/VVCSoftware_VTM
  • yhchao/VVCSoftware_VTM
  • Zhu/VVCSoftware_VTM
  • ykato/VVCSoftware_VTM
  • ZhipinDeng/VVCSoftware_VTM
  • jasonjung/VVCSoftware_VTM
  • hanhuang/VVCSoftware_VTM
  • seregin/VVCSoftware_VTM
  • wchen1014/VVCSoftware_VTM
  • Auyeung/VVCSoftware_VTM
  • Morris/VVCSoftware_VTM
  • lphamvan/VVCSoftware_VTM
  • dmehlem/VVCSoftware_VTM
  • shih-ta.hsiang/VVCSoftware_VTM
  • ysanchez/VVCSoftware_VTM
  • baegn74/VVCSoftware_VTM
  • kazui/VVCSoftware_VTM
  • yuwenhe_vvc/VVCSoftware_VTM
  • rickard/VVCSoftware_VTM
  • wangyang.cs/VVCSoftware_VTM
  • xwmeng/VVCSoftware_VTM
  • takeshi.tsukuba/VVCSoftware_VTM
  • yixindu/VVCSoftware_VTM
  • baixiu.wz/VVCSoftware_VTM
  • hm.jang/VVCSoftware_VTM
  • Ted/VVCSoftware_VTM
  • nguyen/VVCSoftware_VTM
  • chaohsiu/VVCSoftware_VTM
  • francoise/VVCSoftware_VTM
  • Yin/VVCSoftware_VTM
  • Morigami/VVCSoftware_VTM
  • sagar.kotecha/VVCSoftware_VTM
  • hwsun/VVCSoftware_VTM
  • pierrick.bouvier/VVCSoftware_VTM
  • XiangMa/VVCSoftware_VTM
  • LouiseLee/VVCSoftware_VTM
  • chenps/VVCSoftware_VTM
  • karls/VVCSoftware_VTM
  • biaowang/VVCSoftware_VTM
  • hangao/VVCSoftware_VTM
  • Jin/VVCSoftware_VTM
  • analci/VVCSoftware_VTM
  • KuiFan/VVCSoftware_VTM
  • hobingzhang/VVCSoftware_VTM
  • audrey.turquin/VVCSoftware_VTM
  • rlliao/VVCSoftware_VTM
  • winken/VVCSoftware_VTM
  • hallapur/VVCSoftware_VTM
  • T.Hashimoto/VVCSoftware_VTM
  • AnandMeher/VVCSoftware_VTM
  • semihese/VVCSoftware_VTM
  • ouedraogo/VVCSoftware_VTM
  • arthurcerveira/VVCSoftware_VTM
  • sunmi.yoo/VVCSoftware_VTM
  • Cynthia/VVCSoftware_VTM
  • yang/VVCSoftware_VTM
  • yuyoon/VVCSoftware_VTM
  • jslee/VVCSoftware_VTM
  • weimin.zeng/VVCSoftware_VTM
  • edrthomas/VVCSoftware_VTM
  • Mitsuru.Katsumata/VVCSoftware_VTM
  • adybrowne/VVCSoftware_VTM
  • jack.enhorn/VVCSoftware_VTM
  • Palanivel/VVCSoftware_VTM
  • olena.chubach/VVCSoftware_VTM
  • juvenalluo/VVCSoftware_VTM
  • yylee/VVCSoftware_VTM
  • bross/VVCSoftware_VTM
  • jvet-ahg-nnvc/VVCSoftware_VTM
  • jacob/VVCSoftware_VTM
  • dmytro.rusanovskyy/VVCSoftware_VTM
  • karamnaser/VVCSoftware_VTM
  • milos.radosavljevic/VVCSoftware_VTM
  • Keming/VVCSoftware_VTM
  • pj/VVCSoftware_VTM
  • cwkuo/VVCSoftware_VTM
  • BD/VVCSoftware_VTM
  • bartnik/VVCSoftware_VTM
  • Fangjun.Pu/VVCSoftware_VTM
  • nikolay.shostak/VVCSoftware_VTM
  • kirill.suverov/VVCSoftware_VTM
  • Xile_Zhou/VVCSoftware_VTM
  • ksuehring/vvc-software-vtm-nnvc
  • guether/VVCSoftware_VTM
  • salmonc/VVCSoftware_VTM
  • eeehey/VVCSoftware_VTM
  • marie-pierre.gallasso/VVCSoftware_VTM
  • jvet-ahg-fgt/VTM
  • liaojq/VVCSoftware_VTM
  • axel.ricard/VVCSoftware_VTM
  • XiangLi/nnvc
  • sw.xie/VVCSoftware_VTM
  • jeeva.raj/vvc-software-vtm-tu-c
  • XiangLi/tu-c
  • msantamaria/nnvc
  • cjj490168650/VVCSoftware_VTM
  • Yun_li/VVCSoftware_VTM
  • Zhengang/vvc-software-vtm
  • lvzhuoyi/vvc-software-vtm-nnvc
  • Kenneth/vvc-software-vtm-nn
  • biatekt/vvc-software-vtm
  • jvet-ahg-gcc/VVCSoftware_VTM
  • JINGYING/VVCSoftware_VTM
  • furban/VVCSoftware_VTM
  • yanning/VVCSoftware_VTM
  • zhuochen/VVCSoftware_VTM
  • Kaifa/VVCSoftware_VTM_AJ0048
  • yueli/VVCSoftware_VTM
  • tokumo/VVCSoftware_VTM
221 results
Show changes
Commits on Source (17)
Showing
with 282 additions and 238 deletions
......@@ -144,7 +144,7 @@ bool BitstreamExtractorApp::xCheckSEIFiller(SEIMessages SEIs, int targetSubPicId
{
for (auto sei : SEIs)
{
if (sei->payloadType() == SEI::SUBPICTURE_LEVEL_INFO)
if (sei->payloadType() == SEI::PayloadType::SUBPICTURE_LEVEL_INFO)
{
SEISubpicureLevelInfo *seiSLI = (SEISubpicureLevelInfo *)sei;
if (!seiSLI->m_cbrConstraintFlag)
......@@ -155,7 +155,7 @@ bool BitstreamExtractorApp::xCheckSEIFiller(SEIMessages SEIs, int targetSubPicId
}
for (auto sei : SEIs)
{
if (sei->payloadType() == SEI::FILLER_PAYLOAD)
if (sei->payloadType() == SEI::PayloadType::FILLER_PAYLOAD)
{
return (rmAllFillerInSubpicExt ? false : lastSliceWritten);
}
......@@ -437,7 +437,7 @@ bool BitstreamExtractorApp::xCheckNumSubLayers(InputNALUnit &nalu, VPS *vps)
bool BitstreamExtractorApp::xCheckSEIsSubPicture(SEIMessages& SEIs, InputNALUnit& nalu, std::ostream& out, int subpicId, VPS *vps)
{
SEIMessages scalableNestingSEIs = getSeisByType(SEIs, SEI::SCALABLE_NESTING);
SEIMessages scalableNestingSEIs = getSeisByType(SEIs, SEI::PayloadType::SCALABLE_NESTING);
if (scalableNestingSEIs.size())
{
CHECK ( scalableNestingSEIs.size() > 1, "There shall be only one Scalable Nesting SEI in one NAL unit" );
......@@ -470,7 +470,7 @@ bool BitstreamExtractorApp::xCheckSEIsSubPicture(SEIMessages& SEIs, InputNALUnit
}
}
// remove not nested decoded picture hash SEIs
SEIMessages hashSEI = getSeisByType(SEIs, SEI::DECODED_PICTURE_HASH);
SEIMessages hashSEI = getSeisByType(SEIs, SEI::PayloadType::DECODED_PICTURE_HASH);
if (hashSEI.size() > 0)
{
return false;
......@@ -801,13 +801,17 @@ uint32_t BitstreamExtractorApp::decode()
{
// remove from outBitstream all NAL units that have nuh_layer_id not included in the list LayerIdInOls[ targetOlsIdx ] and ( are SEI NAL units containing (scalable-nested SEI messages) or (non-scalable-nested SEI messages with PayloadType not equal to 0, 1, 130, or 203) )
bool isNonNestedHRDSEI = false;
if (sei->payloadType() == SEI::BUFFERING_PERIOD || sei->payloadType() == SEI::PICTURE_TIMING || sei->payloadType() == SEI::DECODING_UNIT_INFO || sei->payloadType() == SEI::SUBPICTURE_LEVEL_INFO)
if (sei->payloadType() == SEI::PayloadType::BUFFERING_PERIOD
|| sei->payloadType() == SEI::PayloadType::PICTURE_TIMING
|| sei->payloadType() == SEI::PayloadType::DECODING_UNIT_INFO
|| sei->payloadType() == SEI::PayloadType::SUBPICTURE_LEVEL_INFO)
{
isNonNestedHRDSEI = true;
}
writeInpuNalUnitToStream &= isIncludedInTargetOls || (sei->payloadType() != SEI::SCALABLE_NESTING && isNonNestedHRDSEI);
writeInpuNalUnitToStream &=
isIncludedInTargetOls || (sei->payloadType() != SEI::PayloadType::SCALABLE_NESTING && isNonNestedHRDSEI);
// remove unqualified scalable nesting SEI
if (sei->payloadType() == SEI::SCALABLE_NESTING)
if (sei->payloadType() == SEI::PayloadType::SCALABLE_NESTING)
{
SEIScalableNesting *seiNesting = (SEIScalableNesting *)sei;
if (seiNesting->m_snOlsFlag == 1)
......@@ -838,7 +842,10 @@ uint32_t BitstreamExtractorApp::decode()
}
}
// remove unqualified timing related SEI
if (sei->payloadType() == SEI::BUFFERING_PERIOD || (m_removeTimingSEI && sei->payloadType() == SEI::PICTURE_TIMING) || sei->payloadType() == SEI::DECODING_UNIT_INFO || sei->payloadType() == SEI::SUBPICTURE_LEVEL_INFO)
if (sei->payloadType() == SEI::PayloadType::BUFFERING_PERIOD
|| (m_removeTimingSEI && sei->payloadType() == SEI::PayloadType::PICTURE_TIMING)
|| sei->payloadType() == SEI::PayloadType::DECODING_UNIT_INFO
|| sei->payloadType() == SEI::PayloadType::SUBPICTURE_LEVEL_INFO)
{
writeInpuNalUnitToStream &= targetOlsIncludeAllVclLayers;
}
......
......@@ -574,7 +574,7 @@ uint32_t DecApp::decode()
#if JVET_Z0120_SII_SEI_PROCESSING
PicList::iterator iterPic = pcListPic->begin();
Picture* pcPic = *(iterPic);
SEIMessages shutterIntervalInfo = getSeisByType(pcPic->SEIs, SEI::SHUTTER_INTERVAL_INFO);
SEIMessages shutterIntervalInfo = getSeisByType(pcPic->SEIs, SEI::PayloadType::SHUTTER_INTERVAL_INFO);
if (!m_shutterIntervalPostFileName.empty())
{
......@@ -1475,7 +1475,7 @@ void DecApp::xOutputAnnotatedRegions(PicList* pcListPic)
if (pcPic->neededForOutput)
{
// Check if any annotated region SEI has arrived
SEIMessages annotatedRegionSEIs = getSeisByType(pcPic->SEIs, SEI::ANNOTATED_REGIONS);
SEIMessages annotatedRegionSEIs = getSeisByType(pcPic->SEIs, SEI::PayloadType::ANNOTATED_REGIONS);
for(auto it=annotatedRegionSEIs.begin(); it!=annotatedRegionSEIs.end(); it++)
{
const SEIAnnotatedRegions &seiAnnotatedRegions = *(SEIAnnotatedRegions*)(*it);
......
......@@ -732,7 +732,11 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] )
SMultiValueInput<unsigned> cfg_siiSEIInputNumUnitsInSI(0, std::numeric_limits<uint32_t>::max(), 0, 7);
SMultiValueInput<uint16_t> cfg_poSEIPayloadType (0, 65535, 0, 256*2);
#if JVET_AB0069_SEI_PROCESSING_ORDER
SMultiValueInput<uint16_t> cfg_poSEIProcessingOrder(0, 65535, 0, 65536);
#else
SMultiValueInput<uint16_t> cfg_poSEIProcessingOrder (0, 255, 0, 256);
#endif
#if ENABLE_TRACING
string sTracingRule;
......@@ -3309,7 +3313,11 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] )
for (uint32_t i = 0; i < m_numofSEIMessages; i++)
{
m_poSEIPayloadType[i] = cfg_poSEIPayloadType.values[i];
#if JVET_AB0069_SEI_PROCESSING_ORDER
m_poSEIProcessingOrder[i] = (uint16_t)cfg_poSEIProcessingOrder.values[i];
#else
m_poSEIProcessingOrder[i] = (uint8_t)cfg_poSEIProcessingOrder.values[i];
#endif
//Error check, to avoid same PayloadType with different PayloadOrder
for (uint32_t j = 0; j < i; j++)
{
......
......@@ -758,7 +758,11 @@ protected:
bool m_poSEIEnabled;
std::vector<uint16_t> m_poSEIPayloadType;
#if JVET_AB0069_SEI_PROCESSING_ORDER
std::vector<uint16_t> m_poSEIProcessingOrder;
#else
std::vector<uint8_t> m_poSEIProcessingOrder;
#endif
uint32_t m_numofSEIMessages;
bool m_constrainedRaslEncoding;
......
......@@ -213,14 +213,14 @@ uint32_t SEIFilmGrainApp::process()
// parse FGC SEI
m_seiReader.parseSEImessage(&(nalu.getBitstream()), SEIs, nalu.m_nalUnitType, nalu.m_nuhLayerId, nalu.m_temporalId, vps, nullptr, m_hrd, &std::cout);
int payloadType = 0;
SEI::PayloadType payloadType;
std::list<SEI*>::iterator message;
SEIFilmGrainCharacteristics *fgcParameters;
for (message = SEIs.begin(); message != SEIs.end(); ++message)
{
SEIcount++;
payloadType = (*message)->payloadType();
if (payloadType == SEI::FILM_GRAIN_CHARACTERISTICS)
if (payloadType == SEI::PayloadType::FILM_GRAIN_CHARACTERISTICS)
{
if (m_seiFilmGrainOption == 1) // remove FGC SEI
{
......@@ -258,7 +258,7 @@ uint32_t SEIFilmGrainApp::process()
{
const bool useLongStartCode = (nalu.m_nalUnitType == NAL_UNIT_OPI || nalu.m_nalUnitType == NAL_UNIT_DCI || nalu.m_nalUnitType == NAL_UNIT_VPS || nalu.m_nalUnitType == NAL_UNIT_SPS
|| nalu.m_nalUnitType == NAL_UNIT_PPS || nalu.m_nalUnitType == NAL_UNIT_PREFIX_APS || nalu.m_nalUnitType == NAL_UNIT_SUFFIX_APS);
SEIMessages currentMessages = extractSeisByType(SEIs, SEI::FILM_GRAIN_CHARACTERISTICS);
SEIMessages currentMessages = extractSeisByType(SEIs, SEI::PayloadType::FILM_GRAIN_CHARACTERISTICS);
OutputNALUnit outNalu(NAL_UNIT_PREFIX_SEI, nalu.m_nuhLayerId, nalu.m_temporalId);
m_seiWriter.writeSEImessages(outNalu.m_bitstream, currentMessages, m_hrd, false, nalu.m_temporalId);
NALUnitEBSP naluWithHeader(outNalu);
......
......@@ -314,7 +314,7 @@ void SubpicMergeApp::parseSEI(SEIReader &seiReader, InputNALUnit &nalu, const VP
decodePictureHashSei = nullptr;
for (auto& s : seis)
{
if (s->payloadType() == SEI::DECODED_PICTURE_HASH)
if (s->payloadType() == SEI::PayloadType::DECODED_PICTURE_HASH)
{
decodePictureHashSei = s;
break;
......@@ -825,7 +825,9 @@ void SubpicMergeApp::copyNalUnitsToAccessUnit(AccessUnit &accessUnit, std::vecto
{
if (inNalu.m_nalUnitType == (NalUnitType)naluType)
{
if (!(naluType == NAL_UNIT_SUFFIX_SEI && inNalu.getBitstream().getFifo().at(2) == SEI::DECODED_PICTURE_HASH)) // Don't copy decoded_picture_hash SEI
if (!(naluType == NAL_UNIT_SUFFIX_SEI
&& SEI::PayloadType(inNalu.getBitstream().getFifo().at(2))
== SEI::PayloadType::DECODED_PICTURE_HASH)) // Don't copy decoded_picture_hash SEI
{
OutputNALUnit outNalu((NalUnitType)naluType);
copyInputNaluToOutputNalu(outNalu, inNalu);
......
......@@ -43,8 +43,7 @@
#include "UnitTools.h"
#include "UnitPartitioner.h"
XUCache g_globalUnitCache = XUCache();
XuPool g_xuPool = XuPool();
const UnitScale UnitScaleArray[NUM_CHROMA_FORMAT][MAX_NUM_COMPONENT] =
{
......@@ -58,19 +57,19 @@ const UnitScale UnitScaleArray[NUM_CHROMA_FORMAT][MAX_NUM_COMPONENT] =
// coding structure method definitions
// ---------------------------------------------------------------------------
CodingStructure::CodingStructure(CUCache& cuCache, PUCache& puCache, TUCache& tuCache)
: area ()
, picture ( nullptr )
, parent ( nullptr )
, bestCS ( nullptr )
, m_isTuEnc ( false )
, m_cuCache ( cuCache )
, m_puCache ( puCache )
, m_tuCache ( tuCache )
, bestParent ( nullptr )
CodingStructure::CodingStructure(XuPool &xuPool)
: area()
, picture(nullptr)
, parent(nullptr)
, bestCS(nullptr)
, m_isTuEnc(false)
, m_cuPool(xuPool.cuPool)
, m_puPool(xuPool.puPool)
, m_tuPool(xuPool.tuPool)
, bestParent(nullptr)
, tmpColorSpaceCost(MAX_DOUBLE)
, firstColorSpaceSelected(true)
, resetIBCBuffer (false)
, resetIBCBuffer(false)
{
for( uint32_t i = 0; i < MAX_NUM_COMPONENT; i++ )
{
......@@ -144,10 +143,9 @@ void CodingStructure::destroy()
delete[] m_motionBuf;
m_motionBuf = nullptr;
m_tuCache.cache( tus );
m_puCache.cache( pus );
m_cuCache.cache( cus );
m_tuPool.giveBack(tus);
m_puPool.giveBack(pus);
m_cuPool.giveBack(cus);
}
void CodingStructure::releaseIntermediateData()
......@@ -945,19 +943,19 @@ void CodingStructure::clearCuPuTuIdxMap( const UnitArea &_area, uint32_t numCu,
//pop cu/pu/tus
for( int i = m_numTUs; i > numTu; i-- )
{
m_tuCache.cache( tus.back() );
m_tuPool.giveBack(tus.back());
tus.pop_back();
m_numTUs--;
}
for( int i = m_numPUs; i > numPu; i-- )
{
m_puCache.cache( pus.back() );
m_puPool.giveBack(pus.back());
pus.pop_back();
m_numPUs--;
}
for( int i = m_numCUs; i > numCu; i-- )
{
m_cuCache.cache( cus.back() );
m_cuPool.giveBack(cus.back());
cus.pop_back();
m_numCUs--;
}
......@@ -1142,7 +1140,7 @@ TransformUnit* CodingStructure::getTU( const Position &pos, const ChannelType ef
{
const TransformUnit& tu = *tus[idx - 1];
if( tu.cu->ispMode ) // Intra SubPartitions mode
if (tu.cu->ispMode != ISPType::NONE) // Intra SubPartitions mode
{
//we obtain the offset to index the corresponding sub-partition
if( subTuIdx != -1 )
......@@ -1197,7 +1195,7 @@ const TransformUnit * CodingStructure::getTU( const Position &pos, const Channel
if( isLuma( effChType ) )
{
const TransformUnit& tu = *tus[idx - 1];
if( tu.cu->ispMode ) // Intra SubPartitions mode
if (tu.cu->ispMode != ISPType::NONE) // Intra SubPartitions mode
{
//we obtain the offset to index the corresponding sub-partition
if( subTuIdx != -1 )
......@@ -1230,7 +1228,7 @@ const TransformUnit * CodingStructure::getTU( const Position &pos, const Channel
CodingUnit& CodingStructure::addCU( const UnitArea &unit, const ChannelType chType )
{
CodingUnit *cu = m_cuCache.get();
CodingUnit *cu = m_cuPool.get();
cu->UnitArea::operator=( unit );
cu->initData();
......@@ -1282,7 +1280,7 @@ CodingUnit& CodingStructure::addCU( const UnitArea &unit, const ChannelType chTy
PredictionUnit& CodingStructure::addPU( const UnitArea &unit, const ChannelType chType )
{
PredictionUnit *pu = m_puCache.get();
PredictionUnit *pu = m_puPool.get();
pu->UnitArea::operator=( unit );
pu->initData();
......@@ -1333,7 +1331,7 @@ PredictionUnit& CodingStructure::addPU( const UnitArea &unit, const ChannelType
TransformUnit& CodingStructure::addTU( const UnitArea &unit, const ChannelType chType )
{
TransformUnit *tu = m_tuCache.get();
TransformUnit *tu = m_tuPool.get();
tu->UnitArea::operator=( unit );
tu->initData();
......@@ -1383,7 +1381,7 @@ TransformUnit& CodingStructure::addTU( const UnitArea &unit, const ChannelType c
const CompArea &_selfBlk = area.blocks[i];
const CompArea &_blk = tu->blocks[i];
bool isIspTu = tu->cu != nullptr && tu->cu->ispMode && isLuma(_blk.compID);
bool isIspTu = tu->cu != nullptr && tu->cu->ispMode != ISPType::NONE && isLuma(_blk.compID);
bool isFirstIspTu = false;
if (isIspTu)
......@@ -2224,7 +2222,7 @@ void CodingStructure::clearTUs()
pcu->firstTU = pcu->lastTU = nullptr;
}
m_tuCache.cache( tus );
m_tuPool.giveBack(tus);
m_numTUs = 0;
}
......@@ -2236,7 +2234,7 @@ void CodingStructure::clearPUs()
memset( m_puIdx[i], 0, sizeof( *m_puIdx[0] ) * unitScale[i].scaleArea( area.blocks[i].area() ) );
}
m_puCache.cache( pus );
m_puPool.giveBack(pus);
m_numPUs = 0;
for( auto &pcu : cus )
......@@ -2253,7 +2251,7 @@ void CodingStructure::clearCUs()
memset( m_cuIdx[i], 0, sizeof( *m_cuIdx[0] ) * unitScale[i].scaleArea( area.blocks[i].area() ) );
}
m_cuCache.cache( cus );
m_cuPool.giveBack(cus);
m_numCUs = 0;
}
......
......@@ -68,7 +68,7 @@ enum PictureType
#endif
NUM_PIC_TYPES
};
extern XUCache g_globalUnitCache;
extern XuPool g_xuPool;
// ---------------------------------------------------------------------------
// coding structure
......@@ -100,7 +100,7 @@ public:
const VPS *vps;
const PreCalcValues* pcv;
CodingStructure(CUCache&, PUCache&, TUCache&);
CodingStructure(XuPool &);
#if GDR_ENABLED
bool isGdrEnabled() { return m_gdrEnabled; }
......@@ -263,9 +263,9 @@ private:
unsigned m_numPUs;
unsigned m_numTUs;
CUCache& m_cuCache;
PUCache& m_puCache;
TUCache& m_tuCache;
CuPool &m_cuPool;
PuPool &m_puPool;
TuPool &m_tuPool;
std::vector<SAOBlkParam> m_sao;
......
......@@ -480,26 +480,24 @@ protected:
};
typedef dynamic_cache<Ctx> CtxCache;
typedef Pool<Ctx> CtxPool;
class TempCtx
{
TempCtx( const TempCtx& ) = delete;
const TempCtx& operator=( const TempCtx& ) = delete;
public:
TempCtx ( CtxCache* cache ) : m_ctx( *cache->get() ), m_cache( cache ) {}
TempCtx ( CtxCache* cache, const Ctx& ctx ) : m_ctx( *cache->get() ), m_cache( cache ) { m_ctx = ctx; }
TempCtx ( CtxCache* cache, SubCtx&& subCtx ) : m_ctx( *cache->get() ), m_cache( cache ) { m_ctx = std::forward<SubCtx>(subCtx); }
~TempCtx() { m_cache->cache( &m_ctx ); }
TempCtx(CtxPool *pool) : m_ctx(*pool->get()), m_pool(pool) {}
TempCtx(CtxPool *pool, const Ctx &ctx) : m_ctx(*pool->get()), m_pool(pool) { m_ctx = ctx; }
TempCtx(CtxPool *pool, SubCtx &&subCtx) : m_ctx(*pool->get()), m_pool(pool) { m_ctx = std::forward<SubCtx>(subCtx); }
~TempCtx() { m_pool->giveBack(&m_ctx); }
const Ctx& operator=( const Ctx& ctx ) { return ( m_ctx = ctx ); }
SubCtx operator=( SubCtx&& subCtx ) { return m_ctx = std::forward<SubCtx>( subCtx ); }
operator const Ctx& () const { return m_ctx; }
operator Ctx& () { return m_ctx; }
private:
Ctx& m_ctx;
CtxCache* m_cache;
CtxPool *m_pool;
};
......
......@@ -459,7 +459,7 @@ void DeblockingFilter::xDeblockCU( CodingUnit& cu, const DeblockEdgeDir edgeDir
if ( pcv.chrFormat != CHROMA_400 && cu.blocks[COMPONENT_Cb].valid() )
{
if ( !cu.ispMode || edge == 0 )
if (cu.ispMode == ISPType::NONE || edge == 0)
{
xEdgeFilterChroma( cu, edgeDir, edge );
}
......
......@@ -487,15 +487,15 @@ namespace DQIntern
{
bits = fracBitsAccess.getFracBitsArray(Ctx::QtRootCbf());
}
else if (tu.cu->ispMode && isLuma(chType))
else if (tu.cu->ispMode != ISPType::NONE && isLuma(chType))
{
bool lastCbfIsInferred = false;
if (CU::isISPLast(*tu.cu, tu.Y(), compID))
{
TransformUnit *tuPointer = tu.cu->firstTU;
const uint32_t nTus = tu.cu->ispMode == HOR_INTRA_SUBPARTITIONS ? tu.cu->lheight() >> floorLog2(tu.lheight())
: tu.cu->lwidth() >> floorLog2(tu.lwidth());
const uint32_t nTus = tu.cu->ispMode == ISPType::HOR ? tu.cu->lheight() >> floorLog2(tu.lheight())
: tu.cu->lwidth() >> floorLog2(tu.lwidth());
lastCbfIsInferred = true;
for (int tuIdx = 0; tuIdx < nTus - 1; tuIdx++)
......
......@@ -374,7 +374,7 @@ void IntraPrediction::initPredIntraParams(const PredictionUnit & pu, const CompA
const ComponentID compId = area.compID;
const ChannelType chType = toChannelType(compId);
const bool useISP = NOT_INTRA_SUBPARTITIONS != pu.cu->ispMode && isLuma(chType);
const bool useISP = ISPType::NONE != pu.cu->ispMode && isLuma(chType);
const Size cuSize = Size(pu.cu->blocks[compId].width, pu.cu->blocks[compId].height);
const Size puSize = Size(area.width, area.height);
......@@ -814,12 +814,12 @@ void IntraPrediction::initIntraPatternChTypeISP(const CodingUnit& cu, const Comp
{
Pel *refBufUnfiltered = m_refBuffer[area.compID][PRED_BUF_UNFILTERED];
// With the first subpartition all the CU reference samples are fetched at once in a single call to xFillReferenceSamples
if (cu.ispMode == HOR_INTRA_SUBPARTITIONS)
if (cu.ispMode == ISPType::HOR)
{
m_leftRefLength = cu.Y().height << 1;
m_topRefLength = cu.Y().width + area.width;
}
else //if (cu.ispMode == VER_INTRA_SUBPARTITIONS)
else // if (cu.ispMode == ISPType::VER)
{
m_leftRefLength = cu.Y().height + area.height;
m_topRefLength = cu.Y().width << 1;
......@@ -838,7 +838,7 @@ void IntraPrediction::initIntraPatternChTypeISP(const CodingUnit& cu, const Comp
const int predSizeHor = m_topRefLength;
const int predSizeVer = m_leftRefLength;
if (cu.ispMode == HOR_INTRA_SUBPARTITIONS)
if (cu.ispMode == ISPType::HOR)
{
Pel* src = recBuf.bufAt(0, -1);
Pel *ref = m_refBuffer[area.compID][PRED_BUF_UNFILTERED] + m_refBufferStride[area.compID];
......@@ -929,12 +929,13 @@ void IntraPrediction::xFillReferenceSamples( const CPelBuf &recoBuf, Pel* refBuf
m_refBufferStride[area.compID] = predStride;
const bool useIsp = cu.ispMode != ISPType::NONE && isLuma(area.compID);
const bool noShift = pcv.noChroma2x2 && area.width == 4; // don't shift on the lowest level (chroma not-split)
const int unitWidth = tuWidth <= 2 && cu.ispMode && isLuma(area.compID)
const int unitWidth = tuWidth <= 2 && useIsp
? tuWidth
: pcv.minCUWidth >> (noShift ? 0 : getComponentScaleX(area.compID, sps.getChromaFormatIdc()));
const int unitHeight =
tuHeight <= 2 && cu.ispMode && isLuma(area.compID)
tuHeight <= 2 && useIsp
? tuHeight
: pcv.minCUHeight >> (noShift ? 0 : getComponentScaleY(area.compID, sps.getChromaFormatIdc()));
......
......@@ -251,7 +251,7 @@ void Picture::finalInit( const VPS* vps, const SPS& sps, const PPS& pps, PicHead
}
else
{
cs = new CodingStructure( g_globalUnitCache.cuCache, g_globalUnitCache.puCache, g_globalUnitCache.tuCache );
cs = new CodingStructure(g_xuPool);
cs->sps = &sps;
#if GDR_ENABLED
cs->create(chromaFormatIDC, Area(0, 0, width, height), true, (bool)sps.getPLTMode(), sps.getGDREnabledFlag());
......@@ -1441,13 +1441,13 @@ void Picture::createGrainSynthesizer(bool firstPictureInSequence, SEIFilmGrainSy
PelUnitBuf Picture::getDisplayBufFG(bool wrap)
{
int payloadType = 0;
SEI::PayloadType payloadType;
std::list<SEI *>::iterator message;
for (message = SEIs.begin(); message != SEIs.end(); ++message)
{
payloadType = (*message)->payloadType();
if (payloadType == SEI::FILM_GRAIN_CHARACTERISTICS)
if (payloadType == SEI::PayloadType::FILM_GRAIN_CHARACTERISTICS)
{
m_grainCharacteristic->m_errorCode = -1;
*m_grainCharacteristic->m_fgcParameters = *static_cast<SEIFilmGrainCharacteristics *>(*message);
......@@ -1469,7 +1469,7 @@ PelUnitBuf Picture::getDisplayBufFG(bool wrap)
}
else
{
if (payloadType == SEI::FILM_GRAIN_CHARACTERISTICS)
if (payloadType == SEI::PayloadType::FILM_GRAIN_CHARACTERISTICS)
{
msg(WARNING, "Film Grain synthesis is not performed. Error code: 0x%x \n", m_grainCharacteristic->m_errorCode);
}
......@@ -1493,13 +1493,13 @@ void Picture::createColourTransfProcessor(bool firstPictureInSequence, SEIColour
PelUnitBuf Picture::getDisplayBuf()
{
int payloadType = 0;
SEI::PayloadType payloadType;
std::list<SEI*>::iterator message;
for (message = SEIs.begin(); message != SEIs.end(); ++message)
{
payloadType = (*message)->payloadType();
if (payloadType == SEI::COLOUR_TRANSFORM_INFO)
if (payloadType == SEI::PayloadType::COLOUR_TRANSFORM_INFO)
{
// re-init parameters
*m_colourTranfParams->m_pColourTransfParams = *static_cast<SEIColourTransformInfo*>(*message);
......
......@@ -521,7 +521,7 @@ void QuantRDOQ::quant(TransformUnit &tu, const ComponentID &compID, const CCoeff
bool useRDOQ = useTransformSkip ? m_useRDOQTS : m_useRDOQ;
if (!tu.cu->ispMode || !isLuma(compID))
if (tu.cu->ispMode == ISPType::NONE || !isLuma(compID))
{
useRDOQ &= uiWidth > 2;
useRDOQ &= uiHeight > 2;
......@@ -579,7 +579,7 @@ void QuantRDOQ::xRateDistOptQuant(TransformUnit &tu, const ComponentID &compID,
const bool extendedPrecision = sps.getSpsRangeExtension().getExtendedPrecisionProcessingFlag();
const int maxLog2TrDynamicRange = sps.getMaxLog2TrDynamicRange(chType);
const bool useIntraSubPartitions = tu.cu->ispMode && isLuma(compID);
const bool useIntraSubPartitions = tu.cu->ispMode != ISPType::NONE && isLuma(compID);
/* for 422 chroma blocks, the effective scaling applied during transformation is not a power of 2, hence it cannot be
* implemented as a bit-shift (the quantised result will be sqrt(2) * larger than required). Alternatively, adjust the
* uiLog2TrSize applied in iTransformShift, such that the result is 1/sqrt(2) the required result (i.e. smaller)
......@@ -920,7 +920,8 @@ void QuantRDOQ::xRateDistOptQuant(TransformUnit &tu, const ComponentID &compID,
{
bool rootCbfSoFar = false;
bool isLastSubPartition = CU::isISPLast(*tu.cu, tu.Y(), compID);
uint32_t nTus = tu.cu->ispMode == HOR_INTRA_SUBPARTITIONS ? tu.cu->lheight() >> floorLog2(tu.lheight()) : tu.cu->lwidth() >> floorLog2(tu.lwidth());
uint32_t nTus = tu.cu->ispMode == ISPType::HOR ? tu.cu->lheight() >> floorLog2(tu.lheight())
: tu.cu->lwidth() >> floorLog2(tu.lwidth());
if( isLastSubPartition )
{
TransformUnit* tuPointer = tu.cu->firstTU;
......
......@@ -418,10 +418,12 @@ bool SEIMultiviewAcquisitionInfo::isMAISameContent(SEIMultiviewAcquisitionInfo *
#if JVET_T0056_SEI_MANIFEST
SEIManifest::SEIManifestDescription SEIManifest::getSEIMessageDescription(const PayloadType payloadType)
{
std::vector<PayloadType> necessary = { FRAME_PACKING, EQUIRECTANGULAR_PROJECTION, GENERALIZED_CUBEMAP_PROJECTION,
SPHERE_ROTATION, REGION_WISE_PACKING };
std::vector<PayloadType> necessary = { PayloadType::FRAME_PACKING, PayloadType::EQUIRECTANGULAR_PROJECTION,
PayloadType::GENERALIZED_CUBEMAP_PROJECTION, PayloadType::SPHERE_ROTATION,
PayloadType::REGION_WISE_PACKING };
std::vector<PayloadType> undetermined = { USER_DATA_REGISTERED_ITU_T_T35, USER_DATA_UNREGISTERED };
std::vector<PayloadType> undetermined = { PayloadType::USER_DATA_REGISTERED_ITU_T_T35,
PayloadType::USER_DATA_UNREGISTERED };
for (auto pt : necessary)
{
......@@ -445,13 +447,13 @@ SEIManifest::SEIManifestDescription SEIManifest::getSEIMessageDescription(const
uint8_t SEIPrefixIndication::getNumsOfSeiPrefixIndications(const SEI *sei)
{
PayloadType payloadType = sei->payloadType();
CHECK((payloadType == SEI_MANIFEST), "SEI_SPI should not include SEI_manfest");
CHECK((payloadType == SEI_PREFIX_INDICATION), "SEI_SPI should not include itself");
CHECK((payloadType == PayloadType::SEI_MANIFEST), "SEI_SPI should not include SEI_manfest");
CHECK((payloadType == PayloadType::SEI_PREFIX_INDICATION), "SEI_SPI should not include itself");
//Unable to determine how many indicators are needed, it will be determined in xWriteSEIPrefixIndication() return 3
std::vector<PayloadType> indicationN = { REGION_WISE_PACKING };
std::vector<PayloadType> indicationN = { PayloadType::REGION_WISE_PACKING };
// Need two indicators to finish writing the SEI prefix indication message(return 2)
std::vector<PayloadType> indication2 = { SPHERE_ROTATION };
std::vector<PayloadType> indication2 = { PayloadType::SPHERE_ROTATION };
for (auto pt: indicationN)
{
......@@ -492,58 +494,65 @@ bool SEIMultiviewViewPosition::isMVPSameContent(SEIMultiviewViewPosition *mvpB)
}
// Static member
const char *SEI::getSEIMessageString(SEI::PayloadType payloadType)
{
switch (payloadType)
{
case SEI::BUFFERING_PERIOD: return "Buffering period";
case SEI::PICTURE_TIMING: return "Picture timing";
case SEI::FILLER_PAYLOAD: return "Filler payload"; // not currently decoded
case SEI::USER_DATA_REGISTERED_ITU_T_T35: return "User data registered"; // not currently decoded
case SEI::USER_DATA_UNREGISTERED: return "User data unregistered";
case SEI::FILM_GRAIN_CHARACTERISTICS: return "Film grain characteristics"; // not currently decoded
case SEI::FRAME_PACKING: return "Frame packing arrangement";
case SEI::DISPLAY_ORIENTATION: return "Display orientation";
case SEI::GREEN_METADATA: return "Green metadata";
case SEI::PARAMETER_SETS_INCLUSION_INDICATION: return "Parameter sets inclusion indication";
case SEI::DECODING_UNIT_INFO: return "Decoding unit information";
case SEI::SCALABLE_NESTING: return "Scalable nesting";
case SEI::DECODED_PICTURE_HASH: return "Decoded picture hash";
case SEI::DEPENDENT_RAP_INDICATION: return "Dependent RAP indication";
case SEI::MASTERING_DISPLAY_COLOUR_VOLUME: return "Mastering display colour volume";
case SEI::ALTERNATIVE_TRANSFER_CHARACTERISTICS: return "Alternative transfer characteristics";
case SEI::CONTENT_LIGHT_LEVEL_INFO: return "Content light level information";
case SEI::AMBIENT_VIEWING_ENVIRONMENT: return "Ambient viewing environment";
case SEI::CONTENT_COLOUR_VOLUME: return "Content colour volume";
case SEI::COLOUR_TRANSFORM_INFO: return "Colour transform information";
case SEI::EQUIRECTANGULAR_PROJECTION: return "Equirectangular projection";
case SEI::SPHERE_ROTATION: return "Sphere rotation";
case SEI::REGION_WISE_PACKING: return "Region wise packing information";
case SEI::OMNI_VIEWPORT: return "Omni viewport";
case SEI::GENERALIZED_CUBEMAP_PROJECTION: return "Generalized cubemap projection";
case SEI::ALPHA_CHANNEL_INFO: return "Alpha channel information";
case SEI::DEPTH_REPRESENTATION_INFO: return "Depth representation information";
case SEI::MULTIVIEW_ACQUISITION_INFO: return "Multiview acquisition information";
case SEI::MULTIVIEW_VIEW_POSITION: return "Multiview view position";
case SEI::SAMPLE_ASPECT_RATIO_INFO: return "Sample aspect ratio information";
case SEI::SUBPICTURE_LEVEL_INFO: return "Subpicture level information";
case SEI::ANNOTATED_REGIONS: return "Annotated Region";
case SEI::SCALABILITY_DIMENSION_INFO: return "Scalability dimension information";
case SEI::EXTENDED_DRAP_INDICATION: return "Extended DRAP indication";
static const std::map<SEI::PayloadType, const char *> payloadTypeStrings = {
{ SEI::PayloadType::BUFFERING_PERIOD, "Buffering period" },
{ SEI::PayloadType::PICTURE_TIMING, "Picture timing" },
{ SEI::PayloadType::FILLER_PAYLOAD, "Filler payload" },
{ SEI::PayloadType::USER_DATA_REGISTERED_ITU_T_T35, "User data registered" },
{ SEI::PayloadType::USER_DATA_UNREGISTERED, "User data unregistered" },
{ SEI::PayloadType::FILM_GRAIN_CHARACTERISTICS, "Film grain characteristics" },
{ SEI::PayloadType::FRAME_PACKING, "Frame packing arrangement" },
{ SEI::PayloadType::DISPLAY_ORIENTATION, "Display orientation" },
{ SEI::PayloadType::GREEN_METADATA, "Green metadata" },
{ SEI::PayloadType::PARAMETER_SETS_INCLUSION_INDICATION, "Parameter sets inclusion indication" },
{ SEI::PayloadType::DECODING_UNIT_INFO, "Decoding unit information" },
{ SEI::PayloadType::SCALABLE_NESTING, "Scalable nesting" },
{ SEI::PayloadType::DECODED_PICTURE_HASH, "Decoded picture hash" },
{ SEI::PayloadType::DEPENDENT_RAP_INDICATION, "Dependent RAP indication" },
{ SEI::PayloadType::MASTERING_DISPLAY_COLOUR_VOLUME, "Mastering display colour volume" },
{ SEI::PayloadType::ALTERNATIVE_TRANSFER_CHARACTERISTICS, "Alternative transfer characteristics" },
{ SEI::PayloadType::CONTENT_LIGHT_LEVEL_INFO, "Content light level information" },
{ SEI::PayloadType::AMBIENT_VIEWING_ENVIRONMENT, "Ambient viewing environment" },
{ SEI::PayloadType::CONTENT_COLOUR_VOLUME, "Content colour volume" },
{ SEI::PayloadType::COLOUR_TRANSFORM_INFO, "Colour transform information" },
{ SEI::PayloadType::EQUIRECTANGULAR_PROJECTION, "Equirectangular projection" },
{ SEI::PayloadType::SPHERE_ROTATION, "Sphere rotation" },
{ SEI::PayloadType::REGION_WISE_PACKING, "Region wise packing information" },
{ SEI::PayloadType::OMNI_VIEWPORT, "Omni viewport" },
{ SEI::PayloadType::GENERALIZED_CUBEMAP_PROJECTION, "Generalized cubemap projection" },
{ SEI::PayloadType::ALPHA_CHANNEL_INFO, "Alpha channel information" },
{ SEI::PayloadType::DEPTH_REPRESENTATION_INFO, "Depth representation information" },
{ SEI::PayloadType::MULTIVIEW_ACQUISITION_INFO, "Multiview acquisition information" },
{ SEI::PayloadType::MULTIVIEW_VIEW_POSITION, "Multiview view position" },
{ SEI::PayloadType::SAMPLE_ASPECT_RATIO_INFO, "Sample aspect ratio information" },
{ SEI::PayloadType::SUBPICTURE_LEVEL_INFO, "Subpicture level information" },
{ SEI::PayloadType::ANNOTATED_REGIONS, "Annotated Region" },
{ SEI::PayloadType::SCALABILITY_DIMENSION_INFO, "Scalability dimension information" },
{ SEI::PayloadType::EXTENDED_DRAP_INDICATION, "Extended DRAP indication" },
#if JVET_T0056_SEI_MANIFEST
case SEI::SEI_MANIFEST: return "SEI manifest";
{ SEI::PayloadType::SEI_MANIFEST, "SEI manifest" },
#endif
#if JVET_T0056_SEI_PREFIX_INDICATION
case SEI::SEI_PREFIX_INDICATION: return "SEI prefix indication";
#endif
case SEI::CONSTRAINED_RASL_ENCODING: return "Constrained RASL encoding";
case SEI::VDI_SEI_ENVELOPE: return "Video decoding interface SEI envelope";
case SEI::SHUTTER_INTERVAL_INFO: return "Shutter interval information";
case SEI::NEURAL_NETWORK_POST_FILTER_CHARACTERISTICS: return "Neural network post-filter characteristics";
case SEI::NEURAL_NETWORK_POST_FILTER_ACTIVATION: return "Neural network post-filter activation";
case SEI::PHASE_INDICATION: return "Phase Indication";
case SEI::SEI_PROCESSING_ORDER: return "SEI messages Processing order";
default: return "Unknown";
{ SEI::PayloadType::SEI_PREFIX_INDICATION, "SEI prefix indication" },
#endif
{ SEI::PayloadType::CONSTRAINED_RASL_ENCODING, "Constrained RASL encoding" },
{ SEI::PayloadType::VDI_SEI_ENVELOPE, "Video decoding interface SEI envelope" },
{ SEI::PayloadType::SHUTTER_INTERVAL_INFO, "Shutter interval information" },
{ SEI::PayloadType::NEURAL_NETWORK_POST_FILTER_CHARACTERISTICS, "Neural network post-filter characteristics" },
{ SEI::PayloadType::NEURAL_NETWORK_POST_FILTER_ACTIVATION, "Neural network post-filter activation" },
{ SEI::PayloadType::PHASE_INDICATION, "Phase Indication" },
{ SEI::PayloadType::SEI_PROCESSING_ORDER, "SEI messages Processing order" },
};
const char *SEI::getSEIMessageString(SEI::PayloadType payloadType)
{
auto p = payloadTypeStrings.find(payloadType);
if (p != payloadTypeStrings.end())
{
return p->second;
}
else
{
return "Unknown";
}
}
......@@ -52,7 +52,7 @@ class SPS;
class SEI
{
public:
enum PayloadType
enum class PayloadType : uint16_t
{
BUFFERING_PERIOD = 0,
PICTURE_TIMING = 1,
......@@ -69,40 +69,40 @@ public:
SCALABLE_NESTING = 133,
MASTERING_DISPLAY_COLOUR_VOLUME = 137,
COLOUR_TRANSFORM_INFO = 142,
CONTENT_LIGHT_LEVEL_INFO = 144,
DEPENDENT_RAP_INDICATION = 145,
ALTERNATIVE_TRANSFER_CHARACTERISTICS = 147,
AMBIENT_VIEWING_ENVIRONMENT = 148,
CONTENT_COLOUR_VOLUME = 149,
EQUIRECTANGULAR_PROJECTION = 150,
GENERALIZED_CUBEMAP_PROJECTION = 153,
SPHERE_ROTATION = 154,
REGION_WISE_PACKING = 155,
OMNI_VIEWPORT = 156,
GENERALIZED_CUBEMAP_PROJECTION = 153,
ALPHA_CHANNEL_INFO = 165,
FRAME_FIELD_INFO = 168,
DEPTH_REPRESENTATION_INFO = 177,
MULTIVIEW_ACQUISITION_INFO = 179,
MULTIVIEW_VIEW_POSITION = 180,
SUBPICTURE_LEVEL_INFO = 203,
SAMPLE_ASPECT_RATIO_INFO = 204,
CONTENT_LIGHT_LEVEL_INFO = 144,
ALTERNATIVE_TRANSFER_CHARACTERISTICS = 147,
AMBIENT_VIEWING_ENVIRONMENT = 148,
CONTENT_COLOUR_VOLUME = 149,
#if JVET_T0056_SEI_MANIFEST
SEI_MANIFEST = 200,
SEI_MANIFEST = 200,
#endif
#if JVET_T0056_SEI_PREFIX_INDICATION
SEI_PREFIX_INDICATION = 201,
SEI_PREFIX_INDICATION = 201,
#endif
ANNOTATED_REGIONS = 202,
SCALABILITY_DIMENSION_INFO = 205,
EXTENDED_DRAP_INDICATION = 206,
CONSTRAINED_RASL_ENCODING = 207,
VDI_SEI_ENVELOPE = 208,
SHUTTER_INTERVAL_INFO = 209,
SUBPICTURE_LEVEL_INFO = 203,
SAMPLE_ASPECT_RATIO_INFO = 204,
ANNOTATED_REGIONS = 202,
SCALABILITY_DIMENSION_INFO = 205,
EXTENDED_DRAP_INDICATION = 206,
CONSTRAINED_RASL_ENCODING = 207,
VDI_SEI_ENVELOPE = 208,
SHUTTER_INTERVAL_INFO = 209,
NEURAL_NETWORK_POST_FILTER_CHARACTERISTICS = 210,
NEURAL_NETWORK_POST_FILTER_ACTIVATION = 211,
PHASE_INDICATION = 212,
PHASE_INDICATION = 212,
SEI_PROCESSING_ORDER = 213,
SEI_PROCESSING_ORDER = 213,
};
SEI() {}
......@@ -113,10 +113,21 @@ public:
virtual PayloadType payloadType() const = 0;
};
struct SeiPayload
{
SEI::PayloadType payloadType;
uint32_t payloadLayerId;
bool payloadNested;
uint32_t payloadSize;
uint8_t *payload;
int duiIdx;
int subpicId;
};
class SEIFillerPayload : public SEI
{
public:
PayloadType payloadType() const { return FILLER_PAYLOAD; }
PayloadType payloadType() const { return PayloadType::FILLER_PAYLOAD; }
SEIFillerPayload() {}
virtual ~SEIFillerPayload() {}
......@@ -125,7 +136,7 @@ public:
class SEIShutterIntervalInfo : public SEI
{
public:
PayloadType payloadType() const { return SHUTTER_INTERVAL_INFO; }
PayloadType payloadType() const { return PayloadType::SHUTTER_INTERVAL_INFO; }
SEIShutterIntervalInfo() {}
virtual ~SEIShutterIntervalInfo() {}
......@@ -140,20 +151,24 @@ public:
class SEIProcessingOrderInfo : public SEI
{
public:
PayloadType payloadType() const { return SEI_PROCESSING_ORDER; }
PayloadType payloadType() const { return PayloadType::SEI_PROCESSING_ORDER; }
SEIProcessingOrderInfo() {}
virtual ~SEIProcessingOrderInfo() {}
bool m_posEnabled;
std::vector<uint16_t> m_posPayloadType;
#if JVET_AB0069_SEI_PROCESSING_ORDER
std::vector<uint16_t> m_posProcessingOrder;
#else
std::vector<uint8_t> m_posProcessingOrder;
#endif
uint32_t m_posNumofSeiMessages;
};
class SEIEquirectangularProjection : public SEI
{
public:
PayloadType payloadType() const { return EQUIRECTANGULAR_PROJECTION; }
PayloadType payloadType() const { return PayloadType::EQUIRECTANGULAR_PROJECTION; }
SEIEquirectangularProjection() {}
virtual ~SEIEquirectangularProjection() {}
......@@ -169,7 +184,7 @@ public:
class SEISphereRotation : public SEI
{
public:
PayloadType payloadType() const { return SPHERE_ROTATION; }
PayloadType payloadType() const { return PayloadType::SPHERE_ROTATION; }
SEISphereRotation() {}
virtual ~SEISphereRotation() {}
......@@ -184,7 +199,7 @@ public:
class SEIOmniViewport : public SEI
{
public:
PayloadType payloadType() const { return OMNI_VIEWPORT; }
PayloadType payloadType() const { return PayloadType::OMNI_VIEWPORT; }
SEIOmniViewport() {}
virtual ~SEIOmniViewport() {}
......@@ -208,7 +223,7 @@ public:
class SEIRegionWisePacking : public SEI
{
public:
PayloadType payloadType() const { return REGION_WISE_PACKING; }
PayloadType payloadType() const { return PayloadType::REGION_WISE_PACKING; }
SEIRegionWisePacking() {}
virtual ~SEIRegionWisePacking() {}
bool m_rwpCancelFlag;
......@@ -240,7 +255,7 @@ public:
class SEIGeneralizedCubemapProjection : public SEI
{
public:
PayloadType payloadType() const { return GENERALIZED_CUBEMAP_PROJECTION; }
PayloadType payloadType() const { return PayloadType::GENERALIZED_CUBEMAP_PROJECTION; }
SEIGeneralizedCubemapProjection() {}
virtual ~SEIGeneralizedCubemapProjection() {}
......@@ -264,7 +279,7 @@ public:
class SEIScalabilityDimensionInfo : public SEI
{
public:
PayloadType payloadType() const { return SCALABILITY_DIMENSION_INFO; }
PayloadType payloadType() const { return PayloadType::SCALABILITY_DIMENSION_INFO; }
SEIScalabilityDimensionInfo()
: m_sdiNumViews (0)
, m_sdiMaxLayersMinus1 (0)
......@@ -291,7 +306,7 @@ public:
class SEIMultiviewAcquisitionInfo : public SEI
{
public:
PayloadType payloadType( ) const { return MULTIVIEW_ACQUISITION_INFO; }
PayloadType payloadType() const { return PayloadType::MULTIVIEW_ACQUISITION_INFO; }
SEIMultiviewAcquisitionInfo ( ) { };
~SEIMultiviewAcquisitionInfo( ) { };
SEI* getCopy( ) const { return new SEIMultiviewAcquisitionInfo(*this); };
......@@ -386,7 +401,7 @@ private:
class SEIMultiviewViewPosition : public SEI
{
public:
PayloadType payloadType() const { return MULTIVIEW_VIEW_POSITION; }
PayloadType payloadType() const { return PayloadType::MULTIVIEW_VIEW_POSITION; }
SEIMultiviewViewPosition() { };
~SEIMultiviewViewPosition() { };
bool isMVPSameContent(SEIMultiviewViewPosition* mvpB);
......@@ -398,7 +413,7 @@ public:
class SEIAlphaChannelInfo : public SEI
{
public:
PayloadType payloadType() const { return ALPHA_CHANNEL_INFO; }
PayloadType payloadType() const { return PayloadType::ALPHA_CHANNEL_INFO; }
SEIAlphaChannelInfo()
: m_aciCancelFlag (false)
, m_aciUseIdc (0)
......@@ -424,7 +439,7 @@ public:
class SEIDepthRepresentationInfo : public SEI
{
public:
PayloadType payloadType() const { return DEPTH_REPRESENTATION_INFO; }
PayloadType payloadType() const { return PayloadType::DEPTH_REPRESENTATION_INFO; }
SEIDepthRepresentationInfo()
: m_driZNearFlag (false)
, m_driZFarFlag (false)
......@@ -457,7 +472,7 @@ public:
class SEISampleAspectRatioInfo : public SEI
{
public:
PayloadType payloadType() const { return SAMPLE_ASPECT_RATIO_INFO; }
PayloadType payloadType() const { return PayloadType::SAMPLE_ASPECT_RATIO_INFO; }
SEISampleAspectRatioInfo() {}
virtual ~SEISampleAspectRatioInfo() {}
bool m_sariCancelFlag;
......@@ -470,7 +485,7 @@ public:
class SEIPhaseIndication : public SEI
{
public:
PayloadType payloadType() const { return PHASE_INDICATION; }
PayloadType payloadType() const { return PayloadType::PHASE_INDICATION; }
SEIPhaseIndication() {}
virtual ~SEIPhaseIndication() {}
int m_horPhaseNum;
......@@ -484,7 +499,7 @@ static constexpr uint32_t ISO_IEC_11578_LEN=16;
class SEIuserDataUnregistered : public SEI
{
public:
PayloadType payloadType() const { return USER_DATA_UNREGISTERED; }
PayloadType payloadType() const { return PayloadType::USER_DATA_UNREGISTERED; }
SEIuserDataUnregistered()
: userData(0)
......@@ -503,7 +518,7 @@ public:
class SEIDecodedPictureHash : public SEI
{
public:
PayloadType payloadType() const { return DECODED_PICTURE_HASH; }
PayloadType payloadType() const { return PayloadType::DECODED_PICTURE_HASH; }
SEIDecodedPictureHash() {}
virtual ~SEIDecodedPictureHash() {}
......@@ -517,7 +532,7 @@ public:
class SEIDependentRAPIndication : public SEI
{
public:
PayloadType payloadType() const { return DEPENDENT_RAP_INDICATION; }
PayloadType payloadType() const { return PayloadType::DEPENDENT_RAP_INDICATION; }
SEIDependentRAPIndication() { }
virtual ~SEIDependentRAPIndication() { }
......@@ -527,7 +542,7 @@ public:
class SEIBufferingPeriod : public SEI
{
public:
PayloadType payloadType() const { return BUFFERING_PERIOD; }
PayloadType payloadType() const { return PayloadType::BUFFERING_PERIOD; }
void copyTo (SEIBufferingPeriod& target) const;
SEIBufferingPeriod()
......@@ -594,7 +609,7 @@ public:
class SEIPictureTiming : public SEI
{
public:
PayloadType payloadType() const { return PICTURE_TIMING; }
PayloadType payloadType() const { return PayloadType::PICTURE_TIMING; }
void copyTo (SEIPictureTiming& target) const;
SEIPictureTiming()
......@@ -642,7 +657,7 @@ public:
class SEIDecodingUnitInfo : public SEI
{
public:
PayloadType payloadType() const { return DECODING_UNIT_INFO; }
PayloadType payloadType() const { return PayloadType::DECODING_UNIT_INFO; }
SEIDecodingUnitInfo()
: m_decodingUnitIdx(0)
......@@ -664,7 +679,7 @@ public:
class SEIFrameFieldInfo : public SEI
{
public:
PayloadType payloadType() const { return FRAME_FIELD_INFO; }
PayloadType payloadType() const { return PayloadType::FRAME_FIELD_INFO; }
SEIFrameFieldInfo()
: m_fieldPicFlag(false)
......@@ -694,7 +709,7 @@ public:
class SEIFramePacking : public SEI
{
public:
PayloadType payloadType() const { return FRAME_PACKING; }
PayloadType payloadType() const { return PayloadType::FRAME_PACKING; }
SEIFramePacking() {}
virtual ~SEIFramePacking() {}
......@@ -722,7 +737,7 @@ public:
class SEIDisplayOrientation : public SEI
{
public:
PayloadType payloadType() const { return DISPLAY_ORIENTATION; }
PayloadType payloadType() const { return PayloadType::DISPLAY_ORIENTATION; }
SEIDisplayOrientation() {}
virtual ~SEIDisplayOrientation() {}
......@@ -735,7 +750,7 @@ public:
class SEIGreenMetadata : public SEI
{
public:
PayloadType payloadType() const { return GREEN_METADATA; }
PayloadType payloadType() const { return PayloadType::GREEN_METADATA; }
SEIGreenMetadata() {}
virtual ~SEIGreenMetadata() {}
......@@ -745,7 +760,7 @@ public:
class SEIGreenMetadataInfo : public SEI
{
public:
PayloadType payloadType() const { return GREEN_METADATA; }
PayloadType payloadType() const { return PayloadType::GREEN_METADATA; }
SEIGreenMetadataInfo() {}
virtual ~SEIGreenMetadataInfo() {}
......@@ -778,7 +793,7 @@ public:
class SEIParameterSetsInclusionIndication : public SEI
{
public:
PayloadType payloadType() const { return PARAMETER_SETS_INCLUSION_INDICATION; }
PayloadType payloadType() const { return PayloadType::PARAMETER_SETS_INCLUSION_INDICATION; }
SEIParameterSetsInclusionIndication() {}
virtual ~SEIParameterSetsInclusionIndication() {}
......@@ -788,11 +803,11 @@ public:
class SEIMasteringDisplayColourVolume : public SEI
{
public:
PayloadType payloadType() const { return MASTERING_DISPLAY_COLOUR_VOLUME; }
SEIMasteringDisplayColourVolume() {}
virtual ~SEIMasteringDisplayColourVolume(){}
PayloadType payloadType() const { return PayloadType::MASTERING_DISPLAY_COLOUR_VOLUME; }
SEIMasteringDisplayColourVolume() {}
virtual ~SEIMasteringDisplayColourVolume() {}
SEIMasteringDisplay values;
SEIMasteringDisplay values;
};
typedef std::list<SEI*> SEIMessages;
......@@ -809,7 +824,7 @@ void deleteSEIs (SEIMessages &seiList);
class SEIScalableNesting : public SEI
{
public:
PayloadType payloadType() const { return SCALABLE_NESTING; }
PayloadType payloadType() const { return PayloadType::SCALABLE_NESTING; }
SEIScalableNesting()
: m_snOlsFlag (false)
......@@ -852,7 +867,7 @@ void xTraceSEIMessageType( SEI::PayloadType payloadType );
class SEIAlternativeTransferCharacteristics : public SEI
{
public:
PayloadType payloadType() const { return ALTERNATIVE_TRANSFER_CHARACTERISTICS; }
PayloadType payloadType() const { return PayloadType::ALTERNATIVE_TRANSFER_CHARACTERISTICS; }
SEIAlternativeTransferCharacteristics() : m_preferredTransferCharacteristics(18)
{ }
......@@ -864,7 +879,7 @@ public:
class SEIUserDataRegistered : public SEI
{
public:
PayloadType payloadType() const { return USER_DATA_REGISTERED_ITU_T_T35; }
PayloadType payloadType() const { return PayloadType::USER_DATA_REGISTERED_ITU_T_T35; }
SEIUserDataRegistered() {}
virtual ~SEIUserDataRegistered() {}
......@@ -876,7 +891,7 @@ public:
class SEIFilmGrainCharacteristics : public SEI
{
public:
PayloadType payloadType() const { return FILM_GRAIN_CHARACTERISTICS; }
PayloadType payloadType() const { return PayloadType::FILM_GRAIN_CHARACTERISTICS; }
SEIFilmGrainCharacteristics() {}
virtual ~SEIFilmGrainCharacteristics() {}
......@@ -915,7 +930,7 @@ public:
class SEIContentLightLevelInfo : public SEI
{
public:
PayloadType payloadType() const { return CONTENT_LIGHT_LEVEL_INFO; }
PayloadType payloadType() const { return PayloadType::CONTENT_LIGHT_LEVEL_INFO; }
SEIContentLightLevelInfo() { }
virtual ~SEIContentLightLevelInfo() { }
......@@ -927,7 +942,7 @@ public:
class SEIAmbientViewingEnvironment : public SEI
{
public:
PayloadType payloadType() const { return AMBIENT_VIEWING_ENVIRONMENT; }
PayloadType payloadType() const { return PayloadType::AMBIENT_VIEWING_ENVIRONMENT; }
SEIAmbientViewingEnvironment() { }
virtual ~SEIAmbientViewingEnvironment() { }
......@@ -940,7 +955,7 @@ public:
class SEIColourTransformInfo : public SEI
{
public:
PayloadType payloadType() const { return COLOUR_TRANSFORM_INFO; }
PayloadType payloadType() const { return PayloadType::COLOUR_TRANSFORM_INFO; }
SEIColourTransformInfo() { }
virtual ~SEIColourTransformInfo() { }
......@@ -962,7 +977,7 @@ public:
class SEIContentColourVolume : public SEI
{
public:
PayloadType payloadType() const { return CONTENT_COLOUR_VOLUME; }
PayloadType payloadType() const { return PayloadType::CONTENT_COLOUR_VOLUME; }
SEIContentColourVolume() {}
virtual ~SEIContentColourVolume() {}
......@@ -985,7 +1000,7 @@ public:
class SEISubpicureLevelInfo : public SEI
{
public:
PayloadType payloadType() const { return SUBPICTURE_LEVEL_INFO; }
PayloadType payloadType() const { return PayloadType::SUBPICTURE_LEVEL_INFO; }
SEISubpicureLevelInfo()
: m_numRefLevels(0)
, m_explicitFractionPresentFlag (false)
......@@ -1011,7 +1026,7 @@ public:
class SEIManifest : public SEI
{
public:
PayloadType payloadType() const { return SEI_MANIFEST; }
PayloadType payloadType() const { return PayloadType::SEI_MANIFEST; }
SEIManifest() {}
virtual ~SEIManifest() {}
......@@ -1024,7 +1039,7 @@ public:
UNDETERMINED_SEI_MESSAGE = 3,
};
uint16_t m_manifestNumSeiMsgTypes;
std::vector<uint16_t> m_manifestSeiPayloadType;
std::vector<PayloadType> m_manifestSeiPayloadType;
std::vector<uint8_t> m_manifestSeiDescription;
SEIManifestDescription getSEIMessageDescription(const PayloadType payloadType);
......@@ -1035,12 +1050,12 @@ public:
class SEIPrefixIndication : public SEI
{
public:
PayloadType payloadType() const { return SEI_PREFIX_INDICATION; }
PayloadType payloadType() const { return PayloadType::SEI_PREFIX_INDICATION; }
SEIPrefixIndication() {}
virtual ~SEIPrefixIndication() {}
uint16_t m_prefixSeiPayloadType;
PayloadType m_prefixSeiPayloadType;
uint8_t m_numSeiPrefixIndicationsMinus1;
std::vector<uint16_t> m_numBitsInPrefixIndicationMinus1;
std::vector<std::vector<int>> m_seiPrefixDataBit;
......@@ -1053,7 +1068,7 @@ public:
class SEIAnnotatedRegions : public SEI
{
public:
PayloadType payloadType() const { return ANNOTATED_REGIONS; }
PayloadType payloadType() const { return PayloadType::ANNOTATED_REGIONS; }
SEIAnnotatedRegions() {}
virtual ~SEIAnnotatedRegions() {}
......@@ -1119,7 +1134,7 @@ public:
class SEIExtendedDrapIndication : public SEI
{
public:
PayloadType payloadType() const { return EXTENDED_DRAP_INDICATION; }
PayloadType payloadType() const { return PayloadType::EXTENDED_DRAP_INDICATION; }
SEIExtendedDrapIndication() {}
virtual ~SEIExtendedDrapIndication() {}
......@@ -1134,7 +1149,7 @@ public:
class SEIConstrainedRaslIndication : public SEI
{
public:
PayloadType payloadType() const { return CONSTRAINED_RASL_ENCODING; }
PayloadType payloadType() const { return PayloadType::CONSTRAINED_RASL_ENCODING; }
SEIConstrainedRaslIndication() { }
virtual ~SEIConstrainedRaslIndication() { }
......@@ -1143,7 +1158,7 @@ public:
class SEIVDISeiEnvelope : public SEI
{
public:
PayloadType payloadType() const { return VDI_SEI_ENVELOPE; }
PayloadType payloadType() const { return PayloadType::VDI_SEI_ENVELOPE; }
SEIVDISeiEnvelope() {}
virtual ~SEIVDISeiEnvelope() {}
......@@ -1152,7 +1167,7 @@ public:
class SEINeuralNetworkPostFilterCharacteristics : public SEI
{
public:
PayloadType payloadType() const override { return NEURAL_NETWORK_POST_FILTER_CHARACTERISTICS; }
PayloadType payloadType() const override { return PayloadType::NEURAL_NETWORK_POST_FILTER_CHARACTERISTICS; }
SEINeuralNetworkPostFilterCharacteristics()
: m_id(0)
, m_modeIdc(0)
......@@ -1245,7 +1260,7 @@ public:
class SEINeuralNetworkPostFilterActivation : public SEI
{
public:
PayloadType payloadType() const { return NEURAL_NETWORK_POST_FILTER_ACTIVATION; }
PayloadType payloadType() const { return PayloadType::NEURAL_NETWORK_POST_FILTER_ACTIVATION; }
SEINeuralNetworkPostFilterActivation()
: m_id(0)
{}
......
......@@ -626,7 +626,7 @@ void TrQuant::getTrTypes(const TransformUnit tu, const ComponentID compID, Trans
&& isLuma(compID);
const bool isImplicitMTS = CU::isIntra(*tu.cu) && tu.cs->sps->getImplicitMTSIntraEnabled() && isLuma(compID)
&& tu.cu->lfnstIdx == 0 && tu.cu->mipFlag == 0;
const bool isISP = CU::isIntra(*tu.cu) && tu.cu->ispMode && isLuma(compID);
const bool isISP = CU::isIntra(*tu.cu) && tu.cu->ispMode != ISPType::NONE && isLuma(compID);
const bool isSBT = CU::isInter(*tu.cu) && tu.cu->sbtInfo && isLuma(compID);
trTypeHor = TransType::DCT2;
......
......@@ -56,6 +56,7 @@
#define JVET_T0056_SEI_MANIFEST 1 // JVET-T0056: SEI manifest SEI message
#define JVET_T0056_SEI_PREFIX_INDICATION 1 // JVET-T0056: SEI prefix indication SEI message
#define JVET_AB0069_SEI_PROCESSING_ORDER 1 // JVET-AB0069: SEI processing order SEI message update
#define JVET_AB0080 1 // GOP-based RPR encoder control
#if JVET_AB0080
#define JVET_AB0080_CHROMA_QP_FIX 1 // fix to align chroma QP changes with luma QP changes
......@@ -370,15 +371,19 @@ static inline MtsType operator++(MtsType &a, int)
typedef std::pair<MtsType, bool> TrMode;
typedef std::pair<int, int> TrCost;
enum ISPType
enum class ISPType : int8_t
{
NOT_INTRA_SUBPARTITIONS = 0,
HOR_INTRA_SUBPARTITIONS = 1,
VER_INTRA_SUBPARTITIONS = 2,
NUM_INTRA_SUBPARTITIONS_MODES = 3,
INTRA_SUBPARTITIONS_RESERVED = 4
// Note: numbering starts at -1 (NONE) and NUM is equal to 2 (HOR and VER cases)
// to_uint() defined below can be used to convert to the range 0 (for NONE) to 3 (for NUM)
NONE = -1,
HOR = 0,
VER,
NUM,
RESERVED
};
static inline uint32_t to_uint(ISPType t) { return to_underlying(t) - to_underlying(ISPType::NONE); }
enum SbtIdx
{
SBT_OFF_DCT = 0,
......@@ -1331,39 +1336,37 @@ public:
// ---------------------------------------------------------------------------
// dynamic cache
// This class contains a pool of objects that can be used and reused
// while minimizing the amount of required memory allocation and
// deallocation operations.
// ---------------------------------------------------------------------------
template<typename T>
class dynamic_cache
template<typename T> class Pool
{
std::vector<T*> m_cache;
std::vector<T *> m_items;
public:
~dynamic_cache()
{
deleteEntries();
}
~Pool() { deleteEntries(); }
void deleteEntries()
{
for( auto &p : m_cache )
for (auto &p: m_items)
{
delete p;
p = nullptr;
}
m_cache.clear();
m_items.clear();
}
T* get()
{
T* ret;
if( !m_cache.empty() )
if (!m_items.empty())
{
ret = m_cache.back();
m_cache.pop_back();
ret = m_items.back();
m_items.pop_back();
}
else
{
......@@ -1373,27 +1376,24 @@ public:
return ret;
}
void cache( T* el )
{
m_cache.push_back( el );
}
void giveBack(T *el) { m_items.push_back(el); }
void cache( std::vector<T*>& vel )
void giveBack(std::vector<T *> &vel)
{
m_cache.insert( m_cache.end(), vel.begin(), vel.end() );
m_items.insert(m_items.end(), vel.begin(), vel.end());
vel.clear();
}
};
typedef dynamic_cache<struct CodingUnit > CUCache;
typedef dynamic_cache<struct PredictionUnit> PUCache;
typedef dynamic_cache<struct TransformUnit > TUCache;
typedef Pool<struct CodingUnit> CuPool;
typedef Pool<struct PredictionUnit> PuPool;
typedef Pool<struct TransformUnit> TuPool;
struct XUCache
struct XuPool
{
CUCache cuCache;
PUCache puCache;
TUCache tuCache;
CuPool cuPool;
PuPool puPool;
TuPool tuPool;
};
......
......@@ -348,7 +348,7 @@ void CodingUnit::initData()
refIdxBi[i] = -1;
}
smvdMode = 0;
ispMode = 0;
ispMode = ISPType::NONE;
mipFlag = false;
for (int idx = 0; idx < MAX_NUM_CHANNEL_TYPE; idx++)
......@@ -443,7 +443,8 @@ const bool CodingUnit::checkCCLMAllowed() const
allowCCLM = false;
}
}
else if( colLumaCu->lwidth() == 64 && colLumaCu->lheight() == 64 && colLumaCu->ispMode ) //not split at 64x64 luma node and use ISP mode
else if (colLumaCu->lwidth() == 64 && colLumaCu->lheight() == 64
&& colLumaCu->ispMode != ISPType::NONE) // not split at 64x64 luma node and use ISP mode
{
allowCCLM = false;
}
......
......@@ -326,7 +326,7 @@ struct CodingUnit : public UnitArea
// needed for fast imv mode decisions
int8_t imvNumCand;
uint8_t smvdMode;
uint8_t ispMode;
ISPType ispMode;
bool useEscape[MAX_NUM_CHANNEL_TYPE];
bool useRotation[MAX_NUM_CHANNEL_TYPE];
bool reuseflag[MAX_NUM_CHANNEL_TYPE][MAXPLTPREDSIZE];
......@@ -378,7 +378,7 @@ struct IntraPredictionData
{
uint32_t intraDir[MAX_NUM_CHANNEL_TYPE];
bool mipTransposedFlag;
int multiRefIdx;
uint8_t multiRefIdx;
};
struct InterPredictionData
......