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
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jeeva Raj A
VVCSoftware_VTM
Commits
afb62348
Commit
afb62348
authored
Jul 22, 2019
by
Zhi-Yi Lin
Committed by
Xiang Li
Jul 22, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
JVET-O0272: CE2-related: Simplified inverse luma mapping
parent
f865549a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
55 additions
and
0 deletions
+55
-0
source/Lib/CommonLib/CommonDef.h
source/Lib/CommonLib/CommonDef.h
+3
-0
source/Lib/CommonLib/TypeDef.h
source/Lib/CommonLib/TypeDef.h
+2
-0
source/Lib/EncoderLib/EncReshape.cpp
source/Lib/EncoderLib/EncReshape.cpp
+47
-0
source/Lib/EncoderLib/EncReshape.h
source/Lib/EncoderLib/EncReshape.h
+3
-0
No files found.
source/Lib/CommonLib/CommonDef.h
View file @
afb62348
...
...
@@ -445,6 +445,9 @@ static constexpr int MV_MIN = -(1 << (MV_BITS - 1));
static
const
int
PIC_ANALYZE_CW_BINS
=
32
;
static
const
int
PIC_CODE_CW_BINS
=
16
;
#if JVET_O0272_LMCS_SIMP_INVERSE_MAPPING
static
const
int
LMCS_SEG_SIZE
=
(
PIC_CODE_CW_BINS
<<
1
);
#endif
static
const
int
FP_PREC
=
11
;
static
const
int
CSCALE_FP_PREC
=
11
;
#if JVET_O1109_UNFIY_CRS
...
...
source/Lib/CommonLib/TypeDef.h
View file @
afb62348
...
...
@@ -52,6 +52,8 @@
#define JVET_O0216_ALF_COEFF_EG3 1 // JVET-O0216/O0302/O0648: using EG3 for ALF coefficients coding
#define JVET_O0272_LMCS_SIMP_INVERSE_MAPPING 1 // JVET-O0272: LMCS simplified inverse mapping
#define JVET_O0247_ALF_CTB_CODING_REDUNDANCY_REMOVAL 1 // JVET-O0247: not signal APS index when number APS is 2
#define JVET_O0637_CHROMA_GRADIENT_LINE_SELECTION 1 // Choose line0 and line3 for gradient computation when chroma is same size as luma
...
...
source/Lib/EncoderLib/EncReshape.cpp
View file @
afb62348
...
...
@@ -1054,6 +1054,10 @@ void EncReshape::initLUTfromdQPModel()
}
#endif
#if JVET_O0272_LMCS_SIMP_INVERSE_MAPPING
adjustLmcsPivot
();
#endif
int
maxAbsDeltaCW
=
0
,
absDeltaCW
=
0
,
deltaCW
=
0
;
for
(
int
i
=
m_sliceReshapeInfo
.
reshaperModelMinBinIdx
;
i
<=
m_sliceReshapeInfo
.
reshaperModelMaxBinIdx
;
i
++
)
{
...
...
@@ -1261,6 +1265,11 @@ void EncReshape::constructReshaperSDR()
{
m_binCW
[
i
]
=
m_binCW
[
2
*
i
]
+
m_binCW
[
2
*
i
+
1
];
}
#if JVET_O0272_LMCS_SIMP_INVERSE_MAPPING
adjustLmcsPivot
();
#endif
m_sliceReshapeInfo
.
reshaperModelMinBinIdx
=
0
;
m_sliceReshapeInfo
.
reshaperModelMaxBinIdx
=
PIC_CODE_CW_BINS
-
1
;
for
(
int
i
=
0
;
i
<
PIC_CODE_CW_BINS
;
i
++
)
...
...
@@ -1361,6 +1370,44 @@ void EncReshape::constructReshaperSDR()
#endif
}
#if JVET_O0272_LMCS_SIMP_INVERSE_MAPPING
void
EncReshape
::
adjustLmcsPivot
()
{
int
bdShift
=
m_lumaBD
-
10
;
int
totCW
=
bdShift
!=
0
?
(
bdShift
>
0
?
m_reshapeLUTSize
/
(
1
<<
bdShift
)
:
m_reshapeLUTSize
*
(
1
<<
(
-
bdShift
)))
:
m_reshapeLUTSize
;
int
orgCW
=
totCW
/
PIC_CODE_CW_BINS
;
int
log2SegSize
=
g_aucLog2
[
LMCS_SEG_SIZE
];
m_reshapePivot
[
0
]
=
0
;
for
(
int
i
=
0
;
i
<
PIC_CODE_CW_BINS
;
i
++
)
{
m_reshapePivot
[
i
+
1
]
=
m_reshapePivot
[
i
]
+
m_binCW
[
i
];
int
segIdxCurr
=
(
m_reshapePivot
[
i
]
>>
log2SegSize
);
int
segIdxNext
=
(
m_reshapePivot
[
i
+
1
]
>>
log2SegSize
);
if
((
segIdxCurr
==
segIdxNext
)
&&
(
m_reshapePivot
[
i
]
!=
m_reshapePivot
[
i
+
1
])
&&
(
m_reshapePivot
[
i
]
!=
(
segIdxCurr
<<
log2SegSize
)))
{
int16_t
adjustVal
=
((
segIdxCurr
+
1
)
<<
log2SegSize
)
-
m_reshapePivot
[
i
+
1
];
m_reshapePivot
[
i
+
1
]
+=
adjustVal
;
m_binCW
[
i
]
+=
adjustVal
;
for
(
int
j
=
i
+
1
;
j
<
PIC_CODE_CW_BINS
;
j
++
)
{
if
(
m_binCW
[
j
]
<
(
adjustVal
+
(
orgCW
>>
3
)))
{
adjustVal
-=
(
m_binCW
[
j
]
-
(
orgCW
>>
3
));
m_binCW
[
j
]
=
(
orgCW
>>
3
);
}
else
{
m_binCW
[
j
]
-=
adjustVal
;
adjustVal
=
0
;
}
if
(
adjustVal
==
0
)
break
;
}
}
}
}
#endif
#if ENABLE_SPLIT_PARALLELISM || ENABLE_WPP_PARALLELISM
void
EncReshape
::
copyState
(
const
EncReshape
&
other
)
{
...
...
source/Lib/EncoderLib/EncReshape.h
View file @
afb62348
...
...
@@ -93,6 +93,9 @@ public:
ReshapeCW
*
getReshapeCW
()
{
return
&
m_reshapeCW
;
}
Pel
*
getWeightTable
()
{
return
m_cwLumaWeight
;
}
double
getCWeight
()
{
return
m_chromaWeight
;
}
#if JVET_O0272_LMCS_SIMP_INVERSE_MAPPING
void
adjustLmcsPivot
();
#endif
#if ENABLE_SPLIT_PARALLELISM || ENABLE_WPP_PARALLELISM
void
copyState
(
const
EncReshape
&
other
);
...
...
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