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_BMS
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
Custom Issue Tracker
Custom Issue Tracker
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
jvet
VVCSoftware_BMS
Commits
f291ade5
Commit
f291ade5
authored
Sep 28, 2018
by
Johannes Sauer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added CPR (K0076) block statistics
parent
f211d5e8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
75 additions
and
5 deletions
+75
-5
source/Lib/CommonLib/dtrace.h
source/Lib/CommonLib/dtrace.h
+1
-1
source/Lib/CommonLib/dtrace_blockstatistics.cpp
source/Lib/CommonLib/dtrace_blockstatistics.cpp
+56
-3
source/Lib/CommonLib/dtrace_blockstatistics.h
source/Lib/CommonLib/dtrace_blockstatistics.h
+18
-1
No files found.
source/Lib/CommonLib/dtrace.h
View file @
f291ade5
...
...
@@ -132,7 +132,7 @@ public:
void
dtrace_block_vector
(
int
k
,
const
CodingUnit
&
cu
,
std
::
string
stat_type
,
signed
val_x
,
signed
val_y
);
// PU
void
dtrace_block_scalar
(
int
k
,
const
PredictionUnit
&
pu
,
std
::
string
stat_type
,
signed
value
,
bool
isChroma
=
false
);
void
dtrace_block_vector
(
int
k
,
const
PredictionUnit
&
pu
,
std
::
string
stat_type
,
signed
val_x
,
signed
val_y
);
void
dtrace_block_vector
(
int
k
,
const
PredictionUnit
&
pu
,
std
::
string
stat_type
,
signed
val_x
,
signed
val_y
,
bool
isChroma
=
false
);
void
dtrace_block_affinetf
(
int
k
,
const
PredictionUnit
&
pu
,
std
::
string
stat_type
,
signed
val_x0
,
signed
val_y0
,
signed
val_x1
,
signed
val_y1
,
signed
val_x2
,
signed
val_y2
);
// TU
void
dtrace_block_scalar
(
int
k
,
const
TransformUnit
&
tu
,
std
::
string
stat_type
,
signed
value
,
bool
isChroma
=
false
);
...
...
source/Lib/CommonLib/dtrace_blockstatistics.cpp
View file @
f291ade5
...
...
@@ -156,13 +156,27 @@ void CDTrace::dtrace_block_scalar( int k, const PredictionUnit &pu, std::string
#endif
}
void
CDTrace
::
dtrace_block_vector
(
int
k
,
const
PredictionUnit
&
pu
,
std
::
string
stat_type
,
signed
val_x
,
signed
val_y
)
void
CDTrace
::
dtrace_block_vector
(
int
k
,
const
PredictionUnit
&
pu
,
std
::
string
stat_type
,
signed
val_x
,
signed
val_y
,
bool
isChroma
/*= false*/
)
{
const
CodingStructure
&
cs
=
*
pu
.
cs
;
#if BLOCK_STATS_AS_CSV
dtrace
<
false
>
(
k
,
"BlockStat;%d;%4d;%4d;%2d;%2d;%s;%4d;%4d
\n
"
,
cs
.
picture
->
poc
,
pu
.
lx
(),
pu
.
ly
(),
pu
.
lwidth
(),
pu
.
lheight
(),
stat_type
.
c_str
(),
val_x
,
val_y
);
if
(
isChroma
)
{
dtrace
<
false
>
(
k
,
"BlockStat;%d;%4d;%4d;%2d;%2d;%s;%4d;%4d
\n
"
,
cs
.
picture
->
poc
,
pu
.
Cb
().
x
*
2
,
pu
.
Cb
().
y
*
2
,
pu
.
Cb
().
width
*
2
,
pu
.
Cb
().
height
*
2
,
stat_type
.
c_str
(),
val_x
*
2
,
val_y
*
2
);
}
else
{
dtrace
<
false
>
(
k
,
"BlockStat;%d;%4d;%4d;%2d;%2d;%s;%4d;%4d
\n
"
,
cs
.
picture
->
poc
,
pu
.
lx
(),
pu
.
ly
(),
pu
.
lwidth
(),
pu
.
lheight
(),
stat_type
.
c_str
(),
val_x
,
val_y
);
}
#else
dtrace
<
false
>
(
k
,
"BlockStat: POC %d @(%4d,%4d) [%2dx%2d] %s={%4d,%4d}
\n
"
,
cs
.
picture
->
poc
,
pu
.
lx
(),
pu
.
ly
(),
pu
.
lwidth
(),
pu
.
lheight
(),
stat_type
.
c_str
(),
val_x
,
val_y
);
if
(
isChroma
)
{
dtrace
<
false
>
(
k
,
"BlockStat: POC %d @(%4d,%4d) [%2dx%2d] %s={%4d,%4d}
\n
"
,
cs
.
picture
->
poc
,
pu
.
Cb
().
x
*
2
,
pu
.
Cb
().
y
*
2
,
pu
.
Cb
().
width
*
2
,
pu
.
Cb
().
height
*
2
,
stat_type
.
c_str
(),
val_x
*
2
,
val_y
*
2
);
}
else
{
dtrace
<
false
>
(
k
,
"BlockStat: POC %d @(%4d,%4d) [%2dx%2d] %s={%4d,%4d}
\n
"
,
cs
.
picture
->
poc
,
pu
.
lx
(),
pu
.
ly
(),
pu
.
lwidth
(),
pu
.
lheight
(),
stat_type
.
c_str
(),
val_x
,
val_y
);
}
#endif
}
...
...
@@ -436,6 +450,45 @@ void writeAllData(const CodingStructure& cs, const UnitArea& ctuArea)
#if JVET_K0248_GBI
DTRACE_BLOCK_SCALAR
(
g_trace_ctx
,
D_BLOCK_STATISTICS_ALL
,
cu
,
GetBlockStatisticName
(
BlockStatistic
::
GBiIdx
),
cu
.
GBiIdx
);
#endif
#if JVET_K0076_CPR
if
(
chType
==
CHANNEL_TYPE_LUMA
)
{
DTRACE_BLOCK_SCALAR
(
g_trace_ctx
,
D_BLOCK_STATISTICS_ALL
,
cu
,
GetBlockStatisticName
(
BlockStatistic
::
IBCFlag
),
cu
.
ibc
);
}
else
if
(
chType
==
CHANNEL_TYPE_CHROMA
)
{
DTRACE_BLOCK_SCALAR_CHROMA
(
g_trace_ctx
,
D_BLOCK_STATISTICS_ALL
,
cu
,
GetBlockStatisticName
(
BlockStatistic
::
IBCFlag_Chroma
),
cu
.
ibc
);
}
const
uint32_t
numChType
=
::
getNumberValidChannels
(
cu
.
chromaFormat
);
for
(
uint32_t
chType
=
CHANNEL_TYPE_LUMA
;
chType
<
numChType
;
chType
++
)
{
if
(
cu
.
blocks
[
chType
].
valid
()
)
{
for
(
const
PredictionUnit
&
pu
:
CU
::
traversePUs
(
cu
)
)
{
if
(
isLuma
(
ChannelType
(
chType
)
)
)
{
if
(
cu
.
ibc
)
{
DTRACE_BLOCK_VECTOR
(
g_trace_ctx
,
D_BLOCK_STATISTICS_ALL
,
pu
,
GetBlockStatisticName
(
BlockStatistic
::
IBC_BV
),
pu
.
mv
[
0
].
hor
,
pu
.
mv
[
0
].
ver
);
DTRACE_BLOCK_VECTOR
(
g_trace_ctx
,
D_BLOCK_STATISTICS_ALL
,
pu
,
GetBlockStatisticName
(
BlockStatistic
::
IBC_BVD
),
pu
.
mvd
[
0
].
hor
,
pu
.
mvd
[
0
].
ver
);
}
}
else
{
if
(
cu
.
ibc
)
{
DTRACE_BLOCK_VECTOR_CHROMA
(
g_trace_ctx
,
D_BLOCK_STATISTICS_ALL
,
pu
,
GetBlockStatisticName
(
BlockStatistic
::
IBC_BV_Chroma
),
pu
.
mv
[
0
].
hor
,
pu
.
mv
[
0
].
ver
);
DTRACE_BLOCK_VECTOR_CHROMA
(
g_trace_ctx
,
D_BLOCK_STATISTICS_ALL
,
pu
,
GetBlockStatisticName
(
BlockStatistic
::
IBC_BVD_Chroma
),
pu
.
mvd
[
0
].
hor
,
pu
.
mvd
[
0
].
ver
);
}
}
}
}
}
#endif
}
break
;
case
MODE_INTRA
:
...
...
source/Lib/CommonLib/dtrace_blockstatistics.h
View file @
f291ade5
...
...
@@ -47,6 +47,7 @@
#define DTRACE_BLOCK_SCALAR(ctx,channel,cs_cu_pu,stat_type,val) ctx->dtrace_block_scalar( channel, cs_cu_pu, stat_type, val )
#define DTRACE_BLOCK_SCALAR_CHROMA(ctx,channel,cs_cu_pu,stat_type,val) ctx->dtrace_block_scalar( channel, cs_cu_pu, stat_type, val, true)
#define DTRACE_BLOCK_VECTOR(ctx,channel,cu_pu,stat_type,v_x,v_y) ctx->dtrace_block_vector( channel, cu_pu, stat_type, v_x, v_y )
#define DTRACE_BLOCK_VECTOR_CHROMA(ctx,channel,pu,stat_type,v_x,v_y) ctx->dtrace_block_vector( channel, pu, stat_type, v_x, v_y, true )
#define DTRACE_BLOCK_AFFINETF(ctx,channel,pu,stat_type,v_x0,v_y0,v_x1,v_y1,v_x2,v_y2) ctx->dtrace_block_affinetf( channel, pu, stat_type, v_x0, v_y0, v_x1, v_y1, v_x2, v_y2 )
enum
class
BlockStatistic
{
...
...
@@ -76,6 +77,15 @@ enum class BlockStatistic {
PDPCFlag
,
NSSTIdx
,
#endif
#if JVET_K0076_CPR
IBCFlag
,
IBCFlag_Chroma
,
IBC_BV
,
IBC_BV_Chroma
,
IBC_BVD
,
IBC_BVD_Chroma
,
#endif
// inter
SkipFlag
,
RootCbf
,
...
...
@@ -208,7 +218,14 @@ static const std::map<BlockStatistic, std::tuple<std::string, BlockStatisticType
{
BlockStatistic
::
PDPCFlag
,
std
::
tuple
<
std
::
string
,
BlockStatisticType
,
std
::
string
>
{
"PDPCFlag"
,
BlockStatisticType
::
Flag
,
""
}},
{
BlockStatistic
::
NSSTIdx
,
std
::
tuple
<
std
::
string
,
BlockStatisticType
,
std
::
string
>
{
"NSSTIdx"
,
BlockStatisticType
::
Integer
,
"[0, 3]"
}},
#endif
#if JVET_K0076_CPR
{
BlockStatistic
::
IBCFlag
,
std
::
tuple
<
std
::
string
,
BlockStatisticType
,
std
::
string
>
{
"IBCFlag"
,
BlockStatisticType
::
Flag
,
""
}},
{
BlockStatistic
::
IBCFlag_Chroma
,
std
::
tuple
<
std
::
string
,
BlockStatisticType
,
std
::
string
>
{
"IBCFlag_Chroma"
,
BlockStatisticType
::
Flag
,
""
}},
{
BlockStatistic
::
IBC_BV
,
std
::
tuple
<
std
::
string
,
BlockStatisticType
,
std
::
string
>
{
"IBC_BV"
,
BlockStatisticType
::
Vector
,
"Scale: 4"
}},
{
BlockStatistic
::
IBC_BV_Chroma
,
std
::
tuple
<
std
::
string
,
BlockStatisticType
,
std
::
string
>
{
"IBC_BV_Chroma"
,
BlockStatisticType
::
Vector
,
"Scale: 4"
}},
{
BlockStatistic
::
IBC_BVD
,
std
::
tuple
<
std
::
string
,
BlockStatisticType
,
std
::
string
>
{
"IBC_BD"
,
BlockStatisticType
::
Vector
,
"Scale: 4"
}},
{
BlockStatistic
::
IBC_BVD_Chroma
,
std
::
tuple
<
std
::
string
,
BlockStatisticType
,
std
::
string
>
{
"IBC_BD_Chroma"
,
BlockStatisticType
::
Vector
,
"Scale: 4"
}},
#endif
#if JVET_K0248_GBI
{
BlockStatistic
::
GBiIdx
,
std
::
tuple
<
std
::
string
,
BlockStatisticType
,
std
::
string
>
{
"GBiIdx"
,
BlockStatisticType
::
Integer
,
"[0, "
+
std
::
to_string
(
GBI_NUM
)
+
"]"
}},
#endif
...
...
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