Commit d15f4116 authored by Xiang Li's avatar Xiang Li

Merge branch 'R0388-Cleanup' into 'master'

JVET-R0388: cleanups on deblocking signalling

See merge request jvet/VVCSoftware_VTM!1536
parents b380e39f 6c100ded
......@@ -51,6 +51,9 @@
#include <cassert>
//########### place macros to be removed in next cycle below this line ###############
#define JVET_R0388_DBF_CLEANUP 1 // JVET-R0388: Cleanups on deblocking signalling
#define JVET_R0071_SPS_PPS_CELANUP 1 // JVET-R0071 item 2-4: cleanups on subpicture signalling (item 1 has been ported in JVET_R0156_ASPECT4)
#define JVET_R0271_SLICE_LEVEL_DQ_SDH_RRC 1 // JVET-R0271/R0155: Slice level DQ and SDH granularity for mixed lossy/lossless.
......
......@@ -2894,8 +2894,19 @@ void HLSyntaxReader::parsePictureHeader( PicHeader* picHeader, ParameterSetManag
if(picHeader->getDeblockingFilterOverrideFlag())
{
READ_FLAG( uiCode, "ph_deblocking_filter_disabled_flag" );
picHeader->setDeblockingFilterDisable(uiCode != 0);
#if JVET_R0388_DBF_CLEANUP
if (!pps->getPPSDeblockingFilterDisabledFlag())
{
#endif
READ_FLAG(uiCode, "ph_deblocking_filter_disabled_flag");
picHeader->setDeblockingFilterDisable(uiCode != 0);
#if JVET_R0388_DBF_CLEANUP
}
else
{
picHeader->setDeblockingFilterDisable(false);
}
#endif
if (!picHeader->getDeblockingFilterDisable())
{
READ_SVLC( iCode, "ph_beta_offset_div2" );
......@@ -3711,7 +3722,18 @@ void HLSyntaxReader::parseSliceHeader (Slice* pcSlice, PicHeader* picHeader, Par
}
if(pcSlice->getDeblockingFilterOverrideFlag())
{
READ_FLAG ( uiCode, "slice_deblocking_filter_disabled_flag" ); pcSlice->setDeblockingFilterDisable(uiCode ? 1 : 0);
#if JVET_R0388_DBF_CLEANUP
if (!pps->getPPSDeblockingFilterDisabledFlag())
{
#endif
READ_FLAG(uiCode, "slice_deblocking_filter_disabled_flag"); pcSlice->setDeblockingFilterDisable(uiCode ? 1 : 0);
#if JVET_R0388_DBF_CLEANUP
}
else
{
pcSlice->setDeblockingFilterDisable(false);
}
#endif
if(!pcSlice->getDeblockingFilterDisable())
{
READ_SVLC( iCode, "slice_beta_offset_div2" ); pcSlice->setDeblockingFilterBetaOffsetDiv2( iCode );
......
......@@ -1922,7 +1922,14 @@ void HLSWriter::codePictureHeader( PicHeader* picHeader, bool writeRbspTrailingB
if(picHeader->getDeblockingFilterOverrideFlag())
{
WRITE_FLAG( picHeader->getDeblockingFilterDisable(), "ph_deblocking_filter_disabled_flag" );
#if JVET_R0388_DBF_CLEANUP
if (!pps->getPPSDeblockingFilterDisabledFlag())
{
#endif
WRITE_FLAG(picHeader->getDeblockingFilterDisable(), "ph_deblocking_filter_disabled_flag");
#if JVET_R0388_DBF_CLEANUP
}
#endif
if( !picHeader->getDeblockingFilterDisable() )
{
WRITE_SVLC( picHeader->getDeblockingFilterBetaOffsetDiv2(), "ph_beta_offset_div2" );
......@@ -2324,7 +2331,14 @@ void HLSWriter::codeSliceHeader ( Slice* pcSlice )
}
if (pcSlice->getDeblockingFilterOverrideFlag())
{
WRITE_FLAG(pcSlice->getDeblockingFilterDisable(), "slice_deblocking_filter_disabled_flag");
#if JVET_R0388_DBF_CLEANUP
if (!pcSlice->getPPS()->getPPSDeblockingFilterDisabledFlag())
{
#endif
WRITE_FLAG(pcSlice->getDeblockingFilterDisable(), "slice_deblocking_filter_disabled_flag");
#if JVET_R0388_DBF_CLEANUP
}
#endif
if(!pcSlice->getDeblockingFilterDisable())
{
WRITE_SVLC (pcSlice->getDeblockingFilterBetaOffsetDiv2(), "slice_beta_offset_div2");
......
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