Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
VVCSoftware_VTM-tmuc
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
Thibaud Biatek
VVCSoftware_VTM-tmuc
Commits
b74c4adb
Commit
b74c4adb
authored
5 years ago
by
Taoran Lu
Browse files
Options
Downloads
Patches
Plain Diff
o1109 improvement
parent
d5a8be14
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
source/Lib/CommonLib/Reshape.cpp
+19
-8
19 additions, 8 deletions
source/Lib/CommonLib/Reshape.cpp
with
19 additions
and
8 deletions
source/Lib/CommonLib/Reshape.cpp
+
19
−
8
View file @
b74c4adb
...
...
@@ -155,6 +155,8 @@ int Reshape::calculateChromaAdjVpduNei(TransformUnit &tu, const CompArea &areaY
int
xPos
=
areaY
.
lumaPos
().
x
;
int
yPos
=
areaY
.
lumaPos
().
y
;
int
ctuSize
=
cs
.
sps
->
getCTUSize
();
int
numNeighbor
=
std
::
min
(
64
,
ctuSize
);
int
numNeighborLog
=
g_aucLog2
[
numNeighbor
];
if
(
ctuSize
==
128
)
{
xPos
=
xPos
/
64
*
64
;
...
...
@@ -175,10 +177,19 @@ int Reshape::calculateChromaAdjVpduNei(TransformUnit &tu, const CompArea &areaY
setVPDULoc
(
xPos
,
yPos
);
Position
topLeft
(
xPos
,
yPos
);
CodingUnit
*
topLeftLuma
;
const
CodingUnit
*
cuAbove
,
*
cuLeft
;
if
(
CS
::
isDualITree
(
cs
)
&&
cs
.
slice
->
getSliceType
()
==
I_SLICE
)
{
topLeftLuma
=
tu
.
cs
->
picture
->
cs
->
getCU
(
topLeft
,
CHANNEL_TYPE_LUMA
);
cuAbove
=
cs
.
picture
->
cs
->
getCURestricted
(
topLeftLuma
->
lumaPos
().
offset
(
0
,
-
1
),
*
topLeftLuma
,
CHANNEL_TYPE_LUMA
);
cuLeft
=
cs
.
picture
->
cs
->
getCURestricted
(
topLeftLuma
->
lumaPos
().
offset
(
-
1
,
0
),
*
topLeftLuma
,
CHANNEL_TYPE_LUMA
);
}
else
{
topLeftLuma
=
cs
.
getCU
(
topLeft
,
CHANNEL_TYPE_LUMA
);
cuAbove
=
cs
.
getCURestricted
(
topLeftLuma
->
lumaPos
().
offset
(
0
,
-
1
),
*
topLeftLuma
,
CHANNEL_TYPE_LUMA
);
cuLeft
=
cs
.
getCURestricted
(
topLeftLuma
->
lumaPos
().
offset
(
-
1
,
0
),
*
topLeftLuma
,
CHANNEL_TYPE_LUMA
);
}
xPos
=
topLeftLuma
->
lumaPos
().
x
;
yPos
=
topLeftLuma
->
lumaPos
().
y
;
...
...
@@ -195,31 +206,31 @@ int Reshape::calculateChromaAdjVpduNei(TransformUnit &tu, const CompArea &areaY
const
Pel
valueDC
=
1
<<
(
tu
.
cs
->
sps
->
getBitDepth
(
CHANNEL_TYPE_LUMA
)
-
1
);
int32_t
recLuma
=
0
;
int
pelnum
=
0
;
if
(
xPos
>
0
)
if
(
cuLeft
!=
nullptr
)
{
for
(
int
i
=
0
;
i
<
NEIG_NUM
;
i
++
)
for
(
int
i
=
0
;
i
<
numNeighbor
;
i
++
)
{
int
k
=
(
yPos
+
i
)
>=
picH
?
(
picH
-
yPos
-
1
)
:
i
;
recLuma
+=
recSrc0
[
-
1
+
k
*
strideY
];
pelnum
++
;
}
}
if
(
yPos
>
0
)
if
(
cuAbove
!=
nullptr
)
{
for
(
int
i
=
0
;
i
<
NEIG_NUM
;
i
++
)
for
(
int
i
=
0
;
i
<
numNeighbor
;
i
++
)
{
int
k
=
(
xPos
+
i
)
>=
picW
?
(
picW
-
xPos
-
1
)
:
i
;
recLuma
+=
recSrc0
[
-
strideY
+
k
];
pelnum
++
;
}
}
if
(
pelnum
==
NEIG_NUM
)
if
(
pelnum
==
numNeighbor
)
{
lumaValue
=
ClipPel
((
recLuma
+
(
1
<<
(
NEIG_NUM_LOG
-
1
)))
>>
NEIG_NUM_LOG
,
tu
.
cs
->
slice
->
clpRng
(
COMPONENT_Y
));
lumaValue
=
ClipPel
((
recLuma
+
(
1
<<
(
numNeighborLog
-
1
)))
>>
numNeighborLog
,
tu
.
cs
->
slice
->
clpRng
(
COMPONENT_Y
));
}
else
if
(
pelnum
==
(
NEIG_NUM
<<
1
))
else
if
(
pelnum
==
(
numNeighbor
<<
1
))
{
lumaValue
=
ClipPel
((
recLuma
+
(
1
<<
NEIG_NUM_LOG
))
>>
(
NEIG_NUM_LOG
+
1
),
tu
.
cs
->
slice
->
clpRng
(
COMPONENT_Y
));
lumaValue
=
ClipPel
((
recLuma
+
(
1
<<
numNeighborLog
))
>>
(
numNeighborLog
+
1
),
tu
.
cs
->
slice
->
clpRng
(
COMPONENT_Y
));
}
else
{
...
...
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