Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
VVCSoftware_VTM
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
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
Monitor
Incidents
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
Philip Cowan
VVCSoftware_VTM
Commits
62dd071b
Commit
62dd071b
authored
5 years ago
by
Xiaoyu Xiu
Committed by
Xiang Li
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
JVET-Q0512: encoder-side improvement on enabling chroma transform-skip for ACT
parent
69c43f06
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
source/Lib/CommonLib/TypeDef.h
+1
-0
1 addition, 0 deletions
source/Lib/CommonLib/TypeDef.h
source/Lib/EncoderLib/IntraSearch.cpp
+61
-0
61 additions, 0 deletions
source/Lib/EncoderLib/IntraSearch.cpp
with
62 additions
and
0 deletions
source/Lib/CommonLib/TypeDef.h
+
1
−
0
View file @
62dd071b
...
...
@@ -50,6 +50,7 @@
#include
<assert.h>
#include
<cassert>
#define JVET_Q0512_ENC_CHROMA_TS_ACT 1 // JVET-Q0512: encoder-side improvement on enabling chroma transform-skip for ACT
#define JVET_Q0446_MIP_CONST_SHIFT_OFFSET 1 // JVET-Q0446: MIP with constant shift and offset
#define JVET_Q0820_ACT 1 // JVET-Q0820: ACT bug fixes and reversible ACT transform
...
...
This diff is collapsed.
Click to expand it.
source/Lib/EncoderLib/IntraSearch.cpp
+
61
−
0
View file @
62dd071b
...
...
@@ -4718,20 +4718,68 @@ bool IntraSearch::xRecurIntraCodingACTQT(CodingStructure &cs, Partitioner &parti
for
(
int
cbfMask
:
jointCbfMasksToTest
)
{
#if !JVET_Q0512_ENC_CHROMA_TS_ACT
m_CABACEstimator
->
getCtx
()
=
ctxStart
;
m_CABACEstimator
->
resetBits
();
Distortion
distTmp
=
0
;
#endif
tu
.
jointCbCr
=
(
uint8_t
)
cbfMask
;
#if JVET_Q0512_ENC_CHROMA_TS_ACT
ComponentID
codeCompId
=
((
cbfMask
>>
1
)
?
COMPONENT_Cb
:
COMPONENT_Cr
);
ComponentID
otherCompId
=
((
codeCompId
==
COMPONENT_Cb
)
?
COMPONENT_Cr
:
COMPONENT_Cb
);
#if JVET_Q0784_LFNST_COMBINATION
bool
tsAllowed
=
TU
::
isTSAllowed
(
tu
,
codeCompId
)
&&
(
m_pcEncCfg
->
getUseChromaTS
())
&&
!
cu
.
lfnstIdx
;
#else
bool
tsAllowed
=
TU
::
isTSAllowed
(
tu
,
codeCompId
)
&&
(
m_pcEncCfg
->
getUseChromaTS
());
#endif
uint8_t
numTransformCands
=
1
+
(
tsAllowed
?
1
:
0
);
// DCT + TS = 2 tests
bool
cbfDCT2
=
true
;
trModes
.
clear
();
trModes
.
push_back
(
TrMode
(
0
,
true
));
// DCT2
if
(
tsAllowed
)
{
trModes
.
push_back
(
TrMode
(
1
,
true
));
//TS
}
for
(
int
modeId
=
0
;
modeId
<
numTransformCands
;
modeId
++
)
{
if
(
modeId
&&
!
cbfDCT2
)
{
continue
;
}
if
(
!
trModes
[
modeId
].
second
)
{
continue
;
}
Distortion
distTmp
=
0
;
tu
.
mtsIdx
[
codeCompId
]
=
trModes
[
modeId
].
first
;
tu
.
mtsIdx
[
otherCompId
]
=
MTS_DCT2_DCT2
;
m_CABACEstimator
->
getCtx
()
=
ctxStart
;
#endif
csFull
->
getResiBuf
(
cbArea
).
copyFrom
(
orgResiCb
[
cbfMask
]);
csFull
->
getResiBuf
(
crArea
).
copyFrom
(
orgResiCr
[
cbfMask
]);
#if JVET_Q0512_ENC_CHROMA_TS_ACT
if
(
nNumTransformCands
>
1
)
{
xIntraCodingACTTUBlock
(
tu
,
COMPONENT_Cb
,
distTmp
,
modeId
==
0
?
&
trModes
:
nullptr
,
true
);
}
else
#endif
xIntraCodingACTTUBlock
(
tu
,
COMPONENT_Cb
,
distTmp
);
double
costTmp
=
std
::
numeric_limits
<
double
>::
max
();
uint64_t
bitsTmp
=
0
;
if
(
distTmp
<
std
::
numeric_limits
<
Distortion
>::
max
())
{
#if JVET_Q0512_ENC_CHROMA_TS_ACT
if
(
!
tu
.
mtsIdx
[
codeCompId
])
{
cbfDCT2
=
true
;
}
#endif
#if JVET_Q0820_ACT
csFull
->
getResiBuf
(
tu
).
colorSpaceConvert
(
invColorTransResidual
,
false
,
csFull
->
slice
->
clpRng
(
COMPONENT_Y
));
#else
...
...
@@ -4774,6 +4822,12 @@ bool IntraSearch::xRecurIntraCodingACTQT(CodingStructure &cs, Partitioner &parti
bitsTmp
=
xGetIntraFracBitsQT
(
*
csFull
,
partitioner
,
true
,
true
,
-
1
,
TU_NO_ISP
);
costTmp
=
m_pcRdCost
->
calcRdCost
(
bitsTmp
,
distTmp
);
}
#if JVET_Q0512_ENC_CHROMA_TS_ACT
else
if
(
!
tu
.
mtsIdx
[
codeCompId
])
{
cbfDCT2
=
false
;
}
#endif
if
(
costTmp
<
bestCostJointCbCr
)
{
...
...
@@ -4781,7 +4835,11 @@ bool IntraSearch::xRecurIntraCodingACTQT(CodingStructure &cs, Partitioner &parti
bestDistJointCbCr
=
distTmp
;
bestBitsJointCbCr
=
bitsTmp
;
bestJointCbCr
=
tu
.
jointCbCr
;
#if JVET_Q0512_ENC_CHROMA_TS_ACT
lastIsBest
=
(
cbfMask
==
jointCbfMasksToTest
.
back
()
&&
modeId
==
(
numTransformCands
-
1
));
#else
lastIsBest
=
(
cbfMask
==
jointCbfMasksToTest
.
back
());
#endif
// store data
if
(
!
lastIsBest
)
...
...
@@ -4795,6 +4853,9 @@ bool IntraSearch::xRecurIntraCodingACTQT(CodingStructure &cs, Partitioner &parti
ctxBest
=
m_CABACEstimator
->
getCtx
();
}
}
#if JVET_Q0512_ENC_CHROMA_TS_ACT
}
#endif
}
if
(
!
lastIsBest
)
...
...
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