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
Hongbin Liu
VVCSoftware_VTM
Commits
8de020f2
Commit
8de020f2
authored
Aug 25, 2019
by
Hongbin Liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
JVET-O0625/O654/O0662: Unified padding method in ALF.
parent
bb993c36
Pipeline
#2673
passed with stage
Changes
9
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
1007 additions
and
30 deletions
+1007
-30
source/Lib/CommonLib/AdaptiveLoopFilter.cpp
source/Lib/CommonLib/AdaptiveLoopFilter.cpp
+382
-4
source/Lib/CommonLib/AdaptiveLoopFilter.h
source/Lib/CommonLib/AdaptiveLoopFilter.h
+33
-1
source/Lib/CommonLib/CommonDef.h
source/Lib/CommonLib/CommonDef.h
+4
-0
source/Lib/CommonLib/TypeDef.h
source/Lib/CommonLib/TypeDef.h
+2
-0
source/Lib/CommonLib/UnitTools.cpp
source/Lib/CommonLib/UnitTools.cpp
+12
-0
source/Lib/CommonLib/UnitTools.h
source/Lib/CommonLib/UnitTools.h
+3
-1
source/Lib/CommonLib/x86/AdaptiveLoopFilterX86.h
source/Lib/CommonLib/x86/AdaptiveLoopFilterX86.h
+357
-11
source/Lib/EncoderLib/EncAdaptiveLoopFilter.cpp
source/Lib/EncoderLib/EncAdaptiveLoopFilter.cpp
+207
-13
source/Lib/EncoderLib/EncAdaptiveLoopFilter.h
source/Lib/EncoderLib/EncAdaptiveLoopFilter.h
+7
-0
No files found.
source/Lib/CommonLib/AdaptiveLoopFilter.cpp
View file @
8de020f2
This diff is collapsed.
Click to expand it.
source/Lib/CommonLib/AdaptiveLoopFilter.h
View file @
8de020f2
...
...
@@ -87,25 +87,52 @@ public:
void
ALFProcess
(
CodingStructure
&
cs
);
void
create
(
const
int
picWidth
,
const
int
picHeight
,
const
ChromaFormat
format
,
const
int
maxCUWidth
,
const
int
maxCUHeight
,
const
int
maxCUDepth
,
const
int
inputBitDepth
[
MAX_NUM_CHANNEL_TYPE
]
);
void
destroy
();
#if JVET_O0625_ALF_PADDING
static
void
deriveClassificationBlk
(
AlfClassifier
**
classifier
,
int
**
laplacian
[
NUM_DIRECTIONS
],
const
CPelBuf
&
srcLuma
,
const
Area
&
blkDst
,
const
Area
&
blk
,
const
int
shift
,
const
int
vbCTUHeight
,
int
vbPos
,
const
int
alfBryList
[
4
]
);
void
deriveClassification
(
AlfClassifier
**
classifier
,
const
CPelBuf
&
srcLuma
,
const
Area
&
blkDst
,
const
Area
&
blk
,
const
int
alfBryList
[
4
]
);
#else
static
void
deriveClassificationBlk
(
AlfClassifier
**
classifier
,
int
**
laplacian
[
NUM_DIRECTIONS
],
const
CPelBuf
&
srcLuma
,
const
Area
&
blkDst
,
const
Area
&
blk
,
const
int
shift
,
const
int
vbCTUHeight
,
int
vbPos
);
void
deriveClassification
(
AlfClassifier
**
classifier
,
const
CPelBuf
&
srcLuma
,
const
Area
&
blkDst
,
const
Area
&
blk
);
#endif
#if !JVET_O0525_REMOVE_PCM
void
resetPCMBlkClassInfo
(
CodingStructure
&
cs
,
AlfClassifier
**
classifier
,
const
CPelBuf
&
srcLuma
,
const
Area
&
blk
);
#endif
template
<
AlfFilterType
filtType
>
#if JVET_O0625_ALF_PADDING
static
void
filterBlk
(
AlfClassifier
**
classifier
,
const
PelUnitBuf
&
recDst
,
const
CPelUnitBuf
&
recSrc
,
const
Area
&
blkDst
,
const
Area
&
blk
,
const
ComponentID
compId
,
const
short
*
filterSet
,
const
short
*
fClipSet
,
const
ClpRng
&
clpRng
,
CodingStructure
&
cs
,
const
int
vbCTUHeight
,
int
vbPos
,
const
int
alfBryList
[
4
]
);
#else
static
void
filterBlk
(
AlfClassifier
**
classifier
,
const
PelUnitBuf
&
recDst
,
const
CPelUnitBuf
&
recSrc
,
const
Area
&
blkDst
,
const
Area
&
blk
,
const
ComponentID
compId
,
const
short
*
filterSet
,
const
short
*
fClipSet
,
const
ClpRng
&
clpRng
,
CodingStructure
&
cs
,
const
int
vbCTUHeight
,
int
vbPos
);
#endif
#if !JVET_O0216_ALF_COEFF_EG3 || !JVET_O0064_SIMP_ALF_CLIP_CODING
inline
static
int
getMaxGolombIdx
(
AlfFilterType
filterType
)
{
return
filterType
==
ALF_FILTER_5
?
2
:
3
;
}
#endif
#if JVET_O0625_ALF_PADDING
void
getAlfBoundary
(
const
CodingStructure
&
cs
,
int
posX
,
int
posY
,
int
&
topBry
,
int
&
botBry
,
int
&
leftBry
,
int
&
rightBry
);
void
(
*
m_deriveClassificationBlk
)(
AlfClassifier
**
classifier
,
int
**
laplacian
[
NUM_DIRECTIONS
],
const
CPelBuf
&
srcLuma
,
const
Area
&
blkDst
,
const
Area
&
blk
,
const
int
shift
,
const
int
vbCTUHeight
,
int
vbPos
,
const
int
alfBryList
[
4
]
);
void
(
*
m_filter5x5Blk
)(
AlfClassifier
**
classifier
,
const
PelUnitBuf
&
recDst
,
const
CPelUnitBuf
&
recSrc
,
const
Area
&
blkDst
,
const
Area
&
blk
,
const
ComponentID
compId
,
const
short
*
filterSet
,
const
short
*
fClipSet
,
const
ClpRng
&
clpRng
,
CodingStructure
&
cs
,
const
int
vbCTUHeight
,
int
vbPos
,
const
int
alfBryList
[
4
]
);
void
(
*
m_filter7x7Blk
)(
AlfClassifier
**
classifier
,
const
PelUnitBuf
&
recDst
,
const
CPelUnitBuf
&
recSrc
,
const
Area
&
blkDst
,
const
Area
&
blk
,
const
ComponentID
compId
,
const
short
*
filterSet
,
const
short
*
fClipSet
,
const
ClpRng
&
clpRng
,
CodingStructure
&
cs
,
const
int
vbCTUHeight
,
int
vbPos
,
const
int
alfBryList
[
4
]
);
#else
void
(
*
m_deriveClassificationBlk
)(
AlfClassifier
**
classifier
,
int
**
laplacian
[
NUM_DIRECTIONS
],
const
CPelBuf
&
srcLuma
,
const
Area
&
blkDst
,
const
Area
&
blk
,
const
int
shift
,
const
int
vbCTUHeight
,
int
vbPos
);
...
...
@@ -118,6 +145,7 @@ public:
const
Area
&
blkDst
,
const
Area
&
blk
,
const
ComponentID
compId
,
const
short
*
filterSet
,
const
short
*
fClipSet
,
const
ClpRng
&
clpRng
,
CodingStructure
&
cs
,
const
int
vbCTUHeight
,
int
vbPos
);
#endif
#ifdef TARGET_SIMD_X86
void
initAdaptiveLoopFilterX86
();
...
...
@@ -126,7 +154,11 @@ public:
#endif
protected:
#if JVET_O0625_ALF_PADDING
bool
isCrossedByVirtualBoundaries
(
const
CodingStructure
&
cs
,
const
int
xPos
,
const
int
yPos
,
const
int
width
,
const
int
height
,
int
&
topBry
,
int
&
botBry
,
int
&
leftBry
,
int
&
rightBry
,
int
&
numHorVirBndry
,
int
&
numVerVirBndry
,
int
horVirBndryPos
[],
int
verVirBndryPos
[],
const
PPS
*
pps
);
#else
bool
isCrossedByVirtualBoundaries
(
const
int
xPos
,
const
int
yPos
,
const
int
width
,
const
int
height
,
bool
&
clipTop
,
bool
&
clipBottom
,
bool
&
clipLeft
,
bool
&
clipRight
,
int
&
numHorVirBndry
,
int
&
numVerVirBndry
,
int
horVirBndryPos
[],
int
verVirBndryPos
[],
const
PPS
*
pps
);
#endif
static
const
int
m_classToFilterMapping
[
NUM_FIXED_FILTER_SETS
][
MAX_NUM_ALF_CLASSES
];
static
const
int
m_fixedFilterSetCoeff
[
ALF_FIXED_FILTER_NUM
][
MAX_NUM_ALF_LUMA_COEFF
];
short
m_fixedFilterSetCoeffDec
[
NUM_FIXED_FILTER_SETS
][
MAX_NUM_ALF_CLASSES
*
MAX_NUM_ALF_LUMA_COEFF
];
...
...
source/Lib/CommonLib/CommonDef.h
View file @
8de020f2
...
...
@@ -205,6 +205,10 @@ static const int ALF_CTB_MAX_NUM_APS = 6;
static
const
int
NUM_FIXED_FILTER_SETS
=
16
;
static
const
int
NUM_TOTAL_FILTER_SETS
=
NUM_FIXED_FILTER_SETS
+
ALF_CTB_MAX_NUM_APS
;
#if JVET_O0625_ALF_PADDING
static
const
int
ALF_NONE_BOUNDARY
=
-
128
;
#endif
static
const
int
MAX_BDOF_APPLICATION_REGION
=
16
;
static
const
int
MAX_CPB_CNT
=
32
;
///< Upper bound of (cpb_cnt_minus1 + 1)
...
...
source/Lib/CommonLib/TypeDef.h
View file @
8de020f2
...
...
@@ -60,6 +60,8 @@
#define RPR_CONF_WINDOW 1
#endif
#define JVET_O0625_ALF_PADDING 1 // JVET-O0625/O0654/O0662: Unified padding method in ALF
#define JVET_O0238_PPS_OR_SLICE 1 // JVET-O0238: Signal certain parameters either in PPS or per slice
#define SUPPORT_FOR_RECT_SLICES_WITH_VARYING_NUMBER_OF_TILES 1
...
...
source/Lib/CommonLib/UnitTools.cpp
View file @
8de020f2
...
...
@@ -170,6 +170,18 @@ bool CU::isSameTile(const CodingUnit& cu, const CodingUnit& cu2)
return
cu
.
tileIdx
==
cu2
.
tileIdx
;
}
#if JVET_O0625_ALF_PADDING
bool
CU
::
isSameBrick
(
const
CodingUnit
&
cu
,
const
CodingUnit
&
cu2
)
{
const
Picture
&
pcPic
=
*
(
cu
.
cs
->
picture
);
const
BrickMap
&
tileMap
=
*
(
pcPic
.
brickMap
);
const
uint32_t
brickIdx
=
tileMap
.
getBrickIdxRsMap
(
cu
.
lumaPos
()
);
const
uint32_t
brickIdx2
=
tileMap
.
getBrickIdxRsMap
(
cu2
.
lumaPos
()
);
return
brickIdx
==
brickIdx2
;
}
#endif
bool
CU
::
isSameSliceAndTile
(
const
CodingUnit
&
cu
,
const
CodingUnit
&
cu2
)
{
return
(
cu
.
slice
->
getIndependentSliceIdx
()
==
cu2
.
slice
->
getIndependentSliceIdx
()
)
&&
(
cu
.
tileIdx
==
cu2
.
tileIdx
);
...
...
source/Lib/CommonLib/UnitTools.h
View file @
8de020f2
...
...
@@ -71,7 +71,9 @@ namespace CU
bool
isSameSliceAndTile
(
const
CodingUnit
&
cu
,
const
CodingUnit
&
cu2
);
bool
isLastSubCUOfCtu
(
const
CodingUnit
&
cu
);
uint32_t
getCtuAddr
(
const
CodingUnit
&
cu
);
#if JVET_O0625_ALF_PADDING
bool
isSameBrick
(
const
CodingUnit
&
cu
,
const
CodingUnit
&
cu2
);
#endif
int
predictQP
(
const
CodingUnit
&
cu
,
const
int
prevQP
);
uint32_t
getNumPUs
(
const
CodingUnit
&
cu
);
...
...
source/Lib/CommonLib/x86/AdaptiveLoopFilterX86.h
View file @
8de020f2
This diff is collapsed.
Click to expand it.
source/Lib/EncoderLib/EncAdaptiveLoopFilter.cpp
View file @
8de020f2
This diff is collapsed.
Click to expand it.
source/Lib/EncoderLib/EncAdaptiveLoopFilter.h
View file @
8de020f2
...
...
@@ -315,8 +315,15 @@ private:
void
getFrameStat
(
AlfCovariance
*
frameCov
,
AlfCovariance
**
ctbCov
,
uint8_t
*
ctbEnableFlags
,
const
int
numClasses
);
#endif
void
deriveStatsForFiltering
(
PelUnitBuf
&
orgYuv
,
PelUnitBuf
&
recYuv
,
CodingStructure
&
cs
);
#if JVET_O0625_ALF_PADDING
void
getBlkStats
(
AlfCovariance
*
alfCovariace
,
const
AlfFilterShape
&
shape
,
AlfClassifier
**
classifier
,
Pel
*
org
,
const
int
orgStride
,
Pel
*
rec
,
const
int
recStride
,
const
CompArea
&
areaDst
,
const
CompArea
&
area
,
const
ChannelType
channel
,
int
vbCTUHeight
,
int
vbPos
,
const
int
alfBryList
[
4
]
);
void
calcCovariance
(
int
ELocal
[
MAX_NUM_ALF_LUMA_COEFF
][
MaxAlfNumClippingValues
],
const
Pel
*
rec
,
const
int
stride
,
const
AlfFilterShape
&
shape
,
const
int
transposeIdx
,
const
ChannelType
channel
,
int
vbDistance
,
const
int
alfBryList
[
4
]
);
#else
void
getBlkStats
(
AlfCovariance
*
alfCovariace
,
const
AlfFilterShape
&
shape
,
AlfClassifier
**
classifier
,
Pel
*
org
,
const
int
orgStride
,
Pel
*
rec
,
const
int
recStride
,
const
CompArea
&
areaDst
,
const
CompArea
&
area
,
const
ChannelType
channel
,
int
vbCTUHeight
,
int
vbPos
);
void
calcCovariance
(
int
ELocal
[
MAX_NUM_ALF_LUMA_COEFF
][
MaxAlfNumClippingValues
],
const
Pel
*
rec
,
const
int
stride
,
const
AlfFilterShape
&
shape
,
const
int
transposeIdx
,
const
ChannelType
channel
,
int
vbDistance
);
#endif
void
mergeClasses
(
const
AlfFilterShape
&
alfShape
,
AlfCovariance
*
cov
,
AlfCovariance
*
covMerged
,
int
clipMerged
[
MAX_NUM_ALF_CLASSES
][
MAX_NUM_ALF_CLASSES
][
MAX_NUM_ALF_LUMA_COEFF
],
const
int
numClasses
,
short
filterIndices
[
MAX_NUM_ALF_CLASSES
][
MAX_NUM_ALF_CLASSES
]);
...
...
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