Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
VVCSoftware_VTM
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
jvet
VVCSoftware_VTM
Commits
d9765738
Commit
d9765738
authored
5 years ago
by
Biao Wang
Browse files
Options
Downloads
Patches
Plain Diff
add cleanup operations for vector
parent
9dbfb2f5
No related branches found
No related tags found
1 merge request
!1431
JVET-P0124/P0095/P0222: mixed Nal Unit type within a picture
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
source/Lib/DecoderLib/DecLib.cpp
+20
-19
20 additions, 19 deletions
source/Lib/DecoderLib/DecLib.cpp
source/Lib/DecoderLib/DecLib.h
+1
-1
1 addition, 1 deletion
source/Lib/DecoderLib/DecLib.h
with
21 additions
and
20 deletions
source/Lib/DecoderLib/DecLib.cpp
+
20
−
19
View file @
d9765738
...
...
@@ -2152,7 +2152,7 @@ bool DecLib::xDecodeSlice(InputNALUnit &nalu, int &iSkipFrame, int iPOCLastDispl
naluInfo
.
m_firstCTUinSlice
=
pcSlice
->
getFirstCtuRsAddrInSlice
();
naluInfo
.
m_POC
=
pcSlice
->
getPOC
();
xCheckMixedNalUnit
(
pcSlice
,
sps
,
nalu
);
m_nalUnitInfo
.
push_back
(
naluInfo
);
m_nalUnitInfo
[
naluInfo
.
m_nuhLayerId
]
.
push_back
(
naluInfo
);
#endif
SEIMessages
drapSEIs
=
getSeisByType
(
m_pcPic
->
SEIs
,
SEI
::
DEPENDENT_RAP_INDICATION
);
if
(
!
drapSEIs
.
empty
())
...
...
@@ -2590,18 +2590,17 @@ void DecLib::xCheckMixedNalUnit(Slice* pcSlice, SPS *sps, InputNALUnit &nalu)
else
{
// check reference list constraint
if
(
!
m_nalUnitInfo
.
empty
())
if
(
!
m_nalUnitInfo
[
nalu
.
m_nuhLayerId
]
.
empty
())
{
//find out the closest IRAP nal unit that are in the same layer and in the corresponding subpicture
NalUnitInfo
*
latestIRAPNalUnit
=
nullptr
;
int
size
=
(
int
)
m_nalUnitInfo
.
size
();
int
size
=
(
int
)
m_nalUnitInfo
[
nalu
.
m_nuhLayerId
]
.
size
();
int
naluIdx
;
for
(
naluIdx
=
size
-
1
;
naluIdx
>=
0
;
naluIdx
--
)
{
NalUnitInfo
*
iterNalu
=
&
m_nalUnitInfo
[
naluIdx
];
bool
isTheSameLayer
=
iterNalu
->
m_nuhLayerId
==
nalu
.
m_nuhLayerId
;
NalUnitInfo
*
iterNalu
=
&
m_nalUnitInfo
[
nalu
.
m_nuhLayerId
][
naluIdx
];
bool
isIRAPSlice
=
iterNalu
->
m_nalUnitType
>=
NAL_UNIT_CODED_SLICE_IDR_W_RADL
&&
iterNalu
->
m_nalUnitType
<=
NAL_UNIT_CODED_SLICE_CRA
;
if
(
isTheSameLayer
&&
isIRAPSlice
)
if
(
isIRAPSlice
)
{
latestIRAPNalUnit
=
iterNalu
;
break
;
...
...
@@ -2609,7 +2608,9 @@ void DecLib::xCheckMixedNalUnit(Slice* pcSlice, SPS *sps, InputNALUnit &nalu)
}
if
(
latestIRAPNalUnit
!=
nullptr
)
{
// only check the current slice, as previous slice have been checked
// clear the nalu unit before the latest IRAP slice
m_nalUnitInfo
[
nalu
.
m_nuhLayerId
].
erase
(
m_nalUnitInfo
[
nalu
.
m_nuhLayerId
].
begin
(),
m_nalUnitInfo
[
nalu
.
m_nuhLayerId
].
begin
()
+
naluIdx
);
const
unsigned
ctuRsAddrIRAP
=
latestIRAPNalUnit
->
m_firstCTUinSlice
;
const
unsigned
ctuXPosInCtusIRAP
=
ctuRsAddrIRAP
%
pcSlice
->
getPPS
()
->
getPicWidthInCtu
();
const
unsigned
ctuYPosInCtusIRAP
=
ctuRsAddrIRAP
/
pcSlice
->
getPPS
()
->
getPicWidthInCtu
();
...
...
@@ -2621,27 +2622,27 @@ void DecLib::xCheckMixedNalUnit(Slice* pcSlice, SPS *sps, InputNALUnit &nalu)
for
(
int
refIdx
=
0
;
refIdx
<
pcSlice
->
getNumRefIdx
(
REF_PIC_LIST_0
);
refIdx
++
)
{
int
POC
=
pcSlice
->
getRefPOC
(
REF_PIC_LIST_0
,
refIdx
);
for
(
int
i
=
0
;
i
<
naluIdx
;
i
++
)
bool
notInPOCAfterIRAP
=
true
;
// check all ref pics of the current slice are from poc after the IRAP slice
for
(
auto
iterNalu
:
m_nalUnitInfo
[
nalu
.
m_nuhLayerId
])
{
NalUnitInfo
*
iterNalu
=
&
m_nalUnitInfo
[
i
];
if
(
iterNalu
->
m_nuhLayerId
==
nalu
.
m_nuhLayerId
)
{
CHECK
(
POC
==
iterNalu
->
m_POC
,
"preIRAP picture shall not be used as the reference picture of a slice after the IRAP picture"
);
}
if
(
POC
==
iterNalu
.
m_POC
)
notInPOCAfterIRAP
=
false
;
}
CHECK
(
notInPOCAfterIRAP
,
"all reference pictures of a slice after the IRAP picture are from pictures after the IRAP"
);
}
// check RefPicList[1]
for
(
int
refIdx
=
0
;
refIdx
<
pcSlice
->
getNumRefIdx
(
REF_PIC_LIST_1
);
refIdx
++
)
{
int
POC
=
pcSlice
->
getRefPOC
(
REF_PIC_LIST_1
,
refIdx
);
for
(
int
i
=
0
;
i
<
naluIdx
;
i
++
)
bool
notInPOCAfterIRAP
=
true
;
// check all ref pics of the current slice are from poc after the IRAP slice
for
(
auto
iterNalu
:
m_nalUnitInfo
[
nalu
.
m_nuhLayerId
])
{
NalUnitInfo
*
iterNalu
=
&
m_nalUnitInfo
[
i
];
if
(
iterNalu
->
m_nuhLayerId
==
nalu
.
m_nuhLayerId
)
{
CHECK
(
POC
==
iterNalu
->
m_POC
,
"preIRAP picture shall not be used as the reference picture of a slice after the IRAP picture"
);
}
if
(
POC
==
iterNalu
.
m_POC
)
notInPOCAfterIRAP
=
false
;
}
CHECK
(
notInPOCAfterIRAP
,
"all reference pictures of a slice after the IRAP picture are from pictures after the IRAP"
);
}
}
}
...
...
This diff is collapsed.
Click to expand it.
source/Lib/DecoderLib/DecLib.h
+
1
−
1
View file @
d9765738
...
...
@@ -153,7 +153,7 @@ private:
uint32_t
m_firstCTUinSlice
;
/// the first CTU in slice, specified with raster scan order ctu address
int
m_POC
;
/// the picture order
};
std
::
vector
<
NalUnitInfo
>
m_nalUnitInfo
;
std
::
vector
<
NalUnitInfo
>
m_nalUnitInfo
[
MAX_VPS_LAYERS
]
;
#endif
std
::
vector
<
int
>
m_accessUnitApsNals
;
#if JVET_P0125_ASPECT_TID_LAYER_ID_NUH
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment