Add pyramid level check in subgop unit test
This patch extends subgop unit test to validate pyramid level
and corresponding qindex assignment of each frame.
Change-Id: I5c18e513aaab86c11a4f0e6af0544419f4d183e2
diff --git a/av1/av1_dx_iface.c b/av1/av1_dx_iface.c
index ec920db..76568cf 100644
--- a/av1/av1_dx_iface.c
+++ b/av1/av1_dx_iface.c
@@ -1168,17 +1168,20 @@
FrameWorkerData *const frame_worker_data = (FrameWorkerData *)worker->data1;
const AV1Decoder *const pbi = frame_worker_data->pbi;
const SubGOPStatsDec *const subgop_stats = &pbi->subgop_stats;
- SubGOPStepData *step_data = subgop_data->step;
+ SubGOPStepData *subgop_step = subgop_data->step;
const int stat_count = subgop_stats->stat_count;
// Collects already decoded out of order frames info along with in-order
// frame
- step_data += subgop_data->step_idx_dec;
+ subgop_step += subgop_data->step_idx_dec;
for (int step_idx = 0; step_idx < stat_count; step_idx++) {
- step_data[step_idx].disp_frame_idx = subgop_stats->disp_frame_idx[step_idx];
- step_data[step_idx].show_existing_frame =
+ SubGOPStepData *step_data = &subgop_step[step_idx];
+ step_data->disp_frame_idx = subgop_stats->disp_frame_idx[step_idx];
+ step_data->show_existing_frame =
subgop_stats->show_existing_frame[step_idx];
- step_data[step_idx].show_frame = subgop_stats->show_frame[step_idx];
+ step_data->show_frame = subgop_stats->show_frame[step_idx];
+ step_data->qindex = subgop_stats->qindex[step_idx];
+
subgop_data->step_idx_dec++;
}
return AOM_CODEC_OK;
diff --git a/av1/av1_iface_common.h b/av1/av1_iface_common.h
index 18c3eb4..af1f48d 100644
--- a/av1/av1_iface_common.h
+++ b/av1/av1_iface_common.h
@@ -24,6 +24,7 @@
int show_frame;
int show_existing_frame;
int pyramid_level;
+ int qindex;
} SubGOPStepData;
typedef struct {
diff --git a/av1/decoder/decoder.c b/av1/decoder/decoder.c
index 608b1a7..c13fa15 100644
--- a/av1/decoder/decoder.c
+++ b/av1/decoder/decoder.c
@@ -55,6 +55,7 @@
subgop_stats->show_existing_frame[subgop_stats->stat_count] =
cm->show_existing_frame;
subgop_stats->show_frame[subgop_stats->stat_count] = cm->show_frame;
+ subgop_stats->qindex[subgop_stats->stat_count] = cm->quant_params.base_qindex;
assert(subgop_stats->stat_count < MAX_SUBGOP_STATS_SIZE);
subgop_stats->stat_count++;
}
diff --git a/av1/decoder/decoder.h b/av1/decoder/decoder.h
index b4dabce..e483623 100644
--- a/av1/decoder/decoder.h
+++ b/av1/decoder/decoder.h
@@ -225,6 +225,7 @@
unsigned char disp_frame_idx[MAX_SUBGOP_STATS_SIZE];
int show_existing_frame[MAX_SUBGOP_STATS_SIZE];
int show_frame[MAX_SUBGOP_STATS_SIZE];
+ int qindex[MAX_SUBGOP_STATS_SIZE];
int refresh_frame_flags[MAX_SUBGOP_STATS_SIZE];
unsigned char stat_count;
} SubGOPStatsDec;