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
14
Merge Requests
14
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
6981f879
Commit
6981f879
authored
Jan 18, 2019
by
Karsten Suehring
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove macro JVET_L0124_L0208_TRIANGLE
parent
77e8c485
Changes
37
Show whitespace changes
Inline
Side-by-side
Showing
37 changed files
with
0 additions
and
180 deletions
+0
-180
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/CodingStatistics.h
source/Lib/CommonLib/CodingStatistics.h
+0
-4
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/ContextModelling.h
source/Lib/CommonLib/ContextModelling.h
+0
-2
source/Lib/CommonLib/Contexts.cpp
source/Lib/CommonLib/Contexts.cpp
+0
-2
source/Lib/CommonLib/Contexts.h
source/Lib/CommonLib/Contexts.h
+0
-2
source/Lib/CommonLib/InterPrediction.cpp
source/Lib/CommonLib/InterPrediction.cpp
+0
-21
source/Lib/CommonLib/InterPrediction.h
source/Lib/CommonLib/InterPrediction.h
+0
-6
source/Lib/CommonLib/Rom.cpp
source/Lib/CommonLib/Rom.cpp
+0
-4
source/Lib/CommonLib/Rom.h
source/Lib/CommonLib/Rom.h
+0
-2
source/Lib/CommonLib/Slice.cpp
source/Lib/CommonLib/Slice.cpp
+0
-4
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
-4
source/Lib/CommonLib/Unit.h
source/Lib/CommonLib/Unit.h
+0
-2
source/Lib/CommonLib/UnitTools.cpp
source/Lib/CommonLib/UnitTools.cpp
+0
-2
source/Lib/CommonLib/UnitTools.h
source/Lib/CommonLib/UnitTools.h
+0
-2
source/Lib/CommonLib/dtrace_blockstatistics.cpp
source/Lib/CommonLib/dtrace_blockstatistics.cpp
+0
-18
source/Lib/CommonLib/dtrace_blockstatistics.h
source/Lib/CommonLib/dtrace_blockstatistics.h
+0
-4
source/Lib/DecoderLib/CABACReader.cpp
source/Lib/DecoderLib/CABACReader.cpp
+0
-6
source/Lib/DecoderLib/CABACReader.h
source/Lib/DecoderLib/CABACReader.h
+0
-2
source/Lib/DecoderLib/DecCu.cpp
source/Lib/DecoderLib/DecCu.cpp
+0
-10
source/Lib/DecoderLib/DecCu.h
source/Lib/DecoderLib/DecCu.h
+0
-2
source/Lib/DecoderLib/VLCReader.cpp
source/Lib/DecoderLib/VLCReader.cpp
+0
-2
source/Lib/EncoderLib/CABACWriter.cpp
source/Lib/EncoderLib/CABACWriter.cpp
+0
-6
source/Lib/EncoderLib/CABACWriter.h
source/Lib/EncoderLib/CABACWriter.h
+0
-2
source/Lib/EncoderLib/EncCfg.h
source/Lib/EncoderLib/EncCfg.h
+0
-4
source/Lib/EncoderLib/EncCu.cpp
source/Lib/EncoderLib/EncCu.cpp
+0
-22
source/Lib/EncoderLib/EncCu.h
source/Lib/EncoderLib/EncCu.h
+0
-6
source/Lib/EncoderLib/EncLib.cpp
source/Lib/EncoderLib/EncLib.cpp
+0
-2
source/Lib/EncoderLib/EncModeCtrl.cpp
source/Lib/EncoderLib/EncModeCtrl.cpp
+0
-6
source/Lib/EncoderLib/EncModeCtrl.h
source/Lib/EncoderLib/EncModeCtrl.h
+0
-4
source/Lib/EncoderLib/InterSearch.cpp
source/Lib/EncoderLib/InterSearch.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 @
6981f879
...
...
@@ -258,9 +258,7 @@ void EncApp::xInitLibCfg()
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
m_cEncLib
.
setUseMHIntra
(
m_MHIntra
);
#endif
#if JVET_L0124_L0208_TRIANGLE
m_cEncLib
.
setUseTriangle
(
m_Triangle
);
#endif
#if JVET_L0293_CPR
m_cEncLib
.
setCPRMode
(
m_CPRMode
);
...
...
source/App/EncoderApp/EncAppCfg.cpp
View file @
6981f879
...
...
@@ -859,9 +859,7 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] )
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
(
"MHIntra"
,
m_MHIntra
,
false
,
"Enable MHIntra mode"
)
#endif
#if JVET_L0124_L0208_TRIANGLE
(
"Triangle"
,
m_Triangle
,
false
,
"Enable triangular shape motion vector prediction (0:off, 1:on)"
)
#endif
#if JVET_L0293_CPR
(
"CPR"
,
m_CPRMode
,
0u
,
"CPRMode (0x1:enabled, 0x0:disabled) [default: disabled]"
)
...
...
@@ -1950,9 +1948,7 @@ bool EncAppCfg::xCheckParameter()
xConfirmPara
(
m_GBi
,
"GBi is only allowed with NEXT profile"
);
xConfirmPara
(
m_GBiFast
,
"GBiFast is only allowed with NEXT profile"
);
#endif
#if JVET_L0124_L0208_TRIANGLE
xConfirmPara
(
m_Triangle
,
"Triangle is only allowed with NEXT profile"
);
#endif
// ADD_NEW_TOOL : (parameter check) add a check for next tools here
}
else
...
...
@@ -3151,9 +3147,7 @@ void EncAppCfg::xPrintParameter()
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
msg
(
VERBOSE
,
"MHIntra:%d "
,
m_MHIntra
);
#endif
#if JVET_L0124_L0208_TRIANGLE
msg
(
VERBOSE
,
"Triangle:%d "
,
m_Triangle
);
#endif
}
#if JVET_L0293_CPR
msg
(
VERBOSE
,
"CPR:%d "
,
m_CPRMode
);
...
...
source/App/EncoderApp/EncAppCfg.h
View file @
6981f879
...
...
@@ -239,9 +239,7 @@ protected:
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
bool
m_MHIntra
;
#endif
#if JVET_L0124_L0208_TRIANGLE
bool
m_Triangle
;
#endif
#if JVET_L0293_CPR
...
...
source/Lib/CommonLib/CodingStatistics.h
View file @
6981f879
...
...
@@ -106,10 +106,8 @@ enum CodingStatisticsType
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
STATS__CABAC_BITS__MH_INTRA_FLAG
,
#endif
#if JVET_L0124_L0208_TRIANGLE
STATS__CABAC_BITS__TRIANGLE_FLAG
,
STATS__CABAC_BITS__TRIANGLE_INDEX
,
#endif
#if JVET_L0283_MULTI_REF_LINE
STATS__CABAC_BITS__MULTI_REF_LINE
,
#endif
...
...
@@ -193,10 +191,8 @@ static inline const char* getName(CodingStatisticsType name)
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
"CABAC_BITS__MH_INTRA_FLAG"
,
#endif
#if JVET_L0124_L0208_TRIANGLE
"CABAC_BITS__TRIANGLE_FLAG"
,
"CABAC_BITS__TRIANGLE_INDEX"
,
#endif
#if JVET_L0283_MULTI_REF_LINE
"CABAC_BITS__MULTI_REF_LINE"
,
#endif
...
...
source/Lib/CommonLib/CommonDef.h
View file @
6981f879
...
...
@@ -420,13 +420,11 @@ static const int NTAPS_BILINEAR = 2; ///< Numb
#if JVET_L0198_L0468_L0104_ATMVP_8x8SUB_BLOCK
static
const
int
ATMVP_SUB_BLOCK_SIZE
=
3
;
///< sub-block size for ATMVP
#endif
#if JVET_L0124_L0208_TRIANGLE
static
const
int
TRIANGLE_MAX_NUM_UNI_CANDS
=
5
;
static
const
int
TRIANGLE_MAX_NUM_CANDS_MEM
=
7
;
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
;
#endif
#if JVET_L0293_CPR
static
const
int
CPR_MAX_CAND_SIZE
=
16
;
// max block size for cpr search
...
...
source/Lib/CommonLib/ContextModelling.cpp
View file @
6981f879
...
...
@@ -330,7 +330,6 @@ unsigned DeriveCtx::CtxBTsplit(const CodingStructure& cs, Partitioner& partition
return
ctx
;
}
#if JVET_L0124_L0208_TRIANGLE
unsigned
DeriveCtx
::
CtxTriangleFlag
(
const
CodingUnit
&
cu
)
{
const
CodingStructure
*
cs
=
cu
.
cs
;
...
...
@@ -344,7 +343,6 @@ unsigned DeriveCtx::CtxTriangleFlag( const CodingUnit& cu )
return
ctxId
;
}
#endif
void
MergeCtx
::
setMergeInfo
(
PredictionUnit
&
pu
,
int
candIdx
)
...
...
source/Lib/CommonLib/ContextModelling.h
View file @
6981f879
...
...
@@ -349,9 +349,7 @@ unsigned CtxInterDir ( const PredictionUnit& pu );
unsigned
CtxSkipFlag
(
const
CodingUnit
&
cu
);
unsigned
CtxIMVFlag
(
const
CodingUnit
&
cu
);
unsigned
CtxAffineFlag
(
const
CodingUnit
&
cu
);
#if JVET_L0124_L0208_TRIANGLE
unsigned
CtxTriangleFlag
(
const
CodingUnit
&
cu
);
#endif
}
#endif // __CONTEXTMODELLING__
source/Lib/CommonLib/Contexts.cpp
View file @
6981f879
...
...
@@ -1138,7 +1138,6 @@ const CtxSet ContextSetCfg::MHIntraPredMode = ContextSetCfg::addCtxSet
});
#endif
#if JVET_L0124_L0208_TRIANGLE
const
CtxSet
ContextSetCfg
::
TriangleFlag
=
ContextSetCfg
::
addCtxSet
({
#if TRAINED_CABAC_INIT_TABLES
...
...
@@ -1164,7 +1163,6 @@ const CtxSet ContextSetCfg::TriangleIdx = ContextSetCfg::addCtxSet
{
CNU
,
},
#endif
});
#endif
const
unsigned
ContextSetCfg
::
NumberOfContexts
=
(
unsigned
)
ContextSetCfg
::
sm_InitTables
[
0
].
size
();
...
...
source/Lib/CommonLib/Contexts.h
View file @
6981f879
...
...
@@ -210,10 +210,8 @@ public:
static
const
CtxSet
MHIntraFlag
;
static
const
CtxSet
MHIntraPredMode
;
#endif
#if JVET_L0124_L0208_TRIANGLE
static
const
CtxSet
TriangleFlag
;
static
const
CtxSet
TriangleIdx
;
#endif
static
const
unsigned
NumberOfContexts
;
// combined sets for less complex copying
...
...
source/Lib/CommonLib/InterPrediction.cpp
View file @
6981f879
...
...
@@ -120,9 +120,7 @@ void InterPrediction::destroy()
}
}
#if JVET_L0124_L0208_TRIANGLE
m_triangleBuf
.
destroy
();
#endif
#if JVET_L0265_AFF_MINIMUM4X4
if
(
m_storedMv
!=
nullptr
)
...
...
@@ -180,9 +178,7 @@ void InterPrediction::init( RdCost* pcRdCost, ChromaFormat chromaFormatIDC )
}
}
#if JVET_L0124_L0208_TRIANGLE
m_triangleBuf
.
create
(
UnitArea
(
chromaFormatIDC
,
Area
(
0
,
0
,
MAX_CU_SIZE
,
MAX_CU_SIZE
)));
#endif
m_iRefListIdx
=
-
1
;
...
...
@@ -574,7 +570,6 @@ void InterPrediction::xPredInterBi(PredictionUnit& pu, PelUnitBuf &pcYuvPred)
}
else
{
#if JVET_L0124_L0208_TRIANGLE
xPredInterUni
(
pu
,
eRefPicList
,
pcMbBuf
,
pu
.
cu
->
triangle
#if JVET_L0256_BIO
,
bioApplied
...
...
@@ -583,16 +578,6 @@ void InterPrediction::xPredInterBi(PredictionUnit& pu, PelUnitBuf &pcYuvPred)
,
true
,
true
#endif
);
#else
xPredInterUni
(
pu
,
eRefPicList
,
pcMbBuf
,
false
#if JVET_L0256_BIO
,
bioApplied
#endif
#if JVET_L0293_CPR
,
true
,
true
#endif
);
#endif
}
}
}
...
...
@@ -1349,24 +1334,20 @@ void InterPrediction::xWeightedAverage( const PredictionUnit& pu, const CPelUnit
}
else
if
(
iRefIdx0
>=
0
&&
iRefIdx1
<
0
)
{
#if JVET_L0124_L0208_TRIANGLE
if
(
pu
.
cu
->
triangle
)
{
pcYuvDst
.
copyFrom
(
pcYuvSrc0
);
}
else
#endif
pcYuvDst
.
copyClip
(
pcYuvSrc0
,
clpRngs
);
}
else
if
(
iRefIdx0
<
0
&&
iRefIdx1
>=
0
)
{
#if JVET_L0124_L0208_TRIANGLE
if
(
pu
.
cu
->
triangle
)
{
pcYuvDst
.
copyFrom
(
pcYuvSrc1
);
}
else
#endif
pcYuvDst
.
copyClip
(
pcYuvSrc1
,
clpRngs
);
}
}
...
...
@@ -1508,7 +1489,6 @@ int InterPrediction::rightShiftMSB(int numer, int denom)
}
#endif
#if JVET_L0124_L0208_TRIANGLE
void
InterPrediction
::
motionCompensation4Triangle
(
CodingUnit
&
cu
,
MergeCtx
&
triangleMrgCtx
,
const
bool
splitDir
,
const
uint8_t
candIdx0
,
const
uint8_t
candIdx1
)
{
for
(
auto
&
pu
:
CU
::
traversePUs
(
cu
)
)
...
...
@@ -1618,7 +1598,6 @@ void InterPrediction::xWeightedTriangleBlk( const PredictionUnit &pu, const uint
weightedEndPos
+=
weightedPosoffset
;
}
}
#endif
#if JVET_J0090_MEMORY_BANDWITH_MEASURE
void
InterPrediction
::
cacheAssign
(
CacheModel
*
cache
)
...
...
source/Lib/CommonLib/InterPrediction.h
View file @
6981f879
...
...
@@ -91,9 +91,7 @@ protected:
RdCost
*
m_pcRdCost
;
int
m_iRefListIdx
;
#if JVET_L0124_L0208_TRIANGLE
PelStorage
m_triangleBuf
;
#endif
#if JVET_L0265_AFF_MINIMUM4X4
Mv
*
m_storedMv
;
#endif
...
...
@@ -140,9 +138,7 @@ protected:
#endif
void
xPredAffineBlk
(
const
ComponentID
&
compID
,
const
PredictionUnit
&
pu
,
const
Picture
*
refPic
,
const
Mv
*
_mv
,
PelUnitBuf
&
dstPic
,
const
bool
&
bi
,
const
ClpRng
&
clpRng
);
#if JVET_L0124_L0208_TRIANGLE
void
xWeightedTriangleBlk
(
const
PredictionUnit
&
pu
,
const
uint32_t
width
,
const
uint32_t
height
,
const
ComponentID
compIdx
,
const
bool
splitDir
,
const
bool
weights
,
PelUnitBuf
&
predDst
,
PelUnitBuf
&
predSrc0
,
PelUnitBuf
&
predSrc1
);
#endif
static
bool
xCheckIdenticalMotion
(
const
PredictionUnit
&
pu
);
...
...
@@ -180,10 +176,8 @@ public:
#endif
);
#if JVET_L0124_L0208_TRIANGLE
void
motionCompensation4Triangle
(
CodingUnit
&
cu
,
MergeCtx
&
triangleMrgCtx
,
const
bool
splitDir
,
const
uint8_t
candIdx0
,
const
uint8_t
candIdx1
);
void
weightedTriangleBlk
(
PredictionUnit
&
pu
,
bool
weights
,
const
bool
splitDir
,
int32_t
channel
,
PelUnitBuf
&
predDst
,
PelUnitBuf
&
predSrc0
,
PelUnitBuf
&
predSrc1
);
#endif
#if JVET_J0090_MEMORY_BANDWITH_MEASURE
void
cacheAssign
(
CacheModel
*
cache
);
...
...
source/Lib/CommonLib/Rom.cpp
View file @
6981f879
...
...
@@ -529,7 +529,6 @@ void initROM()
}
}
#if JVET_L0124_L0208_TRIANGLE
for
(
int
idxH
=
MAX_CU_DEPTH
-
MIN_CU_LOG2
;
idxH
>=
0
;
--
idxH
)
{
for
(
int
idxW
=
MAX_CU_DEPTH
-
MIN_CU_LOG2
;
idxW
>=
0
;
--
idxW
)
...
...
@@ -551,7 +550,6 @@ void initROM()
}
}
}
#endif
}
void
destroyROM
()
...
...
@@ -883,7 +881,6 @@ const uint8_t g_NonMPM[257] = { 0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3,
7
,
7
,
7
,
7
,
7
,
7
,
7
,
7
,
7
,
7
,
7
,
7
,
7
,
7
,
7
,
7
,
7
,
7
,
7
,
7
,
7
,
7
,
7
,
7
,
7
,
7
,
7
,
7
,
7
,
7
,
7
,
7
,
7
,
7
,
7
,
7
,
7
,
7
,
7
,
7
,
7
,
7
,
7
,
7
,
7
,
7
,
7
,
7
,
8
};
#if JVET_L0124_L0208_TRIANGLE
const
Pel
g_trianglePelWeightedLuma
[
TRIANGLE_DIR_NUM
][
2
][
7
]
=
{
{
// TRIANGLE_DIR_135
...
...
@@ -943,5 +940,4 @@ const uint8_t g_triangleIdxBins[TRIANGLE_MAX_NUM_CANDS] =
8
,
8
,
8
,
8
,
8
,
8
,
8
,
8
,
8
,
8
,
10
,
10
,
10
,
10
,
10
,
10
,
10
,
10
,
10
,
10
};
#endif
//! \}
source/Lib/CommonLib/Rom.h
View file @
6981f879
...
...
@@ -257,7 +257,6 @@ constexpr uint8_t g_tbMax[257] = { 0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3,
//! \}
#if JVET_L0124_L0208_TRIANGLE
extern
const
Pel
g_trianglePelWeightedLuma
[
TRIANGLE_DIR_NUM
][
2
][
7
];
extern
const
Pel
g_trianglePelWeightedChroma
[
2
][
TRIANGLE_DIR_NUM
][
2
][
7
];
extern
const
uint8_t
g_triangleWeightLengthLuma
[
2
];
...
...
@@ -265,7 +264,6 @@ extern const uint8_t g_triangleWeightLengthChroma[2][2];
extern
uint8_t
g_triangleMvStorage
[
TRIANGLE_DIR_NUM
][
MAX_CU_DEPTH
-
MIN_CU_LOG2
+
1
][
MAX_CU_DEPTH
-
MIN_CU_LOG2
+
1
][
MAX_CU_SIZE
>>
MIN_CU_LOG2
][
MAX_CU_SIZE
>>
MIN_CU_LOG2
];
extern
const
uint8_t
g_triangleCombination
[
TRIANGLE_MAX_NUM_CANDS
][
3
];
extern
const
uint8_t
g_triangleIdxBins
[
TRIANGLE_MAX_NUM_CANDS
];
#endif
#endif //__TCOMROM__
source/Lib/CommonLib/Slice.cpp
View file @
6981f879
...
...
@@ -1687,9 +1687,7 @@ void Slice::updateMotionLUTs(LutMotionCand* lutMC, CodingUnit & cu)
{
PredictionUnit
*
selectedPU
=
cu
.
firstPU
;
if
(
cu
.
affine
)
{
return
;
}
#if JVET_L0124_L0208_TRIANGLE
if
(
cu
.
triangle
)
{
return
;
}
#endif
MotionInfo
newMi
=
selectedPU
->
getMotionInfo
();
addMotionInfoToLUTs
(
lutMC
,
newMi
);
...
...
@@ -1792,9 +1790,7 @@ SPSNext::SPSNext( SPS& sps )
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
,
m_MHIntra
(
false
)
#endif
#if JVET_L0124_L0208_TRIANGLE
,
m_Triangle
(
false
)
#endif
#if ENABLE_WPP_PARALLELISM
,
m_NextDQP
(
false
)
#endif
...
...
source/Lib/CommonLib/Slice.h
View file @
6981f879
...
...
@@ -819,9 +819,7 @@ private:
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
bool
m_MHIntra
;
#endif
#if JVET_L0124_L0208_TRIANGLE
bool
m_Triangle
;
#endif
#if ENABLE_WPP_PARALLELISM
bool
m_NextDQP
;
#endif
...
...
@@ -978,10 +976,8 @@ public:
void
setUseMHIntra
(
bool
b
)
{
m_MHIntra
=
b
;
}
bool
getUseMHIntra
()
const
{
return
m_MHIntra
;
}
#endif
#if JVET_L0124_L0208_TRIANGLE
void
setUseTriangle
(
bool
b
)
{
m_Triangle
=
b
;
}
bool
getUseTriangle
()
const
{
return
m_Triangle
;
}
#endif
#if JVET_L0293_CPR
void
setCPRMode
(
unsigned
CPRMode
)
{
m_CPRMode
=
CPRMode
;
}
unsigned
getCPRMode
()
const
{
return
m_CPRMode
;
}
...
...
source/Lib/CommonLib/TypeDef.h
View file @
6981f879
...
...
@@ -53,7 +53,6 @@
#define TRAINED_CABAC_INIT_TABLES 1 // Trained values for VTM3
#define JVET_L0124_L0208_TRIANGLE 1 // triangular shape prediction unit
#define JVET_L0059_MTS_SIMP 1 // Simpification on MTS signaling
#define JVET_L0100_MULTI_HYPOTHESIS_INTRA 1 // Combine intra mode with an extra merge indexed prediction
...
...
@@ -942,14 +941,12 @@ enum MergeType
NUM_MRG_TYPE
// 5
};
#if JVET_L0124_L0208_TRIANGLE
enum
TriangleSplit
{
TRIANGLE_DIR_135
=
0
,
TRIANGLE_DIR_45
,
TRIANGLE_DIR_NUM
};
#endif
//////////////////////////////////////////////////////////////////////////
// Encoder modes to try out
...
...
source/Lib/CommonLib/Unit.cpp
View file @
6981f879
...
...
@@ -257,9 +257,7 @@ CodingUnit& CodingUnit::operator=( const CodingUnit& other )
#endif
affine
=
other
.
affine
;
affineType
=
other
.
affineType
;
#if JVET_L0124_L0208_TRIANGLE
triangle
=
other
.
triangle
;
#endif
transQuantBypass
=
other
.
transQuantBypass
;
ipcm
=
other
.
ipcm
;
qp
=
other
.
qp
;
...
...
@@ -296,9 +294,7 @@ void CodingUnit::initData()
#endif
affine
=
false
;
affineType
=
0
;
#if JVET_L0124_L0208_TRIANGLE
triangle
=
false
;
#endif
transQuantBypass
=
false
;
ipcm
=
false
;
qp
=
0
;
...
...
source/Lib/CommonLib/Unit.h
View file @
6981f879
...
...
@@ -299,9 +299,7 @@ struct CodingUnit : public UnitArea
#endif
bool
affine
;
int
affineType
;
#if JVET_L0124_L0208_TRIANGLE
bool
triangle
;
#endif
bool
transQuantBypass
;
bool
ipcm
;
uint8_t
imv
;
...
...
source/Lib/CommonLib/UnitTools.cpp
View file @
6981f879
...
...
@@ -4460,7 +4460,6 @@ void PU::restrictBiPredMergeCands( const PredictionUnit &pu, MergeCtx& mergeCtx
}
}
#if JVET_L0124_L0208_TRIANGLE
void PU::getTriangleMergeCandidates( const PredictionUnit &pu, MergeCtx& triangleMrgCtx )
{
const CodingStructure &cs = *pu.cs;
...
...
@@ -4971,7 +4970,6 @@ int32_t PU::mappingRefPic( const PredictionUnit &pu, int32_t refPicPoc, bool tar
}
return -1;
}
#endif
void CU::resetMVDandMV2Int( CodingUnit& cu, InterPrediction *interPred )
{
...
...
source/Lib/CommonLib/UnitTools.h
View file @
6981f879
...
...
@@ -183,13 +183,11 @@ namespace PU
int
getMHIntraMPMs
(
const
PredictionUnit
&
pu
,
unsigned
*
mpm
,
const
ChannelType
&
channelType
=
CHANNEL_TYPE_LUMA
,
const
bool
isChromaMDMS
=
false
,
const
unsigned
startIdx
=
0
);
int
getNarrowShape
(
const
int
width
,
const
int
height
);
#endif
#if JVET_L0124_L0208_TRIANGLE
void
getTriangleMergeCandidates
(
const
PredictionUnit
&
pu
,
MergeCtx
&
triangleMrgCtx
);
bool
isUniqueTriangleCandidates
(
const
PredictionUnit
&
pu
,
MergeCtx
&
triangleMrgCtx
);
bool
getTriangleWeights
(
const
PredictionUnit
&
pu
,
MergeCtx
&
triangleMrgCtx
,
const
uint8_t
candIdx0
,
const
uint8_t
candIdx1
);
void
spanTriangleMotionInfo
(
PredictionUnit
&
pu
,
MergeCtx
&
triangleMrgCtx
,
const
uint8_t
mergeIdx
,
const
bool
splitDir
,
const
uint8_t
candIdx0
,
const
uint8_t
candIdx1
);
int32_t
mappingRefPic
(
const
PredictionUnit
&
pu
,
int32_t
refPicPoc
,
bool
targetRefPicList
);
#endif
#if JVET_L0293_CPR
void
getCprMVPsEncOnly
(
PredictionUnit
&
pu
,
Mv
*
MvPred
,
int
&
nbPred
);
bool
getDerivedBV
(
PredictionUnit
&
pu
,
const
Mv
&
currentMv
,
Mv
&
derivedMv
);
...
...
source/Lib/CommonLib/dtrace_blockstatistics.cpp
View file @
6981f879
...
...
@@ -271,7 +271,6 @@ void CDTrace::dtrace_polygon_vector(int k, int poc, const std::vector<Position>
dtrace
<
false
>
(
k
,
"BlockStat: POC %d @[%s] %s={%4d,%4d}
\n
"
,
poc
,
polygonDescription
.
c_str
(),
stat_type
.
c_str
(),
val_x
,
val_y
);
}
#if JVET_L0124_L0208_TRIANGLE
void
retrieveTriangularMvInfo
(
const
PredictionUnit
&
pu
,
MotionInfo
&
mi0
,
MotionInfo
&
mi1
)
{
int
triangleDir
=
g_triangleCombination
[
pu
.
mergeIdx
][
0
];
...
...
@@ -359,7 +358,6 @@ void retrieveTrianglePolygon(const PredictionUnit& pu, std::vector<Position>& tr
CHECK
(
triangleDir
!=
TRIANGLE_DIR_45
&&
triangleDir
!=
TRIANGLE_DIR_135
,
"Unknown triangle type"
);
}
}
#endif
void
writeBlockStatisticsHeader
(
const
SPS
*
sps
)
{
...
...
@@ -497,9 +495,7 @@ void writeAllData(const CodingStructure& cs, const UnitArea& ctuArea)
DTRACE_BLOCK_SCALAR
(
g_trace_ctx
,
D_BLOCK_STATISTICS_ALL
,
pu
,
GetBlockStatisticName
(
BlockStatistic
::
Luma_IntraMode
),
pu
.
intraDir
[
COMPONENT_Y
]);
}
#endif
#if JVET_L0124_L0208_TRIANGLE
DTRACE_BLOCK_SCALAR
(
g_trace_ctx
,
D_BLOCK_STATISTICS_ALL
,
pu
,
GetBlockStatisticName
(
BlockStatistic
::
TriangleFlag
),
pu
.
cu
->
triangle
);
#endif
}
DTRACE_BLOCK_SCALAR
(
g_trace_ctx
,
D_BLOCK_STATISTICS_ALL
,
pu
,
GetBlockStatisticName
(
BlockStatistic
::
AffineFlag
),
pu
.
cu
->
affine
);
DTRACE_BLOCK_SCALAR
(
g_trace_ctx
,
D_BLOCK_STATISTICS_ALL
,
pu
,
GetBlockStatisticName
(
BlockStatistic
::
AffineType
),
pu
.
cu
->
affineType
);
...
...
@@ -515,11 +511,7 @@ void writeAllData(const CodingStructure& cs, const UnitArea& ctuArea)
DTRACE_BLOCK_SCALAR
(
g_trace_ctx
,
D_BLOCK_STATISTICS_ALL
,
pu
,
GetBlockStatisticName
(
BlockStatistic
::
MVPIdxL1
),
pu
.
mvpIdx
[
REF_PIC_LIST_1
]);
DTRACE_BLOCK_SCALAR
(
g_trace_ctx
,
D_BLOCK_STATISTICS_ALL
,
pu
,
GetBlockStatisticName
(
BlockStatistic
::
RefIdxL1
),
pu
.
refIdx
[
REF_PIC_LIST_1
]);
}
#if JVET_L0124_L0208_TRIANGLE
if
(
!
pu
.
cu
->
affine
&&
!
pu
.
cu
->
triangle
)
#else
if
(
!
pu
.
cu
->
affine
)
#endif
{
if
(
pu
.
interDir
!=
2
/* PRED_L1 */
)
{
...
...
@@ -544,7 +536,6 @@ void writeAllData(const CodingStructure& cs, const UnitArea& ctuArea)
DTRACE_BLOCK_VECTOR
(
g_trace_ctx
,
D_BLOCK_STATISTICS_ALL
,
pu
,
GetBlockStatisticName
(
BlockStatistic
::
MVL1
),
mv
.
hor
,
mv
.
ver
);
}
}
#if JVET_L0124_L0208_TRIANGLE
else
if
(
pu
.
cu
->
triangle
)
{
MotionInfo
mi
[
2
];
...
...
@@ -566,7 +557,6 @@ void writeAllData(const CodingStructure& cs, const UnitArea& ctuArea)
}
}
}
#endif
else
{
if
(
pu
.
interDir
!=
2
/* PRED_L1 */
)
...
...
@@ -904,13 +894,11 @@ void writeAllCodedData(const CodingStructure & cs, const UnitArea & ctuArea)
}
}
#endif
#if JVET_L0124_L0208_TRIANGLE
if
(
cu
.
cs
->
slice
->
getSPS
()
->
getSpsNext
().
getUseTriangle
()
&&
cu
.
cs
->
slice
->
isInterB
()
&&
cu
.
lwidth
()
*
cu
.
lheight
()
>=
TRIANGLE_MIN_SIZE
&&
!
cu
.
affine
)
{
DTRACE_BLOCK_SCALAR
(
g_trace_ctx
,
D_BLOCK_STATISTICS_CODED
,
cu
,
GetBlockStatisticName
(
BlockStatistic
::
TriangleFlag
),
cu
.
triangle
);
}
#endif
}
else
{
...
...
@@ -943,11 +931,7 @@ void writeAllCodedData(const CodingStructure & cs, const UnitArea & ctuArea)
DTRACE_BLOCK_SCALAR
(
g_trace_ctx
,
D_BLOCK_STATISTICS_CODED
,
pu
,
GetBlockStatisticName
(
BlockStatistic
::
MVPIdxL1
),
pu
.
mvpIdx
[
REF_PIC_LIST_1
]);
DTRACE_BLOCK_SCALAR
(
g_trace_ctx
,
D_BLOCK_STATISTICS_CODED
,
pu
,
GetBlockStatisticName
(
BlockStatistic
::
RefIdxL1
),
pu
.
refIdx
[
REF_PIC_LIST_1
]);
}
#if JVET_L0124_L0208_TRIANGLE
if
(
!
pu
.
cu
->
affine
&&
!
pu
.
cu
->
triangle
)
#else
if
(
!
pu
.
cu
->
affine
)
#endif
{
if
(
pu
.
interDir
!=
2
/* PRED_L1 */
)
{
...
...
@@ -972,7 +956,6 @@ void writeAllCodedData(const CodingStructure & cs, const UnitArea & ctuArea)
DTRACE_BLOCK_VECTOR
(
g_trace_ctx
,
D_BLOCK_STATISTICS_CODED
,
pu
,
GetBlockStatisticName
(
BlockStatistic
::
MVL1
),
mv
.
hor
,
mv
.
ver
);
}
}
#if JVET_L0124_L0208_TRIANGLE
else
if
(
pu
.
cu
->
triangle
)
{
MotionInfo
mi
[
2
];
...
...
@@ -994,7 +977,6 @@ void writeAllCodedData(const CodingStructure & cs, const UnitArea & ctuArea)
}
}
}
#endif
else
{
if
(
pu
.
interDir
!=
2
/* PRED_L1 */
)
...
...
source/Lib/CommonLib/dtrace_blockstatistics.h
View file @
6981f879
...
...
@@ -109,12 +109,10 @@ enum class BlockStatistic {
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
MHIntraFlag
,
#endif
#if JVET_L0124_L0208_TRIANGLE
TriangleFlag
,
TrianglePartitioning
,
TriangleMVL0
,
//<< currently only uni-prediction enabled
TriangleMVL1
,
//<< currently only uni-prediction enabled
#endif
#if JVET_L0646_GBI
GBIIndex
,
#endif
...
...
@@ -205,12 +203,10 @@ static const std::map<BlockStatistic, std::tuple<std::string, BlockStatisticType
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
{
BlockStatistic
::
MHIntraFlag
,
std
::
tuple
<
std
::
string
,
BlockStatisticType
,
std
::
string
>
{
"MHIntraFlag"
,
BlockStatisticType
::
Flag
,
""
}},
#endif
#if JVET_L0124_L0208_TRIANGLE
{
BlockStatistic
::
TriangleFlag
,
std
::
tuple
<
std
::
string
,
BlockStatisticType
,
std
::
string
>
{
"TriangleFlag"
,
BlockStatisticType
::
Flag
,
""
}},
{
BlockStatistic
::
TrianglePartitioning
,
std
::
tuple
<
std
::
string
,
BlockStatisticType
,
std
::
string
>
{
"TrianglePartitioning"
,
BlockStatisticType
::
Line
,
""
}},
{
BlockStatistic
::
TriangleMVL0
,
std
::
tuple
<
std
::
string
,
BlockStatisticType
,
std
::
string
>
{
"TriangleMVL0"
,
BlockStatisticType
::
VectorPolygon
,
"Scale: 4"
}},
{
BlockStatistic
::
TriangleMVL1
,
std
::
tuple
<
std
::
string
,
BlockStatisticType
,
std
::
string
>
{
"TriangleMVL1"
,
BlockStatisticType
::
VectorPolygon
,
"Scale: 4"
}},
#endif
#if JVET_L0646_GBI
{
BlockStatistic
::
GBIIndex
,
std
::
tuple
<
std
::
string
,
BlockStatisticType
,
std
::
string
>
{
"GBIIndex"
,
BlockStatisticType
::
Integer
,
"[0, 4]"
}},
#endif
...
...
source/Lib/DecoderLib/CABACReader.cpp
View file @
6981f879
...
...
@@ -1270,9 +1270,7 @@ void CABACReader::prediction_unit( PredictionUnit& pu, MergeCtx& mrgCtx )
pu
.
intraDir
[
1
]
=
DM_CHROMA_IDX
;
}
#endif
#if JVET_L0124_L0208_TRIANGLE
triangle_mode
(
*
pu
.
cu
);
#endif
#if JVET_L0054_MMVD
if
(
pu
.
mmvdMergeFlag
)
{
...
...
@@ -1513,7 +1511,6 @@ void CABACReader::merge_idx( PredictionUnit& pu )
int
numCandminus1
=
int
(
pu
.
cs
->
slice
->
getMaxNumMergeCand
()
)
-
1
;
pu
.
mergeIdx
=
0
;
#if JVET_L0124_L0208_TRIANGLE
if
(
pu
.
cu
->
triangle
)
{
RExt__DECODER_DEBUG_BIT_STATISTICS_CREATE_SET
(
STATS__CABAC_BITS__TRIANGLE_INDEX
);
...
...
@@ -1529,7 +1526,6 @@ void CABACReader::merge_idx( PredictionUnit& pu )
DTRACE
(
g_trace_ctx
,
D_SYNTAX
,
"merge_idx() triangle_idx=%d
\n
"
,
pu
.
mergeIdx
);
return
;
}
#endif
if
(
numCandminus1
>
0
)
{
...
...
@@ -1850,7 +1846,6 @@ void CABACReader::MHIntra_luma_pred_modes(CodingUnit &cu)
}
#endif
#if JVET_L0124_L0208_TRIANGLE
void
CABACReader
::
triangle_mode
(
CodingUnit
&
cu
)
{
RExt__DECODER_DEBUG_BIT_STATISTICS_CREATE_SET
(
STATS__CABAC_BITS__TRIANGLE_FLAG
);
...
...
@@ -1866,7 +1861,6 @@ void CABACReader::triangle_mode( CodingUnit& cu )
DTRACE
(
g_trace_ctx
,
D_SYNTAX
,
"triangle_mode() triangle_mode=%d pos=(%d,%d) size: %dx%d
\n
"
,
cu
.
triangle
,
cu
.
Y
().
x
,
cu
.
Y
().
y
,
cu
.
lumaSize
().
width
,
cu
.
lumaSize
().
height
);
}
#endif
//================================================================================
// clause 7.3.8.7
...
...
source/Lib/DecoderLib/CABACReader.h
View file @
6981f879
...
...
@@ -118,9 +118,7 @@ public:
void
MHIntra_flag
(
PredictionUnit
&
pu
);
void
MHIntra_luma_pred_modes
(
CodingUnit
&
cu
);
#endif
#if JVET_L0124_L0208_TRIANGLE
void
triangle_mode
(
CodingUnit
&
cu
);
#endif
// pcm samples (clause 7.3.8.7)
void
pcm_samples
(
TransformUnit
&
tu
);
...
...
source/Lib/DecoderLib/DecCu.cpp
View file @
6981f879
...
...
@@ -334,7 +334,6 @@ void DecCu::xFillPCMBuffer(CodingUnit &cu)
void
DecCu
::
xReconInter
(
CodingUnit
&
cu
)
{
#if JVET_L0124_L0208_TRIANGLE