Remove mi_grid_* structures.

mi_grid_* are arrays of pointer to pointer. They save the pointers that point
to the MIs in cm->mi. But they are unnecessary and complicated. The original
goal was to remove MODE_INFO_t copy. But with an extra MODE_INFO_t pointer
inside MODE_INFO_t, same goal could be achieved.

This commit totally removes the mi_grid_* structures. But there are still
many dummy MODE_INFO_t inside cm->mi which are a waste of memory. Next commit
will do on-demand MODE_INFO_t allocation in order to save these memories.

Change-Id: I3a05cf1610679fed26e0b2eadd315a9ae91afdd6
This commit is contained in:
hkuang
2014-09-11 15:37:08 -07:00
parent 77caad4ff1
commit c70cea97ac
31 changed files with 314 additions and 326 deletions

View File

@@ -26,7 +26,8 @@ static void print_mi_data(VP9_COMMON *cm, FILE *file, const char *descriptor,
size_t member_offset) {
int mi_row, mi_col;
int mi_index = 0;
MODE_INFO **mi = cm->mi_grid_visible;
// TODO(hkuang): Fix this debug function.
MODE_INFO **mi = NULL;
int rows = cm->mi_rows;
int cols = cm->mi_cols;
char prefix = descriptor[0];
@@ -51,7 +52,8 @@ void vp9_print_modes_and_motion_vectors(VP9_COMMON *cm, const char *file) {
int mi_col;
int mi_index = 0;
FILE *mvs = fopen(file, "a");
MODE_INFO **mi = cm->mi_grid_visible;
// TODO(hkuang): Fix this debug function.
MODE_INFO **mi = NULL;
int rows = cm->mi_rows;
int cols = cm->mi_cols;