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
a24fc4c0
Commit
a24fc4c0
authored
5 years ago
by
Zhi-Yi Lin
Committed by
Xiang Li
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix #386: JVET-O0272 with alignment between SW and text and one corner case bug fixed
parent
b8a28645
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
source/Lib/EncoderLib/EncReshape.cpp
+53
-21
53 additions, 21 deletions
source/Lib/EncoderLib/EncReshape.cpp
with
53 additions
and
21 deletions
source/Lib/EncoderLib/EncReshape.cpp
+
53
−
21
View file @
a24fc4c0
...
...
@@ -1858,9 +1858,6 @@ void EncReshape::constructReshaperLMCS()
{
m_inputPivot
[
i
]
=
m_initCW
*
i
;
}
#if JVET_O0272_LMCS_SIMP_INVERSE_MAPPING
adjustLmcsPivot
();
#endif
m_sliceReshapeInfo
.
reshaperModelMinBinIdx
=
0
;
m_sliceReshapeInfo
.
reshaperModelMaxBinIdx
=
PIC_CODE_CW_BINS
-
1
;
...
...
@@ -1881,6 +1878,10 @@ void EncReshape::constructReshaperLMCS()
}
}
#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
++
)
{
...
...
@@ -2084,10 +2085,6 @@ 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
++
)
...
...
@@ -2107,6 +2104,10 @@ void EncReshape::constructReshaperSDR()
}
}
#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
++
)
{
...
...
@@ -2196,34 +2197,65 @@ void EncReshape::adjustLmcsPivot()
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
];
m_reshapePivot
[
i
+
1
]
=
m_reshapePivot
[
i
]
+
m_binCW
[
i
];
}
int
segIdxMax
=
(
m_reshapePivot
[
m_sliceReshapeInfo
.
reshaperModelMaxBinIdx
+
1
]
>>
log2SegSize
);
for
(
int
i
=
m_sliceReshapeInfo
.
reshaperModelMinBinIdx
;
i
<=
m_sliceReshapeInfo
.
reshaperModelMaxBinIdx
;
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
)))
if
((
segIdxCurr
==
segIdxNext
)
&&
(
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
(
segIdxCurr
==
segIdxMax
)
{
if
(
m_binCW
[
j
]
<
(
adjustVal
+
(
orgCW
>>
3
)))
m_reshapePivot
[
i
]
=
m_reshapePivot
[
m_sliceReshapeInfo
.
reshaperModelMaxBinIdx
+
1
];
for
(
int
j
=
i
;
j
<=
m_sliceReshapeInfo
.
reshaperModelMaxBinIdx
;
j
++
)
{
adjustVal
-
=
(
m_
binCW
[
j
]
-
(
orgCW
>>
3
))
;
m_binCW
[
j
]
=
(
orgCW
>>
3
)
;
m_reshapePivot
[
j
+
1
]
=
m_
reshapePivot
[
i
]
;
m_binCW
[
j
]
=
0
;
}
else
m_binCW
[
i
-
1
]
=
m_reshapePivot
[
i
]
-
m_reshapePivot
[
i
-
1
];
break
;
}
else
{
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
<=
m_sliceReshapeInfo
.
reshaperModelMaxBinIdx
;
j
++
)
{
m_binCW
[
j
]
-=
adjustVal
;
adjustVal
=
0
;
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
;
}
if
(
adjustVal
==
0
)
break
;
}
}
}
for
(
int
i
=
PIC_CODE_CW_BINS
-
1
;
i
>=
0
;
i
--
)
{
if
(
m_binCW
[
i
]
>
0
)
{
m_sliceReshapeInfo
.
reshaperModelMaxBinIdx
=
i
;
break
;
}
}
}
#endif
...
...
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