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
16
Merge Requests
16
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
058998c8
Commit
058998c8
authored
Jan 25, 2019
by
Taoran Lu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
address discussion points and rebase
parent
442a0444
Changes
22
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
340 additions
and
282 deletions
+340
-282
source/App/EncoderApp/EncAppCfg.cpp
source/App/EncoderApp/EncAppCfg.cpp
+3
-2
source/Lib/CommonLib/Buffer.cpp
source/Lib/CommonLib/Buffer.cpp
+3
-3
source/Lib/CommonLib/Buffer.h
source/Lib/CommonLib/Buffer.h
+1
-1
source/Lib/CommonLib/CommonDef.h
source/Lib/CommonLib/CommonDef.h
+2
-9
source/Lib/CommonLib/RdCost.cpp
source/Lib/CommonLib/RdCost.cpp
+48
-36
source/Lib/CommonLib/RdCost.h
source/Lib/CommonLib/RdCost.h
+12
-9
source/Lib/CommonLib/Reshape.cpp
source/Lib/CommonLib/Reshape.cpp
+46
-43
source/Lib/CommonLib/Reshape.h
source/Lib/CommonLib/Reshape.h
+9
-7
source/Lib/CommonLib/Unit.cpp
source/Lib/CommonLib/Unit.cpp
+7
-0
source/Lib/CommonLib/Unit.h
source/Lib/CommonLib/Unit.h
+3
-0
source/Lib/DecoderLib/DecCu.cpp
source/Lib/DecoderLib/DecCu.cpp
+2
-2
source/Lib/DecoderLib/DecLib.cpp
source/Lib/DecoderLib/DecLib.cpp
+1
-1
source/Lib/DecoderLib/VLCReader.cpp
source/Lib/DecoderLib/VLCReader.cpp
+15
-11
source/Lib/EncoderLib/EncAdaptiveLoopFilter.cpp
source/Lib/EncoderLib/EncAdaptiveLoopFilter.cpp
+6
-2
source/Lib/EncoderLib/EncAdaptiveLoopFilter.h
source/Lib/EncoderLib/EncAdaptiveLoopFilter.h
+2
-2
source/Lib/EncoderLib/EncGOP.cpp
source/Lib/EncoderLib/EncGOP.cpp
+9
-5
source/Lib/EncoderLib/EncLib.cpp
source/Lib/EncoderLib/EncLib.cpp
+1
-1
source/Lib/EncoderLib/EncReshape.cpp
source/Lib/EncoderLib/EncReshape.cpp
+133
-111
source/Lib/EncoderLib/EncReshape.h
source/Lib/EncoderLib/EncReshape.h
+22
-22
source/Lib/EncoderLib/InterSearch.cpp
source/Lib/EncoderLib/InterSearch.cpp
+2
-2
source/Lib/EncoderLib/IntraSearch.cpp
source/Lib/EncoderLib/IntraSearch.cpp
+2
-2
source/Lib/EncoderLib/VLCWriter.cpp
source/Lib/EncoderLib/VLCWriter.cpp
+11
-11
No files found.
source/App/EncoderApp/EncAppCfg.cpp
View file @
058998c8
...
...
@@ -708,6 +708,7 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] )
int
warnUnknowParameter
=
0
;
#if JVET_M0427_INLOOP_RESHAPER
const
int
CW_NUMS
=
3
;
const
uint32_t
defaultBinCW
[
CW_NUMS
-
1
]
=
{
38
,
28
};
const
uint32_t
defaultBinThr
[
CW_NUMS
-
1
]
=
{
2500
,
4000
};
SMultiValueInput
<
uint32_t
>
cfg_BinCW
(
0
,
64
,
CW_NUMS
-
1
,
CW_NUMS
-
1
,
defaultBinCW
,
sizeof
(
defaultBinCW
)
/
sizeof
(
uint32_t
));
...
...
@@ -1852,7 +1853,7 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] )
m_reshapeCW
.
RspFps
=
m_iFrameRate
;
m_reshapeCW
.
RspIntraPeriod
=
m_iIntraPeriod
;
m_reshapeCW
.
RspPicSize
=
m_iSourceWidth
*
m_iSourceHeight
;
const
int
FpsToIpTable
[
MAX_FRAME_RATE
+
1
]
=
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
16
,
16
,
16
,
16
,
16
,
16
,
16
,
16
,
16
,
16
,
16
,
16
,
16
,
16
,
16
,
16
,
32
,
32
,
32
,
32
,
32
,
32
,
32
,
32
,
32
,
32
,
32
,
32
,
32
,
32
,
32
,
32
,
48
,
48
,
48
,
48
,
48
,
48
,
48
,
48
,
48
,
48
,
48
,
48
,
48
,
48
,
48
,
48
,
64
,
64
,
64
,
64
,
64
,
64
,
64
,
64
,
64
,
64
,
64
,
64
,
64
,
64
,
64
,
64
,
80
,
80
,
80
,
80
,
80
,
80
,
80
,
80
,
80
,
80
,
80
,
80
,
80
,
80
,
80
,
80
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
112
,
112
,
112
,
112
,
112
,
112
,
112
,
112
,
112
,
112
,
112
,
112
,
112
,
112
,
112
,
112
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
128
};
const
int
FpsToIpTable
[
129
]
=
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
16
,
16
,
16
,
16
,
16
,
16
,
16
,
16
,
16
,
16
,
16
,
16
,
16
,
16
,
16
,
16
,
32
,
32
,
32
,
32
,
32
,
32
,
32
,
32
,
32
,
32
,
32
,
32
,
32
,
32
,
32
,
32
,
48
,
48
,
48
,
48
,
48
,
48
,
48
,
48
,
48
,
48
,
48
,
48
,
48
,
48
,
48
,
48
,
64
,
64
,
64
,
64
,
64
,
64
,
64
,
64
,
64
,
64
,
64
,
64
,
64
,
64
,
64
,
64
,
80
,
80
,
80
,
80
,
80
,
80
,
80
,
80
,
80
,
80
,
80
,
80
,
80
,
80
,
80
,
80
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
112
,
112
,
112
,
112
,
112
,
112
,
112
,
112
,
112
,
112
,
112
,
112
,
112
,
112
,
112
,
112
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
128
};
m_reshapeCW
.
RspFpsToIp
=
FpsToIpTable
[
m_iFrameRate
];
m_reshapeCW
.
RspBaseQP
=
m_iQP
;
#endif
...
...
@@ -2243,7 +2244,7 @@ bool EncAppCfg::xCheckParameter()
if
(
m_bLumaReshapeEnable
&&
(
m_internalBitDepth
[
CHANNEL_TYPE_LUMA
]
!=
10
))
{
m_bLumaReshapeEnable
=
false
;
msg
(
WARNING
,
"Reshaping is
implemented for 10bit luma internal bitdepth
.
\n
"
);
msg
(
WARNING
,
"Reshaping is
turned off for luma internal bitdepth not equal to 10
.
\n
"
);
}
if
(
!
m_bLumaReshapeEnable
)
{
...
...
source/Lib/CommonLib/Buffer.cpp
View file @
058998c8
...
...
@@ -368,11 +368,12 @@ void AreaBuf<Pel>::rspSignal(std::vector<Pel>& pLUT)
}
template
<
>
void
AreaBuf
<
Pel
>::
scaleSignal
(
const
int
scale
,
const
bool
dir
)
void
AreaBuf
<
Pel
>::
scaleSignal
(
const
int
scale
,
const
bool
dir
,
const
ClpRng
&
clpRng
)
{
Pel
*
dst
=
buf
;
Pel
*
src
=
buf
;
int
sign
,
absval
;
int
maxAbsclipBD
=
(
1
<<
clpRng
.
bd
)
-
1
;
if
(
dir
)
// forward
{
...
...
@@ -388,8 +389,7 @@ void AreaBuf<Pel>::scaleSignal(const int scale, const bool dir)
{
sign
=
src
[
x
]
>=
0
?
1
:
-
1
;
absval
=
sign
*
src
[
x
];
dst
[
x
]
=
sign
*
(((
absval
<<
CSCALE_FP_PREC
)
+
(
scale
>>
1
))
/
scale
);
dst
[
x
]
=
dst
[
x
]
>
1023
?
1023
:
dst
[
x
]
<
-
1023
?
-
1023
:
dst
[
x
];
dst
[
x
]
=
(
Pel
)
Clip3
(
-
maxAbsclipBD
,
maxAbsclipBD
,
sign
*
(((
absval
<<
CSCALE_FP_PREC
)
+
(
scale
>>
1
))
/
scale
));
}
dst
+=
stride
;
src
+=
stride
;
...
...
source/Lib/CommonLib/Buffer.h
View file @
058998c8
...
...
@@ -134,7 +134,7 @@ struct AreaBuf : public Size
#if JVET_M0427_INLOOP_RESHAPER
void
rspSignal
(
std
::
vector
<
Pel
>&
pLUT
);
void
scaleSignal
(
const
int
scale
,
const
bool
dir
);
void
scaleSignal
(
const
int
scale
,
const
bool
dir
,
const
ClpRng
&
clpRng
);
T
computeAvg
(
)
const
;
#endif
T
&
at
(
const
int
&
x
,
const
int
&
y
)
{
return
buf
[
y
*
stride
+
x
];
}
...
...
source/Lib/CommonLib/CommonDef.h
View file @
058998c8
...
...
@@ -405,17 +405,10 @@ static const int IBC_FAST_METHOD_NOINTRA_IBCCBF0 = 0x01;
static
const
int
IBC_FAST_METHOD_BUFFERBV
=
0X02
;
static
const
int
IBC_FAST_METHOD_ADAPTIVE_SEARCHRANGE
=
0X04
;
#if JVET_M0427_INLOOP_RESHAPER
static
const
int
MAX_LUMA_RESHAPING_LUT_SIZE
=
1024
;
static
const
int
CSCALE_FP_PREC
=
11
;
static
const
int
PIC_ANALYZE_CW_BINS
=
32
;
static
const
int
FP_PREC
=
14
;
static
const
int
log2_MAX_LUMA_RESHAPING_LUT_SIZE
=
10
;
static
const
int
log2_PIC_ANALYZE_CW_BINS
=
5
;
static
const
int
PIC_ANALYZE_WIN_SIZE
=
5
;
static
const
int
CW_NUMS
=
3
;
static
const
int
MAX_FRAME_RATE
=
128
;
static
const
int
PIC_CODE_CW_BINS
=
16
;
static
const
int
log2_PIC_CODE_CW_BINS
=
4
;
static
const
int
FP_PREC
=
14
;
static
const
int
CSCALE_FP_PREC
=
11
;
#endif
#if JVET_M0512_MOTION_BUFFER_COMPRESSION
static
constexpr
int
MV_EXPONENT_BITCOUNT
=
4
;
...
...
source/Lib/CommonLib/RdCost.cpp
View file @
058998c8
...
...
@@ -177,8 +177,9 @@ void RdCost::init()
m_motionLambda
=
0
;
m_iCostScale
=
0
;
#if JVET_M0427_INLOOP_RESHAPER
m_iSignalType
=
RESHAPE_SIGNAL_NULL
;
m_chroma_weight
=
1.0
;
m_signalType
=
RESHAPE_SIGNAL_NULL
;
m_chromaWeight
=
1.0
;
m_lumaBD
=
10
;
#endif
}
...
...
@@ -2862,11 +2863,14 @@ Distortion RdCost::xGetHADs( const DistParam &rcDtParam )
#if WCG_EXT
double
RdCost
::
m_lumaLevelToWeightPLUT
[
LUMA_LEVEL_TO_DQP_LUT_MAXSIZE
];
#if JVET_M0427_INLOOP_RESHAPER
double
RdCost
::
m_reshapeLumaLevelToWeightPLUT
[
LUMA_LEVEL_TO_DQP_LUT_MAXSIZE
];
uint32_t
RdCost
::
m_iSignalType
;
double
RdCost
::
m_chroma_weight
;
uint32_t
RdCost
::
m_signalType
;
double
RdCost
::
m_chromaWeight
;
int
RdCost
::
m_lumaBD
;
std
::
vector
<
double
>
RdCost
::
m_reshapeLumaLevelToWeightPLUT
;
std
::
vector
<
double
>
RdCost
::
m_lumaLevelToWeightPLUT
;
#else
double
RdCost
::
m_lumaLevelToWeightPLUT
[
LUMA_LEVEL_TO_DQP_LUT_MAXSIZE
];
#endif
void
RdCost
::
saveUnadjustedLambda
()
...
...
@@ -2877,18 +2881,6 @@ void RdCost::saveUnadjustedLambda()
void
RdCost
::
initLumaLevelToWeightTable
()
{
#if JVET_M0427_INLOOP_RESHAPER
if
(
m_iSignalType
==
RESHAPE_SIGNAL_SDR
)
{
double
weight
=
1.0
;
for
(
int
i
=
0
;
i
<
LUMA_LEVEL_TO_DQP_LUT_MAXSIZE
;
i
++
)
{
m_lumaLevelToWeightPLUT
[
i
]
=
weight
;
}
return
;
}
#endif
for
(
int
i
=
0
;
i
<
LUMA_LEVEL_TO_DQP_LUT_MAXSIZE
;
i
++
)
{
double
x
=
i
;
double
y
;
...
...
@@ -2910,15 +2902,33 @@ void RdCost::initLumaLevelToWeightTable()
m_lumaLevelToWeightPLUT
[
i
]
=
pow
(
2.0
,
y
/
3.0
);
// or power(10, dQp/10) they are almost equal
}
#if JVET_M0427_INLOOP_RESHAPER
memcpy
(
m_reshapeLumaLevelToWeightPLUT
,
m_lumaLevelToWeightPLUT
,
LUMA_LEVEL_TO_DQP_LUT_MAXSIZE
*
sizeof
(
double
));
#endif
}
#if JVET_M0427_INLOOP_RESHAPER
void
RdCost
::
initLumaLevelToWeightTableReshape
()
{
int
lutSize
=
1
<<
m_lumaBD
;
if
(
m_reshapeLumaLevelToWeightPLUT
.
empty
())
m_reshapeLumaLevelToWeightPLUT
.
resize
(
lutSize
,
1.0
);
if
(
m_lumaLevelToWeightPLUT
.
empty
())
m_lumaLevelToWeightPLUT
.
resize
(
lutSize
,
1.0
);
if
(
m_signalType
==
RESHAPE_SIGNAL_PQ
)
{
for
(
int
i
=
0
;
i
<
(
1
<<
m_lumaBD
);
i
++
)
{
double
x
=
m_lumaBD
<
10
?
i
<<
(
10
-
m_lumaBD
)
:
m_lumaBD
>
10
?
i
>>
(
m_lumaBD
-
10
)
:
i
;
double
y
;
y
=
0.015
*
x
-
1.5
-
6
;
y
=
y
<
-
3
?
-
3
:
(
y
>
6
?
6
:
y
);
m_reshapeLumaLevelToWeightPLUT
[
i
]
=
pow
(
2.0
,
y
/
3.0
);
m_lumaLevelToWeightPLUT
[
i
]
=
m_reshapeLumaLevelToWeightPLUT
[
i
];
}
}
}
void
RdCost
::
updateReshapeLumaLevelToWeightTableChromaMD
(
std
::
vector
<
Pel
>&
ILUT
)
{
for
(
int
i
=
0
;
i
<
LUMA_LEVEL_TO_DQP_LUT_MAXSIZE
;
i
++
)
// idx in reshaped domain;
for
(
int
i
=
0
;
i
<
(
1
<<
m_lumaBD
);
i
++
)
{
m_reshapeLumaLevelToWeightPLUT
[
i
]
=
m_lumaLevelToWeightPLUT
[
ILUT
[
i
]];
}
...
...
@@ -2926,19 +2936,21 @@ void RdCost::updateReshapeLumaLevelToWeightTableChromaMD(std::vector<Pel>& ILUT)
void
RdCost
::
restoreReshapeLumaLevelToWeightTable
()
{
memcpy
(
m_reshapeLumaLevelToWeightPLUT
,
m_lumaLevelToWeightPLUT
,
LUMA_LEVEL_TO_DQP_LUT_MAXSIZE
*
sizeof
(
double
));
for
(
int
i
=
0
;
i
<
(
1
<<
m_lumaBD
);
i
++
)
{
m_reshapeLumaLevelToWeightPLUT
.
at
(
i
)
=
m_lumaLevelToWeightPLUT
.
at
(
i
);
}
}
void
RdCost
::
updateReshapeLumaLevelToWeightTable
(
sliceReshapeInfo
&
sliceReshape
,
Pel
*
wt_table
,
double
cwt
)
void
RdCost
::
updateReshapeLumaLevelToWeightTable
(
sliceReshapeInfo
&
sliceReshape
,
Pel
*
wtTable
,
double
cwt
)
{
if
(
m_
iS
ignalType
==
RESHAPE_SIGNAL_SDR
)
if
(
m_
s
ignalType
==
RESHAPE_SIGNAL_SDR
)
{
if
(
sliceReshape
.
getSliceReshapeModelPresentFlag
())
{
double
w
_b
in
=
1.0
;
double
w
B
in
=
1.0
;
double
weight
=
1.0
;
int
hist
_lens
=
MAX_LUMA_RESHAPING_LUT_SIZE
/
PIC_CODE_CW_BINS
;
int
hist
Lens
=
(
1
<<
m_lumaBD
)
/
PIC_CODE_CW_BINS
;
for
(
int
i
=
0
;
i
<
PIC_CODE_CW_BINS
;
i
++
)
{
...
...
@@ -2946,21 +2958,21 @@ void RdCost::updateReshapeLumaLevelToWeightTable(sliceReshapeInfo &sliceReshape,
weight
=
1.0
;
else
{
if
(
sliceReshape
.
reshape_model_bin_CW_delta
[
i
]
==
1
||
sliceReshape
.
reshape_model_bin_CW_delta
[
i
]
==
-
1
*
MAX_LUMA_RESHAPING_LUT_SIZE
/
PIC_CODE_CW_BINS
)
weight
=
w
_b
in
;
if
(
sliceReshape
.
reshape_model_bin_CW_delta
[
i
]
==
1
||
(
sliceReshape
.
reshape_model_bin_CW_delta
[
i
]
==
-
1
*
histLens
)
)
weight
=
w
B
in
;
else
{
weight
=
(
double
)
wt
_table
[
i
]
/
(
double
)
hist_l
ens
;
weight
=
(
double
)
wt
Table
[
i
]
/
(
double
)
histL
ens
;
weight
=
weight
*
weight
;
}
}
for
(
int
j
=
0
;
j
<
hist
_l
ens
;
j
++
)
for
(
int
j
=
0
;
j
<
hist
L
ens
;
j
++
)
{
int
ii
=
i
*
hist
_l
ens
+
j
;
int
ii
=
i
*
hist
L
ens
+
j
;
m_reshapeLumaLevelToWeightPLUT
[
ii
]
=
weight
;
}
}
m_chroma
_w
eight
=
cwt
;
m_chroma
W
eight
=
cwt
;
}
else
{
...
...
@@ -2987,13 +2999,13 @@ Distortion RdCost::getWeightedMSE(int compIdx, const Pel org, const Pel cur, con
// use luma to get weight
#if JVET_M0427_INLOOP_RESHAPER
double
weight
=
1.0
;
if
(
m_
iS
ignalType
==
RESHAPE_SIGNAL_SDR
)
if
(
m_
s
ignalType
==
RESHAPE_SIGNAL_SDR
)
{
if
(
compIdx
==
COMPONENT_Y
)
weight
=
m_reshapeLumaLevelToWeightPLUT
[
orgLuma
];
else
{
weight
=
m_chroma
_w
eight
;
weight
=
m_chroma
W
eight
;
}
}
else
...
...
source/Lib/CommonLib/RdCost.h
View file @
058998c8
...
...
@@ -107,11 +107,14 @@ private:
#if WCG_EXT
double
m_dLambda_unadjusted
;
// TODO: check is necessary
double
m_DistScaleUnadjusted
;
static
double
m_lumaLevelToWeightPLUT
[
LUMA_LEVEL_TO_DQP_LUT_MAXSIZE
];
#if JVET_M0427_INLOOP_RESHAPER
static
double
m_reshapeLumaLevelToWeightPLUT
[
LUMA_LEVEL_TO_DQP_LUT_MAXSIZE
];
static
uint32_t
m_iSignalType
;
static
double
m_chroma_weight
;
static
std
::
vector
<
double
>
m_reshapeLumaLevelToWeightPLUT
;
static
std
::
vector
<
double
>
m_lumaLevelToWeightPLUT
;
static
uint32_t
m_signalType
;
static
double
m_chromaWeight
;
static
int
m_lumaBD
;
#else
static
double
m_lumaLevelToWeightPLUT
[
LUMA_LEVEL_TO_DQP_LUT_MAXSIZE
];
#endif
#endif
double
m_DistScale
;
...
...
@@ -296,13 +299,13 @@ public:
void
initLumaLevelToWeightTable
();
inline
double
getWPSNRLumaLevelWeight
(
int
val
)
{
return
m_lumaLevelToWeightPLUT
[
val
];
}
#if JVET_M0427_INLOOP_RESHAPER
void
initLumaLevelToWeightTableReshape
();
void
updateReshapeLumaLevelToWeightTableChromaMD
(
std
::
vector
<
Pel
>&
ILUT
);
void
restoreReshapeLumaLevelToWeightTable
();
inline
double
getWPSNRReshapeLumaLevelWeight
(
int
val
)
{
return
m_reshapeLumaLevelToWeightPLUT
[
val
];
}
uint32_t
getReshapeSignalType
()
const
{
return
m_iSignalType
;
}
void
setReshapeSignalType
(
uint32_t
type
)
{
m_iSignalType
=
type
;
}
void
updateReshapeLumaLevelToWeightTable
(
sliceReshapeInfo
&
sliceReshape
,
Pel
*
wt_table
,
double
cwt
);
inline
double
*
getLumaLevelWeightTable
()
{
return
m_lumaLevelToWeightPLUT
;
}
inline
double
getWPSNRReshapeLumaLevelWeight
(
int
val
)
{
return
m_reshapeLumaLevelToWeightPLUT
[
val
];
}
void
setReshapeInfo
(
uint32_t
type
,
int
lumaBD
)
{
m_signalType
=
type
;
m_lumaBD
=
lumaBD
;
}
void
updateReshapeLumaLevelToWeightTable
(
sliceReshapeInfo
&
sliceReshape
,
Pel
*
wtTable
,
double
cwt
);
inline
std
::
vector
<
double
>&
getLumaLevelWeightTable
()
{
return
m_lumaLevelToWeightPLUT
;
}
#endif
#endif
...
...
source/Lib/CommonLib/Reshape.cpp
View file @
058998c8
...
...
@@ -51,25 +51,27 @@ Reshape::Reshape()
m_bCTUFlag
=
false
;
m_bRecReshaped
=
false
;
m_bReshape
=
true
;
m_uiCWOrg
=
MAX_LUMA_RESHAPING_LUT_SIZE
/
PIC_CODE_CW_BINS
;
}
Reshape
::~
Reshape
()
{
}
void
Reshape
::
create
_dec
(
)
void
Reshape
::
create
Dec
(
int
bitDepth
)
{
m_lumaBD
=
bitDepth
;
m_reshapeLUTSize
=
1
<<
m_lumaBD
;
m_initCW
=
m_reshapeLUTSize
/
PIC_CODE_CW_BINS
;
if
(
forwardReshapingLUT
.
empty
())
forwardReshapingLUT
.
resize
(
MAX_LUMA_RESHAPING_LUT_SIZE
,
0
);
forwardReshapingLUT
.
resize
(
m_reshapeLUTSize
,
0
);
if
(
inverseReshapingLUT
.
empty
())
inverseReshapingLUT
.
resize
(
MAX_LUMA_RESHAPING_LUT_SIZE
,
0
);
if
(
m_
uiBinCWAll
.
empty
())
m_
uiBinCWAll
.
resize
(
PIC_CODE_CW_BINS
,
0
);
if
(
m_
R
eshapePivot
.
empty
())
m_
R
eshapePivot
.
resize
(
PIC_CODE_CW_BINS
+
1
,
0
);
if
(
C
hromaAdjHelpLUT
.
empty
())
ChromaAdjHelpLUT
.
resize
(
PIC_CODE_CW_BINS
,
2048
);
inverseReshapingLUT
.
resize
(
m_reshapeLUTSize
,
0
);
if
(
m_
binCW
.
empty
())
m_
binCW
.
resize
(
PIC_CODE_CW_BINS
,
0
);
if
(
m_
r
eshapePivot
.
empty
())
m_
r
eshapePivot
.
resize
(
PIC_CODE_CW_BINS
+
1
,
0
);
if
(
m_c
hromaAdjHelpLUT
.
empty
())
m_chromaAdjHelpLUT
.
resize
(
PIC_CODE_CW_BINS
,
1
<<
CSCALE_FP_PREC
);
}
void
Reshape
::
destroy
()
...
...
@@ -82,38 +84,38 @@ void Reshape::destroy()
\retval OutputLUT describing the inversed LUT of InputLUT
\param lut_size size of LUT in number of samples
*/
void
Reshape
::
ReverseLUT
(
std
::
vector
<
Pel
>&
InputLUT
,
std
::
vector
<
Pel
>&
OutputLUT
,
uint16_t
lut_s
ize
)
void
Reshape
::
reverseLUT
(
std
::
vector
<
Pel
>&
inputLUT
,
std
::
vector
<
Pel
>&
outputLUT
,
uint16_t
lutS
ize
)
{
int
i
,
j
;
OutputLUT
[
m_ReshapePivot
[
m_sliceReshapeInfo
.
reshape_model_min_bin_idx
]]
=
m_sliceReshapeInfo
.
reshape_model_min_bin_idx
*
m_uiCWOrg
;
outputLUT
[
m_reshapePivot
[
m_sliceReshapeInfo
.
reshape_model_min_bin_idx
]]
=
m_sliceReshapeInfo
.
reshape_model_min_bin_idx
*
m_initCW
;
for
(
i
=
m_sliceReshapeInfo
.
reshape_model_min_bin_idx
;
i
<=
m_sliceReshapeInfo
.
reshape_model_max_bin_idx
;
i
++
)
{
int16_t
X1
=
m_
R
eshapePivot
[
i
];
int16_t
X2
=
m_
R
eshapePivot
[
i
+
1
];
OutputLUT
[
X2
]
=
(
i
+
1
)
*
m_uiCWOrg
;
int16_t
Y1
=
O
utputLUT
[
X1
];
int16_t
Y2
=
O
utputLUT
[
X2
];
int16_t
X1
=
m_
r
eshapePivot
[
i
];
int16_t
X2
=
m_
r
eshapePivot
[
i
+
1
];
outputLUT
[
X2
]
=
(
i
+
1
)
*
m_initCW
;
int16_t
Y1
=
o
utputLUT
[
X1
];
int16_t
Y2
=
o
utputLUT
[
X2
];
if
(
X2
!=
X1
)
{
int32_t
scale
=
(
int32_t
)(
Y2
-
Y1
)
*
(
1
<<
FP_PREC
)
/
(
int32_t
)(
X2
-
X1
);
for
(
j
=
X1
+
1
;
j
<
X2
;
j
++
)
{
O
utputLUT
[
j
]
=
(
Pel
)((
scale
*
(
int32_t
)(
j
-
X1
)
+
(
1
<<
(
FP_PREC
-
1
)))
>>
FP_PREC
)
+
Y1
;
o
utputLUT
[
j
]
=
(
Pel
)((
scale
*
(
int32_t
)(
j
-
X1
)
+
(
1
<<
(
FP_PREC
-
1
)))
>>
FP_PREC
)
+
Y1
;
}
}
}
for
(
i
=
0
;
i
<
m_
R
eshapePivot
[
m_sliceReshapeInfo
.
reshape_model_min_bin_idx
];
i
++
)
OutputLUT
[
i
]
=
OutputLUT
[
m_R
eshapePivot
[
m_sliceReshapeInfo
.
reshape_model_min_bin_idx
]];
for
(
i
=
m_
ReshapePivot
[
m_sliceReshapeInfo
.
reshape_model_max_bin_idx
+
1
];
i
<
MAX_LUMA_RESHAPING_LUT_SIZE
;
i
++
)
OutputLUT
[
i
]
=
OutputLUT
[
m_R
eshapePivot
[
m_sliceReshapeInfo
.
reshape_model_max_bin_idx
+
1
]];
for
(
i
=
0
;
i
<
m_
r
eshapePivot
[
m_sliceReshapeInfo
.
reshape_model_min_bin_idx
];
i
++
)
outputLUT
[
i
]
=
outputLUT
[
m_r
eshapePivot
[
m_sliceReshapeInfo
.
reshape_model_min_bin_idx
]];
for
(
i
=
m_
reshapePivot
[
m_sliceReshapeInfo
.
reshape_model_max_bin_idx
+
1
];
i
<
m_reshapeLUTSize
;
i
++
)
outputLUT
[
i
]
=
outputLUT
[
m_r
eshapePivot
[
m_sliceReshapeInfo
.
reshape_model_max_bin_idx
+
1
]];
bool
clipRange
=
((
m_sliceReshapeInfo
.
reshape_model_min_bin_idx
>
0
)
&&
(
m_sliceReshapeInfo
.
reshape_model_max_bin_idx
<
(
PIC_CODE_CW_BINS
-
1
)));
for
(
i
=
0
;
i
<
lut
_s
ize
;
i
++
)
for
(
i
=
0
;
i
<
lut
S
ize
;
i
++
)
{
if
(
clipRange
)
OutputLUT
[
i
]
=
Clip3
((
Pel
)
64
,
(
Pel
)
940
,
O
utputLUT
[
i
]);
else
OutputLUT
[
i
]
=
Clip3
((
Pel
)
0
,
(
Pel
)
1023
,
O
utputLUT
[
i
]);
if
(
clipRange
)
outputLUT
[
i
]
=
Clip3
((
Pel
)(
16
<<
(
m_lumaBD
-
8
)),
(
Pel
)(
235
<<
(
m_lumaBD
-
8
)),
o
utputLUT
[
i
]);
else
outputLUT
[
i
]
=
Clip3
((
Pel
)
0
,
(
Pel
)((
1
<<
m_lumaBD
)
-
1
),
o
utputLUT
[
i
]);
}
}
...
...
@@ -124,8 +126,8 @@ void Reshape::ReverseLUT(std::vector<Pel>& InputLUT, std::vector<Pel>& OutputLUT
*/
int
Reshape
::
calculateChromaAdj
(
Pel
avgLuma
)
{
int
lumaIdx
=
Clip3
<
int
>
(
0
,
int
(
LUMA_LEVEL_TO_DQP_LUT_MAXSIZE
)
-
1
,
avgLuma
);
int
iAdj
=
C
hromaAdjHelpLUT
[
getPWLIdxInv
(
lumaIdx
)];
int
lumaIdx
=
Clip3
<
int
>
(
0
,
(
1
<<
m_lumaBD
)
-
1
,
avgLuma
);
int
iAdj
=
m_c
hromaAdjHelpLUT
[
getPWLIdxInv
(
lumaIdx
)];
return
(
iAdj
);
}
...
...
@@ -137,15 +139,15 @@ int Reshape::calculateChromaAdj(Pel avgLuma)
int
Reshape
::
getPWLIdxInv
(
int
lumaVal
)
{
int
idxS
=
0
;
if
(
lumaVal
<
m_
R
eshapePivot
[
m_sliceReshapeInfo
.
reshape_model_min_bin_idx
+
1
])
if
(
lumaVal
<
m_
r
eshapePivot
[
m_sliceReshapeInfo
.
reshape_model_min_bin_idx
+
1
])
return
m_sliceReshapeInfo
.
reshape_model_min_bin_idx
;
else
if
(
lumaVal
>=
m_
R
eshapePivot
[
m_sliceReshapeInfo
.
reshape_model_max_bin_idx
])
else
if
(
lumaVal
>=
m_
r
eshapePivot
[
m_sliceReshapeInfo
.
reshape_model_max_bin_idx
])
return
m_sliceReshapeInfo
.
reshape_model_max_bin_idx
;
else
{
for
(
idxS
=
m_sliceReshapeInfo
.
reshape_model_min_bin_idx
;
(
idxS
<
m_sliceReshapeInfo
.
reshape_model_max_bin_idx
);
idxS
++
)
{
if
(
lumaVal
<
m_
R
eshapePivot
[
idxS
+
1
])
break
;
if
(
lumaVal
<
m_
r
eshapePivot
[
idxS
+
1
])
break
;
}
return
idxS
;
}
...
...
@@ -180,33 +182,33 @@ void Reshape::copySliceReshaperInfo(sliceReshapeInfo& tInfo, sliceReshapeInfo& s
void
Reshape
::
constructReshaper
()
{
int
pwlFwdLUTsize
=
PIC_CODE_CW_BINS
;
int
pwlFwdBinLen
=
MAX_LUMA_RESHAPING_LUT_SIZE
/
PIC_CODE_CW_BINS
;
int
pwlFwdBinLen
=
m_reshapeLUTSize
/
PIC_CODE_CW_BINS
;
for
(
int
i
=
0
;
i
<
m_sliceReshapeInfo
.
reshape_model_min_bin_idx
;
i
++
)
m_
uiBinCWAll
[
i
]
=
0
;
m_
binCW
[
i
]
=
0
;
for
(
int
i
=
m_sliceReshapeInfo
.
reshape_model_max_bin_idx
+
1
;
i
<
PIC_CODE_CW_BINS
;
i
++
)
m_
uiBinCWAll
[
i
]
=
0
;
m_
binCW
[
i
]
=
0
;
for
(
int
i
=
m_sliceReshapeInfo
.
reshape_model_min_bin_idx
;
i
<=
m_sliceReshapeInfo
.
reshape_model_max_bin_idx
;
i
++
)
m_
uiBinCWAll
[
i
]
=
(
uint16_t
)(
m_sliceReshapeInfo
.
reshape_model_bin_CW_delta
[
i
]
+
(
int
)
m_uiCWOrg
);
m_
binCW
[
i
]
=
(
uint16_t
)(
m_sliceReshapeInfo
.
reshape_model_bin_CW_delta
[
i
]
+
(
int
)
m_initCW
);
for
(
int
i
=
0
;
i
<
pwlFwdLUTsize
;
i
++
)
{
m_
ReshapePivot
[
i
+
1
]
=
m_ReshapePivot
[
i
]
+
m_uiBinCWAll
[
i
];
int16_t
Y1
=
m_
R
eshapePivot
[
i
];
int16_t
Y2
=
m_
R
eshapePivot
[
i
+
1
];
m_
reshapePivot
[
i
+
1
]
=
m_reshapePivot
[
i
]
+
m_binCW
[
i
];
int16_t
Y1
=
m_
r
eshapePivot
[
i
];
int16_t
Y2
=
m_
r
eshapePivot
[
i
+
1
];
forwardReshapingLUT
[
i
*
pwlFwdBinLen
]
=
Clip3
((
Pel
)
0
,
(
Pel
)
1023
,
(
Pel
)
Y1
);
forwardReshapingLUT
[
i
*
pwlFwdBinLen
]
=
Clip3
((
Pel
)
0
,
(
Pel
)
((
1
<<
m_lumaBD
)
-
1
)
,
(
Pel
)
Y1
);
int
log2_pwlFwdBinLen
=
log2_MAX_LUMA_RESHAPING_LUT_SIZE
-
log2_PIC_CODE_CW_BINS
;
int
log2_pwlFwdBinLen
=
g_aucLog2
[
pwlFwdBinLen
]
;
int32_t
scale
=
((
int32_t
)(
Y2
-
Y1
)
*
(
1
<<
FP_PREC
)
+
(
1
<<
(
log2_pwlFwdBinLen
-
1
)))
>>
(
log2_pwlFwdBinLen
);
for
(
int
j
=
1
;
j
<
pwlFwdBinLen
;
j
++
)
{
int
tempVal
=
Y1
+
(((
int32_t
)
scale
*
(
int32_t
)
j
+
(
1
<<
(
FP_PREC
-
1
)))
>>
FP_PREC
);
forwardReshapingLUT
[
i
*
pwlFwdBinLen
+
j
]
=
Clip3
((
Pel
)
0
,
(
Pel
)
1023
,
(
Pel
)
tempVal
);
forwardReshapingLUT
[
i
*
pwlFwdBinLen
+
j
]
=
Clip3
((
Pel
)
0
,
(
Pel
)
((
1
<<
m_lumaBD
)
-
1
)
,
(
Pel
)
tempVal
);
}
}
ReverseLUT
(
forwardReshapingLUT
,
inverseReshapingLUT
,
MAX_LUMA_RESHAPING_LUT_SIZE
);
reverseLUT
(
forwardReshapingLUT
,
inverseReshapingLUT
,
m_reshapeLUTSize
);
updateChromaDQPLUT
();
}
...
...
@@ -219,10 +221,11 @@ void Reshape::updateChromaDQPLUT()
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
++
)
{
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
((
i
<
m_sliceReshapeInfo
.
reshape_model_min_bin_idx
)
||
(
i
>
m_sliceReshapeInfo
.
reshape_model_max_bin_idx
))
C
hromaAdjHelpLUT
[
i
]
=
1
<<
CSCALE_FP_PREC
;
m_c
hromaAdjHelpLUT
[
i
]
=
1
<<
CSCALE_FP_PREC
;
else
ChromaAdjHelpLUT
[
i
]
=
CW_bin_SC_LUT
[
Clip3
((
uint16_t
)
1
,
(
uint16_t
)
64
,
(
uint16_t
)(
m_uiBinCWAll
[
i
]
>>
1
))
-
1
];
m_chromaAdjHelpLUT
[
i
]
=
CW_bin_SC_LUT
[
Clip3
((
uint16_t
)
1
,
(
uint16_t
)
64
,
(
uint16_t
)(
binCW
>>
1
))
-
1
];
}
}
#endif
...
...
source/Lib/CommonLib/Reshape.h
View file @
058998c8
...
...
@@ -60,22 +60,24 @@ protected:
bool
m_bRecReshaped
;
std
::
vector
<
Pel
>
inverseReshapingLUT
;
std
::
vector
<
Pel
>
forwardReshapingLUT
;
std
::
vector
<
int
>
C
hromaAdjHelpLUT
;
std
::
vector
<
uint16_t
>
m_
uiBinCWAll
;
uint16_t
m_
uiCWOrg
;
std
::
vector
<
int
>
m_c
hromaAdjHelpLUT
;
std
::
vector
<
uint16_t
>
m_
binCW
;
uint16_t
m_
initCW
;
bool
m_bReshape
;
std
::
vector
<
Pel
>
m_ReshapePivot
;
std
::
vector
<
Pel
>
m_reshapePivot
;
int
m_lumaBD
;
int
m_reshapeLUTSize
;
public:
Reshape
();
~
Reshape
();
void
create
_dec
(
);
void
create
Dec
(
int
bitDepth
);
void
destroy
();
void
ReverseLUT
(
std
::
vector
<
Pel
>&
InputLUT
,
std
::
vector
<
Pel
>&
OutputLUT
,
uint16_t
lut_s
ize
);
void
reverseLUT
(
std
::
vector
<
Pel
>&
inputLUT
,
std
::
vector
<
Pel
>&
outputLUT
,
uint16_t
lutS
ize
);
std
::
vector
<
Pel
>&
getFwdLUT
()
{
return
forwardReshapingLUT
;
}
std
::
vector
<
Pel
>&
getInvLUT
()
{
return
inverseReshapingLUT
;
}
std
::
vector
<
int
>&
getChromaAdjHelpLUT
()
{
return
C
hromaAdjHelpLUT
;
}
std
::
vector
<
int
>&
getChromaAdjHelpLUT
()
{
return
m_c
hromaAdjHelpLUT
;
}
bool
getCTUFlag
()
{
return
m_bCTUFlag
;
}
void
setCTUFlag
(
bool
bCTUFlag
)
{
m_bCTUFlag
=
bCTUFlag
;
}
...
...
source/Lib/CommonLib/Unit.cpp
View file @
058998c8
...
...
@@ -278,6 +278,10 @@ CodingUnit& CodingUnit::operator=( const CodingUnit& other )
shareParentSize
=
other
.
shareParentSize
;
#endif
ibc
=
other
.
ibc
;
#if JVET_M0444_SMVD
smvdMode
=
other
.
smvdMode
;
#endif
#if JVET_M0444_SMVD
smvdMode
=
other
.
smvdMode
;
#endif
...
...
@@ -323,6 +327,9 @@ void CodingUnit::initData()
#if JVET_M0444_SMVD
smvdMode
=
0
;
#endif
#if JVET_M0444_SMVD
smvdMode
=
0
;
#endif
}
...
...
source/Lib/CommonLib/Unit.h
View file @
058998c8
...
...
@@ -317,6 +317,9 @@ struct CodingUnit : public UnitArea
Size
shareParentSize
;
#endif
bool
ibc
;
#if JVET_M0444_SMVD
uint8_t
smvdMode
;
#endif
#if JVET_M0444_SMVD
uint8_t
smvdMode
;
#endif
...
...
source/Lib/DecoderLib/DecCu.cpp
View file @
058998c8
...
...
@@ -243,7 +243,7 @@ void DecCu::xIntraRecBlk( TransformUnit& tu, const ComponentID compID )
bFlag
=
bFlag
&&
(
tu
.
blocks
[
compID
].
width
*
tu
.
blocks
[
compID
].
height
>
4
);
if
(
bFlag
&&
TU
::
getCbf
(
tu
,
compID
)
&&
isChroma
(
compID
)
&&
slice
.
getReshapeInfo
().
getSliceReshapeChromaAdj
())
{
piResi
.
scaleSignal
(
tu
.
getChromaAdj
(),
0
);
piResi
.
scaleSignal
(
tu
.
getChromaAdj
(),
0
,
tu
.
cu
->
cs
->
slice
->
clpRng
(
compID
)
);
}
#endif
if
(
isChroma
(
compID
)
&&
tu
.
compAlpha
[
compID
]
!=
0
)
...
...
@@ -570,7 +570,7 @@ void DecCu::xDecodeInterTU( TransformUnit & currTU, const ComponentID compID )
const
Slice
&
slice
=
*
cs
.
slice
;
if
(
slice
.
getReshapeInfo
().
getUseSliceReshaper
()
&&
m_pcReshape
->
getCTUFlag
()
&&
isChroma
(
compID
)
&&
TU
::
getCbf
(
currTU
,
compID
)
&&
slice
.
getReshapeInfo
().
getSliceReshapeChromaAdj
()
&&
currTU
.
blocks
[
compID
].
width
*
currTU
.
blocks
[
compID
].
height
>
4
)
{
resiBuf
.
scaleSignal
(
currTU
.
getChromaAdj
(),
0
);
resiBuf
.
scaleSignal
(
currTU
.
getChromaAdj
(),
0
,
currTU
.
cu
->
cs
->
slice
->
clpRng
(
compID
)
);
}
#endif
if
(
isChroma
(
compID
)
&&
currTU
.
compAlpha
[
compID
]
!=
0
)
...
...
source/Lib/DecoderLib/DecLib.cpp
View file @
058998c8
...
...
@@ -756,7 +756,7 @@ void DecLib::xActivateParameterSets()
#if JVET_M0427_INLOOP_RESHAPER
if
(
sps
->
getUseReshaper
())
{
m_cReshaper
.
create
_dec
(
);
m_cReshaper
.
create
Dec
(
sps
->
getBitDepth
(
CHANNEL_TYPE_LUMA
)
);
}
#endif
...
...
source/Lib/DecoderLib/VLCReader.cpp
View file @
058998c8
...
...
@@ -854,25 +854,29 @@ void HLSyntaxReader::parseSPSNext( SPSNext& spsNext, const bool usePCM )
}
#if JVET_M0427_INLOOP_RESHAPER
void
HLSyntaxReader
::
parseReshaper
(
sliceReshapeInfo
&
info
,
const
SPS
*
pcSPS
,
const
bool
isIntra
)
void
HLSyntaxReader
::
parseReshaper
(
sliceReshapeInfo
&
info
,
const
SPS
*
pcSPS
,
const
bool
isIntra
)
{
unsigned
symbol
=
0
;
READ_FLAG
(
symbol
,
"slice_reshape_model_present_flag"
);
info
.
setSliceReshapeModelPresentFlag
(
symbol
==
1
);
READ_FLAG
(
symbol
,
"slice_reshape_model_present_flag"
);
info
.
setSliceReshapeModelPresentFlag
(
symbol
==
1
);
if
(
info
.
getSliceReshapeModelPresentFlag
())
{
// parse slice reshaper model
memset
(
info
.
reshape_model_bin_CW_delta
,
0
,
PIC_CODE_CW_BINS
*
sizeof
(
int
));
READ_UVLC
(
symbol
,
"reshaper_model_min_bin_idx"
);
info
.
reshape_model_min_bin_idx
=
symbol
;
READ_UVLC
(
symbol
,
"max_bin_minus_reshape_model_max_bin_idx"
);
info
.
reshape_model_max_bin_idx
=
PIC_CODE_CW_BINS
-
1
-
symbol
;
READ_UVLC
(
symbol
,
"reshaper_model_bin_delta_abs_cw_prec_minus1"
);
info
.
maxNbitsNeededDeltaCW
=
symbol
+
1
;
assert
(
info
.
maxNbitsNeededDeltaCW
>
0
);
for
(
uint32_t
i
=
info
.
reshape_model_min_bin_idx
;
i
<=
info
.
reshape_model_max_bin_idx
;
i
++
)
READ_UVLC
(
symbol
,
"reshaper_model_min_bin_idx"
);
info
.
reshape_model_min_bin_idx
=
symbol
;
READ_UVLC
(
symbol
,
"max_bin_minus_reshape_model_max_bin_idx"
);
info
.
reshape_model_max_bin_idx
=
PIC_CODE_CW_BINS
-
1
-
symbol
;
READ_UVLC
(
symbol
,
"reshaper_model_bin_delta_abs_cw_prec_minus1"
);
info
.
maxNbitsNeededDeltaCW
=
symbol
+
1
;
assert
(
info
.
maxNbitsNeededDeltaCW
>
0
);
for
(
uint32_t
i
=
info
.
reshape_model_min_bin_idx
;
i
<=
info
.
reshape_model_max_bin_idx
;
i
++
)
{
READ_CODE
(
info
.
maxNbitsNeededDeltaCW
,
symbol
,
"reshape_model_abs_CW"
);
int
absCW
=
symbol
;
if
(
absCW
>
0
)
{
READ_CODE
(
info
.
maxNbitsNeededDeltaCW
,
symbol
,
"reshape_model_abs_CW"
);
int
absCW
=
symbol
;
if
(
absCW
>
0
)
READ_CODE
(
1
,
symbol
,
"reshape_model_sign_CW"
);
int
signCW
=
symbol
;
info
.
reshape_model_bin_CW_delta
[
i
]
=
(
1
-
2
*
signCW
)
*
absCW
;