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
Xiph.Org
aom-rav1e
Commits
c24351c0
Commit
c24351c0
authored
Oct 24, 2017
by
Yushin Cho
Browse files
Add delta_q support to inspector
Change-Id: Idfc8ebee2325ab51d962efa5846d54db3e139c23
parent
efc55fd9
Changes
4
Hide whitespace changes
Inline
Side-by-side
av1/decoder/decodemv.c
View file @
c24351c0
...
...
@@ -1206,6 +1206,8 @@ static void read_intra_frame_mode_info(AV1_COMMON *const cm,
#endif
}
mbmi
->
current_q_index
=
xd
->
current_qindex
;
mbmi
->
ref_frame
[
0
]
=
INTRA_FRAME
;
mbmi
->
ref_frame
[
1
]
=
NONE_FRAME
;
...
...
@@ -2710,6 +2712,8 @@ static void read_inter_frame_mode_info(AV1Decoder *const pbi,
#endif
}
mbmi
->
current_q_index
=
xd
->
current_qindex
;
inter_block
=
read_is_inter_block
(
cm
,
xd
,
mbmi
->
segment_id
,
r
);
xd
->
above_txfm_context
=
...
...
av1/decoder/inspection.c
View file @
c24351c0
...
...
@@ -50,6 +50,8 @@ int ifd_inspect(insp_frame_data *fd, void *decoder) {
fd
->
base_qindex
=
cm
->
base_qindex
;
fd
->
tile_mi_cols
=
cm
->
tile_width
;
fd
->
tile_mi_rows
=
cm
->
tile_height
;
fd
->
delta_q_present_flag
=
cm
->
delta_q_present_flag
;
fd
->
delta_q_res
=
cm
->
delta_q_res
;
#if CONFIG_ACCOUNTING
fd
->
accounting
=
&
pbi
->
accounting
;
#endif
...
...
@@ -117,6 +119,8 @@ int ifd_inspect(insp_frame_data *fd, void *decoder) {
mi
->
cfl_alpha_sign
=
0
;
}
#endif
// delta_q
mi
->
current_qindex
=
mbmi
->
current_q_index
;
}
}
return
1
;
...
...
av1/decoder/inspection.h
View file @
c24351c0
...
...
@@ -35,28 +35,29 @@ typedef struct insp_mi_data insp_mi_data;
struct
insp_mi_data
{
insp_mv
mv
[
2
];
int
8
_t
ref_frame
[
2
];
int
8
_t
mode
;
int
8
_t
uv_mode
;
int
8
_t
sb_type
;
int
8
_t
skip
;
int
8
_t
segment_id
;
int
16
_t
ref_frame
[
2
];
int
16
_t
mode
;
int
16
_t
uv_mode
;
int
16
_t
sb_type
;
int
16
_t
skip
;
int
16
_t
segment_id
;
#if CONFIG_DUAL_FILTER
int
8
_t
dual_filter_type
;
int
8
_t
filter
[
2
];
int
16
_t
dual_filter_type
;
int
16
_t
filter
[
2
];
#else
int
8
_t
filter
;
int
16
_t
filter
;
#endif
int
8
_t
tx_type
;
int
8
_t
tx_size
;
int
16
_t
tx_type
;
int
16
_t
tx_size
;
#if CONFIG_CDEF
int
8
_t
cdef_level
;
int
8
_t
cdef_strength
;
int
16
_t
cdef_level
;
int
16
_t
cdef_strength
;
#endif
#if CONFIG_CFL
int
8
_t
cfl_alpha_idx
;
int
8
_t
cfl_alpha_sign
;
int
16
_t
cfl_alpha_idx
;
int
16
_t
cfl_alpha_sign
;
#endif
int16_t
current_qindex
;
};
typedef
struct
insp_frame_data
insp_frame_data
;
...
...
@@ -78,6 +79,8 @@ struct insp_frame_data {
#if CONFIG_CDEF
// TODO(negge): add per frame CDEF data
#endif
int
delta_q_present_flag
;
int
delta_q_res
;
};
void
ifd_init
(
insp_frame_data
*
fd
,
int
frame_width
,
int
frame_height
);
...
...
examples/inspect.c
View file @
c24351c0
...
...
@@ -58,7 +58,8 @@ typedef enum {
UV_MODE_LAYER
=
1
<<
10
,
CFL_LAYER
=
1
<<
11
,
DUAL_FILTER_LAYER
=
1
<<
12
,
ALL_LAYERS
=
(
1
<<
13
)
-
1
Q_INDEX_LAYER
=
1
<<
13
,
ALL_LAYERS
=
(
1
<<
14
)
-
1
}
LayerType
;
static
LayerType
layers
=
0
;
...
...
@@ -98,6 +99,8 @@ static const arg_def_t dump_dual_filter_type_arg =
#endif
static
const
arg_def_t
dump_reference_frame_arg
=
ARG_DEF
(
"r"
,
"referenceFrame"
,
0
,
"Dump Reference Frame"
);
static
const
arg_def_t
dump_delta_q_arg
=
ARG_DEF
(
"dq"
,
"delta_q"
,
0
,
"Dump QIndex"
);
static
const
arg_def_t
usage_arg
=
ARG_DEF
(
"h"
,
"help"
,
0
,
"Help"
);
static
const
arg_def_t
*
main_args
[]
=
{
&
limit_arg
,
...
...
@@ -124,6 +127,7 @@ static const arg_def_t *main_args[] = { &limit_arg,
#endif
&
dump_reference_frame_arg
,
&
dump_motion_vectors_arg
,
&
dump_delta_q_arg
,
&
usage_arg
,
NULL
};
#define ENUM(name) \
...
...
@@ -432,7 +436,7 @@ int put_block_info(char *buffer, const map_entry *map, const char *name,
*
(
buf
++
)
=
'['
;
for
(
c
=
0
;
c
<
mi_cols
;
++
c
)
{
insp_mi_data
*
mi
=
&
frame_data
.
mi_grid
[
r
*
mi_cols
+
c
];
int
8
_t
*
v
=
((
int8_t
*
)
mi
)
+
offset
;
int
16
_t
*
v
=
(
int16_t
*
)(
((
int8_t
*
)
mi
)
+
offset
)
;
if
(
len
==
0
)
{
buf
+=
put_num
(
buf
,
0
,
v
[
0
],
0
);
}
else
{
...
...
@@ -448,7 +452,7 @@ int put_block_info(char *buffer, const map_entry *map, const char *name,
if
(
compress
)
{
// RLE
for
(
t
=
c
+
1
;
t
<
mi_cols
;
++
t
)
{
insp_mi_data
*
next_mi
=
&
frame_data
.
mi_grid
[
r
*
mi_cols
+
t
];
int
8
_t
*
nv
=
((
int8_t
*
)
next_mi
)
+
offset
;
int
16
_t
*
nv
=
(
int16_t
*
)(
((
int8_t
*
)
next_mi
)
+
offset
)
;
int
same
=
0
;
if
(
len
==
0
)
{
same
=
v
[
0
]
==
nv
[
0
];
...
...
@@ -584,6 +588,10 @@ void inspect(void *pbi, void *data) {
offsetof
(
insp_mi_data
,
cfl_alpha_sign
),
0
);
}
#endif
if
(
layers
&
Q_INDEX_LAYER
)
{
buf
+=
put_block_info
(
buf
,
NULL
,
"delta_q"
,
offsetof
(
insp_mi_data
,
current_qindex
),
0
);
}
if
(
layers
&
MOTION_VECTORS_LAYER
)
{
buf
+=
put_motion_vectors
(
buf
);
}
...
...
@@ -607,6 +615,10 @@ void inspect(void *pbi, void *data) {
frame_data
.
tile_mi_cols
);
buf
+=
snprintf
(
buf
,
MAX_BUFFER
,
"
\"
tileRows
\"
: %d,
\n
"
,
frame_data
.
tile_mi_rows
);
buf
+=
snprintf
(
buf
,
MAX_BUFFER
,
"
\"
deltaQPresentFlag
\"
: %d,
\n
"
,
frame_data
.
delta_q_present_flag
);
buf
+=
snprintf
(
buf
,
MAX_BUFFER
,
"
\"
deltaQRes
\"
: %d,
\n
"
,
frame_data
.
delta_q_res
);
buf
+=
put_str
(
buf
,
"
\"
config
\"
: {"
);
buf
+=
put_map
(
buf
,
config_map
);
buf
+=
put_str
(
buf
,
"},
\n
"
);
...
...
@@ -736,6 +748,8 @@ static void parse_args(char **argv) {
else
if
(
arg_match
(
&
arg
,
&
dump_dual_filter_type_arg
,
argi
))
layers
|=
DUAL_FILTER_LAYER
;
#endif
else
if
(
arg_match
(
&
arg
,
&
dump_delta_q_arg
,
argi
))
layers
|=
Q_INDEX_LAYER
;
else
if
(
arg_match
(
&
arg
,
&
dump_all_arg
,
argi
))
layers
|=
ALL_LAYERS
;
else
if
(
arg_match
(
&
arg
,
&
compress_arg
,
argi
))
...
...
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