| Index: source/libvpx/vp9/common/vp9_loopfilter.c
|
| ===================================================================
|
| --- source/libvpx/vp9/common/vp9_loopfilter.c (revision 292072)
|
| +++ source/libvpx/vp9/common/vp9_loopfilter.c (working copy)
|
| @@ -619,12 +619,12 @@
|
| // by mi_row, mi_col.
|
| // TODO(JBB): This function only works for yv12.
|
| void vp9_setup_mask(VP9_COMMON *const cm, const int mi_row, const int mi_col,
|
| - MODE_INFO **mi, const int mode_info_stride,
|
| + MODE_INFO *mi, const int mode_info_stride,
|
| LOOP_FILTER_MASK *lfm) {
|
| int idx_32, idx_16, idx_8;
|
| const loop_filter_info_n *const lfi_n = &cm->lf_info;
|
| - MODE_INFO **mip = mi;
|
| - MODE_INFO **mip2 = mi;
|
| + MODE_INFO *mip = mi;
|
| + MODE_INFO *mip2 = mi;
|
|
|
| // These are offsets to the next mi in the 64x64 block. It is what gets
|
| // added to the mi ptr as we go through each loop. It helps us to avoid
|
| @@ -652,28 +652,28 @@
|
| cm->mi_cols - mi_col : MI_BLOCK_SIZE);
|
|
|
| vp9_zero(*lfm);
|
| - assert(mip[0] != NULL);
|
| + assert(mip != NULL);
|
|
|
| // TODO(jimbankoski): Try moving most of the following code into decode
|
| // loop and storing lfm in the mbmi structure so that we don't have to go
|
| // through the recursive loop structure multiple times.
|
| - switch (mip[0]->mbmi.sb_type) {
|
| + switch (mip->mbmi.sb_type) {
|
| case BLOCK_64X64:
|
| - build_masks(lfi_n, mip[0] , 0, 0, lfm);
|
| + build_masks(lfi_n, mip , 0, 0, lfm);
|
| break;
|
| case BLOCK_64X32:
|
| - build_masks(lfi_n, mip[0], 0, 0, lfm);
|
| + build_masks(lfi_n, mip, 0, 0, lfm);
|
| mip2 = mip + mode_info_stride * 4;
|
| if (4 >= max_rows)
|
| break;
|
| - build_masks(lfi_n, mip2[0], 32, 8, lfm);
|
| + build_masks(lfi_n, mip2, 32, 8, lfm);
|
| break;
|
| case BLOCK_32X64:
|
| - build_masks(lfi_n, mip[0], 0, 0, lfm);
|
| + build_masks(lfi_n, mip, 0, 0, lfm);
|
| mip2 = mip + 4;
|
| if (4 >= max_cols)
|
| break;
|
| - build_masks(lfi_n, mip2[0], 4, 2, lfm);
|
| + build_masks(lfi_n, mip2, 4, 2, lfm);
|
| break;
|
| default:
|
| for (idx_32 = 0; idx_32 < 4; mip += offset_32[idx_32], ++idx_32) {
|
| @@ -683,23 +683,23 @@
|
| const int mi_32_row_offset = ((idx_32 >> 1) << 2);
|
| if (mi_32_col_offset >= max_cols || mi_32_row_offset >= max_rows)
|
| continue;
|
| - switch (mip[0]->mbmi.sb_type) {
|
| + switch (mip->mbmi.sb_type) {
|
| case BLOCK_32X32:
|
| - build_masks(lfi_n, mip[0], shift_y, shift_uv, lfm);
|
| + build_masks(lfi_n, mip, shift_y, shift_uv, lfm);
|
| break;
|
| case BLOCK_32X16:
|
| - build_masks(lfi_n, mip[0], shift_y, shift_uv, lfm);
|
| + build_masks(lfi_n, mip, shift_y, shift_uv, lfm);
|
| if (mi_32_row_offset + 2 >= max_rows)
|
| continue;
|
| mip2 = mip + mode_info_stride * 2;
|
| - build_masks(lfi_n, mip2[0], shift_y + 16, shift_uv + 4, lfm);
|
| + build_masks(lfi_n, mip2, shift_y + 16, shift_uv + 4, lfm);
|
| break;
|
| case BLOCK_16X32:
|
| - build_masks(lfi_n, mip[0], shift_y, shift_uv, lfm);
|
| + build_masks(lfi_n, mip, shift_y, shift_uv, lfm);
|
| if (mi_32_col_offset + 2 >= max_cols)
|
| continue;
|
| mip2 = mip + 2;
|
| - build_masks(lfi_n, mip2[0], shift_y + 2, shift_uv + 1, lfm);
|
| + build_masks(lfi_n, mip2, shift_y + 2, shift_uv + 1, lfm);
|
| break;
|
| default:
|
| for (idx_16 = 0; idx_16 < 4; mip += offset_16[idx_16], ++idx_16) {
|
| @@ -713,29 +713,29 @@
|
| if (mi_16_col_offset >= max_cols || mi_16_row_offset >= max_rows)
|
| continue;
|
|
|
| - switch (mip[0]->mbmi.sb_type) {
|
| + switch (mip->mbmi.sb_type) {
|
| case BLOCK_16X16:
|
| - build_masks(lfi_n, mip[0], shift_y, shift_uv, lfm);
|
| + build_masks(lfi_n, mip, shift_y, shift_uv, lfm);
|
| break;
|
| case BLOCK_16X8:
|
| - build_masks(lfi_n, mip[0], shift_y, shift_uv, lfm);
|
| + build_masks(lfi_n, mip, shift_y, shift_uv, lfm);
|
| if (mi_16_row_offset + 1 >= max_rows)
|
| continue;
|
| mip2 = mip + mode_info_stride;
|
| - build_y_mask(lfi_n, mip2[0], shift_y+8, lfm);
|
| + build_y_mask(lfi_n, mip2, shift_y+8, lfm);
|
| break;
|
| case BLOCK_8X16:
|
| - build_masks(lfi_n, mip[0], shift_y, shift_uv, lfm);
|
| + build_masks(lfi_n, mip, shift_y, shift_uv, lfm);
|
| if (mi_16_col_offset +1 >= max_cols)
|
| continue;
|
| mip2 = mip + 1;
|
| - build_y_mask(lfi_n, mip2[0], shift_y+1, lfm);
|
| + build_y_mask(lfi_n, mip2, shift_y+1, lfm);
|
| break;
|
| default: {
|
| const int shift_y = shift_32_y[idx_32] +
|
| shift_16_y[idx_16] +
|
| shift_8_y[0];
|
| - build_masks(lfi_n, mip[0], shift_y, shift_uv, lfm);
|
| + build_masks(lfi_n, mip, shift_y, shift_uv, lfm);
|
| mip += offset[0];
|
| for (idx_8 = 1; idx_8 < 4; mip += offset[idx_8], ++idx_8) {
|
| const int shift_y = shift_32_y[idx_32] +
|
| @@ -749,7 +749,7 @@
|
| if (mi_8_col_offset >= max_cols ||
|
| mi_8_row_offset >= max_rows)
|
| continue;
|
| - build_y_mask(lfi_n, mip[0], shift_y, lfm);
|
| + build_y_mask(lfi_n, mip, shift_y, lfm);
|
| }
|
| break;
|
| }
|
| @@ -905,7 +905,7 @@
|
|
|
| static void filter_block_plane_non420(VP9_COMMON *cm,
|
| struct macroblockd_plane *plane,
|
| - MODE_INFO **mi_8x8,
|
| + MODE_INFO *mi_8x8,
|
| int mi_row, int mi_col) {
|
| const int ss_x = plane->subsampling_x;
|
| const int ss_y = plane->subsampling_y;
|
| @@ -929,7 +929,7 @@
|
|
|
| // Determine the vertical edges that need filtering
|
| for (c = 0; c < MI_BLOCK_SIZE && mi_col + c < cm->mi_cols; c += col_step) {
|
| - const MODE_INFO *mi = mi_8x8[c];
|
| + const MODE_INFO *mi = mi_8x8[c].src_mi;
|
| const BLOCK_SIZE sb_type = mi[0].mbmi.sb_type;
|
| const int skip_this = mi[0].mbmi.skip && is_inter_block(&mi[0].mbmi);
|
| // left edge of current unit is block/partition edge -> no skip
|
| @@ -1193,7 +1193,7 @@
|
| }
|
| }
|
|
|
| -void vp9_loop_filter_rows(const YV12_BUFFER_CONFIG *frame_buffer,
|
| +void vp9_loop_filter_rows(YV12_BUFFER_CONFIG *frame_buffer,
|
| VP9_COMMON *cm,
|
| struct macroblockd_plane planes[MAX_MB_PLANE],
|
| int start, int stop, int y_only) {
|
| @@ -1204,7 +1204,7 @@
|
| int mi_row, mi_col;
|
|
|
| for (mi_row = start; mi_row < stop; mi_row += MI_BLOCK_SIZE) {
|
| - MODE_INFO **mi = cm->mi_grid_visible + mi_row * cm->mi_stride;
|
| + MODE_INFO *mi = cm->mi + mi_row * cm->mi_stride;
|
|
|
| for (mi_col = 0; mi_col < cm->mi_cols; mi_col += MI_BLOCK_SIZE) {
|
| int plane;
|
| @@ -1247,9 +1247,8 @@
|
| y_only);
|
| }
|
|
|
| -int vp9_loop_filter_worker(void *arg1, void *arg2) {
|
| - LFWorkerData *const lf_data = (LFWorkerData*)arg1;
|
| - (void)arg2;
|
| +int vp9_loop_filter_worker(LFWorkerData *const lf_data, void *unused) {
|
| + (void)unused;
|
| vp9_loop_filter_rows(lf_data->frame_buffer, lf_data->cm, lf_data->planes,
|
| lf_data->start, lf_data->stop, lf_data->y_only);
|
| return 1;
|
|
|