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
c327e231
Commit
c327e231
authored
5 years ago
by
Peter Chuang
Browse files
Options
Downloads
Patches
Plain Diff
Adding decoder checks
parent
0e68ff8d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1341
Bugfix for JVET-Q0172
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
source/Lib/DecoderLib/DecLib.cpp
+33
-0
33 additions, 0 deletions
source/Lib/DecoderLib/DecLib.cpp
source/Lib/DecoderLib/DecLib.h
+4
-0
4 additions, 0 deletions
source/Lib/DecoderLib/DecLib.h
with
37 additions
and
0 deletions
source/Lib/DecoderLib/DecLib.cpp
+
33
−
0
View file @
c327e231
...
...
@@ -443,6 +443,13 @@ DecLib::DecLib()
#if ENABLE_SIMD_OPT_BUFFER
g_pelBufOP
.
initPelBufOpsX86
();
#endif
#if JVET_Q0172_CHROMA_FORMAT_BITDEPTH_CONSTRAINT
for
(
int
i
=
0
;
i
<
MAX_VPS_LAYERS
;
i
++
)
{
m_layerChromaFormat
[
i
]
=
NOT_VALID
;
m_layerBitDepth
[
i
]
=
NOT_VALID
;
}
#endif
}
DecLib
::~
DecLib
()
...
...
@@ -1926,6 +1933,32 @@ void DecLib::xDecodeSPS( InputNALUnit& nalu )
m_HLSReader
.
parseSPS
(
sps
);
DTRACE
(
g_trace_ctx
,
D_QP_PER_CTU
,
"CTU Size: %dx%d"
,
sps
->
getMaxCUWidth
(),
sps
->
getMaxCUHeight
()
);
m_parameterSetManager
.
storeSPS
(
sps
,
nalu
.
getBitstream
().
getFifo
()
);
#if JVET_Q0172_CHROMA_FORMAT_BITDEPTH_CONSTRAINT
if
(
m_vps
!=
NULL
&&
m_vps
->
getMaxLayers
()
>
1
)
{
int
curLayerIdx
=
m_vps
->
getGeneralLayerIdx
(
nalu
.
m_nuhLayerId
);
int
curLayerChromaFormat
=
sps
->
getChromaFormatIdc
();
int
curLayerBitDepth
=
sps
->
getBitDepth
(
CHANNEL_TYPE_LUMA
);
if
(
m_layerChromaFormat
[
curLayerIdx
]
==
NOT_VALID
)
m_layerChromaFormat
[
curLayerIdx
]
=
curLayerChromaFormat
;
else
CHECK
(
m_layerChromaFormat
[
curLayerIdx
]
!=
curLayerChromaFormat
,
"Different chroma format in the same layer."
);
if
(
m_layerBitDepth
[
curLayerIdx
]
==
NOT_VALID
)
m_layerBitDepth
[
curLayerIdx
]
=
curLayerBitDepth
;
else
CHECK
(
m_layerBitDepth
[
curLayerIdx
]
!=
curLayerBitDepth
,
"Different bit-depth in the same layer."
);
for
(
int
i
=
0
;
i
<
curLayerIdx
;
i
++
)
{
if
(
m_vps
->
getDirectRefLayerFlag
(
curLayerIdx
,
i
))
{
int
refLayerChromaFormat
=
m_layerChromaFormat
[
i
];
CHECK
(
curLayerChromaFormat
!=
refLayerChromaFormat
,
"The chroma formats of the current layer and the reference layer are different"
);
int
refLayerBitDepth
=
m_layerBitDepth
[
i
];
CHECK
(
curLayerBitDepth
!=
refLayerBitDepth
,
"The bit-depth of the current layer and the reference layer are different"
);
}
}
}
#endif
}
void
DecLib
::
xDecodePPS
(
InputNALUnit
&
nalu
)
...
...
This diff is collapsed.
Click to expand it.
source/Lib/DecoderLib/DecLib.h
+
4
−
0
View file @
c327e231
...
...
@@ -146,6 +146,10 @@ private:
VPS
*
m_vps
;
bool
m_scalingListUpdateFlag
;
int
m_PreScalingListAPSId
;
#if JVET_Q0172_CHROMA_FORMAT_BITDEPTH_CONSTRAINT
int
m_layerChromaFormat
[
MAX_VPS_LAYERS
];
int
m_layerBitDepth
[
MAX_VPS_LAYERS
];
#endif
#if JVET_O1143_SUBPIC_DECCHECK
public
:
...
...
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