Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Remy Foray
VVCSoftware_VTM
Commits
d4cddc85
Commit
d4cddc85
authored
Feb 11, 2019
by
Taoran Lu
Browse files
more fix
parent
65f5a45f
Changes
5
Hide whitespace changes
Inline
Side-by-side
source/Lib/CommonLib/SampleAdaptiveOffset.cpp
View file @
d4cddc85
...
...
@@ -662,6 +662,12 @@ void SampleAdaptiveOffset::xPCMSampleRestoration(CodingUnit& cu, const Component
PelBuf
dstBuf
=
cu
.
cs
->
getRecoBuf
(
currTU
.
block
(
compID
)
);
dstBuf
.
copyFrom
(
pcmBuf
);
#if JVET_M0427_INLOOP_RESHAPER
if
(
cu
.
slice
->
getReshapeInfo
().
getUseSliceReshaper
()
&&
isLuma
(
compID
))
{
dstBuf
.
rspSignal
(
m_pcReshape
->
getInvLUT
());
}
#endif
}
return
;
...
...
@@ -680,6 +686,12 @@ void SampleAdaptiveOffset::xPCMSampleRestoration(CodingUnit& cu, const Component
dstBuf
.
at
(
x
,
y
)
=
(
pcmBuf
.
at
(
x
,
y
)
<<
uiPcmLeftShiftBit
);
}
}
#if JVET_M0427_INLOOP_RESHAPER
if
(
cu
.
slice
->
getReshapeInfo
().
getUseSliceReshaper
()
&&
isLuma
(
compID
))
{
dstBuf
.
rspSignal
(
m_pcReshape
->
getInvLUT
());
}
#endif
}
void
SampleAdaptiveOffset
::
deriveLoopFilterBoundaryAvailibility
(
CodingStructure
&
cs
,
const
Position
&
pos
,
...
...
source/Lib/CommonLib/SampleAdaptiveOffset.h
View file @
d4cddc85
...
...
@@ -40,7 +40,9 @@
#include
"CommonDef.h"
#include
"Unit.h"
#if JVET_M0427_INLOOP_RESHAPER
#include
"Reshape.h"
#endif
//! \ingroup CommonLib
//! \{
...
...
@@ -70,7 +72,9 @@ public:
void
create
(
int
picWidth
,
int
picHeight
,
ChromaFormat
format
,
uint32_t
maxCUWidth
,
uint32_t
maxCUHeight
,
uint32_t
maxCUDepth
,
uint32_t
lumaBitShift
,
uint32_t
chromaBitShift
);
void
destroy
();
static
int
getMaxOffsetQVal
(
const
int
channelBitDepth
)
{
return
(
1
<<
(
std
::
min
<
int
>
(
channelBitDepth
,
MAX_SAO_TRUNCATED_BITDEPTH
)
-
5
))
-
1
;
}
//Table 9-32, inclusive
#if JVET_M0427_INLOOP_RESHAPER
void
setReshaper
(
Reshape
*
p
)
{
m_pcReshape
=
p
;
}
#endif
protected:
void
deriveLoopFilterBoundaryAvailibility
(
CodingStructure
&
cs
,
const
Position
&
pos
,
bool
&
isLeftAvail
,
...
...
@@ -93,7 +97,9 @@ protected:
void
xPCMCURestoration
(
CodingStructure
&
cs
,
const
UnitArea
&
ctuArea
);
void
xPCMSampleRestoration
(
CodingUnit
&
cu
,
const
ComponentID
compID
);
void
xReconstructBlkSAOParams
(
CodingStructure
&
cs
,
SAOBlkParam
*
saoBlkParams
);
#if JVET_M0427_INLOOP_RESHAPER
Reshape
*
m_pcReshape
;
#endif
protected:
uint32_t
m_offsetStepLog2
[
MAX_NUM_COMPONENT
];
//offset step
PelStorage
m_tempBuf
;
...
...
source/Lib/DecoderLib/DecLib.cpp
View file @
d4cddc85
...
...
@@ -564,6 +564,7 @@ void DecLib::executeLoopFilters()
CHECK
((
m_cReshaper
.
getRecReshaped
()
==
false
),
"Rec picture is not reshaped!"
);
m_pcPic
->
getRecoBuf
(
COMPONENT_Y
).
rspSignal
(
m_cReshaper
.
getInvLUT
());
m_cReshaper
.
setRecReshaped
(
false
);
m_cSAO
.
setReshaper
(
&
m_cReshaper
);
}
#endif
// deblocking filter
...
...
source/Lib/EncoderLib/EncCu.cpp
View file @
d4cddc85
...
...
@@ -1893,7 +1893,18 @@ void EncCu::xFillPCMBuffer( CodingUnit &cu )
const
CPelBuf
source
=
tu
.
cs
->
getOrgBuf
(
compArea
);
PelBuf
destination
=
tu
.
getPcmbuf
(
compID
);
destination
.
copyFrom
(
source
);
#if JVET_M0427_INLOOP_RESHAPER
if
(
tu
.
cs
->
slice
->
getReshapeInfo
().
getUseSliceReshaper
()
&&
m_pcReshape
->
getCTUFlag
()
&&
compID
==
COMPONENT_Y
)
{
CompArea
tmpArea
(
COMPONENT_Y
,
compArea
.
chromaFormat
,
Position
(
0
,
0
),
compArea
.
size
());
PelBuf
tempOrgBuf
=
m_tmpStorageLCU
->
getBuf
(
tmpArea
);
tempOrgBuf
.
copyFrom
(
source
);
tempOrgBuf
.
rspSignal
(
m_pcReshape
->
getFwdLUT
());
destination
.
copyFrom
(
tempOrgBuf
);
}
else
#endif
destination
.
copyFrom
(
source
);
}
}
}
...
...
source/Lib/EncoderLib/IntraSearch.cpp
View file @
d4cddc85
...
...
@@ -1338,13 +1338,25 @@ void IntraSearch::xEncPCM(CodingStructure &cs, Partitioner& partitioner, const C
CPelBuf
orgBuf
=
cs
.
getOrgBuf
(
area
);
CHECK
(
pcmShiftRight
<
0
,
"Negative shift"
);
#if JVET_M0427_INLOOP_RESHAPER
CompArea
tmpArea
(
COMPONENT_Y
,
area
.
chromaFormat
,
Position
(
0
,
0
),
area
.
size
());
PelBuf
tempOrgBuf
=
m_tmpStorageLCU
.
getBuf
(
tmpArea
);
tempOrgBuf
.
copyFrom
(
orgBuf
);
if
(
cs
.
slice
->
getReshapeInfo
().
getUseSliceReshaper
()
&&
m_pcReshape
->
getCTUFlag
()
&&
compID
==
COMPONENT_Y
)
{
tempOrgBuf
.
rspSignal
(
m_pcReshape
->
getFwdLUT
());
}
#endif
for
(
uint32_t
uiY
=
0
;
uiY
<
pcmBuf
.
height
;
uiY
++
)
{
for
(
uint32_t
uiX
=
0
;
uiX
<
pcmBuf
.
width
;
uiX
++
)
{
// Encode
#if JVET_M0427_INLOOP_RESHAPER
pcmBuf
.
at
(
uiX
,
uiY
)
=
tempOrgBuf
.
at
(
uiX
,
uiY
)
>>
pcmShiftRight
;
#else
pcmBuf
.
at
(
uiX
,
uiY
)
=
orgBuf
.
at
(
uiX
,
uiY
)
>>
pcmShiftRight
;
#endif
// Reconstruction
recBuf
.
at
(
uiX
,
uiY
)
=
pcmBuf
.
at
(
uiX
,
uiY
)
<<
pcmShiftRight
;
}
...
...
Write
Preview
Supports
Markdown
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