Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
V
VVCSoftware_VTM
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
16
Merge Requests
16
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
jvet
VVCSoftware_VTM
Commits
b2aa56bf
Commit
b2aa56bf
authored
Jan 07, 2019
by
Roman Chernyak
Committed by
Frank Bossen
Jan 07, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
JVET-L0428: Delta QP and Chroma QP Offset for Separate Tree
parent
ed0a0a87
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
61 additions
and
13 deletions
+61
-13
source/Lib/CommonLib/TypeDef.h
source/Lib/CommonLib/TypeDef.h
+1
-0
source/Lib/DecoderLib/CABACReader.cpp
source/Lib/DecoderLib/CABACReader.cpp
+20
-6
source/Lib/EncoderLib/CABACWriter.cpp
source/Lib/EncoderLib/CABACWriter.cpp
+8
-4
source/Lib/EncoderLib/EncCu.cpp
source/Lib/EncoderLib/EncCu.cpp
+25
-2
source/Lib/EncoderLib/EncModeCtrl.cpp
source/Lib/EncoderLib/EncModeCtrl.cpp
+7
-1
No files found.
source/Lib/CommonLib/TypeDef.h
View file @
b2aa56bf
...
...
@@ -187,6 +187,7 @@
#define JVET_L0198_L0468_L0104_ATMVP_8x8SUB_BLOCK 1 // Fix sub-block size to 8x8 in ATMVP as proposed in L0198, L0468 and L0104
#define JVET_L0198_ATMVP_SCAN_SIMP 1 // Simplification for scan process in ATMVP cTMv derivation
#define JVET_L0696_CONSTRAINT_SYNTAX 1 // Starting point for interoperability point syntax
#define JVET_L0428_DQP_SEP_TREE 1 // Delta QP for Separate Tree
// ====================================================================================================================
// NEXT software switches
// ====================================================================================================================
...
...
source/Lib/DecoderLib/CABACReader.cpp
View file @
b2aa56bf
...
...
@@ -579,7 +579,18 @@ bool CABACReader::coding_tree( CodingStructure& cs, Partitioner& partitioner, CU
cuCtx
.
qp
=
CU
::
predictQP
(
cu
,
cuCtx
.
qp
);
}
cu
.
qp
=
cuCtx
.
qp
;
//NOTE: CU QP can be changed by deltaQP signaling at TU level
#if JVET_L0428_DQP_SEP_TREE
const
Position
chromaCentral
(
cu
.
chromaPos
().
offset
(
cu
.
chromaSize
().
width
>>
1
,
cu
.
chromaSize
().
height
>>
1
));
const
Position
lumaRefPos
(
chromaCentral
.
x
<<
getComponentScaleX
(
COMPONENT_Cb
,
cu
.
chromaFormat
),
chromaCentral
.
y
<<
getComponentScaleY
(
COMPONENT_Cb
,
cu
.
chromaFormat
));
const
CodingUnit
*
colLumaCu
=
cs
.
getCU
(
lumaRefPos
,
CHANNEL_TYPE_LUMA
);
if
(
cu
.
cs
->
pps
->
getUseDQP
()
&&
CS
::
isDualITree
(
cs
)
&&
isChroma
(
cu
.
chType
))
{
cuCtx
.
qp
=
colLumaCu
->
qp
;
}
#endif
cu
.
qp
=
cuCtx
.
qp
;
//NOTE: CU QP can be changed by deltaQP signaling at TU level
cu
.
chromaQpAdj
=
cs
.
chromaQpAdj
;
//NOTE: CU chroma QP adjustment can be changed by adjustment signaling at TU level
// coding unit
...
...
@@ -2127,15 +2138,18 @@ void CABACReader::transform_unit( TransformUnit& tu, CUCtx& cuCtx, ChromaCbfs& c
bool
cbfLuma
=
(
tu
.
cbf
[
COMPONENT_Y
]
!=
0
);
bool
cbfChroma
=
(
cu
.
chromaFormat
==
CHROMA_400
?
false
:
(
chromaCbfs
.
Cb
||
chromaCbfs
.
Cr
)
);
if
(
cbfLuma
||
cbfChroma
)
{
if
(
cu
.
cs
->
pps
->
getUseDQP
()
&&
!
cuCtx
.
isDQPCoded
)
{
cu_qp_delta
(
cu
,
cuCtx
.
qp
,
cu
.
qp
);
cuCtx
.
qp
=
cu
.
qp
;
cuCtx
.
isDQPCoded
=
true
;
#if JVET_L0428_DQP_SEP_TREE
if
(
!
CS
::
isDualITree
(
*
tu
.
cs
)
||
isLuma
(
tu
.
chType
))
#endif
{
cu_qp_delta
(
cu
,
cuCtx
.
qp
,
cu
.
qp
);
cuCtx
.
qp
=
cu
.
qp
;
cuCtx
.
isDQPCoded
=
true
;
}
}
if
(
cu
.
cs
->
slice
->
getUseChromaQpAdj
()
&&
cbfChroma
&&
!
cu
.
transQuantBypass
&&
!
cuCtx
.
isChromaQpAdjCoded
)
{
...
...
source/Lib/EncoderLib/CABACWriter.cpp
View file @
b2aa56bf
...
...
@@ -2049,7 +2049,6 @@ void CABACWriter::transform_unit( const TransformUnit& tu, CUCtx& cuCtx, ChromaC
bool
cbfLuma
=
(
cbf
[
COMPONENT_Y
]
!=
0
);
bool
cbfChroma
=
false
;
if
(
cu
.
chromaFormat
!=
CHROMA_400
)
{
if
(
tu
.
blocks
[
COMPONENT_Cb
].
valid
()
)
...
...
@@ -2063,9 +2062,14 @@ void CABACWriter::transform_unit( const TransformUnit& tu, CUCtx& cuCtx, ChromaC
{
if
(
cu
.
cs
->
pps
->
getUseDQP
()
&&
!
cuCtx
.
isDQPCoded
)
{
cu_qp_delta
(
cu
,
cuCtx
.
qp
,
cu
.
qp
);
cuCtx
.
qp
=
cu
.
qp
;
cuCtx
.
isDQPCoded
=
true
;
#if JVET_L0428_DQP_SEP_TREE
if
((
!
CS
::
isDualITree
(
*
tu
.
cs
)
||
isLuma
(
tu
.
chType
)))
#endif
{
cu_qp_delta
(
cu
,
cuCtx
.
qp
,
cu
.
qp
);
cuCtx
.
qp
=
cu
.
qp
;
cuCtx
.
isDQPCoded
=
true
;
}
}
if
(
cu
.
cs
->
slice
->
getUseChromaQpAdj
()
&&
cbfChroma
&&
!
cu
.
transQuantBypass
&&
!
cuCtx
.
isChromaQpAdjCoded
)
{
...
...
source/Lib/EncoderLib/EncCu.cpp
View file @
b2aa56bf
...
...
@@ -401,7 +401,6 @@ void EncCu::compressCtu( CodingStructure& cs, const UnitArea& area, const unsign
#endif
);
// all signals were already copied during compression if the CTU was split - at this point only the structures are copied to the top level CS
const
bool
copyUnsplitCTUSignals
=
bestCS
->
cus
.
size
()
==
1
&&
KEEP_PRED_AND_RESI_SIGNALS
;
cs
.
useSubStructure
(
*
bestCS
,
partitioner
->
chType
,
CS
::
getArea
(
*
bestCS
,
area
,
partitioner
->
chType
),
copyUnsplitCTUSignals
,
false
,
false
,
copyUnsplitCTUSignals
);
...
...
@@ -703,7 +702,24 @@ void EncCu::xCompressCU( CodingStructure *&tempCS, CodingStructure *&bestCS, Par
do
{
const
EncTestMode
currTestMode
=
m_modeCtrl
->
currTestMode
();
EncTestMode
currTestMode
=
m_modeCtrl
->
currTestMode
();
#if JVET_L0428_DQP_SEP_TREE
if
(
tempCS
->
pps
->
getUseDQP
()
&&
partitioner
.
chType
==
CHANNEL_TYPE_CHROMA
)
{
const
Position
chromaCentral
(
tempCS
->
area
.
Cb
().
chromaPos
().
offset
(
tempCS
->
area
.
Cb
().
chromaSize
().
width
>>
1
,
tempCS
->
area
.
Cb
().
chromaSize
().
height
>>
1
));
const
Position
lumaRefPos
(
chromaCentral
.
x
<<
getComponentScaleX
(
COMPONENT_Cb
,
tempCS
->
area
.
chromaFormat
),
chromaCentral
.
y
<<
getComponentScaleY
(
COMPONENT_Cb
,
tempCS
->
area
.
chromaFormat
));
const
CodingStructure
*
baseCS
=
bestCS
->
picture
->
cs
;
const
CodingUnit
*
colLumaCu
=
baseCS
->
getCU
(
lumaRefPos
,
CHANNEL_TYPE_LUMA
);
const
TransformUnit
*
tu
=
baseCS
->
getTU
(
lumaRefPos
,
CHANNEL_TYPE_LUMA
);
if
(
tu
)
{
currTestMode
.
qp
=
colLumaCu
->
qp
;
}
}
#endif
#if SHARP_LUMA_DELTA_QP
if
(
m_pcEncCfg
->
getLumaLevelToDeltaQPMapping
().
isEnabled
()
&&
partitioner
.
currDepth
<=
pps
.
getMaxCuDQPDepth
()
)
...
...
@@ -1586,6 +1602,13 @@ void EncCu::xCheckDQP( CodingStructure& cs, Partitioner& partitioner, bool bKeep
return
;
}
#if JVET_L0428_DQP_SEP_TREE
if
(
partitioner
.
chType
==
CHANNEL_TYPE_CHROMA
)
{
return
;
}
#endif
if
(
bKeepCtx
&&
partitioner
.
currDepth
!=
cs
.
pps
->
getMaxCuDQPDepth
()
)
{
return
;
...
...
source/Lib/EncoderLib/EncModeCtrl.cpp
View file @
b2aa56bf
...
...
@@ -948,8 +948,14 @@ void EncModeCtrlMTnoRQT::initCULevel( Partitioner &partitioner, const CodingStru
int
baseQP
=
cs
.
baseQP
;
if
(
m_pcEncCfg
->
getUseAdaptiveQP
()
)
{
baseQP
=
Clip3
(
-
cs
.
sps
->
getQpBDOffset
(
CHANNEL_TYPE_LUMA
),
MAX_QP
,
baseQP
+
xComputeDQP
(
cs
,
partitioner
)
);
#if JVET_L0428_DQP_SEP_TREE
if
(
partitioner
.
chType
==
CHANNEL_TYPE_LUMA
||
!
cs
.
slice
->
isIRAP
())
{
baseQP
=
Clip3
(
-
cs
.
sps
->
getQpBDOffset
(
CHANNEL_TYPE_LUMA
),
MAX_QP
,
baseQP
+
xComputeDQP
(
cs
,
partitioner
));
}
#endif
}
int
minQP
=
baseQP
;
int
maxQP
=
baseQP
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment