Commit 6e6b6974 authored by Ankur Saxena's avatar Ankur Saxena Committed by Ankur Saxena US

Add dual filter support to inspector etc.

Change-Id: Id3124c0a4724e1c9e94960702445055da1e99277
parent 2d4ac634
......@@ -327,6 +327,20 @@ typedef enum ATTRIBUTE_PACKED {
TX_TYPES,
} TX_TYPE;
#if CONFIG_DUAL_FILTER
typedef enum {
REG_REG,
REG_SMOOTH,
REG_SHARP,
SMOOTH_REG,
SMOOTH_SMOOTH,
SMOOTH_SHARP,
SHARP_REG,
SHARP_SMOOTH,
SHARP_SHARP,
} DUAL_FILTER_TYPE;
#endif
#if CONFIG_EXT_TX
typedef enum ATTRIBUTE_PACKED {
// DCT only
......
......@@ -93,6 +93,7 @@ int ifd_inspect(insp_frame_data *fd, void *decoder) {
#if CONFIG_DUAL_FILTER
mi->filter[0] = av1_extract_interp_filter(mbmi->interp_filters, 0);
mi->filter[1] = av1_extract_interp_filter(mbmi->interp_filters, 1);
mi->dual_filter_type = mi->filter[0] * 3 + mi->filter[1];
#else
mi->filter = av1_extract_interp_filter(mbmi->interp_filters, 0);
#endif
......
......@@ -40,6 +40,7 @@ struct insp_mi_data {
int8_t skip;
int8_t segment_id;
#if CONFIG_DUAL_FILTER
int8_t dual_filter_type;
int8_t filter[2];
#else
int8_t filter;
......
......@@ -57,7 +57,8 @@ typedef enum {
MOTION_VECTORS_LAYER = 1 << 9,
UV_MODE_LAYER = 1 << 10,
CFL_LAYER = 1 << 11,
ALL_LAYERS = (1 << 12) - 1
DUAL_FILTER_LAYER = 1 << 12,
ALL_LAYERS = (1 << 13) - 1
} LayerType;
static LayerType layers = 0;
......@@ -91,6 +92,10 @@ static const arg_def_t dump_cdef_arg = ARG_DEF("c", "cdef", 0, "Dump CDEF");
static const arg_def_t dump_cfl_arg =
ARG_DEF("cfl", "chroma_from_luma", 0, "Dump Chroma from Luma Alphas");
#endif
#if CONFIG_DUAL_FILTER
static const arg_def_t dump_dual_filter_type_arg =
ARG_DEF("df", "dualFilterType", 0, "Dump Dual Filter Type");
#endif
static const arg_def_t dump_reference_frame_arg =
ARG_DEF("r", "referenceFrame", 0, "Dump Reference Frame");
static const arg_def_t usage_arg = ARG_DEF("h", "help", 0, "Help");
......@@ -111,6 +116,9 @@ static const arg_def_t *main_args[] = { &limit_arg,
#if CONFIG_CDEF
&dump_cdef_arg,
#endif
#if CONFIG_DUAL_FILTER
&dump_dual_filter_type_arg,
#endif
#if CONFIG_CFL
&dump_cfl_arg,
#endif
......@@ -185,6 +193,13 @@ const map_entry tx_type_map[] = { ENUM(DCT_DCT),
ENUM(H_FLIPADST),
#endif
LAST_ENUM };
#if CONFIG_DUAL_FILTER
const map_entry dual_filter_map[] = { ENUM(REG_REG), ENUM(REG_SMOOTH),
ENUM(REG_SHARP), ENUM(SMOOTH_REG),
ENUM(SMOOTH_SMOOTH), ENUM(SMOOTH_SHARP),
ENUM(SHARP_REG), ENUM(SHARP_SMOOTH),
ENUM(SHARP_SHARP), LAST_ENUM };
#endif
const map_entry prediction_mode_map[] = {
ENUM(DC_PRED), ENUM(V_PRED), ENUM(H_PRED),
......@@ -501,6 +516,12 @@ void inspect(void *pbi, void *data) {
buf += put_block_info(buf, tx_type_map, "transformType",
offsetof(insp_mi_data, tx_type));
}
#if CONFIG_DUAL_FILTER
if (layers & DUAL_FILTER_LAYER) {
buf += put_block_info(buf, dual_filter_map, "dualFilterType",
offsetof(insp_mi_data, dual_filter_type));
}
#endif
if (layers & MODE_LAYER) {
buf += put_block_info(buf, prediction_mode_map, "mode",
offsetof(insp_mi_data, mode));
......@@ -678,6 +699,10 @@ static void parse_args(char **argv) {
layers |= REFERENCE_FRAME_LAYER;
else if (arg_match(&arg, &dump_motion_vectors_arg, argi))
layers |= MOTION_VECTORS_LAYER;
#if CONFIG_DUAL_FILTER
else if (arg_match(&arg, &dump_dual_filter_type_arg, argi))
layers |= DUAL_FILTER_LAYER;
#endif
else if (arg_match(&arg, &dump_all_arg, argi))
layers |= ALL_LAYERS;
else if (arg_match(&arg, &compress_arg, argi))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment