[CFL] Add CFL alphas to inspection data
Change-Id: I4269d5b808e8809199a24b7511a3dee029f31820
diff --git a/examples/inspect.c b/examples/inspect.c
index 345c088..acd3f25 100644
--- a/examples/inspect.c
+++ b/examples/inspect.c
@@ -56,7 +56,8 @@
REFERENCE_FRAME_LAYER = 1 << 8,
MOTION_VECTORS_LAYER = 1 << 9,
UV_MODE_LAYER = 1 << 10,
- ALL_LAYERS = (1 << 11) - 1
+ CFL_LAYER = 1 << 11,
+ ALL_LAYERS = (1 << 12) - 1
} LayerType;
static LayerType layers = 0;
@@ -86,6 +87,10 @@
static const arg_def_t dump_filter_arg =
ARG_DEF("f", "filter", 0, "Dump Filter");
static const arg_def_t dump_cdef_arg = ARG_DEF("c", "cdef", 0, "Dump CDEF");
+#if CONFIG_CFL
+static const arg_def_t dump_cfl_arg =
+ ARG_DEF("cfl", "chroma_from_luma", 0, "Dump Chroma from Luma Alphas");
+#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");
@@ -106,6 +111,9 @@
#if CONFIG_CDEF
&dump_cdef_arg,
#endif
+#if CONFIG_CFL
+ &dump_cfl_arg,
+#endif
&dump_reference_frame_arg,
&dump_motion_vectors_arg,
&usage_arg,
@@ -489,6 +497,16 @@
offsetof(insp_mi_data, cdef_strength));
}
#endif
+#if CONFIG_CFL
+ if (layers & CFL_LAYER) {
+ buf += put_block_info(buf, NULL, "cfl_alpha_ind",
+ offsetof(insp_mi_data, cfl_alpha_ind));
+ buf += put_block_info(buf, NULL, "cfl_alpha_sign_u",
+ offsetof(insp_mi_data, cfl_alpha_sign_u));
+ buf += put_block_info(buf, NULL, "cfl_alpha_sign_v",
+ offsetof(insp_mi_data, cfl_alpha_sign_v));
+ }
+#endif
if (layers & MOTION_VECTORS_LAYER) {
buf += put_motion_vectors(buf);
}
@@ -621,6 +639,10 @@
else if (arg_match(&arg, &dump_cdef_arg, argi))
layers |= CDEF_LAYER;
#endif
+#if CONFIG_CFL
+ else if (arg_match(&arg, &dump_cfl_arg, argi))
+ layers |= CFL_LAYER;
+#endif
else if (arg_match(&arg, &dump_reference_frame_arg, argi))
layers |= REFERENCE_FRAME_LAYER;
else if (arg_match(&arg, &dump_motion_vectors_arg, argi))