Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
aom-rav1e
Commits
0b3ef733
Commit
0b3ef733
authored
Oct 06, 2017
by
Zoe Liu
Browse files
Clean up obsolete code for mismatch debugging
Change-Id: Ibdcb1530b9f81a2a5222e95cf5c0b7b2938509a8
parent
27be8742
Changes
2
Hide whitespace changes
Inline
Side-by-side
av1/decoder/decodemv.c
View file @
0b3ef733
...
...
@@ -2206,8 +2206,8 @@ static void fpm_sync(void *const data, int mi_row) {
}
#if DEC_MISMATCH_DEBUG
static
void
dec_dump_logs
(
AV1_COMMON
*
cm
,
MODE_INFO
*
const
mi
,
MACROBLOCKD
*
const
xd
,
int
mi_row
,
int
mi_col
,
static
void
dec_dump_logs
(
AV1_COMMON
*
cm
,
MODE_INFO
*
const
mi
,
int
mi_row
,
int
mi_col
,
int16_t
inter_mode_ctx
[
MODE_CTX_REF_FRAMES
],
int16_t
mode_ctx
)
{
int_mv
mv
[
2
]
=
{
{
0
}
};
...
...
@@ -2216,22 +2216,6 @@ static void dec_dump_logs(AV1_COMMON *cm, MODE_INFO *const mi,
for
(
ref
=
0
;
ref
<
1
+
has_second_ref
(
mbmi
);
++
ref
)
mv
[
ref
].
as_mv
=
mbmi
->
mv
[
ref
].
as_mv
;
int
interp_ctx
[
2
]
=
{
-
1
};
int
interp_filter
[
2
]
=
{
cm
->
interp_filter
};
if
(
cm
->
interp_filter
==
SWITCHABLE
)
{
int
dir
;
for
(
dir
=
0
;
dir
<
2
;
++
dir
)
{
if
(
has_subpel_mv_component
(
xd
->
mi
[
0
],
xd
,
dir
)
||
(
mbmi
->
ref_frame
[
1
]
>
INTRA_FRAME
&&
has_subpel_mv_component
(
xd
->
mi
[
0
],
xd
,
dir
+
2
)))
{
interp_ctx
[
dir
]
=
av1_get_pred_context_switchable_interp
(
xd
,
dir
);
interp_filter
[
dir
]
=
mbmi
->
interp_filter
[
dir
];
}
else
{
interp_filter
[
dir
]
=
EIGHTTAP_REGULAR
;
}
}
}
const
int16_t
newmv_ctx
=
mode_ctx
&
NEWMV_CTX_MASK
;
int16_t
zeromv_ctx
=
-
1
;
int16_t
refmv_ctx
=
-
1
;
...
...
@@ -2254,14 +2238,12 @@ static void dec_dump_logs(AV1_COMMON *cm, MODE_INFO *const mi,
"Frame=%d, (mi_row,mi_col)=(%d,%d), mode=%d, bsize=%d, "
"show_frame=%d, mv[0]=(%d,%d), mv[1]=(%d,%d), ref[0]=%d, "
"ref[1]=%d, motion_mode=%d, inter_mode_ctx=%d, mode_ctx=%d, "
"interp_ctx=(%d,%d), interp_filter=(%d,%d), newmv_ctx=%d, "
"zeromv_ctx=%d, refmv_ctx=%d
\n
"
,
"newmv_ctx=%d, zeromv_ctx=%d, refmv_ctx=%d
\n
"
,
cm
->
current_video_frame
,
mi_row
,
mi_col
,
mbmi
->
mode
,
mbmi
->
sb_type
,
cm
->
show_frame
,
mv
[
0
].
as_mv
.
row
,
mv
[
0
].
as_mv
.
col
,
mv
[
1
].
as_mv
.
row
,
mv
[
1
].
as_mv
.
col
,
mbmi
->
ref_frame
[
0
],
mbmi
->
ref_frame
[
1
],
mbmi
->
motion_mode
,
inter_mode_ctx
[
ref_frame_type
],
mode_ctx
,
interp_ctx
[
0
],
interp_ctx
[
1
],
interp_filter
[
0
],
interp_filter
[
1
],
newmv_ctx
,
zeromv_ctx
,
refmv_ctx
);
mbmi
->
motion_mode
,
inter_mode_ctx
[
ref_frame_type
],
mode_ctx
,
newmv_ctx
,
zeromv_ctx
,
refmv_ctx
);
}
}
#endif // DEC_MISMATCH_DEBUG
...
...
@@ -2851,8 +2833,7 @@ static void read_inter_block_mode_info(AV1Decoder *const pbi,
#endif // CONFIG_DUAL_FILTER || CONFIG_WARPED_MOTION
#if DEC_MISMATCH_DEBUG
// NOTE(zoeliu): For debug
dec_dump_logs
(
cm
,
mi
,
xd
,
mi_row
,
mi_col
,
inter_mode_ctx
,
mode_ctx
);
dec_dump_logs
(
cm
,
mi
,
mi_row
,
mi_col
,
inter_mode_ctx
,
mode_ctx
);
#endif // DEC_MISMATCH_DEBUG
}
...
...
av1/encoder/bitstream.c
View file @
0b3ef733
...
...
@@ -2325,21 +2325,6 @@ static void enc_dump_logs(AV1_COMP *cpi, int mi_row, int mi_col) {
#endif // CONFIG_COMPOUND_SINGLEREF
mv
[
1
].
as_int
=
0
;
}
int
interp_ctx
[
2
]
=
{
-
1
};
int
interp_filter
[
2
]
=
{
cm
->
interp_filter
};
if
(
cm
->
interp_filter
==
SWITCHABLE
)
{
int
dir
;
for
(
dir
=
0
;
dir
<
2
;
++
dir
)
{
if
(
has_subpel_mv_component
(
xd
->
mi
[
0
],
xd
,
dir
)
||
(
mbmi
->
ref_frame
[
1
]
>
INTRA_FRAME
&&
has_subpel_mv_component
(
xd
->
mi
[
0
],
xd
,
dir
+
2
)))
{
interp_ctx
[
dir
]
=
av1_get_pred_context_switchable_interp
(
xd
,
dir
);
interp_filter
[
dir
]
=
mbmi
->
interp_filter
[
dir
];
}
else
{
interp_filter
[
dir
]
=
EIGHTTAP_REGULAR
;
}
}
}
MACROBLOCK
*
const
x
=
&
cpi
->
td
.
mb
;
const
MB_MODE_INFO_EXT
*
const
mbmi_ext
=
x
->
mbmi_ext
;
...
...
@@ -2367,13 +2352,11 @@ static void enc_dump_logs(AV1_COMP *cpi, int mi_row, int mi_col) {
"Frame=%d, (mi_row,mi_col)=(%d,%d), mode=%d, bsize=%d, "
"show_frame=%d, mv[0]=(%d,%d), mv[1]=(%d,%d), ref[0]=%d, "
"ref[1]=%d, motion_mode=%d, inter_mode_ctx=%d, mode_ctx=%d, "
"interp_ctx=(%d,%d), interp_filter=(%d,%d), newmv_ctx=%d, "
"zeromv_ctx=%d, refmv_ctx=%d
\n
"
,
"newmv_ctx=%d, zeromv_ctx=%d, refmv_ctx=%d
\n
"
,
cm
->
current_video_frame
,
mi_row
,
mi_col
,
mbmi
->
mode
,
bsize
,
cm
->
show_frame
,
mv
[
0
].
as_mv
.
row
,
mv
[
0
].
as_mv
.
col
,
mv
[
1
].
as_mv
.
row
,
mv
[
1
].
as_mv
.
col
,
mbmi
->
ref_frame
[
0
],
mbmi
->
ref_frame
[
1
],
mbmi
->
motion_mode
,
mbmi_ext
->
mode_context
[
ref_frame_type
],
mode_ctx
,
interp_ctx
[
0
],
interp_ctx
[
1
],
interp_filter
[
0
],
interp_filter
[
1
],
newmv_ctx
,
zeromv_ctx
,
refmv_ctx
);
}
}
...
...
@@ -2432,7 +2415,6 @@ static void write_mbmi_b(AV1_COMP *cpi, const TileInfo *const tile,
#endif // CONFIG_DUAL_FILTER || CONFIG_WARPED_MOTION
#if ENC_MISMATCH_DEBUG
// NOTE(zoeliu): For debug
enc_dump_logs
(
cpi
,
mi_row
,
mi_col
);
#endif // ENC_MISMATCH_DEBUG
...
...
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