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
83cad1c8
Commit
83cad1c8
authored
4 years ago
by
Adrian Browne
Browse files
Options
Downloads
Patches
Plain Diff
Aligned clipping after inverse transform with VVC specification
parent
a46a3c30
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1959
Fix #1431: Avoid clipping after inverse transform when RExt__HIGH_BIT_DEPTH_SUPPORT is enabled
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
source/Lib/CommonLib/TrQuant.cpp
+6
-4
6 additions, 4 deletions
source/Lib/CommonLib/TrQuant.cpp
with
6 additions
and
4 deletions
source/Lib/CommonLib/TrQuant.cpp
+
6
−
4
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
,
clip
Minimum
,
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
,
pel
Minimum
,
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
,
clip
Minimum
,
clip
Maximum
);
fastInvTrans
[
trTypeVer
][
transformHeightIndex
](
pCoeff
.
buf
,
block
,
shift
+
1
,
1
,
0
,
skipHeight
,
pel
Minimum
,
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
,
clip
Minimum
,
clip
Maximum
);
fastInvTrans
[
trTypeHor
][
transformWidthIndex
](
pCoeff
.
buf
,
block
,
shift
+
1
,
1
,
0
,
skipWidth
,
pel
Minimum
,
pel
Maximum
);
}
Pel
*
resiBuf
=
pResidual
.
buf
;
...
...
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