Commit 02f17140 authored by Karsten Suehring's avatar Karsten Suehring
Browse files

JVET-Q0399: Allow inference of scaling window from conformance window

Note: The encoder automatically sets scaling and conformance windows and signalls them without specific config parameters. Thus also no config file option was added for the inference.
parent 4afb36da
Pipeline #4472 passed with stage
in 8 minutes and 37 seconds
......@@ -295,6 +295,8 @@
#define JVET_Q0219_SIGNAL_ALT_BUFFER_DELAY_PARMS 1 // JVET-Q0219: Signal alternative buffering delay parameters
#define JVET_Q0399_SCALING_INFERENCE 1 // JVET-Q0399 infer scaling window to conformance window, if not present
typedef std::pair<int, bool> TrMode;
typedef std::pair<int, int> TrCost;
......
......@@ -1504,15 +1504,19 @@ void DecLib::xCheckParameterSetConstraints(const int layerId)
CHECK( sps->getSubPicPresentFlag() != 0, "When res_change_in_clvs_allowed_flag is equal to 1, the value of subpic_info_present_flag shall be equal to 0." );
#endif
}
#if !JVET_Q0399_SCALING_INFERENCE
CHECK( !sps->getRprEnabledFlag() && pps->getScalingWindow().getWindowEnabledFlag(), "When res_change_in_clvs_allowed_flag is equal to 0, the value of scaling_window_flag shall be equal to 0." );
#else
#endif
#else
if( !sps->getRprEnabledFlag() && sps->getSubPicPresentFlag() )
{
CHECK( pps->getPicWidthInLumaSamples() != sps->getMaxPicWidthInLumaSamples(), "When subpics_present_flag is equal to 1 or ref_pic_resampling_enabled_flag equal to 0, the value of pic_width_in_luma_samples shall be equal to pic_width_max_in_luma_samples." );
CHECK( pps->getPicHeightInLumaSamples() != sps->getMaxPicHeightInLumaSamples(), "When subpics_present_flag is equal to 1 or ref_pic_resampling_enabled_flag equal to 0, the value of pic_height_in_luma_samples shall be equal to pic_height_max_in_luma_samples." );
}
#if !JVET_Q0399_SCALING_INFERENCE
CHECK( !sps->getRprEnabledFlag() && pps->getScalingWindow().getWindowEnabledFlag(), "When ref_pic_resampling_enabled_flag is equal to 0, the value of scaling_window_flag shall be equal to 0." );
#endif
#endif
#if JVET_Q0417_CONSTRAINT_SPS_VB_PRESENT_FLAG
#if JVET_Q0246_VIRTUAL_BOUNDARY_ENABLE_FLAG
......
......@@ -457,6 +457,17 @@ void HLSyntaxReader::parsePPS( PPS* pcPPS )
READ_UVLC( uiCode, "scaling_win_top_offset" ); scalingWindow.setWindowTopOffset( uiCode );
READ_UVLC( uiCode, "scaling_win_bottom_offset" ); scalingWindow.setWindowBottomOffset( uiCode );
}
#if JVET_Q0399_SCALING_INFERENCE
else
{
Window &scalingWindow = pcPPS->getScalingWindow();
Window& conf = pcPPS->getConformanceWindow();
scalingWindow.setWindowLeftOffset( conf.getWindowLeftOffset() );
scalingWindow.setWindowRightOffset( conf.getWindowRightOffset() );
scalingWindow.setWindowTopOffset( conf.getWindowTopOffset() );
scalingWindow.setWindowBottomOffset( conf.getWindowBottomOffset() );
}
#endif
READ_FLAG( uiCode, "output_flag_present_flag" ); pcPPS->setOutputFlagPresentFlag( uiCode==1 );
......
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