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
14
Merge Requests
14
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
f765becc
Commit
f765becc
authored
Feb 01, 2019
by
Karl Sharman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed determination of TS mode and fixed typos in base-VTM var names.
parent
e19fd4c9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
11 deletions
+7
-11
source/Lib/CommonLib/QuantRDOQ.cpp
source/Lib/CommonLib/QuantRDOQ.cpp
+6
-10
source/Lib/CommonLib/UnitTools.cpp
source/Lib/CommonLib/UnitTools.cpp
+1
-1
No files found.
source/Lib/CommonLib/QuantRDOQ.cpp
View file @
f765becc
...
...
@@ -417,16 +417,12 @@ double QuantRDOQ::xGetErrScaleCoeff( SizeType width, SizeType height, int qp, co
const
int
iTransformShift
=
getTransformShift
(
channelBitDepth
,
Size
(
width
,
height
),
maxLog2TrDynamicRange
);
#if HM_QTBT_AS_IN_JEM_QUANT
double
dErrScale
=
(
double
)(
1
<<
SCALE_BITS
);
// Compensate for scaling of bitcount in Lagrange cost function
#if JVET_M0119_NO_TRANSFORM_SKIP_QUANTISATION_ADJUSTMENT
#if !JVET_M0119_NO_TRANSFORM_SKIP_QUANTISATION_ADJUSTMENT
bool
needsSqrt2
=
TU
::
needsBlockSizeTrafoScale
(
Size
(
width
,
height
)
);
// ( ( (sizeX+sizeY) & 1 ) !=0 );
#endif
double
dTransShift
=
(
double
)
iTransformShift
+
(
needsSqrt2
?
-
0.5
:
0.0
);
dErrScale
=
dErrScale
*
pow
(
2.0
,
(
-
2.0
*
dTransShift
)
);
// Compensate for scaling through forward transform
int
QStep
=
(
needsSqrt2
?
(
(
g_quantScales
[
qp
]
*
181
)
>>
7
)
:
g_quantScales
[
qp
]
);
#else
bool
needsSrqt2
=
TU
::
needsBlockSizeTrafoScale
(
Size
(
width
,
height
)
);
// ( ( (sizeX+sizeY) & 1 ) !=0 );
double
dTransShift
=
(
double
)
iTransformShift
+
(
needsSrqt2
?
-
0.5
:
0.0
);
dErrScale
=
dErrScale
*
pow
(
2.0
,
(
-
2.0
*
dTransShift
)
);
// Compensate for scaling through forward transform
int
QStep
=
(
needsSrqt2
?
(
(
g_quantScales
[
qp
]
*
181
)
>>
7
)
:
g_quantScales
[
qp
]
);
#endif
double
finalErrScale
=
dErrScale
/
QStep
/
QStep
/
(
1
<<
(
DISTORTION_PRECISION_ADJUSTMENT
(
channelBitDepth
)
<<
1
));
#else
int
errShift
=
SCALE_BITS
-
((
iTransformShift
+
DISTORTION_PRECISION_ADJUSTMENT
(
channelBitDepth
))
<<
1
);
...
...
@@ -464,8 +460,8 @@ void QuantRDOQ::xSetErrScaleCoeff( uint32_t list, uint32_t sizeX, uint32_t sizeY
#if HM_QTBT_AS_IN_JEM_QUANT
double
dErrScale
=
(
double
)(
1
<<
SCALE_BITS
);
// Compensate for scaling of bitcount in Lagrange cost function
bool
needsS
rq
t2
=
TU
::
needsBlockSizeTrafoScale
(
Size
(
g_scalingListSizeX
[
sizeX
],
g_scalingListSizeX
[
sizeY
]
)
);
// ( ( (sizeX+sizeY) & 1 ) !=0 );
double
dTransShift
=
(
double
)
iTransformShift
+
(
needsS
rq
t2
?
-
0.5
:
0.0
);
bool
needsS
qr
t2
=
TU
::
needsBlockSizeTrafoScale
(
Size
(
g_scalingListSizeX
[
sizeX
],
g_scalingListSizeX
[
sizeY
]
)
);
// ( ( (sizeX+sizeY) & 1 ) !=0 );
double
dTransShift
=
(
double
)
iTransformShift
+
(
needsS
qr
t2
?
-
0.5
:
0.0
);
dErrScale
=
dErrScale
*
pow
(
2.0
,
(
-
2.0
*
dTransShift
)
);
// Compensate for scaling through forward transform
for
(
i
=
0
;
i
<
uiMaxNumCoeff
;
i
++
)
...
...
@@ -474,7 +470,7 @@ void QuantRDOQ::xSetErrScaleCoeff( uint32_t list, uint32_t sizeX, uint32_t sizeY
/
(
1
<<
(
DISTORTION_PRECISION_ADJUSTMENT
(
bitDepths
.
recon
[
channelType
])
<<
1
));
}
int
QStep
=
(
needsS
rq
t2
?
(
(
g_quantScales
[
qp
]
*
181
)
>>
7
)
:
g_quantScales
[
qp
]
);
int
QStep
=
(
needsS
qr
t2
?
(
(
g_quantScales
[
qp
]
*
181
)
>>
7
)
:
g_quantScales
[
qp
]
);
xGetErrScaleCoeffNoScalingList
(
list
,
sizeX
,
sizeY
,
qp
)
=
dErrScale
/
QStep
/
QStep
/
(
1
<<
(
DISTORTION_PRECISION_ADJUSTMENT
(
bitDepths
.
recon
[
channelType
])
<<
1
));
...
...
source/Lib/CommonLib/UnitTools.cpp
View file @
f765becc
...
...
@@ -4816,7 +4816,7 @@ bool TU::needsSqrt2Scale( const TransformUnit &tu, const ComponentID &compID )
{
const
Size
&
size
=
tu
.
blocks
[
compID
];
#if JVET_M0464_UNI_MTS
const
bool
bTransformSkip
=
tu
.
mtsIdx
==
1
;
const
bool
bTransformSkip
=
tu
.
mtsIdx
==
1
&&
isLuma
(
compID
)
;
#else
const
bool
bTransformSkip
=
tu
.
transformSkip
[
compID
];
#endif
...
...
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