Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Remy Foray
VVCSoftware_VTM
Commits
a62384c2
Commit
a62384c2
authored
Apr 17, 2019
by
Luong Pham Van
Browse files
JVET_N0302_SIMPLFIED_CIIP
parent
021d880f
Changes
11
Hide whitespace changes
Inline
Side-by-side
source/Lib/CommonLib/Contexts.cpp
View file @
a62384c2
...
...
@@ -770,7 +770,7 @@ const CtxSet ContextSetCfg::MHIntraFlag = ContextSetCfg::addCtxSet
{
CNU
,
},
{
1
,
},
});
#if !JVET_N0302_SIMPLFIED_CIIP
const
CtxSet
ContextSetCfg
::
MHIntraPredMode
=
ContextSetCfg
::
addCtxSet
({
{
156
,
CNU
,
CNU
,
CNU
,
},
...
...
@@ -778,7 +778,7 @@ const CtxSet ContextSetCfg::MHIntraPredMode = ContextSetCfg::addCtxSet
{
CNU
,
CNU
,
CNU
,
CNU
,
},
{
9
,
DWS
,
DWS
,
DWS
,
},
});
#endif
const
CtxSet
ContextSetCfg
::
TriangleFlag
=
ContextSetCfg
::
addCtxSet
({
#if JVET_N600_AMVR_TPM_CTX_REDUCTION
...
...
source/Lib/CommonLib/Contexts.h
View file @
a62384c2
...
...
@@ -256,7 +256,9 @@ public:
static
const
CtxSet
GBiIdx
;
static
const
CtxSet
ctbAlfFlag
;
static
const
CtxSet
MHIntraFlag
;
#if !JVET_N0302_SIMPLFIED_CIIP
static
const
CtxSet
MHIntraPredMode
;
#endif
static
const
CtxSet
TriangleFlag
;
static
const
CtxSet
TriangleIdx
;
static
const
CtxSet
SmvdFlag
;
...
...
source/Lib/CommonLib/IntraPrediction.cpp
View file @
a62384c2
...
...
@@ -859,6 +859,48 @@ bool IntraPrediction::useDPCMForFirstPassIntraEstimation(const PredictionUnit &p
return
CU
::
isRDPCMEnabled
(
*
pu
.
cu
)
&&
pu
.
cu
->
transQuantBypass
&&
(
uiDirMode
==
HOR_IDX
||
uiDirMode
==
VER_IDX
);
}
#if JVET_N0302_SIMPLFIED_CIIP
void
IntraPrediction
::
geneWeightedPred
(
const
ComponentID
compId
,
PelBuf
&
pred
,
const
PredictionUnit
&
pu
,
Pel
*
srcBuf
)
{
const
int
width
=
pred
.
width
;
const
int
height
=
pred
.
height
;
const
int
srcStride
=
width
;
const
int
dstStride
=
pred
.
stride
;
Pel
*
dstBuf
=
pred
.
buf
;
int
wIntra
,
wMerge
;
const
Position
posBL
=
pu
.
Y
().
bottomLeft
();
const
Position
posTR
=
pu
.
Y
().
topRight
();
const
PredictionUnit
*
neigh0
=
pu
.
cs
->
getPURestricted
(
posBL
.
offset
(
-
1
,
0
),
pu
,
CHANNEL_TYPE_LUMA
);
const
PredictionUnit
*
neigh1
=
pu
.
cs
->
getPURestricted
(
posTR
.
offset
(
0
,
-
1
),
pu
,
CHANNEL_TYPE_LUMA
);
bool
isNeigh0Intra
=
neigh0
&&
(
CU
::
isIntra
(
*
neigh0
->
cu
));
bool
isNeigh1Intra
=
neigh1
&&
(
CU
::
isIntra
(
*
neigh1
->
cu
));
if
(
isNeigh0Intra
&&
isNeigh1Intra
)
{
wIntra
=
3
;
wMerge
=
1
;
}
else
{
if
(
!
isNeigh0Intra
&&
!
isNeigh1Intra
)
{
wIntra
=
1
;
wMerge
=
3
;
}
else
{
wIntra
=
2
;
wMerge
=
2
;
}
}
for
(
int
y
=
0
;
y
<
height
;
y
++
)
{
for
(
int
x
=
0
;
x
<
width
;
x
++
)
{
dstBuf
[
y
*
dstStride
+
x
]
=
(
wMerge
*
dstBuf
[
y
*
dstStride
+
x
]
+
wIntra
*
srcBuf
[
y
*
srcStride
+
x
]
+
2
)
>>
2
;
}
}
}
#else
void
IntraPrediction
::
geneWeightedPred
(
const
ComponentID
compId
,
PelBuf
&
pred
,
const
PredictionUnit
&
pu
,
Pel
*
srcBuf
)
{
const
int
width
=
pred
.
width
;
...
...
@@ -941,6 +983,7 @@ void IntraPrediction::geneWeightedPred(const ComponentID compId, PelBuf &pred, c
}
}
}
#endif
void
IntraPrediction
::
switchBuffer
(
const
PredictionUnit
&
pu
,
ComponentID
compID
,
PelBuf
srcBuff
,
Pel
*
dst
)
{
Pel
*
src
=
srcBuff
.
bufAt
(
0
,
0
);
...
...
source/Lib/CommonLib/LoopFilter.cpp
View file @
a62384c2
...
...
@@ -346,6 +346,7 @@ void LoopFilter::xDeblockCU( CodingUnit& cu, const DeblockEdgeDir edgeDir )
xSetMaxFilterLengthPQForCodingSubBlocks
(
edgeDir
,
cu
,
currPU
,
mvSubBlocks
,
subBlockSize
,
areaPu
);
#endif
}
#if !JVET_N0302_SIMPLFIED_CIIP
if
(
cu
.
firstPU
->
mhIntraFlag
)
{
const
uint32_t
dirMode
=
PU
::
getFinalIntraMode
(
*
(
cu
.
firstPU
),
cu
.
chType
);
...
...
@@ -384,6 +385,7 @@ void LoopFilter::xDeblockCU( CodingUnit& cu, const DeblockEdgeDir edgeDir )
xSetMaxFilterLengthPQForCodingSubBlocks
(
edgeDir
,
cu
,
currPU
,
mvSubBlocks
,
subBlockSize
,
areaPu
);
#endif
}
#endif
const
unsigned
uiPelsInPart
=
pcv
.
minCUWidth
;
...
...
@@ -1025,6 +1027,9 @@ void LoopFilter::xEdgeFilterLuma(const CodingUnit& cu, const DeblockEdgeDir edge
#endif
{
// restrict filter length if sub-blocks are used (e.g affine or ATMVP)
#if JVET_N0302_SIMPLFIED_CIIP
if
(
cuP
.
affine
)
#else
bool
ciipSubBlock
=
false
;
if
(
cuP
.
firstPU
->
mhIntraFlag
)
{
...
...
@@ -1032,6 +1037,7 @@ void LoopFilter::xEdgeFilterLuma(const CodingUnit& cu, const DeblockEdgeDir edge
ciipSubBlock
=
edgeDir
==
EDGE_HOR
?
dirMode
==
VER_IDX
:
dirMode
==
HOR_IDX
;
}
if
(
cuP
.
affine
||
ciipSubBlock
)
#endif
{
maxFilterLengthP
=
std
::
min
(
maxFilterLengthP
,
5
);
}
...
...
source/Lib/CommonLib/TypeDef.h
View file @
a62384c2
...
...
@@ -54,6 +54,8 @@
#define JVET_N0340_TRI_MERGE_CAND 1
#define JVET_N0302_SIMPLFIED_CIIP 1
#define JVET_N0324_REGULAR_MRG_FLAG 1
#define JVET_N0251_ITEM4_IBC_LOCAL_SEARCH_RANGE 1
...
...
source/Lib/CommonLib/UnitTools.cpp
View file @
a62384c2
...
...
@@ -837,6 +837,7 @@ bool PU::isChromaIntraModeCrossCheckMode( const PredictionUnit &pu )
return
pu
.
intraDir
[
CHANNEL_TYPE_CHROMA
]
==
DM_CHROMA_IDX
;
}
#if !JVET_N0302_SIMPLFIED_CIIP
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
...
...
@@ -964,6 +965,7 @@ int PU::getMHIntraMPMs(const PredictionUnit &pu, unsigned* mpm, const ChannelTyp
return
numCand
;
}
}
#endif
int
PU
::
getNarrowShape
(
const
int
width
,
const
int
height
)
{
int
longSide
=
(
width
>
height
)
?
width
:
height
;
...
...
source/Lib/CommonLib/UnitTools.h
View file @
a62384c2
...
...
@@ -178,7 +178,9 @@ namespace PU
bool
isLMCMode
(
unsigned
mode
);
bool
isLMCModeEnabled
(
const
PredictionUnit
&
pu
,
unsigned
mode
);
bool
isChromaIntraModeCrossCheckMode
(
const
PredictionUnit
&
pu
);
#if !JVET_N0302_SIMPLFIED_CIIP
int
getMHIntraMPMs
(
const
PredictionUnit
&
pu
,
unsigned
*
mpm
,
const
ChannelType
&
channelType
=
CHANNEL_TYPE_LUMA
,
const
bool
isChromaMDMS
=
false
,
const
unsigned
startIdx
=
0
);
#endif
int
getNarrowShape
(
const
int
width
,
const
int
height
);
void
getTriangleMergeCandidates
(
const
PredictionUnit
&
pu
,
MergeCtx
&
triangleMrgCtx
);
bool
isUniqueTriangleCandidates
(
const
PredictionUnit
&
pu
,
MergeCtx
&
triangleMrgCtx
);
...
...
source/Lib/DecoderLib/CABACReader.cpp
View file @
a62384c2
...
...
@@ -1516,7 +1516,11 @@ void CABACReader::prediction_unit( PredictionUnit& pu, MergeCtx& mrgCtx )
MHIntra_flag
(
pu
);
if
(
pu
.
mhIntraFlag
)
{
#if JVET_N0302_SIMPLFIED_CIIP
pu
.
intraDir
[
0
]
=
PLANAR_IDX
;
#else
MHIntra_luma_pred_modes
(
*
pu
.
cu
);
#endif
pu
.
intraDir
[
1
]
=
DM_CHROMA_IDX
;
}
#if JVET_N0324_REGULAR_MRG_FLAG
...
...
@@ -2045,6 +2049,7 @@ void CABACReader::MHIntra_flag(PredictionUnit& pu)
DTRACE
(
g_trace_ctx
,
D_SYNTAX
,
"MHIntra_flag() MHIntra=%d pos=(%d,%d) size=%dx%d
\n
"
,
pu
.
mhIntraFlag
?
1
:
0
,
pu
.
lumaPos
().
x
,
pu
.
lumaPos
().
y
,
pu
.
lumaSize
().
width
,
pu
.
lumaSize
().
height
);
}
#if !JVET_N0302_SIMPLFIED_CIIP
void
CABACReader
::
MHIntra_luma_pred_modes
(
CodingUnit
&
cu
)
{
if
(
!
cu
.
Y
().
valid
())
...
...
@@ -2138,6 +2143,7 @@ void CABACReader::MHIntra_luma_pred_modes(CodingUnit &cu)
pu
=
pu
->
next
;
}
}
#endif
void
CABACReader
::
triangle_mode
(
CodingUnit
&
cu
)
{
...
...
source/Lib/EncoderLib/CABACWriter.cpp
View file @
a62384c2
...
...
@@ -1439,6 +1439,7 @@ void CABACWriter::prediction_unit( const PredictionUnit& pu )
#endif
subblock_merge_flag
(
*
pu
.
cu
);
MHIntra_flag
(
pu
);
#if !JVET_N0302_SIMPLFIED_CIIP
if
(
pu
.
mhIntraFlag
)
{
MHIntra_luma_pred_modes
(
*
pu
.
cu
);
...
...
@@ -1453,6 +1454,19 @@ void CABACWriter::prediction_unit( const PredictionUnit& pu )
}
#else
triangle_mode
(
*
pu
.
cu
);
#endif
#else
#if JVET_N0324_REGULAR_MRG_FLAG
if
(
!
pu
.
mhIntraFlag
)
{
if
(
!
pu
.
cu
->
affine
&&
!
pu
.
mmvdMergeFlag
&&
!
pu
.
cu
->
mmvdSkip
)
{
CHECK
(
!
pu
.
cu
->
triangle
,
"triangle_flag must be true"
);
}
}
#else
triangle_mode
(
*
pu
.
cu
);
#endif
#endif
if
(
pu
.
mmvdMergeFlag
)
{
...
...
@@ -1965,6 +1979,7 @@ void CABACWriter::MHIntra_flag(const PredictionUnit& pu)
DTRACE
(
g_trace_ctx
,
D_SYNTAX
,
"MHIntra_flag() MHIntra=%d pos=(%d,%d) size=%dx%d
\n
"
,
pu
.
mhIntraFlag
?
1
:
0
,
pu
.
lumaPos
().
x
,
pu
.
lumaPos
().
y
,
pu
.
lumaSize
().
width
,
pu
.
lumaSize
().
height
);
}
#if !JVET_N0302_SIMPLFIED_CIIP
void
CABACWriter
::
MHIntra_luma_pred_modes
(
const
CodingUnit
&
cu
)
{
if
(
!
cu
.
Y
().
valid
())
...
...
@@ -2024,6 +2039,7 @@ void CABACWriter::MHIntra_luma_pred_modes(const CodingUnit& cu)
pu
=
pu
->
next
;
}
}
#endif
void
CABACWriter
::
triangle_mode
(
const
CodingUnit
&
cu
)
{
...
...
source/Lib/EncoderLib/EncCu.cpp
View file @
a62384c2
...
...
@@ -1791,8 +1791,9 @@ void EncCu::xCheckRDCostMerge2Nx2N( CodingStructure *&tempCS, CodingStructure *&
const
double
sqrtLambdaForFirstPass
=
m_pcRdCost
->
getMotionLambda
(
encTestMode
.
lossless
);
CodingUnit
&
cu
=
tempCS
->
addCU
(
tempCS
->
area
,
partitioner
.
chType
);
#if !JVET_N0302_SIMPLFIED_CIIP
const
double
sqrtLambdaForFirstPassIntra
=
m_pcRdCost
->
getMotionLambda
(
cu
.
transQuantBypass
)
/
double
(
1
<<
SCALE_BITS
);
#endif
partitioner
.
setCUData
(
cu
);
cu
.
slice
=
tempCS
->
slice
;
cu
.
tileIdx
=
tempCS
->
picture
->
tileMap
->
getTileIdxMap
(
tempCS
->
area
.
lumaPos
()
);
...
...
@@ -1888,15 +1889,18 @@ void EncCu::xCheckRDCostMerge2Nx2N( CodingStructure *&tempCS, CodingStructure *&
if
(
isIntrainterEnabled
)
{
#if !JVET_N0302_SIMPLFIED_CIIP
int
numTestIntraMode
=
4
;
#endif
// prepare for Intra bits calculation
const
TempCtx
ctxStart
(
m_CtxCache
,
m_CABACEstimator
->
getCtx
());
#if !JVET_N0302_SIMPLFIED_CIIP
const
TempCtx
ctxStartIntraMode
(
m_CtxCache
,
SubCtx
(
Ctx
::
MHIntraPredMode
,
m_CABACEstimator
->
getCtx
()));
// for Intrainter fast, recored the best intra mode during the first round for mrege 0
int
bestMHIntraMode
=
-
1
;
double
bestMHIntraCost
=
MAX_DOUBLE
;
#endif
pu
.
mhIntraFlag
=
true
;
// save the to-be-tested merge candidates
...
...
@@ -1918,6 +1922,50 @@ void EncCu::xCheckRDCostMerge2Nx2N( CodingStructure *&tempCS, CodingStructure *&
}
// first round
#if JVET_N0302_SIMPLFIED_CIIP
pu
.
intraDir
[
0
]
=
PLANAR_IDX
;
uint32_t
intraCnt
=
0
;
// generate intrainter Y prediction
if
(
mergeCnt
==
0
)
{
m_pcIntraSearch
->
initIntraPatternChType
(
*
pu
.
cu
,
pu
.
Y
());
m_pcIntraSearch
->
predIntraAng
(
COMPONENT_Y
,
pu
.
cs
->
getPredBuf
(
pu
).
Y
(),
pu
);
m_pcIntraSearch
->
switchBuffer
(
pu
,
COMPONENT_Y
,
pu
.
cs
->
getPredBuf
(
pu
).
Y
(),
m_pcIntraSearch
->
getPredictorPtr2
(
COMPONENT_Y
,
intraCnt
));
}
pu
.
cs
->
getPredBuf
(
pu
).
copyFrom
(
acMergeBuffer
[
mergeCand
]);
if
(
pu
.
cs
->
slice
->
getReshapeInfo
().
getUseSliceReshaper
()
&&
m_pcReshape
->
getCTUFlag
())
{
pu
.
cs
->
getPredBuf
(
pu
).
Y
().
rspSignal
(
m_pcReshape
->
getFwdLUT
());
}
m_pcIntraSearch
->
geneWeightedPred
(
COMPONENT_Y
,
pu
.
cs
->
getPredBuf
(
pu
).
Y
(),
pu
,
m_pcIntraSearch
->
getPredictorPtr2
(
COMPONENT_Y
,
intraCnt
));
// calculate cost
if
(
pu
.
cs
->
slice
->
getReshapeInfo
().
getUseSliceReshaper
()
&&
m_pcReshape
->
getCTUFlag
())
{
pu
.
cs
->
getPredBuf
(
pu
).
Y
().
rspSignal
(
m_pcReshape
->
getInvLUT
());
}
distParam
.
cur
=
pu
.
cs
->
getPredBuf
(
pu
).
Y
();
Distortion
sadValue
=
distParam
.
distFunc
(
distParam
);
if
(
pu
.
cs
->
slice
->
getReshapeInfo
().
getUseSliceReshaper
()
&&
m_pcReshape
->
getCTUFlag
())
{
pu
.
cs
->
getPredBuf
(
pu
).
Y
().
rspSignal
(
m_pcReshape
->
getFwdLUT
());
}
#if JVET_N0324_REGULAR_MRG_FLAG
double
cost
=
(
double
)
sadValue
+
(
double
)(
bitsCand
+
9
)
*
sqrtLambdaForFirstPass
;
#else
double
cost
=
(
double
)
sadValue
+
(
double
)(
bitsCand
+
1
)
*
sqrtLambdaForFirstPass
;
#endif
insertPos
=
-
1
;
updateDoubleCandList
(
mergeCand
+
MRG_MAX_NUM_CANDS
+
MMVD_ADD_NUM
,
cost
,
RdModeList
,
candCostList
,
RdModeList2
,
pu
.
intraDir
[
0
],
uiNumMrgSATDCand
,
&
insertPos
);
if
(
insertPos
!=
-
1
)
{
for
(
int
i
=
int
(
RdModeList
.
size
())
-
1
;
i
>
insertPos
;
i
--
)
{
swap
(
acMergeTempBuffer
[
i
-
1
],
acMergeTempBuffer
[
i
]);
}
swap
(
singleMergeTempBuffer
,
acMergeTempBuffer
[
insertPos
]);
}
#else
for
(
uint32_t
intraCnt
=
0
;
intraCnt
<
numTestIntraMode
;
intraCnt
++
)
{
pu
.
intraDir
[
0
]
=
(
intraCnt
<
2
)
?
intraCnt
:
((
intraCnt
==
2
)
?
HOR_IDX
:
VER_IDX
);
...
...
@@ -1985,6 +2033,7 @@ void EncCu::xCheckRDCostMerge2Nx2N( CodingStructure *&tempCS, CodingStructure *&
bestMHIntraCost
=
cost
;
}
}
#endif
}
pu
.
mhIntraFlag
=
false
;
m_CABACEstimator
->
getCtx
()
=
ctxStart
;
...
...
@@ -2084,8 +2133,11 @@ void EncCu::xCheckRDCostMerge2Nx2N( CodingStructure *&tempCS, CodingStructure *&
{
pu
.
intraDir
[
0
]
=
RdModeList2
[
mergeCnt
];
pu
.
intraDir
[
1
]
=
DM_CHROMA_IDX
;
#if JVET_N0302_SIMPLFIED_CIIP
uint32_t
bufIdx
=
0
;
#else
uint32_t
bufIdx
=
(
pu
.
intraDir
[
0
]
>
1
)
?
(
pu
.
intraDir
[
0
]
==
HOR_IDX
?
2
:
3
)
:
pu
.
intraDir
[
0
];
#endif
m_pcIntraSearch
->
initIntraPatternChType
(
*
pu
.
cu
,
pu
.
Cb
());
m_pcIntraSearch
->
predIntraAng
(
COMPONENT_Cb
,
pu
.
cs
->
getPredBuf
(
pu
).
Cb
(),
pu
);
m_pcIntraSearch
->
switchBuffer
(
pu
,
COMPONENT_Cb
,
pu
.
cs
->
getPredBuf
(
pu
).
Cb
(),
m_pcIntraSearch
->
getPredictorPtr2
(
COMPONENT_Cb
,
bufIdx
));
...
...
@@ -2223,7 +2275,11 @@ void EncCu::xCheckRDCostMerge2Nx2N( CodingStructure *&tempCS, CodingStructure *&
}
if
(
pu
.
mhIntraFlag
)
{
#if JVET_N0302_SIMPLFIED_CIIP
uint32_t
bufIdx
=
0
;
#else
uint32_t
bufIdx
=
(
pu
.
intraDir
[
0
]
>
1
)
?
(
pu
.
intraDir
[
0
]
==
HOR_IDX
?
2
:
3
)
:
pu
.
intraDir
[
0
];
#endif
PelBuf
tmpBuf
=
tempCS
->
getPredBuf
(
pu
).
Y
();
tmpBuf
.
copyFrom
(
acMergeBuffer
[
uiMergeCand
].
Y
());
if
(
pu
.
cs
->
slice
->
getReshapeInfo
().
getUseSliceReshaper
()
&&
m_pcReshape
->
getCTUFlag
())
...
...
source/Lib/EncoderLib/IntraSearch.cpp
View file @
a62384c2
...
...
@@ -281,7 +281,9 @@ void IntraSearch::estIntraPredLumaQT( CodingUnit &cu, Partitioner &partitioner,
const
TempCtx
ctxStart
(
m_CtxCache
,
m_CABACEstimator
->
getCtx
()
);
const
TempCtx
ctxStartIntraMode
(
m_CtxCache
,
SubCtx
(
Ctx
::
IntraLumaMpmFlag
,
m_CABACEstimator
->
getCtx
()));
#if !JVET_N0302_SIMPLFIED_CIIP
const
TempCtx
ctxStartMHIntraMode
(
m_CtxCache
,
SubCtx
(
Ctx
::
MHIntraPredMode
,
m_CABACEstimator
->
getCtx
()
)
);
#endif
const
TempCtx
ctxStartMrlIdx
(
m_CtxCache
,
SubCtx
(
Ctx
::
MultiRefLineIdx
,
m_CABACEstimator
->
getCtx
()
)
);
CHECK
(
!
cu
.
firstPU
,
"CU has no PUs"
);
...
...
@@ -479,7 +481,9 @@ void IntraSearch::estIntraPredLumaQT( CodingUnit &cu, Partitioner &partitioner,
// NB xFracModeBitsIntra will not affect the mode for chroma that may have already been pre-estimated.
m_CABACEstimator
->
getCtx
()
=
SubCtx
(
Ctx
::
IntraLumaMpmFlag
,
ctxStartIntraMode
);
#if !JVET_N0302_SIMPLFIED_CIIP
m_CABACEstimator
->
getCtx
()
=
SubCtx
(
Ctx
::
MHIntraPredMode
,
ctxStartMHIntraMode
);
#endif
m_CABACEstimator
->
getCtx
()
=
SubCtx
(
Ctx
::
MultiRefLineIdx
,
ctxStartMrlIdx
);
uint64_t
fracModeBits
=
xFracModeBitsIntra
(
pu
,
uiMode
,
CHANNEL_TYPE_LUMA
);
...
...
@@ -552,7 +556,9 @@ void IntraSearch::estIntraPredLumaQT( CodingUnit &cu, Partitioner &partitioner,
// NB xFracModeBitsIntra will not affect the mode for chroma that may have already been pre-estimated.
m_CABACEstimator
->
getCtx
()
=
SubCtx
(
Ctx
::
IntraLumaMpmFlag
,
ctxStartIntraMode
);
#if !JVET_N0302_SIMPLFIED_CIIP
m_CABACEstimator
->
getCtx
()
=
SubCtx
(
Ctx
::
MHIntraPredMode
,
ctxStartMHIntraMode
);
#endif
m_CABACEstimator
->
getCtx
()
=
SubCtx
(
Ctx
::
MultiRefLineIdx
,
ctxStartMrlIdx
);
uint64_t
fracModeBits
=
xFracModeBitsIntra
(
pu
,
mode
,
CHANNEL_TYPE_LUMA
);
...
...
@@ -632,7 +638,9 @@ void IntraSearch::estIntraPredLumaQT( CodingUnit &cu, Partitioner &partitioner,
// NB xFracModeBitsIntra will not affect the mode for chroma that may have already been pre-estimated.
m_CABACEstimator
->
getCtx
()
=
SubCtx
(
Ctx
::
IntraLumaMpmFlag
,
ctxStartIntraMode
);
#if !JVET_N0302_SIMPLFIED_CIIP
m_CABACEstimator
->
getCtx
()
=
SubCtx
(
Ctx
::
MHIntraPredMode
,
ctxStartMHIntraMode
);
#endif
m_CABACEstimator
->
getCtx
()
=
SubCtx
(
Ctx
::
MultiRefLineIdx
,
ctxStartMrlIdx
);
uint64_t
fracModeBits
=
xFracModeBitsIntra
(
pu
,
mode
,
CHANNEL_TYPE_LUMA
);
...
...
@@ -789,7 +797,9 @@ void IntraSearch::estIntraPredLumaQT( CodingUnit &cu, Partitioner &partitioner,
//===== reset context models =====
m_CABACEstimator
->
getCtx
()
=
SubCtx
(
Ctx
::
IntraLumaMpmFlag
,
ctxStartIntraMode
);
#if !JVET_N0302_SIMPLFIED_CIIP
m_CABACEstimator
->
getCtx
()
=
SubCtx
(
Ctx
::
MHIntraPredMode
,
ctxStartMHIntraMode
);
#endif
m_CABACEstimator
->
getCtx
()
=
SubCtx
(
Ctx
::
MultiRefLineIdx
,
ctxStartMrlIdx
);
return
;
...
...
@@ -2635,9 +2645,13 @@ uint64_t IntraSearch::xFracModeBitsIntra(PredictionUnit &pu, const uint32_t &uiM
if
(
isLuma
(
chType
)
)
{
#if !JVET_N0302_SIMPLFIED_CIIP
if
(
pu
.
mhIntraFlag
)
m_CABACEstimator
->
MHIntra_luma_pred_modes
(
*
pu
.
cu
);
else
#else
if
(
!
pu
.
mhIntraFlag
)
#endif
{
m_CABACEstimator
->
extend_ref_line
(
pu
);
m_CABACEstimator
->
intra_luma_pred_mode
(
pu
);
...
...
Write
Preview
Supports
Markdown
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