Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
V
VVCSoftware_VTM
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
14
Merge Requests
14
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
jvet
VVCSoftware_VTM
Commits
56e946b2
Commit
56e946b2
authored
Apr 02, 2019
by
Semih Esenlik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
JVET-N0178
CE9-2
.4 implicit BDOF split
parent
987cb4bd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
89 additions
and
0 deletions
+89
-0
source/Lib/CommonLib/InterPrediction.cpp
source/Lib/CommonLib/InterPrediction.cpp
+86
-0
source/Lib/CommonLib/InterPrediction.h
source/Lib/CommonLib/InterPrediction.h
+3
-0
No files found.
source/Lib/CommonLib/InterPrediction.cpp
View file @
56e946b2
...
...
@@ -366,7 +366,50 @@ void InterPrediction::xSubPuMC( PredictionUnit& pu, PelUnitBuf& predBuf, const R
pu
.
cu
->
affine
=
isAffine
;
}
#if JVET_N0178_IMPLICIT_BDOF_SPLIT
void
InterPrediction
::
xSubPuBio
(
PredictionUnit
&
pu
,
PelUnitBuf
&
predBuf
,
const
RefPicList
&
eRefPicList
/*= REF_PIC_LIST_X*/
)
{
// compute the location of the current PU
Position
puPos
=
pu
.
lumaPos
();
Size
puSize
=
pu
.
lumaSize
();
PredictionUnit
subPu
;
subPu
.
cs
=
pu
.
cs
;
subPu
.
cu
=
pu
.
cu
;
subPu
.
mergeType
=
pu
.
mergeType
;
subPu
.
mmvdMergeFlag
=
pu
.
mmvdMergeFlag
;
subPu
.
mmvdEncOptMode
=
pu
.
mmvdEncOptMode
;
subPu
.
mergeFlag
=
pu
.
mergeFlag
;
subPu
.
mvRefine
=
pu
.
mvRefine
;
subPu
.
refIdx
[
0
]
=
pu
.
refIdx
[
0
];
subPu
.
refIdx
[
1
]
=
pu
.
refIdx
[
1
];
int
fstStart
=
puPos
.
y
;
int
secStart
=
puPos
.
x
;
int
fstEnd
=
puPos
.
y
+
puSize
.
height
;
int
secEnd
=
puPos
.
x
+
puSize
.
width
;
int
fstStep
=
std
::
min
((
int
)
MAX_BDOF_APPLICATION_REGION
,
(
int
)
puSize
.
height
);
int
secStep
=
std
::
min
((
int
)
MAX_BDOF_APPLICATION_REGION
,
(
int
)
puSize
.
width
);
for
(
int
fstDim
=
fstStart
;
fstDim
<
fstEnd
;
fstDim
+=
fstStep
)
{
for
(
int
secDim
=
secStart
;
secDim
<
secEnd
;
secDim
+=
secStep
)
{
int
x
=
secDim
;
int
y
=
fstDim
;
int
dx
=
secStep
;
int
dy
=
fstStep
;
const
MotionInfo
&
curMi
=
pu
.
getMotionInfo
(
Position
{
x
,
y
});
subPu
.
UnitArea
::
operator
=
(
UnitArea
(
pu
.
chromaFormat
,
Area
(
x
,
y
,
dx
,
dy
)));
subPu
=
curMi
;
PelUnitBuf
subPredBuf
=
predBuf
.
subBuf
(
UnitAreaRelative
(
pu
,
subPu
));
motionCompensation
(
subPu
,
subPredBuf
,
eRefPicList
);
}
}
}
#endif
void
InterPrediction
::
xChromaMC
(
PredictionUnit
&
pu
,
PelUnitBuf
&
pcYuvPred
)
{
// separated tree, chroma
...
...
@@ -1164,6 +1207,49 @@ void InterPrediction::motionCompensation( PredictionUnit &pu, PelUnitBuf &predBu
}
else
{
#if JVET_N0178_IMPLICIT_BDOF_SPLIT
bool
bioApplied
=
false
;
const
Slice
&
slice
=
*
pu
.
cs
->
slice
;
if
(
pu
.
cs
->
sps
->
getBDOFEnabledFlag
())
{
if
(
pu
.
cu
->
affine
||
m_subPuMC
)
{
bioApplied
=
false
;
}
else
{
const
bool
biocheck0
=
!
(
pps
.
getWPBiPred
()
&&
slice
.
getSliceType
()
==
B_SLICE
);
const
bool
biocheck1
=
!
(
pps
.
getUseWP
()
&&
slice
.
getSliceType
()
==
P_SLICE
);
if
(
biocheck0
&&
biocheck1
&&
PU
::
isBiPredFromDifferentDir
(
pu
)
&&
!
(
pu
.
Y
().
height
==
4
||
(
pu
.
Y
().
width
==
4
&&
pu
.
Y
().
height
==
8
))
)
{
bioApplied
=
true
;
}
}
if
(
bioApplied
&&
pu
.
cu
->
smvdMode
)
{
bioApplied
=
false
;
}
if
(
pu
.
cu
->
cs
->
sps
->
getUseGBi
()
&&
bioApplied
&&
pu
.
cu
->
GBiIdx
!=
GBI_DEFAULT
)
{
bioApplied
=
false
;
}
if
(
pu
.
mmvdEncOptMode
==
2
&&
pu
.
mmvdMergeFlag
)
{
bioApplied
=
false
;
}
}
bool
dmvrApplied
=
false
;
dmvrApplied
=
(
pu
.
mvRefine
)
&&
PU
::
checkDMVRCondition
(
pu
);
if
((
pu
.
lumaSize
().
width
>
MAX_BDOF_APPLICATION_REGION
||
pu
.
lumaSize
().
height
>
MAX_BDOF_APPLICATION_REGION
)
&&
pu
.
mergeType
!=
MRG_TYPE_SUBPU_ATMVP
&&
(
bioApplied
&&
!
dmvrApplied
))
{
xSubPuBio
(
pu
,
predBuf
,
eRefPicList
);
}
else
#endif
if
(
pu
.
mergeType
!=
MRG_TYPE_DEFAULT_N
&&
pu
.
mergeType
!=
MRG_TYPE_IBC
)
{
xSubPuMC
(
pu
,
predBuf
,
eRefPicList
);
...
...
source/Lib/CommonLib/InterPrediction.h
View file @
56e946b2
...
...
@@ -144,6 +144,9 @@ protected:
static
bool
xCheckIdenticalMotion
(
const
PredictionUnit
&
pu
);
void
xSubPuMC
(
PredictionUnit
&
pu
,
PelUnitBuf
&
predBuf
,
const
RefPicList
&
eRefPicList
=
REF_PIC_LIST_X
);
#if JVET_N0178_IMPLICIT_BDOF_SPLIT
void
xSubPuBio
(
PredictionUnit
&
pu
,
PelUnitBuf
&
predBuf
,
const
RefPicList
&
eRefPicList
=
REF_PIC_LIST_X
);
#endif
void
destroy
();
...
...
Write
Preview
Markdown
is supported
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