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
958c49b4
Commit
958c49b4
authored
Jan 18, 2019
by
Karsten Suehring
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove macro JVET_L0100_MULTI_HYPOTHESIS_INTRA
parent
82ab0c64
Changes
30
Hide whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
2 additions
and
206 deletions
+2
-206
source/App/EncoderApp/EncApp.cpp
source/App/EncoderApp/EncApp.cpp
+0
-2
source/App/EncoderApp/EncAppCfg.cpp
source/App/EncoderApp/EncAppCfg.cpp
+0
-4
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/Contexts.cpp
source/Lib/CommonLib/Contexts.cpp
+0
-2
source/Lib/CommonLib/Contexts.h
source/Lib/CommonLib/Contexts.h
+0
-2
source/Lib/CommonLib/IntraPrediction.cpp
source/Lib/CommonLib/IntraPrediction.cpp
+0
-10
source/Lib/CommonLib/IntraPrediction.h
source/Lib/CommonLib/IntraPrediction.h
+0
-4
source/Lib/CommonLib/Slice.cpp
source/Lib/CommonLib/Slice.cpp
+0
-2
source/Lib/CommonLib/Slice.h
source/Lib/CommonLib/Slice.h
+0
-4
source/Lib/CommonLib/TypeDef.h
source/Lib/CommonLib/TypeDef.h
+0
-1
source/Lib/CommonLib/Unit.cpp
source/Lib/CommonLib/Unit.cpp
+0
-6
source/Lib/CommonLib/Unit.h
source/Lib/CommonLib/Unit.h
+0
-2
source/Lib/CommonLib/UnitTools.cpp
source/Lib/CommonLib/UnitTools.cpp
+0
-10
source/Lib/CommonLib/UnitTools.h
source/Lib/CommonLib/UnitTools.h
+0
-4
source/Lib/CommonLib/dtrace_blockstatistics.cpp
source/Lib/CommonLib/dtrace_blockstatistics.cpp
+0
-4
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
-4
source/Lib/DecoderLib/CABACReader.h
source/Lib/DecoderLib/CABACReader.h
+0
-2
source/Lib/DecoderLib/DecCu.cpp
source/Lib/DecoderLib/DecCu.cpp
+0
-8
source/Lib/DecoderLib/VLCReader.cpp
source/Lib/DecoderLib/VLCReader.cpp
+0
-2
source/Lib/EncoderLib/CABACWriter.cpp
source/Lib/EncoderLib/CABACWriter.cpp
+0
-4
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
+2
-81
source/Lib/EncoderLib/EncCu.h
source/Lib/EncoderLib/EncCu.h
+0
-2
source/Lib/EncoderLib/EncLib.cpp
source/Lib/EncoderLib/EncLib.cpp
+0
-2
source/Lib/EncoderLib/IntraSearch.cpp
source/Lib/EncoderLib/IntraSearch.cpp
+0
-21
source/Lib/EncoderLib/IntraSearch.h
source/Lib/EncoderLib/IntraSearch.h
+0
-5
source/Lib/EncoderLib/VLCWriter.cpp
source/Lib/EncoderLib/VLCWriter.cpp
+0
-2
No files found.
source/App/EncoderApp/EncApp.cpp
View file @
958c49b4
...
...
@@ -255,9 +255,7 @@ void EncApp::xInitLibCfg()
}
}
#endif
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
m_cEncLib
.
setUseMHIntra
(
m_MHIntra
);
#endif
m_cEncLib
.
setUseTriangle
(
m_Triangle
);
#if JVET_L0293_CPR
...
...
source/App/EncoderApp/EncAppCfg.cpp
View file @
958c49b4
...
...
@@ -856,9 +856,7 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] )
(
"LadfQpOffset"
,
cfg_LadfQpOffset
,
cfg_LadfQpOffset
,
"LADF QP offset"
)
(
"LadfIntervalLowerBound"
,
cfg_LadfIntervalLowerBound
,
cfg_LadfIntervalLowerBound
,
"LADF lower bound for 2nd lowest interval"
)
#endif
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
(
"MHIntra"
,
m_MHIntra
,
false
,
"Enable MHIntra mode"
)
#endif
(
"Triangle"
,
m_Triangle
,
false
,
"Enable triangular shape motion vector prediction (0:off, 1:on)"
)
#if JVET_L0293_CPR
...
...
@@ -3144,9 +3142,7 @@ void EncAppCfg::xPrintParameter()
#if LUMA_ADAPTIVE_DEBLOCKING_FILTER_QP_OFFSET
msg
(
VERBOSE
,
"LADF:%d "
,
m_LadfEnabed
);
#endif
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
msg
(
VERBOSE
,
"MHIntra:%d "
,
m_MHIntra
);
#endif
msg
(
VERBOSE
,
"Triangle:%d "
,
m_Triangle
);
}
#if JVET_L0293_CPR
...
...
source/App/EncoderApp/EncAppCfg.h
View file @
958c49b4
...
...
@@ -236,9 +236,7 @@ protected:
int
m_LadfIntervalLowerBound
[
MAX_LADF_INTERVALS
];
#endif
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
bool
m_MHIntra
;
#endif
bool
m_Triangle
;
...
...
source/Lib/CommonLib/CodingStatistics.h
View file @
958c49b4
...
...
@@ -103,9 +103,7 @@ enum CodingStatisticsType
#endif
STATS__CABAC_BITS__EMT_CU_FLAG
,
STATS__CABAC_BITS__EMT_TU_INDEX
,
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
STATS__CABAC_BITS__MH_INTRA_FLAG
,
#endif
STATS__CABAC_BITS__TRIANGLE_FLAG
,
STATS__CABAC_BITS__TRIANGLE_INDEX
,
#if JVET_L0283_MULTI_REF_LINE
...
...
@@ -188,9 +186,7 @@ static inline const char* getName(CodingStatisticsType name)
#endif
"CABAC_BITS__EMT_CU_FLAG"
,
"CABAC_BITS__EMT_TU_INDX"
,
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
"CABAC_BITS__MH_INTRA_FLAG"
,
#endif
"CABAC_BITS__TRIANGLE_FLAG"
,
"CABAC_BITS__TRIANGLE_INDEX"
,
#if JVET_L0283_MULTI_REF_LINE
...
...
source/Lib/CommonLib/Contexts.cpp
View file @
958c49b4
...
...
@@ -1110,7 +1110,6 @@ const CtxSet ContextSetCfg::ctbAlfFlag =
}
)
};
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
const
CtxSet
ContextSetCfg
::
MHIntraFlag
=
ContextSetCfg
::
addCtxSet
({
#if TRAINED_CABAC_INIT_TABLES
...
...
@@ -1136,7 +1135,6 @@ const CtxSet ContextSetCfg::MHIntraPredMode = ContextSetCfg::addCtxSet
{
184
,
CNU
,
CNU
,
CNU
,
},
#endif
});
#endif
const
CtxSet
ContextSetCfg
::
TriangleFlag
=
ContextSetCfg
::
addCtxSet
({
...
...
source/Lib/CommonLib/Contexts.h
View file @
958c49b4
...
...
@@ -206,10 +206,8 @@ public:
static
const
CtxSet
GBiIdx
;
#endif
static
const
CtxSet
ctbAlfFlag
;
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
static
const
CtxSet
MHIntraFlag
;
static
const
CtxSet
MHIntraPredMode
;
#endif
static
const
CtxSet
TriangleFlag
;
static
const
CtxSet
TriangleIdx
;
static
const
unsigned
NumberOfContexts
;
...
...
source/Lib/CommonLib/IntraPrediction.cpp
View file @
958c49b4
...
...
@@ -141,7 +141,6 @@ IntraPrediction::IntraPrediction()
m_piYuvExt
[
ch
][
buf
]
=
nullptr
;
}
}
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
for
(
uint32_t
ch
=
0
;
ch
<
MAX_NUM_COMPONENT
;
ch
++
)
{
for
(
uint32_t
buf
=
0
;
buf
<
4
;
buf
++
)
...
...
@@ -149,7 +148,6 @@ IntraPrediction::IntraPrediction()
m_yuvExt2
[
ch
][
buf
]
=
nullptr
;
}
}
#endif
m_piTemp
=
nullptr
;
#if JVET_L0338_MDLM
...
...
@@ -172,7 +170,6 @@ void IntraPrediction::destroy()
m_piYuvExt
[
ch
][
buf
]
=
nullptr
;
}
}
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
for
(
uint32_t
ch
=
0
;
ch
<
MAX_NUM_COMPONENT
;
ch
++
)
{
for
(
uint32_t
buf
=
0
;
buf
<
4
;
buf
++
)
...
...
@@ -181,7 +178,6 @@ void IntraPrediction::destroy()
m_yuvExt2
[
ch
][
buf
]
=
nullptr
;
}
}
#endif
delete
[]
m_piTemp
;
m_piTemp
=
nullptr
;
...
...
@@ -199,12 +195,10 @@ void IntraPrediction::init(ChromaFormat chromaFormatIDC, const unsigned bitDepth
destroy
();
}
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
if
(
m_yuvExt2
[
COMPONENT_Y
][
0
]
!=
nullptr
&&
m_currChromaFormat
!=
chromaFormatIDC
)
{
destroy
();
}
#endif
m_currChromaFormat
=
chromaFormatIDC
;
...
...
@@ -229,7 +223,6 @@ void IntraPrediction::init(ChromaFormat chromaFormatIDC, const unsigned bitDepth
}
}
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
if
(
m_yuvExt2
[
COMPONENT_Y
][
0
]
==
nullptr
)
// check if first is null (in which case, nothing initialised yet)
{
m_yuvExtSize2
=
(
MAX_CU_SIZE
)
*
(
MAX_CU_SIZE
);
...
...
@@ -242,7 +235,6 @@ void IntraPrediction::init(ChromaFormat chromaFormatIDC, const unsigned bitDepth
}
}
}
#endif
int
shift
=
bitDepthY
+
4
;
for
(
int
i
=
32
;
i
<
64
;
i
++
)
...
...
@@ -1013,7 +1005,6 @@ bool IntraPrediction::useDPCMForFirstPassIntraEstimation(const PredictionUnit &p
return
CU
::
isRDPCMEnabled
(
*
pu
.
cu
)
&&
pu
.
cu
->
transQuantBypass
&&
(
uiDirMode
==
HOR_IDX
||
uiDirMode
==
VER_IDX
);
}
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
void
IntraPrediction
::
geneWeightedPred
(
const
ComponentID
compId
,
PelBuf
&
pred
,
const
PredictionUnit
&
pu
,
Pel
*
srcBuf
)
{
const
int
width
=
pred
.
width
;
...
...
@@ -1135,7 +1126,6 @@ void IntraPrediction::geneIntrainterPred(const CodingUnit &cu)
switchBuffer
(
*
pu
,
currCompID2
,
tmpBuf
,
getPredictorPtr2
(
currCompID2
,
0
));
}
}
#endif
inline
bool
isAboveLeftAvailable
(
const
CodingUnit
&
cu
,
const
ChannelType
&
chType
,
const
Position
&
posLT
);
inline
int
isAboveAvailable
(
const
CodingUnit
&
cu
,
const
ChannelType
&
chType
,
const
Position
&
posLT
,
const
uint32_t
uiNumUnitsInPU
,
const
uint32_t
unitWidth
,
bool
*
validFlags
);
...
...
source/Lib/CommonLib/IntraPrediction.h
View file @
958c49b4
...
...
@@ -69,10 +69,8 @@ private:
Pel
*
m_piYuvExt
[
MAX_NUM_COMPONENT
][
NUM_PRED_BUF
];
int
m_iYuvExtSize
;
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
Pel
*
m_yuvExt2
[
MAX_NUM_COMPONENT
][
4
];
int
m_yuvExtSize2
;
#endif
static
const
uint8_t
m_aucIntraFilter
[
MAX_NUM_CHANNEL_TYPE
][
MAX_INTRA_FILTER_DEPTHS
];
...
...
@@ -153,12 +151,10 @@ public:
static
bool
useFilteredIntraRefSamples
(
const
ComponentID
&
compID
,
const
PredictionUnit
&
pu
,
bool
modeSpecific
,
const
UnitArea
&
tuArea
);
static
bool
useDPCMForFirstPassIntraEstimation
(
const
PredictionUnit
&
pu
,
const
uint32_t
&
uiDirMode
);
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
void
geneWeightedPred
(
const
ComponentID
compId
,
PelBuf
&
pred
,
const
PredictionUnit
&
pu
,
Pel
*
srcBuf
);
Pel
*
getPredictorPtr2
(
const
ComponentID
compID
,
uint32_t
idx
)
{
return
m_yuvExt2
[
compID
][
idx
];
}
void
switchBuffer
(
const
PredictionUnit
&
pu
,
ComponentID
compID
,
PelBuf
srcBuff
,
Pel
*
dst
);
void
geneIntrainterPred
(
const
CodingUnit
&
cu
);
#endif
};
//! \}
...
...
source/Lib/CommonLib/Slice.cpp
View file @
958c49b4
...
...
@@ -1787,9 +1787,7 @@ SPSNext::SPSNext( SPS& sps )
,
m_Affine
(
false
)
,
m_AffineType
(
false
)
,
m_MTTEnabled
(
false
)
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
,
m_MHIntra
(
false
)
#endif
,
m_Triangle
(
false
)
#if ENABLE_WPP_PARALLELISM
,
m_NextDQP
(
false
)
...
...
source/Lib/CommonLib/Slice.h
View file @
958c49b4
...
...
@@ -816,9 +816,7 @@ private:
bool
m_GBi
;
//
#endif
bool
m_MTTEnabled
;
//
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
bool
m_MHIntra
;
#endif
bool
m_Triangle
;
#if ENABLE_WPP_PARALLELISM
bool
m_NextDQP
;
...
...
@@ -972,10 +970,8 @@ public:
void
setUseCompositeRef
(
bool
b
)
{
m_compositeRefEnabled
=
b
;
}
bool
getUseCompositeRef
()
const
{
return
m_compositeRefEnabled
;
}
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
void
setUseMHIntra
(
bool
b
)
{
m_MHIntra
=
b
;
}
bool
getUseMHIntra
()
const
{
return
m_MHIntra
;
}
#endif
void
setUseTriangle
(
bool
b
)
{
m_Triangle
=
b
;
}
bool
getUseTriangle
()
const
{
return
m_Triangle
;
}
#if JVET_L0293_CPR
...
...
source/Lib/CommonLib/TypeDef.h
View file @
958c49b4
...
...
@@ -54,7 +54,6 @@
#define TRAINED_CABAC_INIT_TABLES 1 // Trained values for VTM3
#define JVET_L0100_MULTI_HYPOTHESIS_INTRA 1 // Combine intra mode with an extra merge indexed prediction
#define JVET_L0165_6MPM 1 // Use 6 MPM for 67 intra prediction modes
#define JVET_L0279_WAIP_CLEANUP 1 // WAIP cleanup
...
...
source/Lib/CommonLib/Unit.cpp
View file @
958c49b4
...
...
@@ -364,9 +364,7 @@ void PredictionUnit::initData()
}
#endif
}
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
mhIntraFlag
=
false
;
#endif
}
PredictionUnit
&
PredictionUnit
::
operator
=
(
const
IntraPredictionData
&
predData
)
...
...
@@ -414,9 +412,7 @@ PredictionUnit& PredictionUnit::operator=(const InterPredictionData& predData)
}
#endif
}
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
mhIntraFlag
=
predData
.
mhIntraFlag
;
#endif
return
*
this
;
}
...
...
@@ -461,9 +457,7 @@ PredictionUnit& PredictionUnit::operator=( const PredictionUnit& other )
}
#endif
}
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
mhIntraFlag
=
other
.
mhIntraFlag
;
#endif
return
*
this
;
}
...
...
source/Lib/CommonLib/Unit.h
View file @
958c49b4
...
...
@@ -372,9 +372,7 @@ struct InterPredictionData
#if JVET_L0694_AFFINE_LINEBUFFER_CLEANUP
Mv
mvAffi
[
NUM_REF_PIC_LIST_01
][
3
];
#endif
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
bool
mhIntraFlag
;
#endif
#if JVET_L0293_CPR
Mv
bv
;
// block vector for CPR
Mv
bvd
;
// block vector difference for CPR
...
...
source/Lib/CommonLib/UnitTools.cpp
View file @
958c49b4
...
...
@@ -458,11 +458,7 @@ int PU::getIntraMPMs( const PredictionUnit &pu, unsigned* mpm, const ChannelType
// Get intra direction of left PU
const
PredictionUnit
*
puLeft
=
pu
.
cs
->
getPURestricted
(
pos
.
offset
(
-
1
,
0
),
pu
,
channelType
);
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
if
(
puLeft
&&
(
CU
::
isIntra
(
*
puLeft
->
cu
)
||
(
channelType
==
CHANNEL_TYPE_LUMA
&&
puLeft
->
mhIntraFlag
)))
#else
if
(
puLeft
&&
CU
::
isIntra
(
*
puLeft
->
cu
))
#endif
{
leftIntraDir
=
puLeft
->
intraDir
[
channelType
];
...
...
@@ -475,11 +471,7 @@ int PU::getIntraMPMs( const PredictionUnit &pu, unsigned* mpm, const ChannelType
// Get intra direction of above PU
const
PredictionUnit
*
puAbove
=
pu
.
cs
->
getPURestricted
(
pos
.
offset
(
0
,
-
1
),
pu
,
channelType
);
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
if
(
puAbove
&&
(
CU
::
isIntra
(
*
puAbove
->
cu
)
||
(
channelType
==
CHANNEL_TYPE_LUMA
&&
puAbove
->
mhIntraFlag
))
&&
CU
::
isSameCtu
(
*
pu
.
cu
,
*
puAbove
->
cu
))
#else
if
(
puAbove
&&
CU
::
isIntra
(
*
puAbove
->
cu
)
&&
CU
::
isSameCtu
(
*
pu
.
cu
,
*
puAbove
->
cu
))
#endif
{
aboveIntraDir
=
puAbove
->
intraDir
[
channelType
];
...
...
@@ -729,7 +721,6 @@ bool PU::isChromaIntraModeCrossCheckMode( const PredictionUnit &pu )
return
pu
.
intraDir
[
CHANNEL_TYPE_CHROMA
]
==
DM_CHROMA_IDX
;
}
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
int
PU
::
getMHIntraMPMs
(
const
PredictionUnit
&
pu
,
unsigned
*
mpm
,
const
ChannelType
&
channelType
/*= CHANNEL_TYPE_LUMA*/
,
const
bool
isChromaMDMS
/*= false*/
,
const
unsigned
startIdx
/*= 0*/
)
{
const
int
numMPMs
=
3
;
// Multi-hypothesis intra uses only 3 MPM
...
...
@@ -873,7 +864,6 @@ int PU::getNarrowShape(const int width, const int height)
return
0
;
}
}
#endif
uint32_t
PU
::
getFinalIntraMode
(
const
PredictionUnit
&
pu
,
const
ChannelType
&
chType
)
{
...
...
source/Lib/CommonLib/UnitTools.h
View file @
958c49b4
...
...
@@ -179,10 +179,8 @@ namespace PU
bool
isLMCMode
(
unsigned
mode
);
bool
isLMCModeEnabled
(
const
PredictionUnit
&
pu
,
unsigned
mode
);
bool
isChromaIntraModeCrossCheckMode
(
const
PredictionUnit
&
pu
);
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
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
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
);
...
...
@@ -306,7 +304,6 @@ uint32_t updateCandList( T uiMode, double uiCost, static_vector<T, N>& candModeL
return
0
;
}
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
template
<
typename
T
,
size_t
N
>
#if JVET_L0054_MMVD
uint32_t
updateDoubleCandList
(
T
mode
,
double
cost
,
static_vector
<
T
,
N
>&
candModeList
,
static_vector
<
double
,
N
>&
candCostList
,
static_vector
<
T
,
N
>&
candModeList2
,
T
mode2
,
size_t
fastCandNum
=
N
,
int
*
iserttPos
=
nullptr
)
...
...
@@ -367,7 +364,6 @@ uint32_t updateDoubleCandList(T mode, double cost, static_vector<T, N>& candMode
#endif
return
0
;
}
#endif
#endif
source/Lib/CommonLib/dtrace_blockstatistics.cpp
View file @
958c49b4
...
...
@@ -488,13 +488,11 @@ void writeAllData(const CodingStructure& cs, const UnitArea& ctuArea)
DTRACE_BLOCK_SCALAR
(
g_trace_ctx
,
D_BLOCK_STATISTICS_ALL
,
pu
,
GetBlockStatisticName
(
BlockStatistic
::
MMVDMergeIdx
),
pu
.
mmvdMergeIdx
);
}
#endif
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
DTRACE_BLOCK_SCALAR
(
g_trace_ctx
,
D_BLOCK_STATISTICS_ALL
,
pu
,
GetBlockStatisticName
(
BlockStatistic
::
MHIntraFlag
),
pu
.
mhIntraFlag
);
if
(
pu
.
mhIntraFlag
)
{
DTRACE_BLOCK_SCALAR
(
g_trace_ctx
,
D_BLOCK_STATISTICS_ALL
,
pu
,
GetBlockStatisticName
(
BlockStatistic
::
Luma_IntraMode
),
pu
.
intraDir
[
COMPONENT_Y
]);
}
#endif
DTRACE_BLOCK_SCALAR
(
g_trace_ctx
,
D_BLOCK_STATISTICS_ALL
,
pu
,
GetBlockStatisticName
(
BlockStatistic
::
TriangleFlag
),
pu
.
cu
->
triangle
);
}
DTRACE_BLOCK_SCALAR
(
g_trace_ctx
,
D_BLOCK_STATISTICS_ALL
,
pu
,
GetBlockStatisticName
(
BlockStatistic
::
AffineFlag
),
pu
.
cu
->
affine
);
...
...
@@ -876,7 +874,6 @@ void writeAllCodedData(const CodingStructure & cs, const UnitArea & ctuArea)
DTRACE_BLOCK_SCALAR
(
g_trace_ctx
,
D_BLOCK_STATISTICS_CODED
,
pu
,
GetBlockStatisticName
(
BlockStatistic
::
AffineFlag
),
pu
.
cu
->
affine
);
}
#endif
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
if
(
pu
.
cs
->
sps
->
getSpsNext
().
getUseMHIntra
()
&&
!
pu
.
cu
->
skip
&&
!
pu
.
cu
->
affine
&&
!
(
pu
.
cu
->
lwidth
()
*
pu
.
cu
->
lheight
()
<
64
||
pu
.
cu
->
lwidth
()
>=
MAX_CU_SIZE
||
pu
.
cu
->
lheight
()
>=
MAX_CU_SIZE
)
#if JVET_L0054_MMVD
&&
!
pu
.
mmvdMergeFlag
...
...
@@ -893,7 +890,6 @@ void writeAllCodedData(const CodingStructure & cs, const UnitArea & ctuArea)
}
}
}
#endif
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
);
...
...
source/Lib/CommonLib/dtrace_blockstatistics.h
View file @
958c49b4
...
...
@@ -106,9 +106,7 @@ enum class BlockStatistic {
MMVDMergeFlag
,
MMVDMergeIdx
,
#endif
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
MHIntraFlag
,
#endif
TriangleFlag
,
TrianglePartitioning
,
TriangleMVL0
,
//<< currently only uni-prediction enabled
...
...
@@ -200,9 +198,7 @@ static const std::map<BlockStatistic, std::tuple<std::string, BlockStatisticType
{
BlockStatistic
::
MMVDMergeFlag
,
std
::
tuple
<
std
::
string
,
BlockStatisticType
,
std
::
string
>
{
"MMVDMergeFlag"
,
BlockStatisticType
::
Flag
,
""
}},
{
BlockStatistic
::
MMVDMergeIdx
,
std
::
tuple
<
std
::
string
,
BlockStatisticType
,
std
::
string
>
{
"MMVDMergeIdx"
,
BlockStatisticType
::
Integer
,
"[0, 1]"
}},
#endif
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
{
BlockStatistic
::
MHIntraFlag
,
std
::
tuple
<
std
::
string
,
BlockStatisticType
,
std
::
string
>
{
"MHIntraFlag"
,
BlockStatisticType
::
Flag
,
""
}},
#endif
{
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"
}},
...
...
source/Lib/DecoderLib/CABACReader.cpp
View file @
958c49b4
...
...
@@ -1262,14 +1262,12 @@ void CABACReader::prediction_unit( PredictionUnit& pu, MergeCtx& mrgCtx )
#else
affine_flag
(
*
pu
.
cu
);
#endif
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
MHIntra_flag
(
pu
);
if
(
pu
.
mhIntraFlag
)
{
MHIntra_luma_pred_modes
(
*
pu
.
cu
);
pu
.
intraDir
[
1
]
=
DM_CHROMA_IDX
;
}
#endif
triangle_mode
(
*
pu
.
cu
);
#if JVET_L0054_MMVD
if
(
pu
.
mmvdMergeFlag
)
...
...
@@ -1714,7 +1712,6 @@ void CABACReader::mvp_flag( PredictionUnit& pu, RefPicList eRefList )
}
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
void
CABACReader
::
MHIntra_flag
(
PredictionUnit
&
pu
)
{
if
(
!
pu
.
cs
->
sps
->
getSpsNext
().
getUseMHIntra
())
...
...
@@ -1844,7 +1841,6 @@ void CABACReader::MHIntra_luma_pred_modes(CodingUnit &cu)
pu
=
pu
->
next
;
}
}
#endif
void
CABACReader
::
triangle_mode
(
CodingUnit
&
cu
)
{
...
...
source/Lib/DecoderLib/CABACReader.h
View file @
958c49b4
...
...
@@ -114,10 +114,8 @@ public:
void
inter_pred_idc
(
PredictionUnit
&
pu
);
void
ref_idx
(
PredictionUnit
&
pu
,
RefPicList
eRefList
);
void
mvp_flag
(
PredictionUnit
&
pu
,
RefPicList
eRefList
);
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
void
MHIntra_flag
(
PredictionUnit
&
pu
);
void
MHIntra_luma_pred_modes
(
CodingUnit
&
cu
);
#endif
void
triangle_mode
(
CodingUnit
&
cu
);
// pcm samples (clause 7.3.8.7)
...
...
source/Lib/DecoderLib/DecCu.cpp
View file @
958c49b4
...
...
@@ -345,15 +345,11 @@ void DecCu::xReconInter(CodingUnit &cu)
}
else
{
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
m_pcIntraPred
->
geneIntrainterPred
(
cu
);
#endif
// inter prediction
#if JVET_L0293_CPR
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
CHECK
(
cu
.
cpr
&&
cu
.
firstPU
->
mhIntraFlag
,
"CPR and MHIntra cannot be used together"
);
#endif
CHECK
(
cu
.
cpr
&&
cu
.
affine
,
"CPR and Affine cannot be used together"
);
CHECK
(
cu
.
cpr
&&
cu
.
triangle
,
"CPR and triangle cannot be used together"
);
#if JVET_L0054_MMVD
...
...
@@ -380,14 +376,12 @@ void DecCu::xReconInter(CodingUnit &cu)
cu
.
slice
->
updateMotionLUTs
(
cu
.
slice
->
getMotionLUTs
(),
cu
);
#endif
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
if
(
cu
.
firstPU
->
mhIntraFlag
)
{
m_pcIntraPred
->
geneWeightedPred
(
COMPONENT_Y
,
cu
.
cs
->
getPredBuf
(
*
cu
.
firstPU
).
Y
(),
*
cu
.
firstPU
,
m_pcIntraPred
->
getPredictorPtr2
(
COMPONENT_Y
,
0
));
m_pcIntraPred
->
geneWeightedPred
(
COMPONENT_Cb
,
cu
.
cs
->
getPredBuf
(
*
cu
.
firstPU
).
Cb
(),
*
cu
.
firstPU
,
m_pcIntraPred
->
getPredictorPtr2
(
COMPONENT_Cb
,
0
));
m_pcIntraPred
->
geneWeightedPred
(
COMPONENT_Cr
,
cu
.
cs
->
getPredBuf
(
*
cu
.
firstPU
).
Cr
(),
*
cu
.
firstPU
,
m_pcIntraPred
->
getPredictorPtr2
(
COMPONENT_Cr
,
0
));
}
#endif
DTRACE
(
g_trace_ctx
,
D_TMP
,
"pred "
);
DTRACE_CRC
(
g_trace_ctx
,
D_TMP
,
*
cu
.
cs
,
cu
.
cs
->
getPredBuf
(
cu
),
&
cu
.
Y
()
);
...
...
@@ -489,9 +483,7 @@ void DecCu::xDeriveCUMV( CodingUnit &cu )
#if JVET_L0054_MMVD
if
(
pu
.
mmvdMergeFlag
||
pu
.
cu
->
mmvdSkip
)
{
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
CHECK
(
pu
.
mhIntraFlag
==
true
,
"invalid MHIntra"
);
#endif
if
(
pu
.
cs
->
sps
->
getSpsNext
().
getUseSubPuMvp
())
{
Size
bufSize
=
g_miScaling
.
scale
(
pu
.
lumaSize
());
...
...
source/Lib/DecoderLib/VLCReader.cpp
View file @
958c49b4
...
...
@@ -814,9 +814,7 @@ void HLSyntaxReader::parseSPSNext( SPSNext& spsNext, const bool usePCM )
READ_FLAG
(
symbol
,
"reserved_flag"
);
if
(
symbol
!=
0
)
EXIT
(
"Incompatible version: SPSNext reserved flag not equal to zero (bitstream was probably created with newer software version)"
);
}
READ_FLAG
(
symbol
,
"mtt_enabled_flag"
);
spsNext
.
setMTTMode
(
symbol
);
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
READ_FLAG
(
symbol
,
"mhintra_flag"
);
spsNext
.
setUseMHIntra
(
symbol
!=
0
);
#endif
READ_FLAG
(
symbol
,
"triangle_flag"
);
spsNext
.
setUseTriangle
(
symbol
!=
0
);
#if ENABLE_WPP_PARALLELISM
READ_FLAG
(
symbol
,
"next_dqp_enabled_flag"
);
spsNext
.
setUseNextDQP
(
symbol
!=
0
);
...
...
source/Lib/EncoderLib/CABACWriter.cpp
View file @
958c49b4
...
...
@@ -1279,13 +1279,11 @@ void CABACWriter::prediction_unit( const PredictionUnit& pu )
#else
affine_flag
(
*
pu
.
cu
);
#endif
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
MHIntra_flag
(
pu
);
if
(
pu
.
mhIntraFlag
)
{
MHIntra_luma_pred_modes
(
*
pu
.
cu
);
}
#endif
triangle_mode
(
*
pu
.
cu
);
#if JVET_L0054_MMVD
if
(
pu
.
mmvdMergeFlag
)
...
...
@@ -1699,7 +1697,6 @@ void CABACWriter::mvp_flag( const PredictionUnit& pu, RefPicList eRefList )
DTRACE
(
g_trace_ctx
,
D_SYNTAX
,
"mvpIdx(refList:%d)=%d
\n
"
,
eRefList
,
pu
.
mvpIdx
[
eRefList
]
);
}
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
void
CABACWriter
::
MHIntra_flag
(
const
PredictionUnit
&
pu
)
{
if
(
!
pu
.
cs
->
sps
->
getSpsNext
().
getUseMHIntra
())
...
...
@@ -1792,7 +1789,6 @@ void CABACWriter::MHIntra_luma_pred_modes(const CodingUnit& cu)
pu
=
pu
->
next
;
}
}
#endif
void
CABACWriter
::
triangle_mode
(
const
CodingUnit
&
cu
)
{
...
...
source/Lib/EncoderLib/CABACWriter.h
View file @
958c49b4
...
...
@@ -130,10 +130,8 @@ public:
void
ref_idx
(
const
PredictionUnit
&
pu
,
RefPicList
eRefList
);
void
mvp_flag
(
const
PredictionUnit
&
pu
,
RefPicList
eRefList
);
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
void
MHIntra_flag
(
const
PredictionUnit
&
pu
);
void
MHIntra_luma_pred_modes
(
const
CodingUnit
&
cu
);
#endif
void
triangle_mode
(
const
CodingUnit
&
cu
);
// pcm samples (clause 7.3.8.7)
...
...
source/Lib/EncoderLib/EncCfg.h
View file @
958c49b4
...
...
@@ -238,9 +238,7 @@ protected:
int
m_LadfIntervalLowerBound
[
MAX_LADF_INTERVALS
];
#endif
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
bool
m_MHIntra
;
#endif
bool
m_Triangle
;
#if JVET_L0293_CPR
...
...
@@ -755,10 +753,8 @@ public:
#endif
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
void
setUseMHIntra
(
bool
b
)
{
m_MHIntra
=
b
;
}
bool
getUseMHIntra
()
const
{
return
m_MHIntra
;
}
#endif
void
setUseTriangle
(
bool
b
)
{
m_Triangle
=
b
;
}
bool
getUseTriangle
()
const
{
return
m_Triangle
;
}
...
...
source/Lib/EncoderLib/EncCu.cpp
View file @
958c49b4
...
...
@@ -155,7 +155,7 @@ void EncCu::create( EncCfg* encCfg )
{
m_acMergeBuffer
[
ui
].
create
(
chromaFormat
,
Area
(
0
,
0
,
uiMaxWidth
,
uiMaxHeight
)
);
}
#if JVET_L0
100_MULTI_HYPOTHESIS_INTRA && JVET_L0
054_MMVD
#if JVET_L0054_MMVD
for
(
unsigned
ui
=
0
;
ui
<
MRG_MAX_NUM_CANDS
;
ui
++
)
{
m_acRealMergeBuffer
[
ui
].
create
(
chromaFormat
,
Area
(
0
,
0
,
uiMaxWidth
,
uiMaxHeight
));
...
...
@@ -256,7 +256,7 @@ void EncCu::destroy()
{
m_acMergeBuffer
[
ui
].
destroy
();
}
#if JVET_L0
100_MULTI_HYPOTHESIS_INTRA && JVET_L0
054_MMVD
#if JVET_L0054_MMVD
for
(
unsigned
ui
=
0
;
ui
<
MRG_MAX_NUM_CANDS
;
ui
++
)
{
m_acRealMergeBuffer
[
ui
].
destroy
();
...
...
@@ -1735,9 +1735,7 @@ void EncCu::xCheckRDCostMerge2Nx2N( CodingStructure *&tempCS, CodingStructure *&
bool
bestIsSkip
=
false
;
bool
bestIsMMVDSkip
=
true
;
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
PelUnitBuf
acMergeBuffer
[
MRG_MAX_NUM_CANDS
];
#endif
PelUnitBuf
acMergeRealBuffer
[
MMVD_MRG_MAX_RD_BUF_NUM
];
PelUnitBuf
*
acMergeTempBuffer
[
MMVD_MRG_MAX_RD_NUM
];
PelUnitBuf
*
singleMergeTempBuffer
;
...
...
@@ -1784,7 +1782,6 @@ void EncCu::xCheckRDCostMerge2Nx2N( CodingStructure *&tempCS, CodingStructure *&
}
#endif
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
#if JVET_L0054_MMVD
static_vector
<
unsigned
,
MRG_MAX_NUM_CANDS
+
MMVD_ADD_NUM
>
RdModeList2
;
// store the Intra mode for Intrainter
#else
...
...
@@ -1801,20 +1798,13 @@ void EncCu::xCheckRDCostMerge2Nx2N( CodingStructure *&tempCS, CodingStructure *&
{
isTestSkipMerge
[
idx
]
=
false
;
}
#endif
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
if
(
m_pcEncCfg
->
getUseFastMerge
()
||
isIntrainterEnabled
)
#else
if
(
m_pcEncCfg
->
getUseFastMerge
()
)
#endif
{
uiNumMrgSATDCand
=
NUM_MRG_SATD_CAND
;
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
if
(
isIntrainterEnabled
)
{
uiNumMrgSATDCand
+=
1
;
}
#endif
bestIsSkip
=
false
;
if
(
auto
blkCache
=
dynamic_cast
<
CacheBlkInfoCtrl
*
>
(
m_modeCtrl
)
)
...
...
@@ -1833,12 +1823,10 @@ void EncCu::xCheckRDCostMerge2Nx2N( CodingStructure *&tempCS, CodingStructure *&
#endif
}
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
if
(
isIntrainterEnabled
)
// always perform low complexity check
{
bestIsSkip
=
false
;
}
#endif
#if JVET_L0054_MMVD
static_vector
<
double
,
MRG_MAX_NUM_CANDS
+
MMVD_ADD_NUM
>
candCostList
;
...
...
@@ -1854,9 +1842,7 @@ void EncCu::xCheckRDCostMerge2Nx2N( CodingStructure *&tempCS, CodingStructure *&
const
double
sqrtLambdaForFirstPass
=
m_pcRdCost
->
getMotionLambda
(
encTestMode
.
lossless
);
CodingUnit
&
cu
=
tempCS
->
addCU
(
tempCS
->
area
,
partitioner
.
chType
);
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
const
double
sqrtLambdaForFirstPassIntra
=
m_pcRdCost
->
getMotionLambda
(
cu
.
transQuantBypass
)
/
double
(
1
<<
SCALE_BITS
);
#endif
partitioner
.
setCUData
(
cu
);
cu
.
slice
=
tempCS
->
slice
;
...
...
@@ -1906,10 +1892,8 @@ void EncCu::xCheckRDCostMerge2Nx2N( CodingStructure *&tempCS, CodingStructure *&
#if JVET_L0054_MMVD
distParam
.
cur
=
singleMergeTempBuffer
->
Y
();
m_pcInterSearch
->
motionCompensation
(
pu
,
*
singleMergeTempBuffer
);
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
acMergeBuffer
[
uiMergeCand
]
=
m_acRealMergeBuffer
[
uiMergeCand
].
getBuf
(
localUnitArea
);
acMergeBuffer
[
uiMergeCand
].
copyFrom
(
*
singleMergeTempBuffer
);