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
93a5dee9
Commit
93a5dee9
authored
Apr 02, 2019
by
Taoran Lu
Committed by
Xiang Li
Apr 02, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
N0220 LMCS simplifications
parent
1a33f26e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
0 deletions
+27
-0
source/Lib/CommonLib/Buffer.cpp
source/Lib/CommonLib/Buffer.cpp
+3
-0
source/Lib/CommonLib/CommonDef.h
source/Lib/CommonLib/CommonDef.h
+4
-0
source/Lib/CommonLib/Reshape.cpp
source/Lib/CommonLib/Reshape.cpp
+18
-0
source/Lib/CommonLib/TypeDef.h
source/Lib/CommonLib/TypeDef.h
+2
-0
No files found.
source/Lib/CommonLib/Buffer.cpp
View file @
93a5dee9
...
...
@@ -407,6 +407,9 @@ void AreaBuf<Pel>::scaleSignal(const int scale, const bool dir, const ClpRng& cl
{
for
(
unsigned
x
=
0
;
x
<
width
;
x
++
)
{
#if JVET_N0220_LMCS_SIMPLIFICATION
src
[
x
]
=
(
Pel
)
Clip3
((
Pel
)(
-
maxAbsclipBD
-
1
),
(
Pel
)
maxAbsclipBD
,
src
[
x
]);
#endif
sign
=
src
[
x
]
>=
0
?
1
:
-
1
;
absval
=
sign
*
src
[
x
];
int
val
=
sign
*
((
absval
*
scale
+
(
1
<<
(
CSCALE_FP_PREC
-
1
)))
>>
CSCALE_FP_PREC
);
...
...
source/Lib/CommonLib/CommonDef.h
View file @
93a5dee9
...
...
@@ -419,7 +419,11 @@ static constexpr int MV_MANTISSA_LIMIT = (1 << (MV_MANTISSA_BITCOUNT - 1))
static
constexpr
int
MV_EXPONENT_MASK
=
((
1
<<
MV_EXPONENT_BITCOUNT
)
-
1
);
static
const
int
PIC_ANALYZE_CW_BINS
=
32
;
static
const
int
PIC_CODE_CW_BINS
=
16
;
#if JVET_N0220_LMCS_SIMPLIFICATION
static
const
int
FP_PREC
=
11
;
#else
static
const
int
FP_PREC
=
14
;
#endif
static
const
int
CSCALE_FP_PREC
=
11
;
// ====================================================================================================================
// Macro functions
...
...
source/Lib/CommonLib/Reshape.cpp
View file @
93a5dee9
...
...
@@ -110,12 +110,19 @@ void Reshape::reverseLUT(std::vector<Pel>& inputLUT, std::vector<Pel>& outputLUT
for
(
i
=
m_reshapePivot
[
m_sliceReshapeInfo
.
reshaperModelMaxBinIdx
+
1
];
i
<
m_reshapeLUTSize
;
i
++
)
outputLUT
[
i
]
=
outputLUT
[
m_reshapePivot
[
m_sliceReshapeInfo
.
reshaperModelMaxBinIdx
+
1
]];
#if JVET_N0220_LMCS_SIMPLIFICATION
for
(
i
=
0
;
i
<
lutSize
;
i
++
)
{
outputLUT
[
i
]
=
Clip3
((
Pel
)
0
,
(
Pel
)((
1
<<
m_lumaBD
)
-
1
),
outputLUT
[
i
]);
}
#else
bool
clipRange
=
((
m_sliceReshapeInfo
.
reshaperModelMinBinIdx
>
0
)
&&
(
m_sliceReshapeInfo
.
reshaperModelMaxBinIdx
<
(
PIC_CODE_CW_BINS
-
1
)));
for
(
i
=
0
;
i
<
lutSize
;
i
++
)
{
if
(
clipRange
)
outputLUT
[
i
]
=
Clip3
((
Pel
)(
16
<<
(
m_lumaBD
-
8
)),
(
Pel
)(
235
<<
(
m_lumaBD
-
8
)),
outputLUT
[
i
]);
else
outputLUT
[
i
]
=
Clip3
((
Pel
)
0
,
(
Pel
)((
1
<<
m_lumaBD
)
-
1
),
outputLUT
[
i
]);
}
#endif
}
...
...
@@ -217,6 +224,16 @@ void Reshape::constructReshaper()
*/
void
Reshape
::
updateChromaScaleLUT
()
{
#if JVET_N0220_LMCS_SIMPLIFICATION
for
(
int
i
=
0
;
i
<
PIC_CODE_CW_BINS
;
i
++
)
{
uint16_t
binCW
=
m_lumaBD
>
10
?
(
m_binCW
[
i
]
>>
(
m_lumaBD
-
10
))
:
m_lumaBD
<
10
?
(
m_binCW
[
i
]
<<
(
10
-
m_lumaBD
))
:
m_binCW
[
i
];
if
(
binCW
==
0
)
m_chromaAdjHelpLUT
[
i
]
=
1
<<
CSCALE_FP_PREC
;
else
m_chromaAdjHelpLUT
[
i
]
=
m_initCW
*
(
1
<<
CSCALE_FP_PREC
)
/
binCW
;
}
#else
const
int16_t
CW_bin_SC_LUT
[
2
*
PIC_ANALYZE_CW_BINS
]
=
{
16384
,
16384
,
16384
,
16384
,
16384
,
16384
,
16384
,
8192
,
8192
,
8192
,
8192
,
5461
,
5461
,
5461
,
5461
,
4096
,
4096
,
4096
,
4096
,
3277
,
3277
,
3277
,
3277
,
2731
,
2731
,
2731
,
2731
,
2341
,
2341
,
2341
,
2048
,
2048
,
2048
,
1820
,
1820
,
1820
,
1638
,
1638
,
1638
,
1638
,
1489
,
1489
,
1489
,
1489
,
1365
,
1365
,
1365
,
1365
,
1260
,
1260
,
1260
,
1260
,
1170
,
1170
,
1170
,
1170
,
1092
,
1092
,
1092
,
1092
,
1024
,
1024
,
1024
,
1024
};
//p=11
for
(
int
i
=
0
;
i
<
PIC_CODE_CW_BINS
;
i
++
)
{
...
...
@@ -226,6 +243,7 @@ void Reshape::updateChromaScaleLUT()
else
m_chromaAdjHelpLUT
[
i
]
=
CW_bin_SC_LUT
[
Clip3
((
uint16_t
)
1
,
(
uint16_t
)
64
,
(
uint16_t
)(
binCW
>>
1
))
-
1
];
}
#endif
}
...
...
source/Lib/CommonLib/TypeDef.h
View file @
93a5dee9
...
...
@@ -50,6 +50,8 @@
#include <assert.h>
#include <cassert>
#define JVET_N0220_LMCS_SIMPLIFICATION 1
#define JCTVC_Y0038_PARAMS 1
#define JVET_MMVD_OFF_MACRO 0
...
...
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