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
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jeeva Raj A
VVCSoftware_VTM
Commits
9623538e
Commit
9623538e
authored
Jul 22, 2019
by
Christian Helmrich
Browse files
Options
Browse Files
Download
Plain Diff
merge, address software coordinator's comments
parents
e5c1ab7f
d528eb7d
Changes
42
Hide whitespace changes
Inline
Side-by-side
Showing
42 changed files
with
490 additions
and
164 deletions
+490
-164
source/Lib/CommonLib/AdaptiveLoopFilter.cpp
source/Lib/CommonLib/AdaptiveLoopFilter.cpp
+1
-1
source/Lib/CommonLib/AdaptiveLoopFilter.h
source/Lib/CommonLib/AdaptiveLoopFilter.h
+2
-0
source/Lib/CommonLib/Buffer.h
source/Lib/CommonLib/Buffer.h
+5
-5
source/Lib/CommonLib/CommonDef.h
source/Lib/CommonLib/CommonDef.h
+3
-0
source/Lib/CommonLib/Contexts.cpp
source/Lib/CommonLib/Contexts.cpp
+1
-1
source/Lib/CommonLib/DepQuant.cpp
source/Lib/CommonLib/DepQuant.cpp
+5
-7
source/Lib/CommonLib/InterPrediction.cpp
source/Lib/CommonLib/InterPrediction.cpp
+3
-15
source/Lib/CommonLib/InterPrediction.h
source/Lib/CommonLib/InterPrediction.h
+1
-5
source/Lib/CommonLib/IntraPrediction.cpp
source/Lib/CommonLib/IntraPrediction.cpp
+17
-1
source/Lib/CommonLib/LoopFilter.cpp
source/Lib/CommonLib/LoopFilter.cpp
+17
-2
source/Lib/CommonLib/MotionInfo.h
source/Lib/CommonLib/MotionInfo.h
+2
-0
source/Lib/CommonLib/Quant.cpp
source/Lib/CommonLib/Quant.cpp
+9
-10
source/Lib/CommonLib/QuantRDOQ.cpp
source/Lib/CommonLib/QuantRDOQ.cpp
+3
-3
source/Lib/CommonLib/Rom.cpp
source/Lib/CommonLib/Rom.cpp
+4
-0
source/Lib/CommonLib/Rom.h
source/Lib/CommonLib/Rom.h
+4
-0
source/Lib/CommonLib/Slice.cpp
source/Lib/CommonLib/Slice.cpp
+4
-4
source/Lib/CommonLib/Slice.h
source/Lib/CommonLib/Slice.h
+2
-2
source/Lib/CommonLib/TrQuant.cpp
source/Lib/CommonLib/TrQuant.cpp
+13
-13
source/Lib/CommonLib/TrQuant.h
source/Lib/CommonLib/TrQuant.h
+2
-2
source/Lib/CommonLib/TypeDef.h
source/Lib/CommonLib/TypeDef.h
+22
-4
source/Lib/CommonLib/Unit.cpp
source/Lib/CommonLib/Unit.cpp
+65
-0
source/Lib/CommonLib/Unit.h
source/Lib/CommonLib/Unit.h
+3
-0
source/Lib/CommonLib/UnitTools.cpp
source/Lib/CommonLib/UnitTools.cpp
+9
-2
source/Lib/CommonLib/UnitTools.h
source/Lib/CommonLib/UnitTools.h
+1
-1
source/Lib/CommonLib/x86/AdaptiveLoopFilterX86.h
source/Lib/CommonLib/x86/AdaptiveLoopFilterX86.h
+1
-1
source/Lib/DecoderLib/CABACReader.cpp
source/Lib/DecoderLib/CABACReader.cpp
+22
-4
source/Lib/DecoderLib/CABACReader.h
source/Lib/DecoderLib/CABACReader.h
+1
-1
source/Lib/DecoderLib/DecCu.cpp
source/Lib/DecoderLib/DecCu.cpp
+11
-4
source/Lib/DecoderLib/DecLib.cpp
source/Lib/DecoderLib/DecLib.cpp
+4
-0
source/Lib/DecoderLib/DecSlice.cpp
source/Lib/DecoderLib/DecSlice.cpp
+2
-0
source/Lib/DecoderLib/VLCReader.cpp
source/Lib/DecoderLib/VLCReader.cpp
+40
-5
source/Lib/EncoderLib/CABACWriter.cpp
source/Lib/EncoderLib/CABACWriter.cpp
+22
-5
source/Lib/EncoderLib/CABACWriter.h
source/Lib/EncoderLib/CABACWriter.h
+1
-1
source/Lib/EncoderLib/EncAdaptiveLoopFilter.cpp
source/Lib/EncoderLib/EncAdaptiveLoopFilter.cpp
+53
-12
source/Lib/EncoderLib/EncAdaptiveLoopFilter.h
source/Lib/EncoderLib/EncAdaptiveLoopFilter.h
+10
-0
source/Lib/EncoderLib/EncCu.cpp
source/Lib/EncoderLib/EncCu.cpp
+7
-0
source/Lib/EncoderLib/EncReshape.cpp
source/Lib/EncoderLib/EncReshape.cpp
+47
-0
source/Lib/EncoderLib/EncReshape.h
source/Lib/EncoderLib/EncReshape.h
+3
-0
source/Lib/EncoderLib/EncSlice.cpp
source/Lib/EncoderLib/EncSlice.cpp
+7
-3
source/Lib/EncoderLib/InterSearch.cpp
source/Lib/EncoderLib/InterSearch.cpp
+13
-13
source/Lib/EncoderLib/IntraSearch.cpp
source/Lib/EncoderLib/IntraSearch.cpp
+30
-30
source/Lib/EncoderLib/VLCWriter.cpp
source/Lib/EncoderLib/VLCWriter.cpp
+18
-7
No files found.
source/Lib/CommonLib/AdaptiveLoopFilter.cpp
View file @
9623538e
...
...
@@ -843,7 +843,7 @@ void AdaptiveLoopFilter::deriveClassificationBlk(AlfClassifier** classifier, int
d0
=
sumD0
;
dirTempD
=
2
;
}
if
(
d1
*
hv0
>
hv1
*
d0
)
if
(
(
uint32_t
)
d1
*
(
uint32_t
)
hv0
>
(
uint32_t
)
hv1
*
(
uint32_t
)
d0
)
{
hvd1
=
d1
;
hvd0
=
d0
;
...
...
source/Lib/CommonLib/AdaptiveLoopFilter.h
View file @
9623538e
...
...
@@ -92,10 +92,12 @@ public:
void
resetPCMBlkClassInfo
(
CodingStructure
&
cs
,
AlfClassifier
**
classifier
,
const
CPelBuf
&
srcLuma
,
const
Area
&
blk
);
template
<
AlfFilterType
filtType
>
static
void
filterBlk
(
AlfClassifier
**
classifier
,
const
PelUnitBuf
&
recDst
,
const
CPelUnitBuf
&
recSrc
,
const
Area
&
blkDst
,
const
Area
&
blk
,
const
ComponentID
compId
,
short
*
filterSet
,
short
*
fClipSet
,
const
ClpRng
&
clpRng
,
CodingStructure
&
cs
,
int
vbCTUHeight
,
int
vbPos
);
#if !JVET_O0216_ALF_COEFF_EG3 || !JVET_O0064_SIMP_ALF_CLIP_CODING
inline
static
int
getMaxGolombIdx
(
AlfFilterType
filterType
)
{
return
filterType
==
ALF_FILTER_5
?
2
:
3
;
}
#endif
void
(
*
m_deriveClassificationBlk
)(
AlfClassifier
**
classifier
,
int
**
laplacian
[
NUM_DIRECTIONS
],
const
CPelBuf
&
srcLuma
,
const
Area
&
blkDst
,
const
Area
&
blk
,
const
int
shift
,
int
vbCTUHeight
,
int
vbPos
);
...
...
source/Lib/CommonLib/Buffer.h
View file @
9623538e
...
...
@@ -111,7 +111,7 @@ struct AreaBuf : public Size
void
copyClip
(
const
AreaBuf
<
const
T
>
&
src
,
const
ClpRng
&
clpRng
);
void
subtract
(
const
AreaBuf
<
const
T
>
&
other
);
#if !JVET_O0105_ICT
_HHI
#if !JVET_O0105_ICT
void
copyAndNegate
(
const
AreaBuf
<
const
T
>
&
other
);
void
subtractAndHalve
(
const
AreaBuf
<
const
T
>
&
other
);
#endif
...
...
@@ -359,7 +359,7 @@ void AreaBuf<T>::subtract( const AreaBuf<const T> &other )
#undef SUBS_INC
}
#if !JVET_O0105_ICT
_HHI
#if !JVET_O0105_ICT
template
<
typename
T
>
void
AreaBuf
<
T
>::
copyAndNegate
(
const
AreaBuf
<
const
T
>
&
other
)
{
...
...
@@ -928,11 +928,11 @@ private:
Pel
*
m_origin
[
MAX_NUM_COMPONENT
];
};
#if JVET_O0105_ICT
_HHI
#if JVET_O0105_ICT
struct
CompStorage
:
public
PelBuf
{
CompStorage
()
{
m_memory
=
nullptr
;
}
~
CompStorage
()
{
delete
[]
m_memory
;
}
~
CompStorage
()
{
if
(
valid
())
delete
[]
m_memory
;
}
void
create
(
const
Size
&
size
)
{
...
...
@@ -942,7 +942,7 @@ struct CompStorage : public PelBuf
}
void
destroy
()
{
delete
[]
m_memory
;
if
(
valid
())
delete
[]
m_memory
;
m_memory
=
nullptr
;
}
bool
valid
()
{
return
m_memory
!=
nullptr
;
}
...
...
source/Lib/CommonLib/CommonDef.h
View file @
9623538e
...
...
@@ -445,6 +445,9 @@ static constexpr int MV_MIN = -(1 << (MV_BITS - 1));
static
const
int
PIC_ANALYZE_CW_BINS
=
32
;
static
const
int
PIC_CODE_CW_BINS
=
16
;
#if JVET_O0272_LMCS_SIMP_INVERSE_MAPPING
static
const
int
LMCS_SEG_SIZE
=
(
PIC_CODE_CW_BINS
<<
1
);
#endif
static
const
int
FP_PREC
=
11
;
static
const
int
CSCALE_FP_PREC
=
11
;
#if JVET_O1109_UNFIY_CRS
...
...
source/Lib/CommonLib/Contexts.cpp
View file @
9623538e
...
...
@@ -784,7 +784,7 @@ const CtxSet ContextSetCfg::IBCFlag = ContextSetCfg::addCtxSet
const
CtxSet
ContextSetCfg
::
JointCbCrFlag
=
ContextSetCfg
::
addCtxSet
({
#if JVET_O0105_ICT
_HHI
#if JVET_O0105_ICT
{
156
,
156
,
156
,
},
{
156
,
156
,
156
,
},
{
184
,
184
,
184
,
},
...
...
source/Lib/CommonLib/DepQuant.cpp
View file @
9623538e
...
...
@@ -750,15 +750,13 @@ namespace DQIntern
{
if
(
enableScalingLists
)
invQScale
=
piDequantCoef
[
rasterPos
];
//scalingfactor*levelScale
if
(
shift
<
0
)
if
(
shift
<
0
&&
(
enableScalingLists
||
scanIdx
==
lastScanIdx
)
)
{
invQScale
<<=
-
shift
;
shift
=
0
;
//add = (1 << shift) >> 1;
}
Intermediate_Int
qIdx
=
(
level
<<
1
)
+
(
level
>
0
?
-
(
state
>>
1
)
:
(
state
>>
1
)
);
Intermediate_Int
nomTCoeff
=
(
qIdx
*
invQScale
+
add
)
>>
shift
;
tCoeff
[
rasterPos
]
=
(
TCoeff
)
Clip3
<
Intermediate_Int
>
(
minTCoeff
,
maxTCoeff
,
nomTCoeff
);
int64_t
nomTCoeff
=
((
int64_t
)
qIdx
*
(
int64_t
)
invQScale
+
add
)
>>
((
shift
<
0
)
?
0
:
shift
)
;
tCoeff
[
rasterPos
]
=
(
TCoeff
)
Clip3
<
int64_t
>
(
minTCoeff
,
maxTCoeff
,
nomTCoeff
);
}
state
=
(
32040
>>
((
state
<<
2
)
+
((
level
&
1
)
<<
1
))
)
&
3
;
// the 16-bit value "32040" represent the state transition table
}
...
...
@@ -1615,7 +1613,7 @@ void DepQuant::quant( TransformUnit &tu, const ComponentID &compID, const CCoeff
CHECK
(
scalingListType
>=
SCALING_LIST_NUM
,
"Invalid scaling list"
);
const
uint32_t
log2TrWidth
=
g_aucLog2
[
width
];
const
uint32_t
log2TrHeight
=
g_aucLog2
[
height
];
const
bool
enableScalingLists
=
getUseScalingList
(
width
,
height
,
tu
.
mtsIdx
==
MTS_SKIP
);
const
bool
enableScalingLists
=
getUseScalingList
(
width
,
height
,
(
tu
.
mtsIdx
==
MTS_SKIP
&&
isLuma
(
compID
))
);
static_cast
<
DQIntern
::
DepQuant
*>
(
p
)
->
quant
(
tu
,
pSrc
,
compID
,
cQP
,
Quant
::
m_dLambda
,
ctx
,
uiAbsSum
,
enableScalingLists
,
Quant
::
getQuantCoeff
(
scalingListType
,
qpRem
,
log2TrWidth
,
log2TrHeight
)
);
}
else
...
...
@@ -1639,7 +1637,7 @@ void DepQuant::dequant( const TransformUnit &tu, CoeffBuf &dstCoeff, const Compo
const
uint32_t
log2TrWidth
=
g_aucLog2
[
width
];
const
uint32_t
log2TrHeight
=
g_aucLog2
[
height
];
const
bool
enableScalingLists
=
getUseScalingList
(
width
,
height
,
(
tu
.
mtsIdx
==
MTS_SKIP
));
const
bool
enableScalingLists
=
getUseScalingList
(
width
,
height
,
(
tu
.
mtsIdx
==
MTS_SKIP
&&
isLuma
(
compID
)
));
static_cast
<
DQIntern
::
DepQuant
*>
(
p
)
->
dequant
(
tu
,
dstCoeff
,
compID
,
cQP
,
enableScalingLists
,
Quant
::
getDequantCoeff
(
scalingListType
,
qpRem
,
log2TrWidth
,
log2TrHeight
)
);
}
else
...
...
source/Lib/CommonLib/InterPrediction.cpp
View file @
9623538e
...
...
@@ -578,11 +578,7 @@ void InterPrediction::xPredInterBi(PredictionUnit& pu, PelUnitBuf &pcYuvPred)
}
else
{
#if JVET_O0055_INT_DMVR_DIS_BDOF
xWeightedAverage
(
pu
,
srcPred0
,
srcPred1
,
pcYuvPred
,
slice
.
getSPS
()
->
getBitDepths
(),
slice
.
clpRngs
(),
(
bioApplied
?
1
:
0
));
#else
xWeightedAverage
(
pu
,
srcPred0
,
srcPred1
,
pcYuvPred
,
slice
.
getSPS
()
->
getBitDepths
(),
slice
.
clpRngs
(),
bioApplied
);
#endif
}
}
}
...
...
@@ -1121,11 +1117,7 @@ void InterPrediction::xCalcBlkGradient(int sx, int sy, int *arraysGx2, int
g_pelBufOP
.
calcBlkGradient
(
sx
,
sy
,
arraysGx2
,
arraysGxGy
,
arraysGxdI
,
arraysGy2
,
arraysGydI
,
sGx2
,
sGy2
,
sGxGy
,
sGxdI
,
sGydI
,
width
,
height
,
unitSize
);
}
#if JVET_O0055_INT_DMVR_DIS_BDOF
void
InterPrediction
::
xWeightedAverage
(
const
PredictionUnit
&
pu
,
const
CPelUnitBuf
&
pcYuvSrc0
,
const
CPelUnitBuf
&
pcYuvSrc1
,
PelUnitBuf
&
pcYuvDst
,
const
BitDepths
&
clipBitDepths
,
const
ClpRngs
&
clpRngs
,
const
int
&
bioApplied
)
#else
void
InterPrediction
::
xWeightedAverage
(
const
PredictionUnit
&
pu
,
const
CPelUnitBuf
&
pcYuvSrc0
,
const
CPelUnitBuf
&
pcYuvSrc1
,
PelUnitBuf
&
pcYuvDst
,
const
BitDepths
&
clipBitDepths
,
const
ClpRngs
&
clpRngs
,
const
bool
&
bioApplied
)
#endif
{
const
int
iRefIdx0
=
pu
.
refIdx
[
0
];
const
int
iRefIdx1
=
pu
.
refIdx
[
1
];
...
...
@@ -1138,11 +1130,7 @@ void InterPrediction::xWeightedAverage(const PredictionUnit& pu, const CPelUnitB
pcYuvDst
.
addWeightedAvg
(
pcYuvSrc0
,
pcYuvSrc1
,
clpRngs
,
pu
.
cu
->
GBiIdx
);
return
;
}
#if JVET_O0055_INT_DMVR_DIS_BDOF
if
(
bioApplied
>
0
)
#else
if
(
bioApplied
)
#endif
{
const
int
src0Stride
=
pu
.
lwidth
()
+
2
*
BIO_EXTEND_SIZE
+
2
;
const
int
src1Stride
=
pu
.
lwidth
()
+
2
*
BIO_EXTEND_SIZE
+
2
;
...
...
@@ -1849,7 +1837,7 @@ void InterPrediction::xProcessDMVR(PredictionUnit& pu, PelUnitBuf &pcYuvDst, con
#if JVET_O0055_INT_DMVR_DIS_BDOF
int
bioEnabledThres
=
8
*
(
dy
>>
1
)
*
dx
;
int
bioAppliedType
[
64
];
bool
bioAppliedType
[
MAX_NUM_SUBCU_DMVR
];
#endif
{
int
num
=
0
;
...
...
@@ -1909,7 +1897,7 @@ void InterPrediction::xProcessDMVR(PredictionUnit& pu, PelUnitBuf &pcYuvDst, con
}
#if JVET_O0055_INT_DMVR_DIS_BDOF
bioAppliedType
[
num
]
=
(
minCost
<
bioEnabledThres
)
?
0
:
(
bioApplied
?
2
:
0
)
;
bioAppliedType
[
num
]
=
(
minCost
<
bioEnabledThres
)
?
false
:
bioApplied
;
#endif
totalDeltaMV
[
0
]
=
(
totalDeltaMV
[
0
]
<<
mvShift
);
totalDeltaMV
[
1
]
=
(
totalDeltaMV
[
1
]
<<
mvShift
);
...
...
@@ -1956,7 +1944,7 @@ void InterPrediction::xProcessDMVR(PredictionUnit& pu, PelUnitBuf &pcYuvDst, con
m_cYuvRefBuffSubCuDMVRL0
=
m_cYuvRefBuffDMVRL0
.
subBuf
(
UnitAreaRelative
(
pu
,
subPu
));
m_cYuvRefBuffSubCuDMVRL1
=
m_cYuvRefBuffDMVRL1
.
subBuf
(
UnitAreaRelative
(
pu
,
subPu
));
#if JVET_O0055_INT_DMVR_DIS_BDOF
xFinalPaddedMCForDMVR
(
subPu
,
srcPred0
,
srcPred1
,
m_cYuvRefBuffSubCuDMVRL0
,
m_cYuvRefBuffSubCuDMVRL1
,
(
bioAppliedType
[
num
]
>
0
?
true
:
false
)
,
mergeMv
);
xFinalPaddedMCForDMVR
(
subPu
,
srcPred0
,
srcPred1
,
m_cYuvRefBuffSubCuDMVRL0
,
m_cYuvRefBuffSubCuDMVRL1
,
bioAppliedType
[
num
]
,
mergeMv
);
#else
xFinalPaddedMCForDMVR
(
subPu
,
srcPred0
,
srcPred1
,
m_cYuvRefBuffSubCuDMVRL0
,
m_cYuvRefBuffSubCuDMVRL1
,
bioApplied
,
mergeMv
);
#endif
...
...
source/Lib/CommonLib/InterPrediction.h
View file @
9623538e
...
...
@@ -136,11 +136,7 @@ protected:
void
xBioGradFilter
(
Pel
*
pSrc
,
int
srcStride
,
int
width
,
int
height
,
int
gradStride
,
Pel
*
gradX
,
Pel
*
gradY
,
int
bitDepth
);
void
xCalcBIOPar
(
const
Pel
*
srcY0Temp
,
const
Pel
*
srcY1Temp
,
const
Pel
*
gradX0
,
const
Pel
*
gradX1
,
const
Pel
*
gradY0
,
const
Pel
*
gradY1
,
int
*
dotProductTemp1
,
int
*
dotProductTemp2
,
int
*
dotProductTemp3
,
int
*
dotProductTemp5
,
int
*
dotProductTemp6
,
const
int
src0Stride
,
const
int
src1Stride
,
const
int
gradStride
,
const
int
widthG
,
const
int
heightG
,
int
bitDepth
);
void
xCalcBlkGradient
(
int
sx
,
int
sy
,
int
*
arraysGx2
,
int
*
arraysGxGy
,
int
*
arraysGxdI
,
int
*
arraysGy2
,
int
*
arraysGydI
,
int
&
sGx2
,
int
&
sGy2
,
int
&
sGxGy
,
int
&
sGxdI
,
int
&
sGydI
,
int
width
,
int
height
,
int
unitSize
);
#if JVET_O0055_INT_DMVR_DIS_BDOF
void
xWeightedAverage
(
const
PredictionUnit
&
pu
,
const
CPelUnitBuf
&
pcYuvSrc0
,
const
CPelUnitBuf
&
pcYuvSrc1
,
PelUnitBuf
&
pcYuvDst
,
const
BitDepths
&
clipBitDepths
,
const
ClpRngs
&
clpRngs
,
const
int
&
bioApplied
);
#else
void
xWeightedAverage
(
const
PredictionUnit
&
pu
,
const
CPelUnitBuf
&
pcYuvSrc0
,
const
CPelUnitBuf
&
pcYuvSrc1
,
PelUnitBuf
&
pcYuvDst
,
const
BitDepths
&
clipBitDepths
,
const
ClpRngs
&
clpRngs
,
const
bool
&
bioApplied
);
#endif
void
xWeightedAverage
(
const
PredictionUnit
&
pu
,
const
CPelUnitBuf
&
pcYuvSrc0
,
const
CPelUnitBuf
&
pcYuvSrc1
,
PelUnitBuf
&
pcYuvDst
,
const
BitDepths
&
clipBitDepths
,
const
ClpRngs
&
clpRngs
,
const
bool
&
bioApplied
);
void
xPredAffineBlk
(
const
ComponentID
&
compID
,
const
PredictionUnit
&
pu
,
const
Picture
*
refPic
,
const
Mv
*
_mv
,
PelUnitBuf
&
dstPic
,
const
bool
&
bi
,
const
ClpRng
&
clpRng
);
void
xWeightedTriangleBlk
(
const
PredictionUnit
&
pu
,
const
uint32_t
width
,
const
uint32_t
height
,
const
ComponentID
compIdx
,
const
bool
splitDir
,
PelUnitBuf
&
predDst
,
PelUnitBuf
&
predSrc0
,
PelUnitBuf
&
predSrc1
);
...
...
source/Lib/CommonLib/IntraPrediction.cpp
View file @
9623538e
...
...
@@ -58,9 +58,15 @@
const
uint8_t
IntraPrediction
::
m_aucIntraFilter
[
MAX_NUM_CHANNEL_TYPE
][
MAX_INTRA_FILTER_DEPTHS
]
=
{
{
// Luma
#if JVET_O0277_INTRA_SMALL_BLOCK_DCTIF
24
,
// 1xn
24
,
// 2xn
24
,
// 4xn
#else
20
,
// 1xn
20
,
// 2xn
20
,
// 4xn
#endif
14
,
// 8xn
2
,
// 16xn
0
,
// 32xn
...
...
@@ -556,14 +562,19 @@ void IntraPrediction::initPredIntraParams(const PredictionUnit & pu, const CompA
else
if
(
!
useISP
)
// HOR, VER and angular modes (MDIS)
{
bool
filterFlag
=
false
;
#if !JVET_O0277_INTRA_SMALL_BLOCK_DCTIF
if
(
predMode
!=
dirMode
)
// wide-anlge mode
{
filterFlag
=
true
;
}
else
#endif
{
#if JVET_O0277_INTRA_SMALL_BLOCK_DCTIF
const
int
diff
=
std
::
min
<
int
>
(
abs
(
predMode
-
HOR_IDX
),
abs
(
predMode
-
VER_IDX
)
);
#else
const
int
diff
=
std
::
min
<
int
>
(
abs
(
dirMode
-
HOR_IDX
),
abs
(
dirMode
-
VER_IDX
)
);
#endif
const
int
log2Size
=
((
g_aucLog2
[
puSize
.
width
]
+
g_aucLog2
[
puSize
.
height
])
>>
1
);
CHECK
(
log2Size
>=
MAX_INTRA_FILTER_DEPTHS
,
"Size not supported"
);
filterFlag
=
(
diff
>
m_aucIntraFilter
[
chType
][
log2Size
]);
...
...
@@ -573,7 +584,12 @@ void IntraPrediction::initPredIntraParams(const PredictionUnit & pu, const CompA
if
(
filterFlag
)
{
const
bool
isRefFilter
=
isIntegerSlope
(
absAng
);
#if JVET_O0277_INTRA_SMALL_BLOCK_DCTIF
CHECK
(
puSize
.
width
*
puSize
.
height
<=
32
,
"DCT-IF interpolation filter is always used for 4x4, 4x8, and 8x4 luma CB"
);
m_ipaParam
.
refFilterFlag
=
isRefFilter
;
#else
m_ipaParam
.
refFilterFlag
=
isRefFilter
&&
puSize
.
width
*
puSize
.
height
>
32
;
#endif
m_ipaParam
.
interpolationFlag
=
!
isRefFilter
;
}
}
...
...
source/Lib/CommonLib/LoopFilter.cpp
View file @
9623538e
...
...
@@ -667,7 +667,7 @@ unsigned LoopFilter::xGetBoundaryStrengthSingle ( const CodingUnit& cu, const De
tmpBs
+=
BsSet
(
1
,
COMPONENT_Y
);
}
// U
#if JVET_O0105_ICT
_HHI
#if JVET_O0105_ICT
if
(
m_aapucBS
[
edgeDir
][
rasterIdx
]
&&
(
TU
::
getCbf
(
tuQ
,
COMPONENT_Cb
)
||
TU
::
getCbf
(
tuP
,
COMPONENT_Cb
)
||
tuQ
.
jointCbCr
||
tuP
.
jointCbCr
))
#else
if
(
m_aapucBS
[
edgeDir
][
rasterIdx
]
&&
(
TU
::
getCbf
(
tuQ
,
COMPONENT_Cb
)
||
TU
::
getCbf
(
tuP
,
COMPONENT_Cb
)))
...
...
@@ -676,7 +676,7 @@ unsigned LoopFilter::xGetBoundaryStrengthSingle ( const CodingUnit& cu, const De
tmpBs
+=
BsSet
(
1
,
COMPONENT_Cb
);
}
// V
#if JVET_O0105_ICT
_HHI
#if JVET_O0105_ICT
if
(
m_aapucBS
[
edgeDir
][
rasterIdx
]
&&
(
TU
::
getCbf
(
tuQ
,
COMPONENT_Cr
)
||
TU
::
getCbf
(
tuP
,
COMPONENT_Cr
)
||
tuQ
.
jointCbCr
||
tuP
.
jointCbCr
))
#else
if
(
m_aapucBS
[
edgeDir
][
rasterIdx
]
&&
(
TU
::
getCbf
(
tuQ
,
COMPONENT_Cr
)
||
TU
::
getCbf
(
tuP
,
COMPONENT_Cr
)))
...
...
@@ -1214,18 +1214,33 @@ void LoopFilter::xEdgeFilterChroma(const CodingUnit& cu, const DeblockEdgeDir ed
const
int
dp0
=
xCalcDP
(
piTmpSrcChroma
+
iSrcStep
*
(
iIdx
*
uiLoopLength
+
0
),
iOffset
);
const
int
dq0
=
xCalcDQ
(
piTmpSrcChroma
+
iSrcStep
*
(
iIdx
*
uiLoopLength
+
0
),
iOffset
);
#if JVET_O0637_CHROMA_GRADIENT_LINE_SELECTION
const
int
subSamplingShift
=
(
edgeDir
==
EDGE_VER
)
?
m_shiftVer
:
m_shiftHor
;
const
int
dp3
=
(
subSamplingShift
==
1
)
?
xCalcDP
(
piTmpSrcChroma
+
iSrcStep
*
(
iIdx
*
uiLoopLength
+
1
),
iOffset
)
:
xCalcDP
(
piTmpSrcChroma
+
iSrcStep
*
(
iIdx
*
uiLoopLength
+
3
),
iOffset
);
const
int
dq3
=
(
subSamplingShift
==
1
)
?
xCalcDQ
(
piTmpSrcChroma
+
iSrcStep
*
(
iIdx
*
uiLoopLength
+
1
),
iOffset
)
:
xCalcDQ
(
piTmpSrcChroma
+
iSrcStep
*
(
iIdx
*
uiLoopLength
+
3
),
iOffset
);
#else
const
int
dp1
=
xCalcDP
(
piTmpSrcChroma
+
iSrcStep
*
(
iIdx
*
uiLoopLength
+
1
),
iOffset
);
const
int
dq1
=
xCalcDQ
(
piTmpSrcChroma
+
iSrcStep
*
(
iIdx
*
uiLoopLength
+
1
),
iOffset
);
#endif
const
int
d0
=
dp0
+
dq0
;
#if JVET_O0637_CHROMA_GRADIENT_LINE_SELECTION
const
int
d3
=
dp3
+
dq3
;
const
int
d
=
d0
+
d3
;
#else
const
int
d1
=
dp1
+
dq1
;
const
int
d
=
d0
+
d1
;
#endif
if
(
d
<
beta
)
{
useLongFilter
=
true
;
const
bool
sw
=
xUseStrongFiltering
(
piTmpSrcChroma
+
iSrcStep
*
(
iIdx
*
uiLoopLength
+
0
),
iOffset
,
2
*
d0
,
beta
,
iTc
)
#if JVET_O0637_CHROMA_GRADIENT_LINE_SELECTION
&&
xUseStrongFiltering
(
piTmpSrcChroma
+
iSrcStep
*
(
iIdx
*
uiLoopLength
+
(
(
subSamplingShift
==
1
)
?
1
:
3
)
),
iOffset
,
2
*
d3
,
beta
,
iTc
);
#else
&&
xUseStrongFiltering
(
piTmpSrcChroma
+
iSrcStep
*
(
iIdx
*
uiLoopLength
+
1
),
iOffset
,
2
*
d1
,
beta
,
iTc
);
#endif
for
(
unsigned
step
=
0
;
step
<
uiLoopLength
;
step
++
)
{
...
...
source/Lib/CommonLib/MotionInfo.h
View file @
9623538e
...
...
@@ -221,7 +221,9 @@ struct LutMotionCand
{
static_vector
<
MotionInfo
,
MAX_NUM_HMVP_CANDS
>
lut
;
static_vector
<
MotionInfo
,
MAX_NUM_HMVP_CANDS
>
lutIbc
;
#if !JVET_O0078_SINGLE_HMVPLUT
static_vector
<
MotionInfo
,
MAX_NUM_HMVP_CANDS
>
lutShareIbc
;
#endif
};
struct
PatentBvCand
{
...
...
source/Lib/CommonLib/Quant.cpp
View file @
9623538e
...
...
@@ -103,9 +103,8 @@ QpParam::QpParam(const TransformUnit& tu, const ComponentID &compIDX, const int
if
(
isChroma
(
compID
))
{
#if JVET_O0105_ICT_HHI
const
int
absIct
=
abs
(
TU
::
getICTMode
(
tu
)
);
const
bool
useJQP
=
(
absIct
==
2
||
absIct
==
4
);
#if JVET_O0105_ICT
const
bool
useJQP
=
(
abs
(
TU
::
getICTMode
(
tu
))
==
2
);
chromaQpOffset
+=
tu
.
cs
->
pps
->
getQpOffset
(
useJQP
?
JOINT_CbCr
:
compID
);
chromaQpOffset
+=
tu
.
cs
->
slice
->
getSliceChromaQpDelta
(
useJQP
?
JOINT_CbCr
:
compID
);
...
...
@@ -407,7 +406,7 @@ void Quant::dequant(const TransformUnit &tu,
const
uint32_t
uiLog2TrWidth
=
g_aucLog2
[
uiWidth
];
const
uint32_t
uiLog2TrHeight
=
g_aucLog2
[
uiHeight
];
int
*
piDequantCoef
=
getDequantCoeff
(
scalingListType
,
QP_rem
,
uiLog2TrWidth
-
1
,
uiLog2TrHeight
-
1
);
int
*
piDequantCoef
=
getDequantCoeff
(
scalingListType
,
QP_rem
,
uiLog2TrWidth
,
uiLog2TrHeight
);
if
(
rightShift
>
0
)
{
...
...
@@ -921,7 +920,7 @@ void Quant::quant(TransformUnit &tu, const ComponentID &compID, const CCoeffBuf
const
CCoeffBuf
&
piCoef
=
pSrc
;
CoeffBuf
piQCoef
=
tu
.
getCoeffs
(
compID
);
const
bool
useTransformSkip
=
tu
.
mtsIdx
==
MTS_SKIP
;
const
bool
useTransformSkip
=
tu
.
mtsIdx
==
MTS_SKIP
&&
isLuma
(
compID
)
;
const
int
maxLog2TrDynamicRange
=
sps
.
getMaxLog2TrDynamicRange
(
toChannelType
(
compID
));
{
...
...
@@ -935,7 +934,7 @@ void Quant::quant(TransformUnit &tu, const ComponentID &compID, const CCoeffBuf
CHECK
(
scalingListType
>=
SCALING_LIST_NUM
,
"Invalid scaling list"
);
const
uint32_t
uiLog2TrWidth
=
g_aucLog2
[
uiWidth
];
const
uint32_t
uiLog2TrHeight
=
g_aucLog2
[
uiHeight
];
int
*
piQuantCoeff
=
getQuantCoeff
(
scalingListType
,
cQP
.
rem
,
uiLog2TrWidth
-
1
,
uiLog2TrHeight
-
1
);
int
*
piQuantCoeff
=
getQuantCoeff
(
scalingListType
,
cQP
.
rem
,
uiLog2TrWidth
,
uiLog2TrHeight
);
const
bool
enableScalingLists
=
getUseScalingList
(
uiWidth
,
uiHeight
,
useTransformSkip
);
...
...
@@ -998,7 +997,7 @@ bool Quant::xNeedRDOQ(TransformUnit &tu, const ComponentID &compID, const CCoeff
const
CCoeffBuf
piCoef
=
pSrc
;
const
bool
useTransformSkip
=
tu
.
mtsIdx
==
MTS_SKIP
;
const
bool
useTransformSkip
=
tu
.
mtsIdx
==
MTS_SKIP
&&
isLuma
(
compID
)
;
const
int
maxLog2TrDynamicRange
=
sps
.
getMaxLog2TrDynamicRange
(
toChannelType
(
compID
));
int
scalingListType
=
getScalingListType
(
tu
.
cu
->
predMode
,
compID
);
...
...
@@ -1006,7 +1005,7 @@ bool Quant::xNeedRDOQ(TransformUnit &tu, const ComponentID &compID, const CCoeff
const
uint32_t
uiLog2TrWidth
=
g_aucLog2
[
uiWidth
];
const
uint32_t
uiLog2TrHeight
=
g_aucLog2
[
uiHeight
];
int
*
piQuantCoeff
=
getQuantCoeff
(
scalingListType
,
cQP
.
rem
,
uiLog2TrWidth
-
1
,
uiLog2TrHeight
-
1
);
int
*
piQuantCoeff
=
getQuantCoeff
(
scalingListType
,
cQP
.
rem
,
uiLog2TrWidth
,
uiLog2TrHeight
);
const
bool
enableScalingLists
=
getUseScalingList
(
uiWidth
,
uiHeight
,
(
useTransformSkip
!=
0
));
...
...
@@ -1064,7 +1063,7 @@ void Quant::transformSkipQuantOneSample(TransformUnit &tu, const ComponentID &co
const
uint32_t
uiLog2TrWidth
=
g_aucLog2
[
uiWidth
];
const
uint32_t
uiLog2TrHeight
=
g_aucLog2
[
uiHeight
];
const
int
*
const
piQuantCoeff
=
getQuantCoeff
(
scalingListType
,
cQP
.
rem
,
uiLog2TrWidth
-
1
,
uiLog2TrHeight
-
1
);
const
int
*
const
piQuantCoeff
=
getQuantCoeff
(
scalingListType
,
cQP
.
rem
,
uiLog2TrWidth
,
uiLog2TrHeight
);
/* for 422 chroma blocks, the effective scaling applied during transformation is not a power of 2, hence it cannot be
* implemented as a bit-shift (the quantised result will be sqrt(2) * larger than required). Alternatively, adjust the
...
...
@@ -1138,7 +1137,7 @@ void Quant::invTrSkipDeQuantOneSample(TransformUnit &tu, const ComponentID &comp
const
uint32_t
uiLog2TrWidth
=
g_aucLog2
[
uiWidth
];
const
uint32_t
uiLog2TrHeight
=
g_aucLog2
[
uiHeight
];
int
*
piDequantCoef
=
getDequantCoeff
(
scalingListType
,
QP_rem
,
uiLog2TrWidth
-
1
,
uiLog2TrHeight
-
1
);
int
*
piDequantCoef
=
getDequantCoeff
(
scalingListType
,
QP_rem
,
uiLog2TrWidth
,
uiLog2TrHeight
);
if
(
rightShift
>
0
)
{
...
...
source/Lib/CommonLib/QuantRDOQ.cpp
View file @
9623538e
...
...
@@ -511,7 +511,7 @@ void QuantRDOQ::quant(TransformUnit &tu, const ComponentID &compID, const CCoeff
const
CCoeffBuf
&
piCoef
=
pSrc
;
CoeffBuf
piQCoef
=
tu
.
getCoeffs
(
compID
);
const
bool
useTransformSkip
=
tu
.
mtsIdx
==
MTS_SKIP
;
const
bool
useTransformSkip
=
tu
.
mtsIdx
==
MTS_SKIP
&&
isLuma
(
compID
)
;
bool
useRDOQ
=
useTransformSkip
?
m_useRDOQTS
:
m_useRDOQ
;
...
...
@@ -620,8 +620,8 @@ void QuantRDOQ::xRateDistOptQuant(TransformUnit &tu, const ComponentID &compID,
const
bool
needSqrtAdjustment
=
TU
::
needsBlockSizeTrafoScale
(
tu
,
compID
);
const
double
*
const
pdErrScale
=
xGetErrScaleCoeffSL
(
scalingListType
,
(
uiLog2BlockWidth
-
1
),
(
uiLog2BlockHeight
-
1
)
,
cQP
.
rem
);
const
int
*
const
piQCoef
=
getQuantCoeff
(
scalingListType
,
cQP
.
rem
,
(
uiLog2BlockWidth
-
1
),
(
uiLog2BlockHeight
-
1
)
);
const
double
*
const
pdErrScale
=
xGetErrScaleCoeffSL
(
scalingListType
,
uiLog2BlockWidth
,
uiLog2BlockHeight
,
cQP
.
rem
);
const
int
*
const
piQCoef
=
getQuantCoeff
(
scalingListType
,
cQP
.
rem
,
uiLog2BlockWidth
,
uiLog2BlockHeight
);
const
bool
isTransformSkip
=
tu
.
mtsIdx
==
MTS_SKIP
&&
isLuma
(
compID
);
const
bool
enableScalingLists
=
getUseScalingList
(
uiWidth
,
uiHeight
,
isTransformSkip
);
const
int
defaultQuantisationCoefficient
=
g_quantScales
[
needSqrtAdjustment
?
1
:
0
][
cQP
.
rem
];
...
...
source/Lib/CommonLib/Rom.cpp
View file @
9623538e
...
...
@@ -585,6 +585,10 @@ int8_t g_aucLog2 [MAX_CU_SIZE + 1];
int8_t
g_aucNextLog2
[
MAX_CU_SIZE
+
1
];
int8_t
g_aucPrevLog2
[
MAX_CU_SIZE
+
1
];
#if JVET_O0105_ICT
const
int
g_ictModes
[
2
][
4
]
=
{
{
0
,
3
,
1
,
2
},
{
0
,
-
3
,
-
1
,
-
2
}
};
#endif
UnitScale
g_miScaling
(
MIN_CU_LOG2
,
MIN_CU_LOG2
);
...
...
source/Lib/CommonLib/Rom.h
View file @
9623538e
...
...
@@ -146,6 +146,10 @@ extern int8_t g_aucLog2 [MAX_CU_SIZE + 1];
extern
int8_t
g_aucNextLog2
[
MAX_CU_SIZE
+
1
];
extern
int8_t
g_aucPrevLog2
[
MAX_CU_SIZE
+
1
];
#if JVET_O0105_ICT
extern
const
int
g_ictModes
[
2
][
4
];
#endif
inline
bool
is34
(
const
SizeType
&
size
)
{
return
(
size
&
(
(
int64_t
)
1
<<
(
g_aucLog2
[
size
]
-
1
)
)
);
...
...
source/Lib/CommonLib/Slice.cpp
View file @
9623538e
...
...
@@ -97,7 +97,7 @@ Slice::Slice()
,
m_bTestWeightBiPred
(
false
)
,
m_substreamSizes
(
)
,
m_cabacInitFlag
(
false
)
#if JVET_O0105_ICT
_HHI
#if JVET_O0105_ICT
,
m_jointCbCrSignFlag
(
false
)
#endif
,
m_bLMvdL1Zero
(
false
)
...
...
@@ -195,7 +195,7 @@ void Slice::initSlice()
m_disFracMMVD
=
false
;
m_substreamSizes
.
clear
();
m_cabacInitFlag
=
false
;
#if JVET_O0105_ICT
_HHI
#if JVET_O0105_ICT
m_jointCbCrSignFlag
=
false
;
#endif
m_enableTMVPFlag
=
true
;
...
...
@@ -678,7 +678,7 @@ void Slice::copySliceInfo(Slice *pSrc, bool cpyAlmostAll)
}
m_cabacInitFlag
=
pSrc
->
m_cabacInitFlag
;
#if JVET_O0105_ICT
_HHI
#if JVET_O0105_ICT
m_jointCbCrSignFlag
=
pSrc
->
m_jointCbCrSignFlag
;
#endif
memcpy
(
m_alfApss
,
pSrc
->
m_alfApss
,
sizeof
(
m_alfApss
));
// this might be quite unsafe
...
...
@@ -1705,7 +1705,7 @@ void ScalingList::checkPredMode(uint32_t sizeId, uint32_t listId)
{
for
(
int
predListIdx
=
(
int
)
listId
;
predListIdx
>=
0
;
predListIdx
--
)
{
if
((
sizeId
==
SCALING_LIST_64x64
&&
(
listId
%
3
)
!=
0
)
||
(
sizeId
==
SCALING_LIST_2x2
&&
(
listId
%
3
)
==
0
))
if
((
sizeId
==
SCALING_LIST_64x64
&&
(
(
listId
%
3
)
!=
0
||
(
predListIdx
%
3
)
!=
0
))
||
(
sizeId
==
SCALING_LIST_2x2
&&
((
listId
%
3
)
==
0
||
(
predListIdx
%
3
)
==
0
)
))
continue
;
if
(
!::
memcmp
(
getScalingListAddress
(
sizeId
,
listId
),((
listId
==
predListIdx
)
?
getScalingListDefaultAddress
(
sizeId
,
predListIdx
)
:
getScalingListAddress
(
sizeId
,
predListIdx
)),
sizeof
(
int
)
*
std
::
min
(
MAX_MATRIX_COEF_NUM
,(
int
)
g_scalingListSize
[
sizeId
]))
// check value of matrix
...
...
source/Lib/CommonLib/Slice.h
View file @
9623538e
...
...
@@ -1467,7 +1467,7 @@ private:
bool
m_cabacInitFlag
;
#if JVET_O0105_ICT
_HHI
#if JVET_O0105_ICT
bool
m_jointCbCrSignFlag
;
#endif
...
...
@@ -1744,7 +1744,7 @@ public:
void
setCabacInitFlag
(
bool
val
)
{
m_cabacInitFlag
=
val
;
}
//!< set CABAC initial flag
bool
getCabacInitFlag
()
const
{
return
m_cabacInitFlag
;
}
//!< get CABAC initial flag
#if JVET_O0105_ICT
_HHI
#if JVET_O0105_ICT
void
setJointCbCrSignFlag
(
bool
b
)
{
m_jointCbCrSignFlag
=
b
;
}
bool
getJointCbCrSignFlag
()
const
{
return
m_jointCbCrSignFlag
;
}
#endif
...
...
source/Lib/CommonLib/TrQuant.cpp
View file @
9623538e
...
...
@@ -83,8 +83,8 @@ InvTrans *fastInvTrans[NUM_TRANS_TYPE][g_numTransformMatrixSizes] =
//! \ingroup CommonLib
//! \{
#if JVET_O0105_ICT
_HHI
int64_t
sq
r
(
int
d
)
{
return
d
*
d
;
}
#if JVET_O0105_ICT
int64_t
sq
uare
(
int
d
)
{
return
d
*
d
;
}
template
<
int
signedMode
>
std
::
pair
<
int64_t
,
int64_t
>
fwdTransformCbCr
(
const
PelBuf
&
resCb
,
const
PelBuf
&
resCr
,
PelBuf
&
resC1
,
PelBuf
&
resC2
)
{
...
...
@@ -102,37 +102,37 @@ template<int signedMode> std::pair<int64_t,int64_t> fwdTransformCbCr( const PelB
if
(
signedMode
==
1
)
{
c1
[
x
]
=
Pel
(
(
4
*
cbx
+
2
*
crx
)
/
5
);
d1
+=
sq
r
(
cbx
-
c1
[
x
]
)
+
sqr
(
crx
-
(
c1
[
x
]
>>
1
)
);
d1
+=
sq
uare
(
cbx
-
c1
[
x
]
)
+
square
(
crx
-
(
c1
[
x
]
>>
1
)
);
}
else
if
(
signedMode
==
-
1
)
{
c1
[
x
]
=
Pel
(
(
4
*
cbx
-
2
*
crx
)
/
5
);
d1
+=
sq
r
(
cbx
-
c1
[
x
]
)
+
sqr
(
crx
-
(
-
c1
[
x
]
>>
1
)
);
d1
+=
sq
uare
(
cbx
-
c1
[
x
]
)
+
square
(
crx
-
(
-
c1
[
x
]
>>
1
)
);
}
else
if
(
signedMode
==
2
)
{
c1
[
x
]
=
Pel
(
(
cbx
+
crx
)
/
2
);
d1
+=
sq
r
(
cbx
-
c1
[
x
]
)
+
sqr
(
crx
-
c1
[
x
]
);
d1
+=
sq
uare
(
cbx
-
c1
[
x
]
)
+
square
(
crx
-
c1
[
x
]
);
}
else
if
(
signedMode
==
-
2
)
{
c1
[
x
]
=
Pel
(
(
cbx
-
crx
)
/
2
);
d1
+=
sq
r
(
cbx
-
c1
[
x
]
)
+
sqr
(
crx
+
c1
[
x
]
);
d1
+=
sq
uare
(
cbx
-
c1
[
x
]
)
+
square
(
crx
+
c1
[
x
]
);
}
else
if
(
signedMode
==
3
)
{
c2
[
x
]
=
Pel
(
(
4
*
crx
+
2
*
cbx
)
/
5
);
d1
+=
sq
r
(
cbx
-
(
c2
[
x
]
>>
1
)
)
+
sqr
(
crx
-
c2
[
x
]
);
d1
+=
sq
uare
(
cbx
-
(
c2
[
x
]
>>
1
)
)
+
square
(
crx
-
c2
[
x
]
);
}
else
if
(
signedMode
==
-
3
)
{
c2
[
x
]
=
Pel
(
(
4
*
crx
-
2
*
cbx
)
/
5
);
d1
+=
sq
r
(
cbx
-
(
-
c2
[
x
]
>>
1
)
)
+
sqr
(
crx
-
c2
[
x
]
);
d1
+=
sq
uare
(
cbx
-
(
-
c2
[
x
]
>>
1
)
)
+
square
(
crx
-
c2
[
x
]
);
}
else
{
d1
+=
sq
r
(
cbx
);
d2
+=
sq
r
(
crx
);
d1
+=
sq
uare
(
cbx
);
d2
+=
sq
uare
(
crx
);
}
}
}
...
...
@@ -170,7 +170,7 @@ TrQuant::TrQuant() : m_quant( nullptr )
{
m_mtsCoeffs
[
i
]
=
(
TCoeff
*
)
xMalloc
(
TCoeff
,
MAX_CU_SIZE
*
MAX_CU_SIZE
);
}
#if JVET_O0105_ICT
_HHI
#if JVET_O0105_ICT
{
m_invICT
=
m_invICTMem
+
maxAbsIctMode
;
m_invICT
[
0
]
=
invTransformCbCr
<
0
>
;
...
...
@@ -650,7 +650,7 @@ void TrQuant::invRdpcmNxN(TransformUnit& tu, const ComponentID &compID, PelBuf &
}
}
#if JVET_O0105_ICT
_HHI
#if JVET_O0105_ICT
std
::
pair
<
int64_t
,
int64_t
>
TrQuant
::
fwdTransformICT
(
const
TransformUnit
&
tu
,
const
PelBuf
&
resCb
,
const
PelBuf
&
resCr
,
PelBuf
&
resC1
,
PelBuf
&
resC2
,
int
jointCbCr
)
{
...
...
@@ -670,7 +670,7 @@ std::vector<int> TrQuant::selectICTCandidates( const TransformUnit &tu, CompStor
{
CHECK
(
!
resCb
[
0
].
valid
()
||
!
resCr
[
0
].
valid
(),
"standard components are not valid"
);
#if JVET_O0543_ICT_
HHI_
ICU_ONLY
#if JVET_O0543_ICT_ICU_ONLY
if
(
!
CU
::
isIntra
(
*
tu
.
cu
)
)
{