Skip to content
Snippets Groups Projects
Commit 906baa7e authored by Biao Wang's avatar Biao Wang
Browse files

fix comments in configuration file, fix initialization of subpic

parent ed9b228a
No related branches found
No related tags found
No related merge requests found
...@@ -19,8 +19,8 @@ SubPicWidth : 4 3 # specifies the width of ...@@ -19,8 +19,8 @@ SubPicWidth : 4 3 # specifies the width of
SubPicHeight : 4 4 # specifies the height of the i-th subpicture in units of CtbSizeY SubPicHeight : 4 4 # specifies the height of the i-th subpicture in units of CtbSizeY
SubPicTreatedAsPicFlag : 1 1 # equal to 1 specifies that the i-th subpicture of each coded picture in the CLVS is treated as a picture in the decoding process excluding in-loop filtering operations SubPicTreatedAsPicFlag : 1 1 # equal to 1 specifies that the i-th subpicture of each coded picture in the CLVS is treated as a picture in the decoding process excluding in-loop filtering operations
LoopFilterAcrossSubpicEnabledFlag : 0 0 # equal to 1 specifies that in-loop filtering operations may be performed across the boundaries of the i-th subpicture in each coded picture in the CLVS LoopFilterAcrossSubpicEnabledFlag : 0 0 # equal to 1 specifies that in-loop filtering operations may be performed across the boundaries of the i-th subpicture in each coded picture in the CLVS
SubPicIdPresentFlag : 0 SubPicIdPresentFlag : 0 # equal to 1 specifies that the subpicture ID mapping is explicitly signalled, either in the SPS or in the PPSs
SubPicIdSignallingPresentFlag : 0 SubPicIdSignallingPresentFlag : 0 # specifies that subpicture ID mapping is signalled in the SPS(0: OFF, 1: ON)
SubPicIdLen : 0 # the number of bits used to represent the syntax element sps_subpic_id[ i ] SubPicIdLen : 0 # the number of bits used to represent the syntax element sps_subpic_id[ i ]
SubPicId : 0 # subpicture ID of the i-th subpicture SubPicId : 0 # subpicture ID of the i-th subpicture
......
...@@ -2634,6 +2634,13 @@ void PPS::initSubPic(const SPS &sps) ...@@ -2634,6 +2634,13 @@ void PPS::initSubPic(const SPS &sps)
{ {
CHECK(getNumSubPics() > MAX_NUM_SUB_PICS, "Number of sub-pictures in picture exceeds valid range"); CHECK(getNumSubPics() > MAX_NUM_SUB_PICS, "Number of sub-pictures in picture exceeds valid range");
m_subPics.resize(getNumSubPics()); m_subPics.resize(getNumSubPics());
// m_ctuSize, m_picWidthInCtu, and m_picHeightInCtu might not be initialized yet.
if (m_ctuSize == 0 || m_picWidthInCtu == 0 || m_picHeightInCtu == 0)
{
m_ctuSize = sps.getCTUSize();
m_picWidthInCtu = (m_picWidthInLumaSamples + m_ctuSize - 1) / m_ctuSize;
m_picHeightInCtu = (m_picHeightInLumaSamples + m_ctuSize - 1) / m_ctuSize;
}
for (int i=0; i< getNumSubPics(); i++) for (int i=0; i< getNumSubPics(); i++)
{ {
m_subPics[i].setSubPicIdx(i); m_subPics[i].setSubPicIdx(i);
...@@ -2667,13 +2674,6 @@ void PPS::initSubPic(const SPS &sps) ...@@ -2667,13 +2674,6 @@ void PPS::initSubPic(const SPS &sps)
if (m_numSlicesInPic == 1) if (m_numSlicesInPic == 1)
{ {
CHECK(getNumSubPics() != 1, "only one slice in picture, but number of subpic is not one"); CHECK(getNumSubPics() != 1, "only one slice in picture, but number of subpic is not one");
// m_ctuSize, m_picWidthInCtu, and m_picHeightInCtu might not be initialized yet.
if (m_ctuSize == 0 || m_picWidthInCtu == 0 || m_picHeightInCtu == 0)
{
m_ctuSize = sps.getCTUSize();
m_picWidthInCtu = (m_picWidthInLumaSamples + m_ctuSize - 1) / m_ctuSize;
m_picHeightInCtu = (m_picHeightInLumaSamples + m_ctuSize - 1) / m_ctuSize;
}
m_subPics[i].addAllCtusInPicToSubPic(0, getPicWidthInCtu(), 0, getPicHeightInCtu(), getPicWidthInCtu()); m_subPics[i].addAllCtusInPicToSubPic(0, getPicWidthInCtu(), 0, getPicHeightInCtu(), getPicWidthInCtu());
} }
else else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment