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
12
Merge Requests
12
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
40d607d9
Commit
40d607d9
authored
Jan 18, 2019
by
Karsten Suehring
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove macro JVET_L0293_CPR
parent
46504ed4
Changes
43
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
43 changed files
with
0 additions
and
544 deletions
+0
-544
source/App/EncoderApp/EncApp.cpp
source/App/EncoderApp/EncApp.cpp
+0
-2
source/App/EncoderApp/EncAppCfg.cpp
source/App/EncoderApp/EncAppCfg.cpp
+0
-6
source/App/EncoderApp/EncAppCfg.h
source/App/EncoderApp/EncAppCfg.h
+0
-2
source/Lib/CommonLib/CodingStructure.cpp
source/Lib/CommonLib/CodingStructure.cpp
+0
-6
source/Lib/CommonLib/CodingStructure.h
source/Lib/CommonLib/CodingStructure.h
+0
-6
source/Lib/CommonLib/Common.h
source/Lib/CommonLib/Common.h
+0
-2
source/Lib/CommonLib/CommonDef.h
source/Lib/CommonLib/CommonDef.h
+0
-2
source/Lib/CommonLib/ContextModelling.cpp
source/Lib/CommonLib/ContextModelling.cpp
+0
-2
source/Lib/CommonLib/CprHashMap.cpp
source/Lib/CommonLib/CprHashMap.cpp
+0
-8
source/Lib/CommonLib/InterPrediction.cpp
source/Lib/CommonLib/InterPrediction.cpp
+0
-44
source/Lib/CommonLib/InterPrediction.h
source/Lib/CommonLib/InterPrediction.h
+0
-12
source/Lib/CommonLib/LoopFilter.cpp
source/Lib/CommonLib/LoopFilter.cpp
+0
-4
source/Lib/CommonLib/MotionInfo.h
source/Lib/CommonLib/MotionInfo.h
+0
-2
source/Lib/CommonLib/Mv.h
source/Lib/CommonLib/Mv.h
+0
-2
source/Lib/CommonLib/Quant.cpp
source/Lib/CommonLib/Quant.cpp
+0
-4
source/Lib/CommonLib/RdCost.h
source/Lib/CommonLib/RdCost.h
+0
-6
source/Lib/CommonLib/Slice.cpp
source/Lib/CommonLib/Slice.cpp
+0
-10
source/Lib/CommonLib/Slice.h
source/Lib/CommonLib/Slice.h
+0
-4
source/Lib/CommonLib/TypeDef.h
source/Lib/CommonLib/TypeDef.h
+0
-3
source/Lib/CommonLib/Unit.cpp
source/Lib/CommonLib/Unit.cpp
+0
-10
source/Lib/CommonLib/Unit.h
source/Lib/CommonLib/Unit.h
+0
-4
source/Lib/CommonLib/UnitTools.cpp
source/Lib/CommonLib/UnitTools.cpp
+0
-130
source/Lib/CommonLib/UnitTools.h
source/Lib/CommonLib/UnitTools.h
+0
-8
source/Lib/CommonLib/dtrace_blockstatistics.cpp
source/Lib/CommonLib/dtrace_blockstatistics.cpp
+0
-6
source/Lib/CommonLib/dtrace_blockstatistics.h
source/Lib/CommonLib/dtrace_blockstatistics.h
+0
-4
source/Lib/CommonLib/x86/InitX86.cpp
source/Lib/CommonLib/x86/InitX86.cpp
+0
-2
source/Lib/DecoderLib/CABACReader.cpp
source/Lib/DecoderLib/CABACReader.cpp
+0
-10
source/Lib/DecoderLib/DecCu.cpp
source/Lib/DecoderLib/DecCu.cpp
+0
-15
source/Lib/DecoderLib/DecLib.cpp
source/Lib/DecoderLib/DecLib.cpp
+0
-4
source/Lib/DecoderLib/VLCReader.cpp
source/Lib/DecoderLib/VLCReader.cpp
+0
-2
source/Lib/EncoderLib/CABACWriter.cpp
source/Lib/EncoderLib/CABACWriter.cpp
+0
-10
source/Lib/EncoderLib/EncCfg.h
source/Lib/EncoderLib/EncCfg.h
+0
-4
source/Lib/EncoderLib/EncCu.cpp
source/Lib/EncoderLib/EncCu.cpp
+0
-72
source/Lib/EncoderLib/EncCu.h
source/Lib/EncoderLib/EncCu.h
+0
-8
source/Lib/EncoderLib/EncGOP.cpp
source/Lib/EncoderLib/EncGOP.cpp
+0
-12
source/Lib/EncoderLib/EncLib.cpp
source/Lib/EncoderLib/EncLib.cpp
+0
-4
source/Lib/EncoderLib/EncModeCtrl.cpp
source/Lib/EncoderLib/EncModeCtrl.cpp
+0
-12
source/Lib/EncoderLib/EncModeCtrl.h
source/Lib/EncoderLib/EncModeCtrl.h
+0
-2
source/Lib/EncoderLib/EncSlice.h
source/Lib/EncoderLib/EncSlice.h
+0
-2
source/Lib/EncoderLib/InterSearch.cpp
source/Lib/EncoderLib/InterSearch.cpp
+0
-72
source/Lib/EncoderLib/InterSearch.h
source/Lib/EncoderLib/InterSearch.h
+0
-18
source/Lib/EncoderLib/IntraSearch.cpp
source/Lib/EncoderLib/IntraSearch.cpp
+0
-4
source/Lib/EncoderLib/VLCWriter.cpp
source/Lib/EncoderLib/VLCWriter.cpp
+0
-2
No files found.
source/App/EncoderApp/EncApp.cpp
View file @
40d607d9
...
...
@@ -254,7 +254,6 @@ void EncApp::xInitLibCfg()
m_cEncLib
.
setUseMHIntra
(
m_MHIntra
);
m_cEncLib
.
setUseTriangle
(
m_Triangle
);
#if JVET_L0293_CPR
m_cEncLib
.
setCPRMode
(
m_CPRMode
);
m_cEncLib
.
setCPRLocalSearchRangeX
(
m_CPRLocalSearchRangeX
);
m_cEncLib
.
setCPRLocalSearchRangeY
(
m_CPRLocalSearchRangeY
);
...
...
@@ -262,7 +261,6 @@ void EncApp::xInitLibCfg()
m_cEncLib
.
setCPRHashSearchMaxCand
(
m_CPRHashSearchMaxCand
);
m_cEncLib
.
setCPRHashSearchRange4SmallBlk
(
m_CPRHashSearchRange4SmallBlk
);
m_cEncLib
.
setCPRFastMethod
(
m_CPRFastMethod
);
#endif
m_cEncLib
.
setUseWrapAround
(
m_wrapAround
);
m_cEncLib
.
setWrapAroundOffset
(
m_wrapAroundOffset
);
...
...
source/App/EncoderApp/EncAppCfg.cpp
View file @
40d607d9
...
...
@@ -855,7 +855,6 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] )
(
"MHIntra"
,
m_MHIntra
,
false
,
"Enable MHIntra mode"
)
(
"Triangle"
,
m_Triangle
,
false
,
"Enable triangular shape motion vector prediction (0:off, 1:on)"
)
#if JVET_L0293_CPR
(
"CPR"
,
m_CPRMode
,
0u
,
"CPRMode (0x1:enabled, 0x0:disabled) [default: disabled]"
)
(
"CPRLocalSearchRangeX"
,
m_CPRLocalSearchRangeX
,
128u
,
"Search range of CPR local search in x direction"
)
(
"CPRLocalSearchRangeY"
,
m_CPRLocalSearchRangeY
,
128u
,
"Search range of CPR local search in y direction"
)
...
...
@@ -863,7 +862,6 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] )
(
"CPRHashSearchMaxCand"
,
m_CPRHashSearchMaxCand
,
256u
,
"Max candidates for hash based CPR search"
)
(
"CPRHashSearchRange4SmallBlk"
,
m_CPRHashSearchRange4SmallBlk
,
256u
,
"Small block search range in based CPR search"
)
(
"CPRFastMethod"
,
m_CPRFastMethod
,
6u
,
"Fast methods for CPR"
)
#endif
(
"WrapAround"
,
m_wrapAround
,
false
,
"Enable horizontal wrap-around motion compensation for inter prediction (0:off, 1:on) [default: off]"
)
(
"WrapAroundOffset"
,
m_wrapAroundOffset
,
0u
,
"Offset in luma samples used for computing the horizontal wrap-around position"
)
...
...
@@ -1927,9 +1925,7 @@ bool EncAppCfg::xCheckParameter()
xConfirmPara
(
m_DisableMotionCompression
,
"Disable motion data compression only allowed with NEXT profile"
);
xConfirmPara
(
m_MTT
,
"Multi type tree is only allowed with NEXT profile"
);
xConfirmPara
(
m_ImvMode
,
"IMV is only allowed with NEXT profile"
);
#if JVET_L0293_CPR
xConfirmPara
(
m_CPRMode
,
"CPR Mode only allowed with NEXT profile"
);
#endif
xConfirmPara
(
m_useFastLCTU
,
"Fast large CTU can only be applied when encoding with NEXT profile"
);
xConfirmPara
(
m_EMT
,
"EMT only allowed with NEXT profile"
);
xConfirmPara
(
m_FastEMT
,
"EMT only allowed with NEXT profile"
);
...
...
@@ -3125,9 +3121,7 @@ void EncAppCfg::xPrintParameter()
msg
(
VERBOSE
,
"MHIntra:%d "
,
m_MHIntra
);
msg
(
VERBOSE
,
"Triangle:%d "
,
m_Triangle
);
}
#if JVET_L0293_CPR
msg
(
VERBOSE
,
"CPR:%d "
,
m_CPRMode
);
#endif
msg
(
VERBOSE
,
"WrapAround:%d "
,
m_wrapAround
);
if
(
m_wrapAround
)
{
...
...
source/App/EncoderApp/EncAppCfg.h
View file @
40d607d9
...
...
@@ -236,7 +236,6 @@ protected:
bool
m_Triangle
;
#if JVET_L0293_CPR
unsigned
m_CPRMode
;
unsigned
m_CPRLocalSearchRangeX
;
unsigned
m_CPRLocalSearchRangeY
;
...
...
@@ -244,7 +243,6 @@ protected:
unsigned
m_CPRHashSearchMaxCand
;
unsigned
m_CPRHashSearchRange4SmallBlk
;
unsigned
m_CPRFastMethod
;
#endif
bool
m_wrapAround
;
unsigned
m_wrapAroundOffset
;
...
...
source/Lib/CommonLib/CodingStructure.cpp
View file @
40d607d9
...
...
@@ -746,11 +746,7 @@ void CodingStructure::useSubStructure( const CodingStructure& subStruct, const C
if
(
cpyResi
)
picture
->
getResiBuf
(
clippedArea
).
copyFrom
(
subResiBuf
);
if
(
cpyReco
)
picture
->
getRecoBuf
(
clippedArea
).
copyFrom
(
subRecoBuf
);
#if JVET_L0293_CPR
if
(
!
subStruct
.
m_isTuEnc
&&
(
!
slice
->
isIntra
()
&&
subStruct
.
chType
!=
CHANNEL_TYPE_CHROMA
))
#else
if
(
!
subStruct
.
m_isTuEnc
&&
!
slice
->
isIntra
()
)
#endif
{
// copy motion buffer
MotionBuf
ownMB
=
getMotionBuf
(
clippedArea
);
...
...
@@ -1303,7 +1299,6 @@ const TransformUnit* CodingStructure::getTURestricted( const Position &pos, cons
}
}
#if JVET_L0293_CPR
CprLumaCoverage
CodingStructure
::
getCprLumaCoverage
(
const
CompArea
&
chromaArea
)
const
{
CHECK
(
chType
!=
CHANNEL_TYPE_CHROMA
,
"Error"
);
...
...
@@ -1337,4 +1332,3 @@ CprLumaCoverage CodingStructure::getCprLumaCoverage(const CompArea& chromaArea)
return
coverage
;
}
#endif
source/Lib/CommonLib/CodingStructure.h
View file @
40d607d9
...
...
@@ -58,7 +58,6 @@ enum PictureType
PIC_ORG_RESI
,
NUM_PIC_TYPES
};
#if JVET_L0293_CPR
enum
CprLumaCoverage
{
CPR_LUMA_COVERAGE_FULL
=
0
,
...
...
@@ -66,7 +65,6 @@ enum CprLumaCoverage
CPR_LUMA_COVERAGE_NONE
,
NUM_CPR_LUMA_COVERAGE
,
};
#endif
extern
XUCache
g_globalUnitCache
;
// ---------------------------------------------------------------------------
...
...
@@ -85,9 +83,7 @@ public:
Slice
*
slice
;
UnitScale
unitScale
[
MAX_NUM_COMPONENT
];
#if JVET_L0293_CPR
ChannelType
chType
;
#endif
int
baseQP
;
int
prevQP
[
MAX_NUM_CHANNEL_TYPE
];
...
...
@@ -158,9 +154,7 @@ public:
cCUTraverser
traverseCUs
(
const
UnitArea
&
_unit
,
const
ChannelType
_chType
)
const
;
cPUTraverser
traversePUs
(
const
UnitArea
&
_unit
,
const
ChannelType
_chType
)
const
;
cTUTraverser
traverseTUs
(
const
UnitArea
&
_unit
,
const
ChannelType
_chType
)
const
;
#if JVET_L0293_CPR
CprLumaCoverage
getCprLumaCoverage
(
const
CompArea
&
chromaArea
)
const
;
#endif
// ---------------------------------------------------------------------------
// encoding search utilities
// ---------------------------------------------------------------------------
...
...
source/Lib/CommonLib/Common.h
View file @
40d607d9
...
...
@@ -114,7 +114,6 @@ struct UnitScale
Size
scale
(
const
Size
&
size
)
const
{
return
{
size
.
width
>>
posx
,
size
.
height
>>
posy
};
}
Area
scale
(
const
Area
&
_area
)
const
{
return
Area
(
scale
(
_area
.
pos
()
),
scale
(
_area
.
size
()
)
);
}
};
#if JVET_L0293_CPR
namespace
std
{
template
<
>
...
...
@@ -135,7 +134,6 @@ namespace std
}
};
}
#endif
inline
size_t
rsAddr
(
const
Position
&
pos
,
const
uint32_t
stride
,
const
UnitScale
&
unitScale
)
{
return
(
size_t
)(
stride
>>
unitScale
.
posx
)
*
(
size_t
)(
pos
.
y
>>
unitScale
.
posy
)
+
(
size_t
)(
pos
.
x
>>
unitScale
.
posx
);
...
...
source/Lib/CommonLib/CommonDef.h
View file @
40d607d9
...
...
@@ -390,14 +390,12 @@ static const int TRIANGLE_MAX_NUM_CANDS = 40;
static
const
int
TRIANGLE_MAX_NUM_SATD_CANDS
=
3
;
static
const
int
TRIANGLE_MIN_SIZE
=
8
*
8
;
#if JVET_L0293_CPR
static
const
int
CPR_MAX_CAND_SIZE
=
16
;
// max block size for cpr search
static
const
int
CPR_NUM_CANDIDATES
=
64
;
///< Maximum number of candidates to store/test
static
const
int
CHROMA_REFINEMENT_CANDIDATES
=
8
;
/// 8 candidates BV to choose from
static
const
int
CPR_FAST_METHOD_NOINTRA_CPRCBF0
=
0x01
;
static
const
int
CPR_FAST_METHOD_BUFFERBV
=
0X02
;
static
const
int
CPR_FAST_METHOD_ADAPTIVE_SEARCHRANGE
=
0X04
;
#endif
// ====================================================================================================================
// Macro functions
...
...
source/Lib/CommonLib/ContextModelling.cpp
View file @
40d607d9
...
...
@@ -340,14 +340,12 @@ void MergeCtx::setMergeInfo( PredictionUnit& pu, int candIdx )
pu
.
mvpIdx
[
REF_PIC_LIST_1
]
=
NOT_VALID
;
pu
.
mvpNum
[
REF_PIC_LIST_0
]
=
NOT_VALID
;
pu
.
mvpNum
[
REF_PIC_LIST_1
]
=
NOT_VALID
;
#if JVET_L0293_CPR
if
(
interDirNeighbours
[
candIdx
]
==
1
&&
pu
.
cs
->
slice
->
getRefPic
(
REF_PIC_LIST_0
,
mvFieldNeighbours
[
candIdx
<<
1
].
refIdx
)
->
getPOC
()
==
pu
.
cs
->
slice
->
getPOC
())
{
pu
.
cu
->
cpr
=
true
;
pu
.
bv
=
pu
.
mv
[
REF_PIC_LIST_0
];
pu
.
bv
.
changePrecision
(
MV_PRECISION_INTERNAL
,
MV_PRECISION_INT
);
// used for only integer resolution
}
#endif
pu
.
cu
->
GBiIdx
=
(
interDirNeighbours
[
candIdx
]
==
3
)
?
GBiIdx
[
candIdx
]
:
GBI_DEFAULT
;
}
...
...
source/Lib/CommonLib/CprHashMap.cpp
View file @
40d607d9
...
...
@@ -298,11 +298,7 @@ bool CprHashMap::cprHashMatch(const Area& lumaArea, std::vector<Position>& cand,
bool
wholeBlockMatch
=
true
;
if
(
lumaArea
.
width
>
MIN_PU_SIZE
||
lumaArea
.
height
>
MIN_PU_SIZE
)
{
#if JVET_L0293_CPR
if
(
!
cs
.
isDecomp
(
bottomRight
,
cs
.
chType
)
||
bottomRight
.
x
>=
m_picWidth
||
bottomRight
.
y
>=
m_picHeight
)
#else
if
(
!
cs
.
isDecomp
(
bottomRight
,
CHANNEL_TYPE_LUMA
)
||
bottomRight
.
x
>=
m_picWidth
||
bottomRight
.
y
>=
m_picHeight
)
#endif
{
continue
;
}
...
...
@@ -317,11 +313,7 @@ bool CprHashMap::cprHashMatch(const Area& lumaArea, std::vector<Position>& cand,
}
else
{
#if JVET_L0293_CPR
if
(
abs
(
refBlockPos
->
x
-
lumaArea
.
x
)
>
searchRange4SmallBlk
||
abs
(
refBlockPos
->
y
-
lumaArea
.
y
)
>
searchRange4SmallBlk
||
!
cs
.
isDecomp
(
bottomRight
,
cs
.
chType
))
#else
if
(
abs
(
refBlockPos
->
x
-
lumaArea
.
x
)
>
searchRange4SmallBlk
||
abs
(
refBlockPos
->
y
-
lumaArea
.
y
)
>
searchRange4SmallBlk
||
!
cs
.
isDecomp
(
bottomRight
,
CHANNEL_TYPE_LUMA
))
#endif
{
continue
;
}
...
...
source/Lib/CommonLib/InterPrediction.cpp
View file @
40d607d9
...
...
@@ -344,7 +344,6 @@ void InterPrediction::xSubPuMC( PredictionUnit& pu, PelUnitBuf& predBuf, const R
pu
.
cu
->
affine
=
isAffine
;
}
#if JVET_L0293_CPR
void
InterPrediction
::
xChromaMC
(
PredictionUnit
&
pu
,
PelUnitBuf
&
pcYuvPred
)
{
// separated tree, chroma
...
...
@@ -372,27 +371,22 @@ void InterPrediction::xChromaMC(PredictionUnit &pu, PelUnitBuf& pcYuvPred)
}
}
}
#endif
void
InterPrediction
::
xPredInterUni
(
const
PredictionUnit
&
pu
,
const
RefPicList
&
eRefPicList
,
PelUnitBuf
&
pcYuvPred
,
const
bool
&
bi
,
const
bool
&
bioApplied
#if JVET_L0293_CPR
,
const
bool
luma
,
const
bool
chroma
#endif
)
{
const
SPS
&
sps
=
*
pu
.
cs
->
sps
;
int
iRefIdx
=
pu
.
refIdx
[
eRefPicList
];
Mv
mv
[
3
];
#if JVET_L0293_CPR
bool
isCPR
=
false
;
if
(
pu
.
cs
->
slice
->
getRefPic
(
eRefPicList
,
iRefIdx
)
->
getPOC
()
==
pu
.
cs
->
slice
->
getPOC
())
{
isCPR
=
true
;
}
#endif
if
(
pu
.
cu
->
affine
)
{
CHECK
(
iRefIdx
<
0
,
"iRefIdx incorrect."
);
...
...
@@ -414,12 +408,10 @@ void InterPrediction::xPredInterUni(const PredictionUnit& pu, const RefPicList&
for
(
uint32_t
comp
=
COMPONENT_Y
;
comp
<
pcYuvPred
.
bufs
.
size
()
&&
comp
<=
m_maxCompIDToPred
;
comp
++
)
{
const
ComponentID
compID
=
ComponentID
(
comp
);
#if JVET_L0293_CPR
if
(
compID
==
COMPONENT_Y
&&
!
luma
)
continue
;
if
(
compID
!=
COMPONENT_Y
&&
!
chroma
)
continue
;
#endif
if
(
pu
.
cu
->
affine
)
{
CHECK
(
bioApplied
,
"BIO is not allowed with affine"
);
...
...
@@ -429,9 +421,7 @@ void InterPrediction::xPredInterUni(const PredictionUnit& pu, const RefPicList&
{
xPredInterBlk
(
compID
,
pu
,
pu
.
cu
->
slice
->
getRefPic
(
eRefPicList
,
iRefIdx
),
mv
[
0
],
pcYuvPred
,
bi
,
pu
.
cu
->
slice
->
clpRng
(
compID
)
,
bioApplied
#if JVET_L0293_CPR
,
isCPR
#endif
);
}
...
...
@@ -490,9 +480,7 @@ void InterPrediction::xPredInterBi(PredictionUnit& pu, PelUnitBuf &pcYuvPred)
{
xPredInterUni
(
pu
,
eRefPicList
,
pcMbBuf
,
true
,
bioApplied
#if JVET_L0293_CPR
,
true
,
true
#endif
);
}
else
...
...
@@ -501,18 +489,14 @@ void InterPrediction::xPredInterBi(PredictionUnit& pu, PelUnitBuf &pcYuvPred)
{
xPredInterUni
(
pu
,
eRefPicList
,
pcMbBuf
,
true
,
bioApplied
#if JVET_L0293_CPR
,
true
,
true
#endif
);
}
else
{
xPredInterUni
(
pu
,
eRefPicList
,
pcMbBuf
,
pu
.
cu
->
triangle
,
bioApplied
#if JVET_L0293_CPR
,
true
,
true
#endif
);
}
}
...
...
@@ -541,9 +525,7 @@ void InterPrediction::xPredInterBi(PredictionUnit& pu, PelUnitBuf &pcYuvPred)
void
InterPrediction
::
xPredInterBlk
(
const
ComponentID
&
compID
,
const
PredictionUnit
&
pu
,
const
Picture
*
refPic
,
const
Mv
&
_mv
,
PelUnitBuf
&
dstPic
,
const
bool
&
bi
,
const
ClpRng
&
clpRng
,
const
bool
&
bioApplied
#if JVET_L0293_CPR
,
bool
isCPR
#endif
)
{
JVET_J0090_SET_REF_PICTURE
(
refPic
,
compID
);
...
...
@@ -555,13 +537,11 @@ void InterPrediction::xPredInterBlk ( const ComponentID& compID, const Predictio
int
xFrac
=
_mv
.
hor
&
((
1
<<
shiftHor
)
-
1
);
int
yFrac
=
_mv
.
ver
&
((
1
<<
shiftVer
)
-
1
);
#if JVET_L0293_CPR
if
(
isCPR
)
{
xFrac
=
yFrac
=
0
;
JVET_J0090_SET_CACHE_ENABLE
(
false
);
}
#endif
PelBuf
&
dstBuf
=
dstPic
.
bufs
[
compID
];
unsigned
width
=
dstBuf
.
width
;
...
...
@@ -634,9 +614,7 @@ void InterPrediction::xPredAffineBlk( const ComponentID& compID, const Predictio
*
pu
.
cs
->
sps
);
xPredInterBlk
(
compID
,
pu
,
refPic
,
mvTemp
,
dstPic
,
bi
,
clpRng
,
false
#if JVET_L0293_CPR
,
false
#endif
);
return
;
}
...
...
@@ -1223,12 +1201,9 @@ void InterPrediction::xWeightedAverage(const PredictionUnit& pu, const CPelUnitB
}
void
InterPrediction
::
motionCompensation
(
PredictionUnit
&
pu
,
PelUnitBuf
&
predBuf
,
const
RefPicList
&
eRefPicList
#if JVET_L0293_CPR
,
const
bool
luma
,
const
bool
chroma
#endif
)
{
#if JVET_L0293_CPR
// dual tree handling for CPR as the only ref
if
(
!
luma
||
!
chroma
)
{
...
...
@@ -1246,7 +1221,6 @@ void InterPrediction::motionCompensation( PredictionUnit &pu, PelUnitBuf &predBu
}
}
// else, go with regular MC below
#endif
CodingStructure
&
cs
=
*
pu
.
cs
;
const
PPS
&
pps
=
*
cs
.
pps
;
const
SliceType
sliceType
=
cs
.
slice
->
getSliceType
();
...
...
@@ -1257,9 +1231,7 @@ void InterPrediction::motionCompensation( PredictionUnit &pu, PelUnitBuf &predBu
{
xPredInterUni
(
pu
,
eRefPicList
,
predBuf
,
true
,
false
#if JVET_L0293_CPR
,
true
,
true
#endif
);
xWeightedPredictionUni
(
pu
,
predBuf
,
eRefPicList
,
predBuf
,
-
1
,
m_maxCompIDToPred
);
}
...
...
@@ -1267,19 +1239,13 @@ void InterPrediction::motionCompensation( PredictionUnit &pu, PelUnitBuf &predBu
{
xPredInterUni
(
pu
,
eRefPicList
,
predBuf
,
false
,
false
#if JVET_L0293_CPR
,
true
,
true
#endif
);
}
}
else
{
#if JVET_L0293_CPR
if
(
pu
.
mergeType
!=
MRG_TYPE_DEFAULT_N
&&
pu
.
mergeType
!=
MRG_TYPE_CPR
)
#else
if
(
pu
.
mergeType
!=
MRG_TYPE_DEFAULT_N
)
#endif
{
xSubPuMC
(
pu
,
predBuf
,
eRefPicList
);
}
...
...
@@ -1287,9 +1253,7 @@ void InterPrediction::motionCompensation( PredictionUnit &pu, PelUnitBuf &predBu
{
xPredInterUni
(
pu
,
REF_PIC_LIST_0
,
predBuf
,
false
,
false
#if JVET_L0293_CPR
,
true
,
true
#endif
);
}
else
...
...
@@ -1301,33 +1265,25 @@ void InterPrediction::motionCompensation( PredictionUnit &pu, PelUnitBuf &predBu
}
void
InterPrediction
::
motionCompensation
(
CodingUnit
&
cu
,
const
RefPicList
&
eRefPicList
#if JVET_L0293_CPR
,
const
bool
luma
,
const
bool
chroma
#endif
)
{
for
(
auto
&
pu
:
CU
::
traversePUs
(
cu
)
)
{
PelUnitBuf
predBuf
=
cu
.
cs
->
getPredBuf
(
pu
);
motionCompensation
(
pu
,
predBuf
,
eRefPicList
#if JVET_L0293_CPR
,
luma
,
chroma
#endif
);
}
}
void
InterPrediction
::
motionCompensation
(
PredictionUnit
&
pu
,
const
RefPicList
&
eRefPicList
/*= REF_PIC_LIST_X*/
#if JVET_L0293_CPR
,
const
bool
luma
,
const
bool
chroma
#endif
)
{
PelUnitBuf
predBuf
=
pu
.
cs
->
getPredBuf
(
pu
);
motionCompensation
(
pu
,
predBuf
,
eRefPicList
#if JVET_L0293_CPR
,
luma
,
chroma
#endif
);
}
...
...
source/Lib/CommonLib/InterPrediction.h
View file @
40d607d9
...
...
@@ -105,16 +105,12 @@ protected:
void
xPredInterUni
(
const
PredictionUnit
&
pu
,
const
RefPicList
&
eRefPicList
,
PelUnitBuf
&
pcYuvPred
,
const
bool
&
bi
,
const
bool
&
bioApplied
#if JVET_L0293_CPR
,
const
bool
luma
,
const
bool
chroma
#endif
);
void
xPredInterBi
(
PredictionUnit
&
pu
,
PelUnitBuf
&
pcYuvPred
);
void
xPredInterBlk
(
const
ComponentID
&
compID
,
const
PredictionUnit
&
pu
,
const
Picture
*
refPic
,
const
Mv
&
_mv
,
PelUnitBuf
&
dstPic
,
const
bool
&
bi
,
const
ClpRng
&
clpRng
,
const
bool
&
bioApplied
#if JVET_L0293_CPR
,
bool
isCPR
#endif
);
void
xAddBIOAvg4
(
const
Pel
*
src0
,
int
src0Stride
,
const
Pel
*
src1
,
int
src1Stride
,
Pel
*
dst
,
int
dstStride
,
const
Pel
*
gradX0
,
const
Pel
*
gradX1
,
const
Pel
*
gradY0
,
const
Pel
*
gradY1
,
int
gradStride
,
int
width
,
int
height
,
int
tmpx
,
int
tmpy
,
int
shift
,
int
offset
,
const
ClpRng
&
clpRng
);
...
...
@@ -133,9 +129,7 @@ protected:
MotionInfo
m_SubPuMiBuf
[(
MAX_CU_SIZE
*
MAX_CU_SIZE
)
>>
(
MIN_CU_LOG2
<<
1
)];
#if JVET_L0293_CPR
void
xChromaMC
(
PredictionUnit
&
pu
,
PelUnitBuf
&
pcYuvPred
);
#endif
#if JVET_J0090_MEMORY_BANDWITH_MEASURE
CacheModel
*
m_cacheModel
;
#endif
...
...
@@ -147,19 +141,13 @@ public:
// inter
void
motionCompensation
(
PredictionUnit
&
pu
,
PelUnitBuf
&
predBuf
,
const
RefPicList
&
eRefPicList
=
REF_PIC_LIST_X
#if JVET_L0293_CPR
,
const
bool
luma
=
true
,
const
bool
chroma
=
true
#endif
);
void
motionCompensation
(
PredictionUnit
&
pu
,
const
RefPicList
&
eRefPicList
=
REF_PIC_LIST_X
#if JVET_L0293_CPR
,
const
bool
luma
=
true
,
const
bool
chroma
=
true
#endif
);
void
motionCompensation
(
CodingUnit
&
cu
,
const
RefPicList
&
eRefPicList
=
REF_PIC_LIST_X
#if JVET_L0293_CPR
,
const
bool
luma
=
true
,
const
bool
chroma
=
true
#endif
);
void
motionCompensation4Triangle
(
CodingUnit
&
cu
,
MergeCtx
&
triangleMrgCtx
,
const
bool
splitDir
,
const
uint8_t
candIdx0
,
const
uint8_t
candIdx1
);
...
...
source/Lib/CommonLib/LoopFilter.cpp
View file @
40d607d9
...
...
@@ -430,13 +430,9 @@ unsigned LoopFilter::xGetBoundaryStrengthSingle ( const CodingUnit& cu, const De
const
Slice
&
sliceQ
=
*
cu
.
slice
;
const
Position
&
cuPosLuma
=
cu
.
lumaPos
();
#if JVET_L0293_CPR
int
shiftHor
=
cu
.
Y
().
valid
()
?
0
:
::
getComponentScaleX
(
COMPONENT_Cb
,
cu
.
firstPU
->
chromaFormat
);
int
shiftVer
=
cu
.
Y
().
valid
()
?
0
:
::
getComponentScaleY
(
COMPONENT_Cb
,
cu
.
firstPU
->
chromaFormat
);
const
Position
&
posQ
=
Position
{
localPos
.
x
>>
shiftHor
,
localPos
.
y
>>
shiftVer
};
#else
const
Position
&
posQ
=
localPos
;
#endif
const
Position
posP
=
(
edgeDir
==
EDGE_VER
)
?
posQ
.
offset
(
-
1
,
0
)
:
posQ
.
offset
(
0
,
-
1
);
const
bool
sameCU
=
posP
.
x
>=
cuPosLuma
.
x
&&
posP
.
y
>=
cuPosLuma
.
y
;
...
...
source/Lib/CommonLib/MotionInfo.h
View file @
40d607d9
...
...
@@ -106,9 +106,7 @@ struct MotionInfo
Mv
mv
[
NUM_REF_PIC_LIST_01
];
int16_t
refIdx
[
NUM_REF_PIC_LIST_01
];
#if JVET_L0293_CPR
Mv
bv
;
#endif
MotionInfo
()
:
isInter
(
false
),
interDir
(
0
),
sliceIdx
(
0
),
refIdx
{
NOT_VALID
,
NOT_VALID
}
{
}
// ensure that MotionInfo(0) produces '\x000....' bit pattern - needed to work with AreaBuf - don't use this constructor for anything else
MotionInfo
(
int
i
)
:
isInter
(
i
!=
0
),
interDir
(
0
),
sliceIdx
(
0
),
refIdx
{
0
,
0
}
{
CHECKD
(
i
!=
0
,
"The argument for this constructor has to be '0'"
);
}
...
...
source/Lib/CommonLib/Mv.h
View file @
40d607d9
...
...
@@ -203,7 +203,6 @@ public:
}
};
// END CLASS DEFINITION MV
#if JVET_L0293_CPR
namespace
std
{
template
<
>
...
...
@@ -215,7 +214,6 @@ namespace std
}
};
};
#endif
void
clipMv
(
Mv
&
rcMv
,
const
struct
Position
&
pos
,
const
struct
Size
&
size
,
const
class
SPS
&
sps
);
...
...
source/Lib/CommonLib/Quant.cpp
View file @
40d607d9
...
...
@@ -916,11 +916,7 @@ void Quant::transformSkipQuantOneSample(TransformUnit &tu, const ComponentID &co
const
int
iQBits
=
QUANT_SHIFT
+
cQP
.
per
+
iTransformShift
;
// QBits will be OK for any internal bit depth as the reduction in transform shift is balanced by an increase in Qp_per due to QpBDOffset
#if JVET_L0293_CPR
const
int
iAdd
=
int64_t
(
bUseHalfRoundingPoint
?
256
:
(
tu
.
cs
->
slice
->
isIRAP
()
?
171
:
85
))
<<
int64_t
(
iQBits
-
9
);
#else
const
int
iAdd
=
int64_t
(
bUseHalfRoundingPoint
?
256
:
(
tu
.
cs
->
slice
->
getSliceType
()
==
I_SLICE
?
171
:
85
))
<<
int64_t
(
iQBits
-
9
);
#endif
TCoeff
transformedCoefficient
;
// transform-skip
...
...
source/Lib/CommonLib/RdCost.h
View file @
40d607d9
...
...
@@ -114,15 +114,11 @@ private:
// for motion cost
Mv
m_mvPredictor
;
#if JVET_L0293_CPR
Mv
m_bvPredictors
[
2
];
#endif
double
m_motionLambda
;
int
m_iCostScale
;
#if JVET_L0293_CPR
double
m_dCost
;
// for cpr
#endif
public:
RdCost
();
virtual
~
RdCost
();
...
...
@@ -166,7 +162,6 @@ public:
}
void
setCostScale
(
int
iCostScale
)
{
m_iCostScale
=
iCostScale
;
}
Distortion
getCost
(
uint32_t
b
)
{
return
Distortion
(
m_motionLambda
*
b
);
}
#if JVET_L0293_CPR
// for cpr
void
getMotionCost
(
int
add
,
bool
isTransquantBypass
)
{
m_dCost
=
m_dLambdaMotionSAD
[(
isTransquantBypass
&&
m_costMode
==
COST_MIXED_LOSSLESS_LOSSY_CODING
)
?
1
:
0
]
+
add
;
}
...
...
@@ -270,7 +265,6 @@ public:
return
length
;
}
#endif
#if ENABLE_SPLIT_PARALLELISM
void
copyState
(
const
RdCost
&
other
);
...
...
source/Lib/CommonLib/Slice.cpp
View file @
40d607d9
...
...
@@ -433,7 +433,6 @@ void Slice::setRefPicList( PicList& rcListPic, bool checkNumPocTotalCurr, bool b
pcRefPic
=
xGetLongTermRefPic
(
rcListPic
,
m_pRPS
->
getPOC
(
i
),
m_pRPS
->
getCheckLTMSBPresent
(
i
));
}
}
#if JVET_L0293_CPR
if
(
getSPS
()
->
getSpsNext
().
getCPRMode
())
{
RefPicSetLtCurr
[
NumPicLtCurr
]
=
getPic
();
...
...
@@ -441,7 +440,6 @@ void Slice::setRefPicList( PicList& rcListPic, bool checkNumPocTotalCurr, bool b
getPic
()
->
longTerm
=
true
;
NumPicLtCurr
++
;
}
#endif
// ref_pic_list_init
Picture
*
rpsCurrList0
[
MAX_NUM_REF
+
1
];
Picture
*
rpsCurrList1
[
MAX_NUM_REF
+
1
];
...
...
@@ -454,13 +452,11 @@ void Slice::setRefPicList( PicList& rcListPic, bool checkNumPocTotalCurr, bool b
// - Otherwise, when the current picture contains a P or B slice, the value of NumPocTotalCurr shall not be equal to 0.
if
(
getRapPicFlag
())
{
#if JVET_L0293_CPR
if
(
getSPS
()
->
getSpsNext
().
getCPRMode
())
{
CHECK
(
numPicTotalCurr
!=
1
,
"Invalid state"
);
}
else
#endif
CHECK
(
numPicTotalCurr
!=
0
,
"Invalid state"
);
}
...
...
@@ -531,13 +527,11 @@ void Slice::setRefPicList( PicList& rcListPic, bool checkNumPocTotalCurr, bool b
m_bIsUsedAsLongTerm
[
REF_PIC_LIST_1
][
rIdx
]
=
(
cIdx
>=
NumPicStCurr0
+
NumPicStCurr1
);
}
}
#if JVET_L0293_CPR
if
(
getSPS
()
->
getSpsNext
().
getCPRMode
())
{
m_apcRefPicList
[
REF_PIC_LIST_0
][
m_aiNumRefIdx
[
REF_PIC_LIST_0
]
-
1
]
=
getPic
();
m_bIsUsedAsLongTerm
[
REF_PIC_LIST_0
][
m_aiNumRefIdx
[
REF_PIC_LIST_0
]
-
1
]
=
true
;
}
#endif
// For generalized B
// note: maybe not existed case (always L0 is copied to L1 if L1 is empty)
if
(
bCopyL0toL1ErrorCase
&&
isInterB
()
&&
getNumRefIdx
(
REF_PIC_LIST_1
)
==
0
)
...
...
@@ -568,13 +562,11 @@ int Slice::getNumRpsCurrTempList() const
numRpsCurrTempList
++
;
}
}
#if JVET_L0293_CPR
if
(
getSPS
()
->
getSpsNext
().
getCPRMode
())
{
return
numRpsCurrTempList
+
1
;
}
else
#endif
return
numRpsCurrTempList
;
}
...
...
@@ -1800,9 +1792,7 @@ SPSNext::SPSNext( SPS& sps )
,
m_ImvMode
(
IMV_OFF
)
,
m_MTTMode
(
0
)
,
m_compositeRefEnabled
(
false
)
#if JVET_L0293_CPR
,
m_CPRMode
(
0
)
#endif
// ADD_NEW_TOOL : (sps extension) add tool enabling flags here (with "false" as default values)
{
}
...
...
source/Lib/CommonLib/Slice.h
View file @
40d607d9
...
...
@@ -853,9 +853,7 @@ private:
bool
m_compositeRefEnabled
;
//composite longterm reference
#if JVET_L0293_CPR
unsigned
m_CPRMode
;
#endif
// ADD_NEW_TOOL : (sps extension) add tool enabling flags and associated parameters here
...
...
@@ -964,10 +962,8 @@ public:
bool
getUseMHIntra
()
const
{
return
m_MHIntra
;
}
void
setUseTriangle
(
bool
b
)
{
m_Triangle
=
b
;
}
bool
getUseTriangle
()
const
{
return
m_Triangle
;
}