Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
VVCSoftware_VTM
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
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
Monitor
Incidents
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
Philip Cowan
VVCSoftware_VTM
Commits
1487dcb9
Commit
1487dcb9
authored
5 years ago
by
Jizheng Xu
Committed by
Xiang Li
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
remove constant parts from ALF chroma decision
Patch provided by Nan Hu Reduces LD chroma loss of JVET-O0491
parent
d33a1825
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
source/Lib/CommonLib/InterPrediction.cpp
+16
-14
16 additions, 14 deletions
source/Lib/CommonLib/InterPrediction.cpp
with
16 additions
and
14 deletions
source/Lib/CommonLib/InterPrediction.cpp
+
16
−
14
View file @
1487dcb9
...
...
@@ -2224,10 +2224,11 @@ void InterPrediction::xFillIBCBuffer(CodingUnit &cu)
continue
;
const
unsigned
int
lcuWidth
=
cu
.
cs
->
slice
->
getSPS
()
->
getMaxCUWidth
();
const
int
shiftSample
=
::
getComponentScaleX
(
area
.
compID
,
cu
.
chromaFormat
);
const
int
ctuSizeLog2
=
floorLog2
(
lcuWidth
)
-
shiftSample
;
const
int
pux
=
area
.
x
&
((
m_IBCBufferWidth
>>
shiftSample
)
-
1
);
const
int
puy
=
area
.
y
&
((
1
<<
ctuSizeLog2
)
-
1
);
const
int
shiftSampleHor
=
::
getComponentScaleX
(
area
.
compID
,
cu
.
chromaFormat
);
const
int
shiftSampleVer
=
::
getComponentScaleY
(
area
.
compID
,
cu
.
chromaFormat
);
const
int
ctuSizeLog2Ver
=
floorLog2
(
lcuWidth
)
-
shiftSampleVer
;
const
int
pux
=
area
.
x
&
((
m_IBCBufferWidth
>>
shiftSampleHor
)
-
1
);
const
int
puy
=
area
.
y
&
((
1
<<
ctuSizeLog2Ver
)
-
1
);
const
CompArea
dstArea
=
CompArea
(
area
.
compID
,
cu
.
chromaFormat
,
Position
(
pux
,
puy
),
Size
(
area
.
width
,
area
.
height
));
CPelBuf
srcBuf
=
cu
.
cs
->
getRecoBuf
(
area
);
PelBuf
dstBuf
=
m_IBCBuffer
.
getBuf
(
dstArea
);
...
...
@@ -2240,8 +2241,9 @@ void InterPrediction::xFillIBCBuffer(CodingUnit &cu)
void
InterPrediction
::
xIntraBlockCopy
(
PredictionUnit
&
pu
,
PelUnitBuf
&
predBuf
,
const
ComponentID
compID
)
{
const
unsigned
int
lcuWidth
=
pu
.
cs
->
slice
->
getSPS
()
->
getMaxCUWidth
();
int
shiftSample
=
::
getComponentScaleX
(
compID
,
pu
.
chromaFormat
);
const
int
ctuSizeLog2
=
floorLog2
(
lcuWidth
)
-
shiftSample
;
const
int
shiftSampleHor
=
::
getComponentScaleX
(
compID
,
pu
.
chromaFormat
);
const
int
shiftSampleVer
=
::
getComponentScaleY
(
compID
,
pu
.
chromaFormat
);
const
int
ctuSizeLog2Ver
=
floorLog2
(
lcuWidth
)
-
shiftSampleVer
;
pu
.
bv
=
pu
.
mv
[
REF_PIC_LIST_0
];
pu
.
bv
.
changePrecision
(
MV_PRECISION_INTERNAL
,
MV_PRECISION_INT
);
int
refx
,
refy
;
...
...
@@ -2252,13 +2254,13 @@ void InterPrediction::xIntraBlockCopy(PredictionUnit &pu, PelUnitBuf &predBuf, c
}
else
{
//Cb or Cr
refx
=
pu
.
Cb
().
x
+
(
pu
.
bv
.
hor
>>
shiftSample
);
refy
=
pu
.
Cb
().
y
+
(
pu
.
bv
.
ver
>>
shiftSample
);
refx
=
pu
.
Cb
().
x
+
(
pu
.
bv
.
hor
>>
shiftSample
Hor
);
refy
=
pu
.
Cb
().
y
+
(
pu
.
bv
.
ver
>>
shiftSample
Ver
);
}
refx
&=
((
m_IBCBufferWidth
>>
shiftSample
)
-
1
);
refy
&=
((
1
<<
ctuSizeLog2
)
-
1
);
refx
&=
((
m_IBCBufferWidth
>>
shiftSample
Hor
)
-
1
);
refy
&=
((
1
<<
ctuSizeLog2
Ver
)
-
1
);
if
(
refx
+
predBuf
.
bufs
[
compID
].
width
<=
(
m_IBCBufferWidth
>>
shiftSample
))
if
(
refx
+
predBuf
.
bufs
[
compID
].
width
<=
(
m_IBCBufferWidth
>>
shiftSample
Hor
))
{
const
CompArea
srcArea
=
CompArea
(
compID
,
pu
.
chromaFormat
,
Position
(
refx
,
refy
),
Size
(
predBuf
.
bufs
[
compID
].
width
,
predBuf
.
bufs
[
compID
].
height
));
const
CPelBuf
refBuf
=
m_IBCBuffer
.
getBuf
(
srcArea
);
...
...
@@ -2266,16 +2268,16 @@ void InterPrediction::xIntraBlockCopy(PredictionUnit &pu, PelUnitBuf &predBuf, c
}
else
{
//wrap around
int
width
=
(
m_IBCBufferWidth
>>
shiftSample
)
-
refx
;
int
width
=
(
m_IBCBufferWidth
>>
shiftSample
Hor
)
-
refx
;
CompArea
srcArea
=
CompArea
(
compID
,
pu
.
chromaFormat
,
Position
(
refx
,
refy
),
Size
(
width
,
predBuf
.
bufs
[
compID
].
height
));
CPelBuf
srcBuf
=
m_IBCBuffer
.
getBuf
(
srcArea
);
PelBuf
dstBuf
=
PelBuf
(
predBuf
.
bufs
[
compID
].
bufAt
(
Position
(
0
,
0
)),
predBuf
.
bufs
[
compID
].
stride
,
Size
(
width
,
predBuf
.
bufs
[
compID
].
height
));
dstBuf
.
copyFrom
(
srcBuf
);
width
=
refx
+
predBuf
.
bufs
[
compID
].
width
-
(
m_IBCBufferWidth
>>
shiftSample
);
width
=
refx
+
predBuf
.
bufs
[
compID
].
width
-
(
m_IBCBufferWidth
>>
shiftSample
Hor
);
srcArea
=
CompArea
(
compID
,
pu
.
chromaFormat
,
Position
(
0
,
refy
),
Size
(
width
,
predBuf
.
bufs
[
compID
].
height
));
srcBuf
=
m_IBCBuffer
.
getBuf
(
srcArea
);
dstBuf
=
PelBuf
(
predBuf
.
bufs
[
compID
].
bufAt
(
Position
((
m_IBCBufferWidth
>>
shiftSample
)
-
refx
,
0
)),
predBuf
.
bufs
[
compID
].
stride
,
Size
(
width
,
predBuf
.
bufs
[
compID
].
height
));
dstBuf
=
PelBuf
(
predBuf
.
bufs
[
compID
].
bufAt
(
Position
((
m_IBCBufferWidth
>>
shiftSample
Hor
)
-
refx
,
0
)),
predBuf
.
bufs
[
compID
].
stride
,
Size
(
width
,
predBuf
.
bufs
[
compID
].
height
));
dstBuf
.
copyFrom
(
srcBuf
);
}
}
...
...
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