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
7341c1e7
Commit
7341c1e7
authored
Jan 27, 2019
by
Yu Han
Committed by
Frank Bossen
Jan 27, 2019
Browse files
M0483 change cpr to ibc tmp
parent
02116053
Changes
44
Hide whitespace changes
Inline
Side-by-side
cfg/encoder_intra_vtm.cfg
View file @
7341c1e7
...
...
@@ -111,7 +111,7 @@ LMChroma : 1 # use CCLM only
DepQuant : 1
IMV : 2
ALF : 1
CPR
: 0 # turned off in CTC
IBC
: 0 # turned off in CTC
# Fast tools
PBIntraFast : 1
...
...
cfg/encoder_lowdelay_P_vtm.cfg
View file @
7341c1e7
...
...
@@ -128,7 +128,7 @@ DepQuant : 1
IMV : 2
ALF : 1
MHIntra : 1
CPR
: 0 # turned off in CTC
IBC
: 0 # turned off in CTC
# Fast tools
PBIntraFast : 1
...
...
cfg/encoder_lowdelay_vtm.cfg
View file @
7341c1e7
...
...
@@ -131,7 +131,7 @@ GBi : 1
GBiFast : 1
MHIntra : 1
Triangle : 1
CPR
: 0 # turned off in CTC
IBC
: 0 # turned off in CTC
# Fast tools
PBIntraFast : 1
...
...
cfg/encoder_randomaccess_vtm.cfg
View file @
7341c1e7
...
...
@@ -146,7 +146,7 @@ GBiFast : 1
BIO : 1
MHIntra : 1
Triangle : 1
CPR
: 0 # turned off in CTC
IBC
: 0 # turned off in CTC
# Fast tools
PBIntraFast : 1
...
...
source/App/EncoderApp/EncApp.cpp
View file @
7341c1e7
...
...
@@ -258,13 +258,13 @@ void EncApp::xInitLibCfg()
m_cEncLib
.
setUseMHIntra
(
m_MHIntra
);
m_cEncLib
.
setUseTriangle
(
m_Triangle
);
m_cEncLib
.
set
CPR
Mode
(
m_
CPR
Mode
);
m_cEncLib
.
set
CPR
LocalSearchRangeX
(
m_
CPR
LocalSearchRangeX
);
m_cEncLib
.
set
CPR
LocalSearchRangeY
(
m_
CPR
LocalSearchRangeY
);
m_cEncLib
.
set
CPR
HashSearch
(
m_
CPR
HashSearch
);
m_cEncLib
.
set
CPR
HashSearchMaxCand
(
m_
CPR
HashSearchMaxCand
);
m_cEncLib
.
set
CPR
HashSearchRange4SmallBlk
(
m_
CPR
HashSearchRange4SmallBlk
);
m_cEncLib
.
set
CPR
FastMethod
(
m_
CPR
FastMethod
);
m_cEncLib
.
set
IBC
Mode
(
m_
IBC
Mode
);
m_cEncLib
.
set
IBC
LocalSearchRangeX
(
m_
IBC
LocalSearchRangeX
);
m_cEncLib
.
set
IBC
LocalSearchRangeY
(
m_
IBC
LocalSearchRangeY
);
m_cEncLib
.
set
IBC
HashSearch
(
m_
IBC
HashSearch
);
m_cEncLib
.
set
IBC
HashSearchMaxCand
(
m_
IBC
HashSearchMaxCand
);
m_cEncLib
.
set
IBC
HashSearchRange4SmallBlk
(
m_
IBC
HashSearchRange4SmallBlk
);
m_cEncLib
.
set
IBC
FastMethod
(
m_
IBC
FastMethod
);
m_cEncLib
.
setUseWrapAround
(
m_wrapAround
);
m_cEncLib
.
setWrapAroundOffset
(
m_wrapAroundOffset
);
...
...
source/App/EncoderApp/EncAppCfg.cpp
View file @
7341c1e7
...
...
@@ -865,13 +865,13 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] )
(
"MHIntra"
,
m_MHIntra
,
false
,
"Enable MHIntra mode"
)
(
"Triangle"
,
m_Triangle
,
false
,
"Enable triangular shape motion vector prediction (0:off, 1:on)"
)
(
"
CPR
"
,
m_
CPR
Mode
,
0u
,
"
CPR
Mode (0x1:enabled, 0x0:disabled) [default: disabled]"
)
(
"
CPR
LocalSearchRangeX"
,
m_
CPR
LocalSearchRangeX
,
128u
,
"Search range of
CPR
local search in x direction"
)
(
"
CPR
LocalSearchRangeY"
,
m_
CPR
LocalSearchRangeY
,
128u
,
"Search range of
CPR
local search in y direction"
)
(
"
CPR
HashSearch"
,
m_
CPR
HashSearch
,
1u
,
"Hash based
CPR
search"
)
(
"
CPR
HashSearchMaxCand"
,
m_
CPR
HashSearchMaxCand
,
256u
,
"Max candidates for hash based
CPR
search"
)
(
"
CPR
HashSearchRange4SmallBlk"
,
m_
CPR
HashSearchRange4SmallBlk
,
256u
,
"Small block search range in based
CPR
search"
)
(
"
CPR
FastMethod"
,
m_
CPR
FastMethod
,
6u
,
"Fast methods for
CPR
"
)
(
"
IBC
"
,
m_
IBC
Mode
,
0u
,
"
IBC
Mode (0x1:enabled, 0x0:disabled) [default: disabled]"
)
(
"
IBC
LocalSearchRangeX"
,
m_
IBC
LocalSearchRangeX
,
128u
,
"Search range of
IBC
local search in x direction"
)
(
"
IBC
LocalSearchRangeY"
,
m_
IBC
LocalSearchRangeY
,
128u
,
"Search range of
IBC
local search in y direction"
)
(
"
IBC
HashSearch"
,
m_
IBC
HashSearch
,
1u
,
"Hash based
IBC
search"
)
(
"
IBC
HashSearchMaxCand"
,
m_
IBC
HashSearchMaxCand
,
256u
,
"Max candidates for hash based
IBC
search"
)
(
"
IBC
HashSearchRange4SmallBlk"
,
m_
IBC
HashSearchRange4SmallBlk
,
256u
,
"Small block search range in based
IBC
search"
)
(
"
IBC
FastMethod"
,
m_
IBC
FastMethod
,
6u
,
"Fast methods for
IBC
"
)
(
"WrapAround"
,
m_wrapAround
,
false
,
"Enable horizontal wrap-around motion compensation for inter prediction (0:off, 1:on) [default: off]"
)
(
"WrapAroundOffset"
,
m_wrapAroundOffset
,
0u
,
"Offset in luma samples used for computing the horizontal wrap-around position"
)
...
...
@@ -1934,7 +1934,7 @@ bool EncAppCfg::xCheckParameter()
xConfirmPara
(
m_DisableMotionCompression
,
"Disable motion data compression only allowed with NEXT profile"
);
xConfirmPara
(
m_MTT
,
"Multi type tree is only allowed with NEXT profile"
);
xConfirmPara
(
m_ImvMode
,
"IMV is only allowed with NEXT profile"
);
xConfirmPara
(
m_
CPR
Mode
,
"
CPR
Mode only allowed with NEXT profile"
);
xConfirmPara
(
m_
IBC
Mode
,
"
IBC
Mode only allowed with NEXT profile"
);
xConfirmPara
(
m_useFastLCTU
,
"Fast large CTU can only be applied when encoding with NEXT profile"
);
#if JVET_M0464_UNI_MTS
xConfirmPara
(
m_MTS
,
"MTS only allowed with NEXT profile"
);
...
...
@@ -3146,7 +3146,7 @@ void EncAppCfg::xPrintParameter()
msg
(
VERBOSE
,
"MHIntra:%d "
,
m_MHIntra
);
msg
(
VERBOSE
,
"Triangle:%d "
,
m_Triangle
);
}
msg
(
VERBOSE
,
"
CPR
:%d "
,
m_
CPR
Mode
);
msg
(
VERBOSE
,
"
IBC
:%d "
,
m_
IBC
Mode
);
msg
(
VERBOSE
,
"WrapAround:%d "
,
m_wrapAround
);
if
(
m_wrapAround
)
{
...
...
source/App/EncoderApp/EncAppCfg.h
View file @
7341c1e7
...
...
@@ -239,13 +239,13 @@ protected:
bool
m_Triangle
;
unsigned
m_
CPR
Mode
;
unsigned
m_
CPR
LocalSearchRangeX
;
unsigned
m_
CPR
LocalSearchRangeY
;
unsigned
m_
CPR
HashSearch
;
unsigned
m_
CPR
HashSearchMaxCand
;
unsigned
m_
CPR
HashSearchRange4SmallBlk
;
unsigned
m_
CPR
FastMethod
;
unsigned
m_
IBC
Mode
;
unsigned
m_
IBC
LocalSearchRangeX
;
unsigned
m_
IBC
LocalSearchRangeY
;
unsigned
m_
IBC
HashSearch
;
unsigned
m_
IBC
HashSearchMaxCand
;
unsigned
m_
IBC
HashSearchRange4SmallBlk
;
unsigned
m_
IBC
FastMethod
;
bool
m_wrapAround
;
unsigned
m_wrapAroundOffset
;
...
...
source/Lib/CommonLib/CodingStructure.cpp
View file @
7341c1e7
...
...
@@ -1299,7 +1299,7 @@ const TransformUnit* CodingStructure::getTURestricted( const Position &pos, cons
}
}
Cpr
LumaCoverage
CodingStructure
::
get
Cpr
LumaCoverage
(
const
CompArea
&
chromaArea
)
const
Ibc
LumaCoverage
CodingStructure
::
get
Ibc
LumaCoverage
(
const
CompArea
&
chromaArea
)
const
{
CHECK
(
chType
!=
CHANNEL_TYPE_CHROMA
,
"Error"
);
...
...
@@ -1307,7 +1307,7 @@ CprLumaCoverage CodingStructure::getCprLumaCoverage(const CompArea& chromaArea)
CompArea
lumaArea
=
CompArea
(
COMPONENT_Y
,
chromaArea
.
chromaFormat
,
chromaArea
.
lumaPos
(),
recalcSize
(
chromaArea
.
chromaFormat
,
CHANNEL_TYPE_CHROMA
,
CHANNEL_TYPE_LUMA
,
chromaArea
.
size
()));
lumaArea
=
clipArea
(
lumaArea
,
picture
->
block
(
COMPONENT_Y
));
const
unsigned
int
fullArea
=
lumaArea
.
area
();
unsigned
int
cpr
Area
=
0
;
unsigned
int
ibc
Area
=
0
;
for
(
SizeType
y
=
0
;
y
<
lumaArea
.
height
;
y
+=
MIN_PU_SIZE
)
{
for
(
SizeType
x
=
0
;
x
<
lumaArea
.
width
;
x
+=
MIN_PU_SIZE
)
...
...
@@ -1315,19 +1315,19 @@ CprLumaCoverage CodingStructure::getCprLumaCoverage(const CompArea& chromaArea)
Position
pos
=
lumaArea
.
offset
(
x
,
y
);
if
(
picture
->
cs
->
getMotionInfo
(
pos
).
isInter
)
// need to change if inter slice allows dualtree
{
cpr
Area
+=
unitAreaSubBlock
;
ibc
Area
+=
unitAreaSubBlock
;
}
}
}
Cpr
LumaCoverage
coverage
=
CPR
_LUMA_COVERAGE_FULL
;
if
(
cpr
Area
==
0
)
Ibc
LumaCoverage
coverage
=
IBC
_LUMA_COVERAGE_FULL
;
if
(
ibc
Area
==
0
)
{
coverage
=
CPR
_LUMA_COVERAGE_NONE
;
coverage
=
IBC
_LUMA_COVERAGE_NONE
;
}
else
if
(
cpr
Area
<
fullArea
)
else
if
(
ibc
Area
<
fullArea
)
{
coverage
=
CPR
_LUMA_COVERAGE_PARTIAL
;
coverage
=
IBC
_LUMA_COVERAGE_PARTIAL
;
}
return
coverage
;
...
...
source/Lib/CommonLib/CodingStructure.h
View file @
7341c1e7
...
...
@@ -58,12 +58,12 @@ enum PictureType
PIC_ORG_RESI
,
NUM_PIC_TYPES
};
enum
Cpr
LumaCoverage
enum
Ibc
LumaCoverage
{
CPR
_LUMA_COVERAGE_FULL
=
0
,
CPR
_LUMA_COVERAGE_PARTIAL
,
CPR
_LUMA_COVERAGE_NONE
,
NUM_
CPR
_LUMA_COVERAGE
,
IBC
_LUMA_COVERAGE_FULL
=
0
,
IBC
_LUMA_COVERAGE_PARTIAL
,
IBC
_LUMA_COVERAGE_NONE
,
NUM_
IBC
_LUMA_COVERAGE
,
};
extern
XUCache
g_globalUnitCache
;
...
...
@@ -154,7 +154,7 @@ public:
cCUTraverser
traverseCUs
(
const
UnitArea
&
_unit
,
const
ChannelType
_chType
)
const
;
cPUTraverser
traversePUs
(
const
UnitArea
&
_unit
,
const
ChannelType
_chType
)
const
;
cTUTraverser
traverseTUs
(
const
UnitArea
&
_unit
,
const
ChannelType
_chType
)
const
;
Cpr
LumaCoverage
get
Cpr
LumaCoverage
(
const
CompArea
&
chromaArea
)
const
;
Ibc
LumaCoverage
get
Ibc
LumaCoverage
(
const
CompArea
&
chromaArea
)
const
;
// ---------------------------------------------------------------------------
// encoding search utilities
// ---------------------------------------------------------------------------
...
...
source/Lib/CommonLib/CommonDef.h
View file @
7341c1e7
...
...
@@ -396,12 +396,12 @@ static const int TRIANGLE_MAX_NUM_CANDS = 40;
static
const
int
TRIANGLE_MAX_NUM_SATD_CANDS
=
3
;
static
const
int
TRIANGLE_MIN_SIZE
=
8
*
8
;
static
const
int
CPR
_MAX_CAND_SIZE
=
16
;
// max block size for
cpr
search
static
const
int
CPR
_NUM_CANDIDATES
=
64
;
///< Maximum number of candidates to store/test
static
const
int
IBC
_MAX_CAND_SIZE
=
16
;
// max block size for
ibc
search
static
const
int
IBC
_NUM_CANDIDATES
=
64
;
///< Maximum number of candidates to store/test
static
const
int
CHROMA_REFINEMENT_CANDIDATES
=
8
;
/// 8 candidates BV to choose from
static
const
int
CPR
_FAST_METHOD_NOINTRA_
CPR
CBF0
=
0x01
;
static
const
int
CPR
_FAST_METHOD_BUFFERBV
=
0X02
;
static
const
int
CPR
_FAST_METHOD_ADAPTIVE_SEARCHRANGE
=
0X04
;
static
const
int
IBC
_FAST_METHOD_NOINTRA_
IBC
CBF0
=
0x01
;
static
const
int
IBC
_FAST_METHOD_BUFFERBV
=
0X02
;
static
const
int
IBC
_FAST_METHOD_ADAPTIVE_SEARCHRANGE
=
0X04
;
// ====================================================================================================================
// Macro functions
...
...
source/Lib/CommonLib/ContextModelling.cpp
View file @
7341c1e7
...
...
@@ -472,7 +472,7 @@ void MergeCtx::setMergeInfo( PredictionUnit& pu, int candIdx )
pu
.
mvpNum
[
REF_PIC_LIST_1
]
=
NOT_VALID
;
if
(
interDirNeighbours
[
candIdx
]
==
1
&&
pu
.
cs
->
slice
->
getRefPic
(
REF_PIC_LIST_0
,
mvFieldNeighbours
[
candIdx
<<
1
].
refIdx
)
->
getPOC
()
==
pu
.
cs
->
slice
->
getPOC
())
{
pu
.
cu
->
cpr
=
true
;
pu
.
cu
->
ibc
=
true
;
pu
.
bv
=
pu
.
mv
[
REF_PIC_LIST_0
];
pu
.
bv
.
changePrecision
(
MV_PRECISION_INTERNAL
,
MV_PRECISION_INT
);
// used for only integer resolution
}
...
...
source/Lib/CommonLib/
Cpr
HashMap.cpp
→
source/Lib/CommonLib/
Ibc
HashMap.cpp
View file @
7341c1e7
...
...
@@ -31,46 +31,46 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
/** \file
Cpr
HashMap.cpp
\brief
CPR
hash map encoder class
/** \file
Ibc
HashMap.cpp
\brief
IBC
hash map encoder class
*/
#include "CommonLib/dtrace_codingstruct.h"
#include "CommonLib/Picture.h"
#include "CommonLib/UnitTools.h"
#include "
Cpr
HashMap.h"
#include "
Ibc
HashMap.h"
using
namespace
std
;
//! \ingroup
Cpr
HashMap
//! \ingroup
Ibc
HashMap
//! \{
// ====================================================================================================================
// Constructor / destructor / create / destroy
// ====================================================================================================================
Cpr
HashMap
::
Cpr
HashMap
()
Ibc
HashMap
::
Ibc
HashMap
()
{
m_picWidth
=
0
;
m_picHeight
=
0
;
m_pos2Hash
=
NULL
;
m_computeCrc32c
=
xxComputeCrc32c16bit
;
#if ENABLE_SIMD_OPT_
CPR
#if ENABLE_SIMD_OPT_
IBC
#ifdef TARGET_SIMD_X86
init
Cpr
HashMapX86
();
init
Ibc
HashMapX86
();
#endif
#endif
}
Cpr
HashMap
::~
Cpr
HashMap
()
Ibc
HashMap
::~
Ibc
HashMap
()
{
destroy
();
}
void
Cpr
HashMap
::
init
(
const
int
picWidth
,
const
int
picHeight
)
void
Ibc
HashMap
::
init
(
const
int
picWidth
,
const
int
picHeight
)
{
if
(
picWidth
!=
m_picWidth
||
picHeight
!=
m_picHeight
)
{
...
...
@@ -87,7 +87,7 @@ void CprHashMap::init(const int picWidth, const int picHeight)
}
}
void
Cpr
HashMap
::
destroy
()
void
Ibc
HashMap
::
destroy
()
{
if
(
m_pos2Hash
!=
NULL
)
{
...
...
@@ -168,7 +168,7 @@ static const uint32_t crc32Table[256] = {
0xBE2DA0A5L
,
0x4C4623A6L
,
0x5F16D052L
,
0xAD7D5351L
};
uint32_t
Cpr
HashMap
::
xxComputeCrc32c16bit
(
uint32_t
crc
,
const
Pel
pel
)
uint32_t
Ibc
HashMap
::
xxComputeCrc32c16bit
(
uint32_t
crc
,
const
Pel
pel
)
{
const
void
*
buf
=
&
pel
;
const
uint8_t
*
p
=
(
const
uint8_t
*
)
buf
;
...
...
@@ -184,7 +184,7 @@ uint32_t CprHashMap::xxComputeCrc32c16bit(uint32_t crc, const Pel pel)
// CRC calculation in C code
////////////////////////////////////////////////////////
unsigned
int
Cpr
HashMap
::
xxCalcBlockHash
(
const
Pel
*
pel
,
const
int
stride
,
const
int
width
,
const
int
height
,
unsigned
int
crc
)
unsigned
int
Ibc
HashMap
::
xxCalcBlockHash
(
const
Pel
*
pel
,
const
int
stride
,
const
int
width
,
const
int
height
,
unsigned
int
crc
)
{
for
(
int
y
=
0
;
y
<
height
;
y
++
)
{
...
...
@@ -198,7 +198,7 @@ unsigned int CprHashMap::xxCalcBlockHash(const Pel* pel, const int stride, const
}
template
<
ChromaFormat
chromaFormat
>
void
Cpr
HashMap
::
xxBuildPicHashMap
(
const
PelUnitBuf
&
pic
)
void
Ibc
HashMap
::
xxBuildPicHashMap
(
const
PelUnitBuf
&
pic
)
{
const
int
chromaScalingX
=
getChannelTypeScaleX
(
CHANNEL_TYPE_CHROMA
,
chromaFormat
);
const
int
chromaScalingY
=
getChannelTypeScaleY
(
CHANNEL_TYPE_CHROMA
,
chromaFormat
);
...
...
@@ -243,7 +243,7 @@ void CprHashMap::xxBuildPicHashMap(const PelUnitBuf& pic)
}
}
void
Cpr
HashMap
::
rebuildPicHashMap
(
const
PelUnitBuf
&
pic
)
void
Ibc
HashMap
::
rebuildPicHashMap
(
const
PelUnitBuf
&
pic
)
{
m_hash2Pos
.
clear
();
...
...
@@ -267,7 +267,7 @@ void CprHashMap::rebuildPicHashMap(const PelUnitBuf& pic)
}
}
bool
Cpr
HashMap
::
cpr
HashMatch
(
const
Area
&
lumaArea
,
std
::
vector
<
Position
>&
cand
,
const
CodingStructure
&
cs
,
const
int
maxCand
,
const
int
searchRange4SmallBlk
)
bool
Ibc
HashMap
::
ibc
HashMatch
(
const
Area
&
lumaArea
,
std
::
vector
<
Position
>&
cand
,
const
CodingStructure
&
cs
,
const
int
maxCand
,
const
int
searchRange4SmallBlk
)
{
cand
.
clear
();
...
...
@@ -332,7 +332,7 @@ bool CprHashMap::cprHashMatch(const Area& lumaArea, std::vector<Position>& cand,
return
cand
.
size
()
>
0
;
}
int
Cpr
HashMap
::
getHashHitRatio
(
const
Area
&
lumaArea
)
int
Ibc
HashMap
::
getHashHitRatio
(
const
Area
&
lumaArea
)
{
int
maxX
=
std
::
min
((
int
)(
lumaArea
.
x
+
lumaArea
.
width
),
m_picWidth
);
int
maxY
=
std
::
min
((
int
)(
lumaArea
.
y
+
lumaArea
.
height
),
m_picHeight
);
...
...
source/Lib/CommonLib/
Cpr
HashMap.h
→
source/Lib/CommonLib/
Ibc
HashMap.h
View file @
7341c1e7
...
...
@@ -31,12 +31,12 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
/** \file
Cpr
HashMap.h
\brief
CPR
hash map encoder class (header)
/** \file
Ibc
HashMap.h
\brief
IBC
hash map encoder class (header)
*/
#ifndef __
CPR
HASHMAP__
#define __
CPR
HASHMAP__
#ifndef __
IBC
HASHMAP__
#define __
IBC
HASHMAP__
// Include files
#include "CommonLib/CommonDef.h"
...
...
@@ -55,7 +55,7 @@
// Class definition
// ====================================================================================================================
class
Cpr
HashMap
class
Ibc
HashMap
{
private:
int
m_picWidth
;
...
...
@@ -73,23 +73,23 @@ private:
public:
uint32_t
(
*
m_computeCrc32c
)
(
uint32_t
crc
,
const
Pel
pel
);
Cpr
HashMap
();
virtual
~
Cpr
HashMap
();
Ibc
HashMap
();
virtual
~
Ibc
HashMap
();
void
init
(
const
int
picWidth
,
const
int
picHeight
);
void
destroy
();
void
rebuildPicHashMap
(
const
PelUnitBuf
&
pic
);
bool
cpr
HashMatch
(
const
Area
&
lumaArea
,
std
::
vector
<
Position
>&
cand
,
const
CodingStructure
&
cs
,
const
int
maxCand
,
const
int
searchRange4SmallBlk
);
bool
ibc
HashMatch
(
const
Area
&
lumaArea
,
std
::
vector
<
Position
>&
cand
,
const
CodingStructure
&
cs
,
const
int
maxCand
,
const
int
searchRange4SmallBlk
);
int
getHashHitRatio
(
const
Area
&
lumaArea
);
#ifdef TARGET_SIMD_X86
void
init
Cpr
HashMapX86
();
void
init
Ibc
HashMapX86
();
template
<
X86_VEXT
vext
>
void
_init
Cpr
HashMapX86
();
void
_init
Ibc
HashMapX86
();
#endif
};
//! \}
#endif // __
CPR
HASHMAP__
#endif // __
IBC
HASHMAP__
source/Lib/CommonLib/InterPrediction.cpp
View file @
7341c1e7
...
...
@@ -374,10 +374,10 @@ void InterPrediction::xPredInterUni(const PredictionUnit& pu, const RefPicList&
int
iRefIdx
=
pu
.
refIdx
[
eRefPicList
];
Mv
mv
[
3
];
bool
is
CPR
=
false
;
bool
is
IBC
=
false
;
if
(
pu
.
cs
->
slice
->
getRefPic
(
eRefPicList
,
iRefIdx
)
->
getPOC
()
==
pu
.
cs
->
slice
->
getPOC
())
{
is
CPR
=
true
;
is
IBC
=
true
;
}
if
(
pu
.
cu
->
affine
)
{
...
...
@@ -413,7 +413,7 @@ void InterPrediction::xPredInterUni(const PredictionUnit& pu, const RefPicList&
{
xPredInterBlk
(
compID
,
pu
,
pu
.
cu
->
slice
->
getRefPic
(
eRefPicList
,
iRefIdx
),
mv
[
0
],
pcYuvPred
,
bi
,
pu
.
cu
->
slice
->
clpRng
(
compID
)
,
bioApplied
,
is
CPR
,
is
IBC
);
}
...
...
@@ -524,7 +524,7 @@ void InterPrediction::xPredInterBi(PredictionUnit& pu, PelUnitBuf &pcYuvPred)
void
InterPrediction
::
xPredInterBlk
(
const
ComponentID
&
compID
,
const
PredictionUnit
&
pu
,
const
Picture
*
refPic
,
const
Mv
&
_mv
,
PelUnitBuf
&
dstPic
,
const
bool
&
bi
,
const
ClpRng
&
clpRng
,
const
bool
&
bioApplied
,
bool
is
CPR
,
bool
is
IBC
)
{
JVET_J0090_SET_REF_PICTURE
(
refPic
,
compID
);
...
...
@@ -536,7 +536,7 @@ void InterPrediction::xPredInterBlk ( const ComponentID& compID, const Predictio
int
xFrac
=
_mv
.
hor
&
((
1
<<
shiftHor
)
-
1
);
int
yFrac
=
_mv
.
ver
&
((
1
<<
shiftVer
)
-
1
);
if
(
is
CPR
)
if
(
is
IBC
)
{
xFrac
=
yFrac
=
0
;
JVET_J0090_SET_CACHE_ENABLE
(
false
);
...
...
@@ -1077,7 +1077,7 @@ void InterPrediction::motionCompensation( PredictionUnit &pu, PelUnitBuf &predBu
,
const
bool
luma
,
const
bool
chroma
)
{
// dual tree handling for
CPR
as the only ref
// dual tree handling for
IBC
as the only ref
if
(
!
luma
||
!
chroma
)
{
if
(
!
luma
&&
chroma
)
...
...
@@ -1118,7 +1118,7 @@ void InterPrediction::motionCompensation( PredictionUnit &pu, PelUnitBuf &predBu
}
else
{
if
(
pu
.
mergeType
!=
MRG_TYPE_DEFAULT_N
&&
pu
.
mergeType
!=
MRG_TYPE_
CPR
)
if
(
pu
.
mergeType
!=
MRG_TYPE_DEFAULT_N
&&
pu
.
mergeType
!=
MRG_TYPE_
IBC
)
{
xSubPuMC
(
pu
,
predBuf
,
eRefPicList
);
}
...
...
source/Lib/CommonLib/InterPrediction.h
View file @
7341c1e7
...
...
@@ -110,7 +110,7 @@ protected:
void
xPredInterBi
(
PredictionUnit
&
pu
,
PelUnitBuf
&
pcYuvPred
);
void
xPredInterBlk
(
const
ComponentID
&
compID
,
const
PredictionUnit
&
pu
,
const
Picture
*
refPic
,
const
Mv
&
_mv
,
PelUnitBuf
&
dstPic
,
const
bool
&
bi
,
const
ClpRng
&
clpRng
,
const
bool
&
bioApplied
,
bool
is
CPR
,
bool
is
IBC
);
void
xAddBIOAvg4
(
const
Pel
*
src0
,
int
src0Stride
,
const
Pel
*
src1
,
int
src1Stride
,
Pel
*
dst
,
int
dstStride
,
const
Pel
*
gradX0
,
const
Pel
*
gradX1
,
const
Pel
*
gradY0
,
const
Pel
*
gradY1
,
int
gradStride
,
int
width
,
int
height
,
int
tmpx
,
int
tmpy
,
int
shift
,
int
offset
,
const
ClpRng
&
clpRng
);
...
...
source/Lib/CommonLib/RdCost.h
View file @
7341c1e7
...
...
@@ -118,7 +118,7 @@ private:
double
m_motionLambda
;
int
m_iCostScale
;
double
m_dCost
;
// for
cpr
double
m_dCost
;
// for
ibc
public:
RdCost
();
virtual
~
RdCost
();
...
...
@@ -162,7 +162,7 @@ public:
}
void
setCostScale
(
int
iCostScale
)
{
m_iCostScale
=
iCostScale
;
}
Distortion
getCost
(
uint32_t
b
)
{
return
Distortion
(
m_motionLambda
*
b
);
}
// for
cpr
// for
ibc
void
getMotionCost
(
int
add
,
bool
isTransquantBypass
)
{
m_dCost
=
m_dLambdaMotionSAD
[(
isTransquantBypass
&&
m_costMode
==
COST_MIXED_LOSSLESS_LOSSY_CODING
)
?
1
:
0
]
+
add
;
}
void
setPredictors
(
Mv
*
pcMv
)
...
...
source/Lib/CommonLib/Slice.cpp
View file @
7341c1e7
...
...
@@ -432,7 +432,7 @@ void Slice::setRefPicList( PicList& rcListPic, bool checkNumPocTotalCurr, bool b
pcRefPic
=
xGetLongTermRefPic
(
rcListPic
,
m_pRPS
->
getPOC
(
i
),
m_pRPS
->
getCheckLTMSBPresent
(
i
));
}
}
if
(
getSPS
()
->
getSpsNext
().
get
CPR
Mode
())
if
(
getSPS
()
->
getSpsNext
().
get
IBC
Mode
())
{
RefPicSetLtCurr
[
NumPicLtCurr
]
=
getPic
();
//getPic()->setIsLongTerm(true);
...
...
@@ -451,7 +451,7 @@ void Slice::setRefPicList( PicList& rcListPic, bool checkNumPocTotalCurr, bool b
// - Otherwise, when the current picture contains a P or B slice, the value of NumPocTotalCurr shall not be equal to 0.
if
(
getRapPicFlag
())
{
if
(
getSPS
()
->
getSpsNext
().
get
CPR
Mode
())
if
(
getSPS
()
->
getSpsNext
().
get
IBC
Mode
())
{
CHECK
(
numPicTotalCurr
!=
1
,
"Invalid state"
);
}
...
...
@@ -526,7 +526,7 @@ void Slice::setRefPicList( PicList& rcListPic, bool checkNumPocTotalCurr, bool b
m_bIsUsedAsLongTerm
[
REF_PIC_LIST_1
][
rIdx
]
=
(
cIdx
>=
NumPicStCurr0
+
NumPicStCurr1
);
}
}
if
(
getSPS
()
->
getSpsNext
().
get
CPR
Mode
())
if
(
getSPS
()
->
getSpsNext
().
get
IBC
Mode
())
{
m_apcRefPicList
[
REF_PIC_LIST_0
][
m_aiNumRefIdx
[
REF_PIC_LIST_0
]
-
1
]
=
getPic
();
m_bIsUsedAsLongTerm
[
REF_PIC_LIST_0
][
m_aiNumRefIdx
[
REF_PIC_LIST_0
]
-
1
]
=
true
;
...
...
@@ -561,7 +561,7 @@ int Slice::getNumRpsCurrTempList() const
numRpsCurrTempList
++
;
}
}
if
(
getSPS
()
->
getSpsNext
().
get
CPR
Mode
())
if
(
getSPS
()
->
getSpsNext
().
get
IBC
Mode
())
{
return
numRpsCurrTempList
+
1
;
}
...
...
@@ -1781,7 +1781,7 @@ SPSNext::SPSNext( SPS& sps )
,
m_ImvMode
(
IMV_OFF
)
,
m_MTTMode
(
0
)
,
m_compositeRefEnabled
(
false
)
,
m_
CPR
Mode
(
0
)
,
m_
IBC
Mode
(
0
)
// ADD_NEW_TOOL : (sps extension) add tool enabling flags here (with "false" as default values)
{
}
...
...
source/Lib/CommonLib/Slice.h
View file @
7341c1e7
...
...
@@ -842,7 +842,7 @@ private:
unsigned
m_MTTMode
;
bool
m_compositeRefEnabled
;
//composite longterm reference
unsigned
m_
CPR
Mode
;
unsigned
m_
IBC
Mode
;
public:
SPSNext
(
SPS
&
sps
);
...
...
@@ -914,8 +914,8 @@ public:
bool
getUseMHIntra
()
const
{
return
m_MHIntra
;
}
void
setUseTriangle
(
bool
b
)
{
m_Triangle
=
b
;
}
bool
getUseTriangle
()
const
{
return
m_Triangle
;
}
void
set
CPR
Mode
(
unsigned
CPR
Mode
)
{
m_
CPR
Mode
=
CPR
Mode
;
}
unsigned
get
CPR
Mode
()
const
{
return
m_
CPR
Mode
;
}
void
set
IBC
Mode
(
unsigned
IBC
Mode
)
{
m_
IBC
Mode
=
IBC
Mode
;
}
unsigned
get
IBC
Mode
()
const
{
return
m_
IBC
Mode
;
}
};
...
...
source/Lib/CommonLib/TypeDef.h
View file @
7341c1e7
...
...
@@ -60,7 +60,7 @@
#define JVET_M0502_PRED_MODE_CTX 1
#define JVET_M0407_
CPR
_RANGE 1 // extend
CPR
search range to some part of left CTU
#define JVET_M0407_
IBC
_RANGE 1 // extend
IBC
search range to some part of left CTU
#define JVET_M0464_UNI_MTS 1
#define JVET_M0068_M0171_MMVD_CLEANUP 1 // MMVD cleanup with 1) flip removal, 2) L1 zero vector fix, 3) bi-pred restriction after merge/MMVD
...
...
@@ -867,7 +867,7 @@ enum MergeType
{
MRG_TYPE_DEFAULT_N
=
0
,
// 0
MRG_TYPE_SUBPU_ATMVP
,
MRG_TYPE_
CPR
,
MRG_TYPE_
IBC
,
NUM_MRG_TYPE
// 5
};
...
...
source/Lib/CommonLib/Unit.cpp
View file @
7341c1e7
...
...
@@ -272,7 +272,7 @@ CodingUnit& CodingUnit::operator=( const CodingUnit& other )
GBiIdx
=
other
.
GBiIdx
;
for
(
int
i
=
0
;
i
<
2
;
i
++
)
refIdxBi
[
i
]
=
other
.
refIdxBi
[
i
];
cpr
=
other
.
cpr
;
ibc
=
other
.
ibc
;
#if JVET_M0444_SMVD
smvdMode
=
other
.
smvdMode
;
#endif
...
...
@@ -309,7 +309,7 @@ void CodingUnit::initData()
GBiIdx
=
GBI_DEFAULT
;
for
(
int
i
=
0
;
i
<
2
;
i
++
)
refIdxBi
[
i
]
=
-
1
;
cpr
=
false
;
ibc
=
false
;
#if JVET_M0444_SMVD
smvdMode
=
0
;
#endif
...
...
Prev
1
2
3
Next
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