From 74a7f554c3df2ab5256a1f43c8e046470fd2c3e8 Mon Sep 17 00:00:00 2001 From: Karsten Suehring <karsten.suehring@hhi.fraunhofer.de> Date: Tue, 13 Aug 2019 15:43:29 +0200 Subject: [PATCH] JVET-O0610: Enable presence of access unit delimiters With the decision "Adopt to mandate the presence of AU delimiter for each AU", AUDs are enabled by default and a warning is printed, if they are disabled. The config parameter should be removed later and the decoder needs to check for AUD presence. --- doc/software-manual.tex | 2 +- source/App/EncoderApp/EncAppCfg.cpp | 11 +++++++++++ source/App/Parcat/parcat.cpp | 2 +- source/Lib/CommonLib/TypeDef.h | 1 + 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/doc/software-manual.tex b/doc/software-manual.tex index 42119bcae..b1306b416 100644 --- a/doc/software-manual.tex +++ b/doc/software-manual.tex @@ -854,7 +854,7 @@ Enables harmonization of Gop first field couple. \Option{AccessUnitDelimiter} & %\ShortOption{\None} & -\Default{0} & +\Default{1} & Add Access Unit Delimiter NAL units between all Access Units. \\ diff --git a/source/App/EncoderApp/EncAppCfg.cpp b/source/App/EncoderApp/EncAppCfg.cpp index f9cdd5a21..a0270f83d 100644 --- a/source/App/EncoderApp/EncAppCfg.cpp +++ b/source/App/EncoderApp/EncAppCfg.cpp @@ -821,7 +821,11 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) ("ConfWinRight", m_confWinRight, 0, "Right offset for window conformance mode 3") ("ConfWinTop", m_confWinTop, 0, "Top offset for window conformance mode 3") ("ConfWinBottom", m_confWinBottom, 0, "Bottom offset for window conformance mode 3") +#if JVET_O0610_CFG + ("AccessUnitDelimiter", m_AccessUnitDelimiter, true, "Enable Access Unit Delimiter NALUs") +#else ("AccessUnitDelimiter", m_AccessUnitDelimiter, false, "Enable Access Unit Delimiter NALUs") +#endif ("FrameRate,-fr", m_iFrameRate, 0, "Frame rate") ("FrameSkip,-fs", m_FrameSkip, 0u, "Number of frames to skip at start of input YUV") ("TemporalSubsampleRatio,-ts", m_temporalSubsampleRatio, 1u, "Temporal sub-sample ratio when reading input YUV") @@ -2023,6 +2027,13 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) } #endif +#if JVET_O0610_CFG + if (m_AccessUnitDelimiter == false) + { + printf ("Warning: Access unit delimiters are disabled. VVC requires the presence of access unit delimiters\n"); + } +#endif + if ( m_loopFilterAcrossVirtualBoundariesDisabledFlag ) { CHECK( m_numVerVirtualBoundaries > 3, "Number of vertical virtual boundaries must be comprised between 0 and 3 included" ); diff --git a/source/App/Parcat/parcat.cpp b/source/App/Parcat/parcat.cpp index 4e5e89952..7198e05ad 100644 --- a/source/App/Parcat/parcat.cpp +++ b/source/App/Parcat/parcat.cpp @@ -357,7 +357,7 @@ std::vector<uint8_t> filter_segment(const std::vector<uint8_t> & v, int idx, int idr_found = true; } - if((idx > 1 && (nalu_type == NAL_UNIT_CODED_SLICE_IDR_W_RADL || nalu_type == NAL_UNIT_CODED_SLICE_IDR_N_LP)) || ((idx > 1 && !idr_found) && (nalu_type == NAL_UNIT_DPS || nalu_type == NAL_UNIT_VPS ||nalu_type == NAL_UNIT_SPS || nalu_type == NAL_UNIT_PPS || nalu_type == NAL_UNIT_APS)) + if((idx > 1 && (nalu_type == NAL_UNIT_CODED_SLICE_IDR_W_RADL || nalu_type == NAL_UNIT_CODED_SLICE_IDR_N_LP)) || ((idx > 1 && !idr_found) && (nalu_type == NAL_UNIT_DPS || nalu_type == NAL_UNIT_VPS ||nalu_type == NAL_UNIT_SPS || nalu_type == NAL_UNIT_PPS || nalu_type == NAL_UNIT_APS || nalu_type == NAL_UNIT_ACCESS_UNIT_DELIMITER)) || (nalu_type == NAL_UNIT_SUFFIX_SEI && skip_next_sei)) { } diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h index 9fdd8bcc8..2d5964e1a 100644 --- a/source/Lib/CommonLib/TypeDef.h +++ b/source/Lib/CommonLib/TypeDef.h @@ -233,6 +233,7 @@ #define JVET_O0249_MERGE_SYNTAX 1 // JVET-O0249: merge syntax change #define JVET_O0594_BDOF_REF_SAMPLE_PADDING 1 // JVET-O0594/O0252/O0506/O0615/O0624: BDOF reference sample padding using the nearest integer sample position +#define JVET_O0610_CFG 1 // config default change for "Adopt to mandate the presence of AU delimiter for each AU", config parameter should be removed later #define JVET_O0376_SPS_JOINTCBCR_FLAG 1 // JVET-O0376: add the JointCbCr control flag in SPS #define JVET_O0472_LFNST_SIGNALLING_LAST_SCAN_POS 1 // JVET-O0472: LFNST index signalling depends on the position of last significant coefficient -- GitLab