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
11
Merge Requests
11
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
f732de68
Commit
f732de68
authored
Jan 18, 2019
by
Karsten Suehring
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove macro JVET_L0266_HMVP
parent
f3c66ebe
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
0 additions
and
113 deletions
+0
-113
source/Lib/CommonLib/CommonDef.h
source/Lib/CommonLib/CommonDef.h
+0
-2
source/Lib/CommonLib/MotionInfo.h
source/Lib/CommonLib/MotionInfo.h
+0
-2
source/Lib/CommonLib/Slice.cpp
source/Lib/CommonLib/Slice.cpp
+0
-12
source/Lib/CommonLib/Slice.h
source/Lib/CommonLib/Slice.h
+0
-6
source/Lib/CommonLib/TypeDef.h
source/Lib/CommonLib/TypeDef.h
+0
-3
source/Lib/CommonLib/UnitTools.cpp
source/Lib/CommonLib/UnitTools.cpp
+0
-16
source/Lib/CommonLib/UnitTools.h
source/Lib/CommonLib/UnitTools.h
+0
-2
source/Lib/DecoderLib/DecCu.cpp
source/Lib/DecoderLib/DecCu.cpp
+0
-2
source/Lib/EncoderLib/EncCu.cpp
source/Lib/EncoderLib/EncCu.cpp
+0
-58
source/Lib/EncoderLib/EncCu.h
source/Lib/EncoderLib/EncCu.h
+0
-10
No files found.
source/Lib/CommonLib/CommonDef.h
View file @
f732de68
...
...
@@ -330,10 +330,8 @@ static const int GBI_NUM = 5; ///< the
static
const
int
GBI_DEFAULT
=
((
uint8_t
)(
GBI_NUM
>>
1
));
///< Default weighting index representing for w=0.5
static
const
int
GBI_SIZE_CONSTRAINT
=
256
;
///< disabling GBi if cu size is smaller than 256
#endif
#if JVET_L0266_HMVP
static
const
int
MAX_NUM_HMVP_CANDS
=
6
;
///< maximum number of HMVP candidates to be stored and used in merge list
static
const
int
MAX_NUM_HMVP_AVMPCANDS
=
4
;
///< maximum number of HMVP candidates to be used in AMVP list
#endif
#if W0038_DB_OPT
static
const
int
MAX_ENCODER_DEBLOCKING_QUALITY_LAYERS
=
8
;
...
...
source/Lib/CommonLib/MotionInfo.h
View file @
f732de68
...
...
@@ -211,11 +211,9 @@ public:
}
};
#endif
#if JVET_L0266_HMVP
struct
LutMotionCand
{
MotionInfo
*
motionCand
;
int
currCnt
;
};
#endif
#endif // __MOTIONINFO__
source/Lib/CommonLib/Slice.cpp
View file @
f732de68
...
...
@@ -41,9 +41,7 @@
#include "Picture.h"
#include "dtrace_next.h"
#if JVET_L0266_HMVP
#include "UnitTools.h"
#endif
//! \ingroup CommonLib
//! \{
...
...
@@ -143,9 +141,7 @@ Slice::Slice()
,
m_uiMaxTTSizeIChroma
(
0
)
#endif
,
m_uiMaxBTSize
(
0
)
#if JVET_L0266_HMVP
,
m_MotionCandLut
(
NULL
)
#endif
{
for
(
uint32_t
i
=
0
;
i
<
NUM_REF_PIC_LIST_01
;
i
++
)
{
...
...
@@ -182,16 +178,12 @@ Slice::Slice()
m_saoEnabledFlag
[
ch
]
=
false
;
}
#if JVET_L0266_HMVP
initMotionLUTs
();
#endif
}
Slice
::~
Slice
()
{
#if JVET_L0266_HMVP
destroyMotionLUTs
();
#endif
}
...
...
@@ -228,9 +220,7 @@ void Slice::initSlice()
m_subPuMvpSubBlkSizeSliceEnable
=
false
;
m_subPuMvpSubBlkLog2Size
=
2
;
#endif
#if JVET_L0266_HMVP
resetMotionLUTs
();
#endif
}
void
Slice
::
setDefaultClpRng
(
const
SPS
&
sps
)
...
...
@@ -1629,7 +1619,6 @@ void Slice::stopProcessingTimer()
m_dProcessingTime
+=
(
double
)(
clock
()
-
m_iProcessingStartTime
)
/
CLOCKS_PER_SEC
;
m_iProcessingStartTime
=
0
;
}
#if JVET_L0266_HMVP
void
Slice
::
initMotionLUTs
()
{
m_MotionCandLut
=
new
LutMotionCand
;
...
...
@@ -1698,7 +1687,6 @@ void Slice::copyMotionLUTs(LutMotionCand* Src, LutMotionCand* Dst)
memcpy
(
Dst
->
motionCand
,
Src
->
motionCand
,
sizeof
(
MotionInfo
)
*
(
std
::
min
(
Src
->
currCnt
,
MAX_NUM_HMVP_CANDS
)));
Dst
->
currCnt
=
Src
->
currCnt
;
}
#endif
unsigned
Slice
::
getMinPictureDistance
()
const
{
...
...
source/Lib/CommonLib/Slice.h
View file @
f732de68
...
...
@@ -49,10 +49,8 @@
//! \ingroup CommonLib
//! \{
#if JVET_L0266_HMVP
#include "CommonLib/MotionInfo.h"
struct
MotionInfo
;
#endif
struct
Picture
;
...
...
@@ -1741,9 +1739,7 @@ private:
uint32_t
m_uiMaxBTSize
;
AlfSliceParam
m_alfSliceParam
;
#if JVET_L0266_HMVP
LutMotionCand
*
m_MotionCandLut
;
#endif
public:
Slice
();
...
...
@@ -2026,7 +2022,6 @@ public:
void
setAlfSliceParam
(
AlfSliceParam
&
alfSliceParam
)
{
m_alfSliceParam
=
alfSliceParam
;
}
AlfSliceParam
&
getAlfSliceParam
()
{
return
m_alfSliceParam
;
}
#if JVET_L0266_HMVP
void
initMotionLUTs
();
void
destroyMotionLUTs
();
void
resetMotionLUTs
();
...
...
@@ -2039,7 +2034,6 @@ public:
void
updateMotionLUTs
(
LutMotionCand
*
lutMC
,
CodingUnit
&
cu
);
void
copyMotionLUTs
(
LutMotionCand
*
Src
,
LutMotionCand
*
Dst
);
#endif
protected:
Picture
*
xGetRefPic
(
PicList
&
rcListPic
,
int
poc
);
...
...
source/Lib/CommonLib/TypeDef.h
View file @
f732de68
...
...
@@ -60,10 +60,7 @@
#define JVET_L0285_8BIT_TRANSFORM_CORE 1 // Primary transform using 8-bit cores
#define JVET_L0266_HMVP 1 //History-based MVP
#if JVET_L0266_HMVP
#define JVET_L0158_L0106_RESET_BUFFER 1 //reset the history buffer on HMVP
#endif
#define JVET_L0265_AFF_MINIMUM4X4 1 //Affine 4x4 chroma subblock
...
...
source/Lib/CommonLib/UnitTools.cpp
View file @
f732de68
...
...
@@ -748,7 +748,6 @@ uint32_t PU::getFinalIntraMode( const PredictionUnit &pu, const ChannelType &chT
return
uiIntraMode
;
}
#if JVET_L0266_HMVP
bool
PU
::
xCheckSimilarMotion
(
const
int
mergeCandIndex
,
const
int
prevCnt
,
const
MergeCtx
mergeCandList
,
bool
hasPruned
[
MRG_MAX_NUM_CANDS
])
{
for
(
uint32_t
ui
=
0
;
ui
<
prevCnt
;
ui
++
)
...
...
@@ -861,7 +860,6 @@ bool PU::addMergeHMVPCand(const Slice &slice, MergeCtx& mrgCtx, bool isCandInter
}
return
false
;
}
#endif
void
PU
::
getInterMergeCandidates
(
const
PredictionUnit
&
pu
,
MergeCtx
&
mrgCtx
,
#if JVET_L0054_MMVD
...
...
@@ -1428,7 +1426,6 @@ void PU::getInterMergeCandidates( const PredictionUnit &pu, MergeCtx& mrgCtx,
return
;
}
#if JVET_L0266_HMVP
int
maxNumMergeCandMin1
=
maxNumMergeCand
-
1
;
if
(
cnt
!=
maxNumMergeCandMin1
)
{
...
...
@@ -1466,7 +1463,6 @@ void PU::getInterMergeCandidates( const PredictionUnit &pu, MergeCtx& mrgCtx,
return
;
}
}
#endif
#if JVET_L0090_PAIR_AVG
// pairwise-average candidates
...
...
@@ -1561,11 +1557,7 @@ void PU::getInterMergeCandidates( const PredictionUnit &pu, MergeCtx& mrgCtx,
uint32_t
uiArrayAddr
=
cnt
;
#if !JVET_L0090_PAIR_AVG
#if JVET_L0266_HMVP
uint32_t
uiCutoff
=
std
::
min
(
uiArrayAddr
,
3u
);
#else
uint32_t
uiCutoff
=
std
::
min
(
uiArrayAddr
,
4u
);
#endif
if
(
slice
.
isInterB
())
{
static
const
uint32_t
NUM_PRIORITY_LIST
=
12
;
...
...
@@ -2158,7 +2150,6 @@ void PU::fillMvpCand(PredictionUnit &pu, const RefPicList &eRefPicList, const in
if
((
C0Avail
&&
getColocatedMVP
(
pu
,
eRefPicList
,
posC0
,
cColMv
,
refIdx_Col
))
||
getColocatedMVP
(
pu
,
eRefPicList
,
posC1
,
cColMv
,
refIdx_Col
))
{
#if JVET_L0266_HMVP
if
(
pu
.
cu
->
imv
!=
0
)
{
cColMv
.
roundToAmvrSignalPrecision
(
MV_PRECISION_INTERNAL
,
pu
.
cu
->
imv
);
...
...
@@ -2175,19 +2166,14 @@ void PU::fillMvpCand(PredictionUnit &pu, const RefPicList &eRefPicList, const in
{
pInfo
->
mvCand
[
pInfo
->
numCand
++
]
=
cColMv
;
}
#else
pInfo
->
mvCand
[
pInfo
->
numCand
++
]
=
cColMv
;
#endif
}
}
#if JVET_L0266_HMVP
if
(
pInfo
->
numCand
<
AMVP_MAX_NUM_CANDS
)
{
const
int
currRefPOC
=
cs
.
slice
->
getRefPic
(
eRefPicList
,
refIdx
)
->
getPOC
();
const
RefPicList
eRefPicList2nd
=
(
eRefPicList
==
REF_PIC_LIST_0
)
?
REF_PIC_LIST_1
:
REF_PIC_LIST_0
;
addAMVPHMVPCand
(
pu
,
eRefPicList
,
eRefPicList2nd
,
currRefPOC
,
*
pInfo
,
pu
.
cu
->
imv
);
}
#endif
if
(
pInfo
->
numCand
>
AMVP_MAX_NUM_CANDS
)
{
pInfo
->
numCand
=
AMVP_MAX_NUM_CANDS
;
...
...
@@ -2867,7 +2853,6 @@ bool PU::addMVPCandWithScaling( const PredictionUnit &pu, const RefPicList &eRef
return
false
;
}
#if JVET_L0266_HMVP
void
PU
::
addAMVPHMVPCand
(
const
PredictionUnit
&
pu
,
const
RefPicList
eRefPicList
,
const
RefPicList
eRefPicList2nd
,
const
int
currRefPOC
,
AMVPInfo
&
info
,
uint8_t
imv
)
{
const
Slice
&
slice
=
*
(
*
pu
.
cs
).
slice
;
...
...
@@ -2916,7 +2901,6 @@ void PU::addAMVPHMVPCand(const PredictionUnit &pu, const RefPicList eRefPicList,
}
}
}
#endif
bool
PU
::
isBipredRestriction
(
const
PredictionUnit
&
pu
)
{
if
(
pu
.
cu
->
lumaSize
().
width
==
4
&&
pu
.
cu
->
lumaSize
().
height
==
4
)
...
...
source/Lib/CommonLib/UnitTools.h
View file @
f732de68
...
...
@@ -126,7 +126,6 @@ namespace PU
bool
addMVPCandUnscaled
(
const
PredictionUnit
&
pu
,
const
RefPicList
&
eRefPicList
,
const
int
&
iRefIdx
,
const
Position
&
pos
,
const
MvpDir
&
eDir
,
AMVPInfo
&
amvpInfo
);
bool
addMVPCandWithScaling
(
const
PredictionUnit
&
pu
,
const
RefPicList
&
eRefPicList
,
const
int
&
iRefIdx
,
const
Position
&
pos
,
const
MvpDir
&
eDir
,
AMVPInfo
&
amvpInfo
);
void
xInheritedAffineMv
(
const
PredictionUnit
&
pu
,
const
PredictionUnit
*
puNeighbour
,
RefPicList
eRefPicList
,
Mv
rcMv
[
3
]
);
#if JVET_L0266_HMVP
bool
xCheckSimilarMotion
(
const
int
mergeCandIndex
,
const
int
prevCnt
,
const
MergeCtx
mergeCandList
,
bool
hasPruned
[
MRG_MAX_NUM_CANDS
]);
#if JVET_L0090_PAIR_AVG
bool
addMergeHMVPCand
(
const
Slice
&
slice
,
MergeCtx
&
mrgCtx
,
bool
canFastExit
,
const
int
&
mrgCandIdx
,
const
uint32_t
maxNumMergeCandMin1
,
int
&
cnt
,
const
int
prevCnt
,
bool
isAvailableSubPu
,
unsigned
subPuMvpPos
...
...
@@ -142,7 +141,6 @@ namespace PU
);
#endif
void
addAMVPHMVPCand
(
const
PredictionUnit
&
pu
,
const
RefPicList
eRefPicList
,
const
RefPicList
eRefPicList2nd
,
const
int
currRefPOC
,
AMVPInfo
&
info
,
uint8_t
imv
);
#endif
#if JVET_L0271_AFFINE_AMVP_SIMPLIFY
bool
addAffineMVPCandUnscaled
(
const
PredictionUnit
&
pu
,
const
RefPicList
&
refPicList
,
const
int
&
refIdx
,
const
Position
&
pos
,
const
MvpDir
&
dir
,
AffineAMVPInfo
&
affiAmvpInfo
);
#endif
...
...
source/Lib/DecoderLib/DecCu.cpp
View file @
f732de68
...
...
@@ -369,12 +369,10 @@ void DecCu::xReconInter(CodingUnit &cu)
m_pcInterPred
->
motionCompensation
(
cu
);
#endif
}
#if JVET_L0266_HMVP
#if JVET_L0293_CPR
if
(
cu
.
Y
().
valid
())
#endif
cu
.
slice
->
updateMotionLUTs
(
cu
.
slice
->
getMotionLUTs
(),
cu
);
#endif
if
(
cu
.
firstPU
->
mhIntraFlag
)
{
...
...
source/Lib/EncoderLib/EncCu.cpp
View file @
f732de68
...
...
@@ -76,21 +76,17 @@ void EncCu::create( EncCfg* encCfg )
m_pTempCS
=
new
CodingStructure
**
[
numWidths
];
m_pBestCS
=
new
CodingStructure
**
[
numWidths
];
#if JVET_L0266_HMVP
m_pTempMotLUTs
=
new
LutMotionCand
**
[
numWidths
];
m_pBestMotLUTs
=
new
LutMotionCand
**
[
numWidths
];
m_pSplitTempMotLUTs
=
new
LutMotionCand
**
[
numWidths
];
#endif
for
(
unsigned
w
=
0
;
w
<
numWidths
;
w
++
)
{
m_pTempCS
[
w
]
=
new
CodingStructure
*
[
numHeights
];
m_pBestCS
[
w
]
=
new
CodingStructure
*
[
numHeights
];
#if JVET_L0266_HMVP
m_pTempMotLUTs
[
w
]
=
new
LutMotionCand
*
[
numHeights
];
m_pBestMotLUTs
[
w
]
=
new
LutMotionCand
*
[
numHeights
];
m_pSplitTempMotLUTs
[
w
]
=
new
LutMotionCand
*
[
numHeights
];
#endif
for
(
unsigned
h
=
0
;
h
<
numHeights
;
h
++
)
{
...
...
@@ -104,7 +100,6 @@ void EncCu::create( EncCfg* encCfg )
m_pTempCS
[
w
][
h
]
->
create
(
chromaFormat
,
Area
(
0
,
0
,
width
,
height
),
false
);
m_pBestCS
[
w
][
h
]
->
create
(
chromaFormat
,
Area
(
0
,
0
,
width
,
height
),
false
);
#if JVET_L0266_HMVP
m_pTempMotLUTs
[
w
][
h
]
=
new
LutMotionCand
;
m_pBestMotLUTs
[
w
][
h
]
=
new
LutMotionCand
;
m_pSplitTempMotLUTs
[
w
][
h
]
=
new
LutMotionCand
;
...
...
@@ -119,17 +114,14 @@ void EncCu::create( EncCfg* encCfg )
m_pBestMotLUTs
[
w
][
h
]
->
currCnt
=
0
;
m_pBestMotLUTs
[
w
][
h
]
->
motionCand
=
nullptr
;
m_pBestMotLUTs
[
w
][
h
]
->
motionCand
=
new
MotionInfo
[
MAX_NUM_HMVP_CANDS
];
#endif
}
else
{
m_pTempCS
[
w
][
h
]
=
nullptr
;
m_pBestCS
[
w
][
h
]
=
nullptr
;
#if JVET_L0266_HMVP
m_pTempMotLUTs
[
w
][
h
]
=
nullptr
;
m_pBestMotLUTs
[
w
][
h
]
=
nullptr
;
m_pSplitTempMotLUTs
[
w
][
h
]
=
nullptr
;
#endif
}
}
}
...
...
@@ -185,7 +177,6 @@ void EncCu::destroy()
delete
m_pBestCS
[
w
][
h
];
delete
m_pTempCS
[
w
][
h
];
#if JVET_L0266_HMVP
if
(
m_pTempMotLUTs
[
w
][
h
])
{
delete
[]
m_pTempMotLUTs
[
w
][
h
]
->
motionCand
;
...
...
@@ -205,25 +196,20 @@ void EncCu::destroy()
m_pSplitTempMotLUTs
[
w
][
h
]
->
motionCand
=
nullptr
;
delete
m_pSplitTempMotLUTs
[
w
][
h
];
}
#endif
}
delete
[]
m_pTempCS
[
w
];
delete
[]
m_pBestCS
[
w
];
#if JVET_L0266_HMVP
delete
[]
m_pBestMotLUTs
[
w
];
delete
[]
m_pTempMotLUTs
[
w
];
delete
[]
m_pSplitTempMotLUTs
[
w
];
#endif
}
delete
[]
m_pBestCS
;
m_pBestCS
=
nullptr
;
delete
[]
m_pTempCS
;
m_pTempCS
=
nullptr
;
#if JVET_L0266_HMVP
delete
[]
m_pSplitTempMotLUTs
;
m_pSplitTempMotLUTs
=
nullptr
;
delete
[]
m_pBestMotLUTs
;
m_pBestMotLUTs
=
nullptr
;
delete
[]
m_pTempMotLUTs
;
m_pTempMotLUTs
=
nullptr
;
#endif
#if REUSE_CU_RESULTS
m_modeCtrl
->
destroy
();
...
...
@@ -377,12 +363,10 @@ void EncCu::compressCtu( CodingStructure& cs, const UnitArea& area, const unsign
CodingStructure
*
tempCS
=
m_pTempCS
[
gp_sizeIdxInfo
->
idxFrom
(
area
.
lumaSize
().
width
)][
gp_sizeIdxInfo
->
idxFrom
(
area
.
lumaSize
().
height
)];
CodingStructure
*
bestCS
=
m_pBestCS
[
gp_sizeIdxInfo
->
idxFrom
(
area
.
lumaSize
().
width
)][
gp_sizeIdxInfo
->
idxFrom
(
area
.
lumaSize
().
height
)];
#if JVET_L0266_HMVP
LutMotionCand
*
tempMotCandLUTs
=
m_pTempMotLUTs
[
gp_sizeIdxInfo
->
idxFrom
(
area
.
lumaSize
().
width
)][
gp_sizeIdxInfo
->
idxFrom
(
area
.
lumaSize
().
height
)];
LutMotionCand
*
bestMotCandLUTs
=
m_pBestMotLUTs
[
gp_sizeIdxInfo
->
idxFrom
(
area
.
lumaSize
().
width
)][
gp_sizeIdxInfo
->
idxFrom
(
area
.
lumaSize
().
height
)];
cs
.
slice
->
copyMotionLUTs
(
cs
.
slice
->
getMotionLUTs
(),
tempMotCandLUTs
);
cs
.
slice
->
copyMotionLUTs
(
cs
.
slice
->
getMotionLUTs
(),
bestMotCandLUTs
);
#endif
cs
.
initSubStructure
(
*
tempCS
,
partitioner
->
chType
,
partitioner
->
currArea
(),
false
);
cs
.
initSubStructure
(
*
bestCS
,
partitioner
->
chType
,
partitioner
->
currArea
(),
false
);
...
...
@@ -391,18 +375,14 @@ void EncCu::compressCtu( CodingStructure& cs, const UnitArea& area, const unsign
tempCS
->
prevQP
[
CH_L
]
=
bestCS
->
prevQP
[
CH_L
]
=
prevQP
[
CH_L
];
xCompressCU
(
tempCS
,
bestCS
,
*
partitioner
#if JVET_L0266_HMVP
,
tempMotCandLUTs
,
bestMotCandLUTs
#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
);
#if JVET_L0266_HMVP
cs
.
slice
->
copyMotionLUTs
(
bestMotCandLUTs
,
cs
.
slice
->
getMotionLUTs
());
#endif
if
(
!
cs
.
pcv
->
ISingleTree
&&
cs
.
slice
->
isIRAP
()
&&
cs
.
pcv
->
chrFormat
!=
CHROMA_400
)
{
...
...
@@ -417,10 +397,8 @@ void EncCu::compressCtu( CodingStructure& cs, const UnitArea& area, const unsign
tempCS
->
prevQP
[
CH_C
]
=
bestCS
->
prevQP
[
CH_C
]
=
prevQP
[
CH_C
];
xCompressCU
(
tempCS
,
bestCS
,
*
partitioner
#if JVET_L0266_HMVP
,
tempMotCandLUTs
,
bestMotCandLUTs
#endif
);
const
bool
copyUnsplitCTUSignals
=
bestCS
->
cus
.
size
()
==
1
&&
KEEP_PRED_AND_RESI_SIGNALS
;
...
...
@@ -567,15 +545,9 @@ int EncCu::updateCtuDataISlice(const CPelBuf buf)
return
(
iSumHad
);
}
#if JVET_L0266_HMVP
bool
EncCu
::
xCheckBestMode
(
CodingStructure
*&
tempCS
,
CodingStructure
*&
bestCS
,
Partitioner
&
partitioner
,
const
EncTestMode
&
encTestMode
)
#else
void
EncCu
::
xCheckBestMode
(
CodingStructure
*&
tempCS
,
CodingStructure
*&
bestCS
,
Partitioner
&
partitioner
,
const
EncTestMode
&
encTestMode
)
#endif
{
#if JVET_L0266_HMVP
bool
bestCSUpdated
=
false
;
#endif
if
(
!
tempCS
->
cus
.
empty
()
)
{
...
...
@@ -607,25 +579,19 @@ void EncCu::xCheckBestMode( CodingStructure *&tempCS, CodingStructure *&bestCS,
std
::
swap
(
tempCS
,
bestCS
);
// store temp best CI for next CU coding
m_CurrCtx
->
best
=
m_CABACEstimator
->
getCtx
();
#if JVET_L0266_HMVP
bestCSUpdated
=
true
;
#endif
}
}
// reset context states
m_CABACEstimator
->
getCtx
()
=
m_CurrCtx
->
start
;
#if JVET_L0266_HMVP
return
bestCSUpdated
;
#endif
}
void
EncCu
::
xCompressCU
(
CodingStructure
*&
tempCS
,
CodingStructure
*&
bestCS
,
Partitioner
&
partitioner
#if JVET_L0266_HMVP
,
LutMotionCand
*&
tempMotCandLUTs
,
LutMotionCand
*&
bestMotCandLUTs
#endif
)
{
#if ENABLE_SPLIT_PARALLELISM
...
...
@@ -679,7 +645,6 @@ void EncCu::xCompressCU( CodingStructure *&tempCS, CodingStructure *&bestCS, Par
m_modeCtrl
->
finishCULevel
(
partitioner
);
return
;
}
#if JVET_L0266_HMVP
if
(
!
slice
.
isIntra
()
#if JVET_L0293_CPR
&&
tempCS
->
chType
==
CHANNEL_TYPE_LUMA
...
...
@@ -688,7 +653,6 @@ void EncCu::xCompressCU( CodingStructure *&tempCS, CodingStructure *&bestCS, Par
{
tempCS
->
slice
->
copyMotionLUTs
(
tempMotCandLUTs
,
tempCS
->
slice
->
getMotionLUTs
());
}
#endif
DTRACE_UPDATE
(
g_trace_ctx
,
std
::
make_pair
(
"cux"
,
uiLPelX
)
);
DTRACE_UPDATE
(
g_trace_ctx
,
std
::
make_pair
(
"cuy"
,
uiTPelY
)
);
...
...
@@ -788,11 +752,9 @@ void EncCu::xCompressCU( CodingStructure *&tempCS, CodingStructure *&bestCS, Par
{
xCheckModeSplit
(
tempCS
,
bestCS
,
partitioner
,
currTestMode
#if JVET_L0266_HMVP
,
tempMotCandLUTs
,
bestMotCandLUTs
,
partitioner
.
currArea
()
#endif
);
}
else
...
...
@@ -819,7 +781,6 @@ void EncCu::xCompressCU( CodingStructure *&tempCS, CodingStructure *&bestCS, Par
// QP from last processed CU for further processing
bestCS
->
prevQP
[
partitioner
.
chType
]
=
bestCS
->
cus
.
back
()
->
qp
;
#if JVET_L0266_HMVP
if
(
!
slice
.
isIntra
()
#if JVET_L0293_CPR
&&
bestCS
->
chType
==
CHANNEL_TYPE_LUMA
...
...
@@ -834,7 +795,6 @@ void EncCu::xCompressCU( CodingStructure *&tempCS, CodingStructure *&bestCS, Par
{
bestCS
->
slice
->
updateMotionLUTs
(
bestMotCandLUTs
,
(
*
bestCS
->
cus
.
back
()));
}
#endif
bestCS
->
picture
->
getRecoBuf
(
currCsArea
).
copyFrom
(
bestCS
->
getRecoBuf
(
currCsArea
)
);
m_modeCtrl
->
finishCULevel
(
partitioner
);
...
...
@@ -1082,11 +1042,9 @@ void EncCu::copyState( EncCu* other, Partitioner& partitioner, const UnitArea& c
#endif
void
EncCu
::
xCheckModeSplit
(
CodingStructure
*&
tempCS
,
CodingStructure
*&
bestCS
,
Partitioner
&
partitioner
,
const
EncTestMode
&
encTestMode
#if JVET_L0266_HMVP
,
LutMotionCand
*
&
tempMotCandLUTs
,
LutMotionCand
*
&
bestMotCandLUTs
,
UnitArea
parArea
#endif
)
{
const
int
qp
=
encTestMode
.
qp
;
...
...
@@ -1096,14 +1054,12 @@ void EncCu::xCheckModeSplit(CodingStructure *&tempCS, CodingStructure *&bestCS,
const
int
oldPrevQp
=
tempCS
->
prevQP
[
partitioner
.
chType
];
const
uint32_t
currDepth
=
partitioner
.
currDepth
;
#if JVET_L0266_HMVP
const
unsigned
wParIdx
=
gp_sizeIdxInfo
->
idxFrom
(
parArea
.
lwidth
());
const
unsigned
hParIdx
=
gp_sizeIdxInfo
->
idxFrom
(
parArea
.
lheight
());
#if JVET_L0293_CPR
if
(
tempCS
->
chType
==
CHANNEL_TYPE_LUMA
)
#endif
tempCS
->
slice
->
copyMotionLUTs
(
tempMotCandLUTs
,
m_pSplitTempMotLUTs
[
wParIdx
][
hParIdx
]);
#endif
const
PartSplit
split
=
getPartSplit
(
encTestMode
);
...
...
@@ -1167,7 +1123,6 @@ void EncCu::xCheckModeSplit(CodingStructure *&tempCS, CodingStructure *&bestCS,
tempCS
->
initSubStructure
(
*
tempSubCS
,
partitioner
.
chType
,
subCUArea
,
false
);
tempCS
->
initSubStructure
(
*
bestSubCS
,
partitioner
.
chType
,
subCUArea
,
false
);
#if JVET_L0266_HMVP
LutMotionCand
*
tempSubMotCandLUTs
=
m_pTempMotLUTs
[
wIdx
][
hIdx
];
LutMotionCand
*
bestSubMotCandLUTs
=
m_pBestMotLUTs
[
wIdx
][
hIdx
];
#if JVET_L0293_CPR
...
...
@@ -1178,14 +1133,11 @@ void EncCu::xCheckModeSplit(CodingStructure *&tempCS, CodingStructure *&bestCS,
tempCS
->
slice
->
copyMotionLUTs
(
tempMotCandLUTs
,
bestSubMotCandLUTs
);
#if JVET_L0293_CPR
}
#endif
#endif
xCompressCU
(
tempSubCS
,
bestSubCS
,
partitioner
#if JVET_L0266_HMVP
,
tempSubMotCandLUTs
,
bestSubMotCandLUTs
#endif
);
if
(
bestSubCS
->
cost
==
MAX_DOUBLE
)
...
...
@@ -1194,12 +1146,9 @@ void EncCu::xCheckModeSplit(CodingStructure *&tempCS, CodingStructure *&bestCS,
tempCS
->
cost
=
MAX_DOUBLE
;
m_CurrCtx
--
;
partitioner
.
exitCurrSplit
();
#if JVET_L0266_HMVP
bool
bestCSUpdated
=
#endif
xCheckBestMode
(
tempCS
,
bestCS
,
partitioner
,
encTestMode
);
#if JVET_L0266_HMVP
#if JVET_L0293_CPR
if
(
tempCS
->
chType
==
CHANNEL_TYPE_LUMA
)
#endif
...
...
@@ -1207,18 +1156,15 @@ void EncCu::xCheckModeSplit(CodingStructure *&tempCS, CodingStructure *&bestCS,
{
std
::
swap
(
tempMotCandLUTs
,
bestMotCandLUTs
);
}
#endif
return
;
}
bool
keepResi
=
KEEP_PRED_AND_RESI_SIGNALS
;
tempCS
->
useSubStructure
(
*
bestSubCS
,
partitioner
.
chType
,
CS
::
getArea
(
*
tempCS
,
subCUArea
,
partitioner
.
chType
),
KEEP_PRED_AND_RESI_SIGNALS
,
true
,
keepResi
,
keepResi
);
#if JVET_L0266_HMVP
#if JVET_L0293_CPR
if
(
tempCS
->
chType
==
CHANNEL_TYPE_LUMA
)
#endif
tempCS
->
slice
->
copyMotionLUTs
(
bestSubMotCandLUTs
,
tempMotCandLUTs
);
#endif
if
(
currDepth
<
pps
.
getMaxCuDQPDepth
())
{
...
...
@@ -1326,9 +1272,7 @@ void EncCu::xCheckModeSplit(CodingStructure *&tempCS, CodingStructure *&bestCS,
// RD check for sub partitioned coding structure.
#if JVET_L0266_HMVP
bool
bestCSUpdated
=
#endif
xCheckBestMode
(
tempCS
,
bestCS
,
partitioner
,
encTestMode
);
#if JVET_L0260_AFFINE_ME
...
...
@@ -1336,7 +1280,6 @@ void EncCu::xCheckModeSplit(CodingStructure *&tempCS, CodingStructure *&bestCS,
m_pcInterSearch
->
addAffMVInfo
(
tmpMVInfo
);
#endif
#if JVET_L0266_HMVP
if
(
!
slice
.
isIntra
()
#if JVET_L0293_CPR
&&
tempCS
->
chType
==
CHANNEL_TYPE_LUMA
...
...
@@ -1349,7 +1292,6 @@ void EncCu::xCheckModeSplit(CodingStructure *&tempCS, CodingStructure *&bestCS,
}
tempCS
->
slice
->
copyMotionLUTs
(
m_pSplitTempMotLUTs
[
wParIdx
][
hParIdx
],
tempMotCandLUTs
);
}
#endif
tempCS
->
releaseIntermediateData
();
...
...
source/Lib/EncoderLib/EncCu.h
View file @
f732de68
...
...
@@ -98,11 +98,9 @@ private:
CodingStructure
***
m_pTempCS
;
CodingStructure
***
m_pBestCS
;
#if JVET_L0266_HMVP
LutMotionCand
***
m_pTempMotLUTs
;
LutMotionCand
***
m_pBestMotLUTs
;
LutMotionCand
***
m_pSplitTempMotLUTs
;
#endif
// Access channel
EncCfg
*
m_pcEncCfg
;
IntraSearch
*
m_pcIntraSearch
;
...
...
@@ -195,29 +193,21 @@ public:
protected:
void
xCompressCU
(
CodingStructure
*&
tempCS
,
CodingStructure
*&
bestCS
,
Partitioner
&
pm
#if JVET_L0266_HMVP
,
LutMotionCand
*&
tempMotCandLUTs
,
LutMotionCand
*&
bestMotCandLUTs
#endif
);
#if ENABLE_SPLIT_PARALLELISM
void
xCompressCUParallel
(
CodingStructure
*&
tempCS
,
CodingStructure
*&
bestCS
,
Partitioner
&
pm
);
void
copyState
(
EncCu
*
other
,
Partitioner
&
pm
,
const
UnitArea
&
currArea
,
const
bool
isDist
);
#endif
#if JVET_L0266_HMVP
bool
#else
void
#endif
xCheckBestMode
(
CodingStructure
*&
tempCS
,
CodingStructure
*&
bestCS
,
Partitioner
&
pm
,
const
EncTestMode
&
encTestmode
);
void
xCheckModeSplit
(
CodingStructure
*&
tempCS
,
CodingStructure
*&
bestCS
,
Partitioner
&
pm
,
const
EncTestMode
&
encTestMode
#if JVET_L0266_HMVP
,
LutMotionCand
*
&
tempMotCandLUTs
,
LutMotionCand
*
&
bestMotCandLUTs
,
UnitArea
parArea
#endif
);
void
xCheckRDCostIntra
(
CodingStructure
*&
tempCS
,
CodingStructure
*&
bestCS
,
Partitioner
&
pm
,
const
EncTestMode
&
encTestMode
);
...
...
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