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
11
Merge Requests
11
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
83cad1c8
Commit
83cad1c8
authored
Nov 19, 2020
by
Adrian Browne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Aligned clipping after inverse transform with VVC specification
parent
a46a3c30
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
source/Lib/CommonLib/TrQuant.cpp
source/Lib/CommonLib/TrQuant.cpp
+6
-4
No files found.
source/Lib/CommonLib/TrQuant.cpp
View file @
83cad1c8
...
...
@@ -812,6 +812,8 @@ void TrQuant::xIT( const TransformUnit &tu, const ComponentID &compID, const CCo
const
int
TRANSFORM_MATRIX_SHIFT
=
g_transformMatrixShift
[
TRANSFORM_INVERSE
];
const
TCoeff
clipMinimum
=
-
(
1
<<
maxLog2TrDynamicRange
);
const
TCoeff
clipMaximum
=
(
1
<<
maxLog2TrDynamicRange
)
-
1
;
const
TCoeff
pelMinimum
=
std
::
numeric_limits
<
Pel
>::
min
();
const
TCoeff
pelMaximum
=
std
::
numeric_limits
<
Pel
>::
max
();
const
uint32_t
transformWidthIndex
=
floorLog2
(
width
)
-
1
;
// nLog2WidthMinus1, since transform start from 2-point
const
uint32_t
transformHeightIndex
=
floorLog2
(
height
)
-
1
;
// nLog2HeightMinus1, since transform start from 2-point
...
...
@@ -844,22 +846,22 @@ void TrQuant::xIT( const TransformUnit &tu, const ComponentID &compID, const CCo
CHECK
(
shift_1st
<
0
,
"Negative shift"
);
CHECK
(
shift_2nd
<
0
,
"Negative shift"
);
TCoeff
*
tmp
=
(
TCoeff
*
)
alloca
(
width
*
height
*
sizeof
(
TCoeff
)
);
fastInvTrans
[
trTypeVer
][
transformHeightIndex
](
pCoeff
.
buf
,
tmp
,
shift_1st
,
width
,
skipWidth
,
skipHeight
,
clipMinimum
,
clipMaximum
);
fastInvTrans
[
trTypeHor
][
transformWidthIndex
]
(
tmp
,
block
,
shift_2nd
,
height
,
0
,
skipWidth
,
clipMinimum
,
clip
Maximum
);
fastInvTrans
[
trTypeVer
][
transformHeightIndex
](
pCoeff
.
buf
,
tmp
,
shift_1st
,
width
,
skipWidth
,
skipHeight
,
clipMinimum
,
clipMaximum
);
fastInvTrans
[
trTypeHor
][
transformWidthIndex
]
(
tmp
,
block
,
shift_2nd
,
height
,
0
,
skipWidth
,
pelMinimum
,
pel
Maximum
);
}
else
if
(
width
==
1
)
//1-D vertical transform
{
int
shift
=
(
TRANSFORM_MATRIX_SHIFT
+
maxLog2TrDynamicRange
-
1
)
-
bitDepth
+
COM16_C806_TRANS_PREC
;
CHECK
(
shift
<
0
,
"Negative shift"
);
CHECK
(
(
transformHeightIndex
<
0
),
"There is a problem with the height."
);
fastInvTrans
[
trTypeVer
][
transformHeightIndex
](
pCoeff
.
buf
,
block
,
shift
+
1
,
1
,
0
,
skipHeight
,
clipMinimum
,
clip
Maximum
);
fastInvTrans
[
trTypeVer
][
transformHeightIndex
](
pCoeff
.
buf
,
block
,
shift
+
1
,
1
,
0
,
skipHeight
,
pelMinimum
,
pel
Maximum
);
}
else
//if(iHeight == 1) //1-D horizontal transform
{
const
int
shift
=
(
TRANSFORM_MATRIX_SHIFT
+
maxLog2TrDynamicRange
-
1
)
-
bitDepth
+
COM16_C806_TRANS_PREC
;
CHECK
(
shift
<
0
,
"Negative shift"
);
CHECK
(
(
transformWidthIndex
<
0
),
"There is a problem with the width."
);
fastInvTrans
[
trTypeHor
][
transformWidthIndex
](
pCoeff
.
buf
,
block
,
shift
+
1
,
1
,
0
,
skipWidth
,
clipMinimum
,
clip
Maximum
);
fastInvTrans
[
trTypeHor
][
transformWidthIndex
](
pCoeff
.
buf
,
block
,
shift
+
1
,
1
,
0
,
skipWidth
,
pelMinimum
,
pel
Maximum
);
}
Pel
*
resiBuf
=
pResidual
.
buf
;
...
...
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