CONFIG_INSPECTION: fix showable and overlay frame behavior

Remove show existing frame from decode order, and add showing of
an overlay frame that doesn't routinely update any buffer.

Change-Id: I9176bfa53a0542b51891fa510f5d62f102a4e8c5
diff --git a/av1/av1_dx_iface.c b/av1/av1_dx_iface.c
index 5b4edfb..0c14a97 100644
--- a/av1/av1_dx_iface.c
+++ b/av1/av1_dx_iface.c
@@ -520,12 +520,16 @@
   frame_worker_data->pbi->inspect_cb = ctx->inspect_cb;
   frame_worker_data->pbi->inspect_ctx = ctx->inspect_ctx;
   res = av1_receive_compressed_data(frame_worker_data->pbi, data_sz, &data);
+  check_resync(ctx, frame_worker_data->pbi);
+
   if (ctx->frame_workers->had_error)
     return update_error_state(ctx, &frame_worker_data->pbi->common.error);
 
+  data2->idx = -1;
   for (int i = 0; i < REF_FRAMES; ++i)
     if (cm->ref_frame_map[i] == cm->new_fb_idx) data2->idx = i;
   data2->buf = data;
+  data2->show_existing = cm->show_existing_frame;
   return res;
 }
 #endif
diff --git a/av1/decoder/inspection.c b/av1/decoder/inspection.c
index 14d6215..715afbc 100644
--- a/av1/decoder/inspection.c
+++ b/av1/decoder/inspection.c
@@ -36,10 +36,12 @@
 int ifd_inspect(insp_frame_data *fd, void *decoder) {
   struct AV1Decoder *pbi = (struct AV1Decoder *)decoder;
   AV1_COMMON *const cm = &pbi->common;
+
   if (fd->mi_rows != cm->mi_rows || fd->mi_cols != cm->mi_cols) {
     ifd_clear(fd);
     ifd_init_mi_rc(fd, cm->mi_rows, cm->mi_cols);
   }
+  fd->show_existing_frame = cm->show_existing_frame;
   fd->frame_number = cm->current_video_frame;
   fd->show_frame = cm->show_frame;
   fd->frame_type = cm->frame_type;
diff --git a/av1/decoder/inspection.h b/av1/decoder/inspection.h
index 51e6d19..0c6f3ad 100644
--- a/av1/decoder/inspection.h
+++ b/av1/decoder/inspection.h
@@ -75,6 +75,7 @@
   // TODO(negge): add per frame CDEF data
   int delta_q_present_flag;
   int delta_q_res;
+  int show_existing_frame;
 };
 
 void ifd_init(insp_frame_data *fd, int frame_width, int frame_height);