Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
VVCSoftware_VTM
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
jvet
VVCSoftware_VTM
Commits
0f426088
Commit
0f426088
authored
6 years ago
by
Kai Zhang
Browse files
Options
Downloads
Patches
Plain Diff
Commit L0265 (Affine 4x4 chroma subblock)
parent
bb866fa9
No related branches found
No related tags found
1 merge request
!30
JVET-L0265: Affine 4x4 chroma subblock
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
source/Lib/CommonLib/InterPrediction.cpp
+40
-1
40 additions, 1 deletion
source/Lib/CommonLib/InterPrediction.cpp
source/Lib/CommonLib/TypeDef.h
+3
-0
3 additions, 0 deletions
source/Lib/CommonLib/TypeDef.h
with
43 additions
and
1 deletion
source/Lib/CommonLib/InterPrediction.cpp
+
40
−
1
View file @
0f426088
...
@@ -501,6 +501,16 @@ void InterPrediction::xPredAffineBlk( const ComponentID& compID, const Predictio
...
@@ -501,6 +501,16 @@ void InterPrediction::xPredAffineBlk( const ComponentID& compID, const Predictio
blockWidth
>>=
iScaleX
;
blockWidth
>>=
iScaleX
;
blockHeight
>>=
iScaleY
;
blockHeight
>>=
iScaleY
;
#if JVET_L0265_AFF_MINIMUM4X4
blockWidth
=
std
::
max
(
blockWidth
,
AFFINE_MIN_BLOCK_SIZE
);
blockHeight
=
std
::
max
(
blockHeight
,
AFFINE_MIN_BLOCK_SIZE
);
CHECK
(
blockWidth
>
(
width
>>
iScaleX
),
"Sub Block width > Block width"
);
CHECK
(
blockHeight
>
(
height
>>
iScaleX
),
"Sub Block height > Block height"
);
static
Mv
storedMv
[
32
][
32
];
//128/4
#endif
const
int
cxWidth
=
width
>>
iScaleX
;
const
int
cxWidth
=
width
>>
iScaleX
;
const
int
cxHeight
=
height
>>
iScaleY
;
const
int
cxHeight
=
height
>>
iScaleY
;
const
int
iHalfBW
=
blockWidth
>>
1
;
const
int
iHalfBW
=
blockWidth
>>
1
;
...
@@ -541,6 +551,35 @@ void InterPrediction::xPredAffineBlk( const ComponentID& compID, const Predictio
...
@@ -541,6 +551,35 @@ void InterPrediction::xPredAffineBlk( const ComponentID& compID, const Predictio
{
{
for
(
int
w
=
0
;
w
<
cxWidth
;
w
+=
blockWidth
)
for
(
int
w
=
0
;
w
<
cxWidth
;
w
+=
blockWidth
)
{
{
#if JVET_L0265_AFF_MINIMUM4X4
int
iMvScaleTmpHor
,
iMvScaleTmpVer
;
if
(
compID
==
COMPONENT_Y
)
{
iMvScaleTmpHor
=
iMvScaleHor
+
iDMvHorX
*
(
iHalfBW
+
w
)
+
iDMvVerX
*
(
iHalfBH
+
h
);
iMvScaleTmpVer
=
iMvScaleVer
+
iDMvHorY
*
(
iHalfBW
+
w
)
+
iDMvVerY
*
(
iHalfBH
+
h
);
roundAffineMv
(
iMvScaleTmpHor
,
iMvScaleTmpVer
,
shift
);
// clip and scale
iMvScaleTmpHor
=
std
::
min
<
int
>
(
iHorMax
,
std
::
max
<
int
>
(
iHorMin
,
iMvScaleTmpHor
));
iMvScaleTmpVer
=
std
::
min
<
int
>
(
iVerMax
,
std
::
max
<
int
>
(
iVerMin
,
iMvScaleTmpVer
));
storedMv
[
h
/
AFFINE_MIN_BLOCK_SIZE
][
w
/
AFFINE_MIN_BLOCK_SIZE
].
set
(
iMvScaleTmpHor
,
iMvScaleTmpVer
);
}
else
{
Mv
curMv
=
(
storedMv
[(
h
<<
iScaleY
)
/
AFFINE_MIN_BLOCK_SIZE
][(
w
<<
iScaleX
)
/
AFFINE_MIN_BLOCK_SIZE
]
+
storedMv
[(
h
<<
iScaleY
)
/
AFFINE_MIN_BLOCK_SIZE
+
1
][(
w
<<
iScaleX
)
/
AFFINE_MIN_BLOCK_SIZE
]
+
storedMv
[(
h
<<
iScaleY
)
/
AFFINE_MIN_BLOCK_SIZE
][(
w
<<
iScaleX
)
/
AFFINE_MIN_BLOCK_SIZE
+
1
]
+
storedMv
[(
h
<<
iScaleY
)
/
AFFINE_MIN_BLOCK_SIZE
+
1
][(
w
<<
iScaleX
)
/
AFFINE_MIN_BLOCK_SIZE
+
1
]
+
Mv
(
2
,
2
));
curMv
.
set
(
curMv
.
getHor
()
>>
2
,
curMv
.
getVer
()
>>
2
);
iMvScaleTmpHor
=
curMv
.
hor
;
iMvScaleTmpVer
=
curMv
.
ver
;
}
#else
int
iMvScaleTmpHor
=
iMvScaleHor
+
iDMvHorX
*
(
iHalfBW
+
w
)
+
iDMvVerX
*
(
iHalfBH
+
h
);
int
iMvScaleTmpHor
=
iMvScaleHor
+
iDMvHorX
*
(
iHalfBW
+
w
)
+
iDMvVerX
*
(
iHalfBH
+
h
);
int
iMvScaleTmpVer
=
iMvScaleVer
+
iDMvHorY
*
(
iHalfBW
+
w
)
+
iDMvVerY
*
(
iHalfBH
+
h
);
int
iMvScaleTmpVer
=
iMvScaleVer
+
iDMvHorY
*
(
iHalfBW
+
w
)
+
iDMvVerY
*
(
iHalfBH
+
h
);
roundAffineMv
(
iMvScaleTmpHor
,
iMvScaleTmpVer
,
shift
);
roundAffineMv
(
iMvScaleTmpHor
,
iMvScaleTmpVer
,
shift
);
...
@@ -548,7 +587,7 @@ void InterPrediction::xPredAffineBlk( const ComponentID& compID, const Predictio
...
@@ -548,7 +587,7 @@ void InterPrediction::xPredAffineBlk( const ComponentID& compID, const Predictio
// clip and scale
// clip and scale
iMvScaleTmpHor
=
std
::
min
<
int
>
(
iHorMax
,
std
::
max
<
int
>
(
iHorMin
,
iMvScaleTmpHor
)
);
iMvScaleTmpHor
=
std
::
min
<
int
>
(
iHorMax
,
std
::
max
<
int
>
(
iHorMin
,
iMvScaleTmpHor
)
);
iMvScaleTmpVer
=
std
::
min
<
int
>
(
iVerMax
,
std
::
max
<
int
>
(
iVerMin
,
iMvScaleTmpVer
)
);
iMvScaleTmpVer
=
std
::
min
<
int
>
(
iVerMax
,
std
::
max
<
int
>
(
iVerMin
,
iMvScaleTmpVer
)
);
#endif
// get the MV in high precision
// get the MV in high precision
int
xFrac
,
yFrac
,
xInt
,
yInt
;
int
xFrac
,
yFrac
,
xInt
,
yInt
;
...
...
This diff is collapsed.
Click to expand it.
source/Lib/CommonLib/TypeDef.h
+
3
−
0
View file @
0f426088
...
@@ -50,8 +50,11 @@
...
@@ -50,8 +50,11 @@
#include
<assert.h>
#include
<assert.h>
#include
<cassert>
#include
<cassert>
#define JVET_L0104_NO_4x4BI_INTER_CU 1 // Prohibit 4x4 bi-prediction for inter CU
#define JVET_L0104_NO_4x4BI_INTER_CU 1 // Prohibit 4x4 bi-prediction for inter CU
#define JVET_L0265_AFF_MINIMUM4X4 1 //Affine 4x4 chroma subblock
#define JVET_L0553_FIX_INITQP 1
#define JVET_L0553_FIX_INITQP 1
#define JVET_L0147_ALF_SUBSAMPLED_LAPLACIAN 1 // Subsampled Laplacian calculation
#define JVET_L0147_ALF_SUBSAMPLED_LAPLACIAN 1 // Subsampled Laplacian calculation
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment