| Index: source/libvpx/vp9/common/vp9_loopfilter.c
|
| ===================================================================
|
| --- source/libvpx/vp9/common/vp9_loopfilter.c (revision 271012)
|
| +++ 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_8x8, 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_8x8;
|
| - MODE_INFO **mip2 = mi_8x8;
|
| + 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 avoids
|
| @@ -1195,13 +1195,13 @@
|
| VP9_COMMON *cm, MACROBLOCKD *xd,
|
| int start, int stop, int y_only) {
|
| const int num_planes = y_only ? 1 : MAX_MB_PLANE;
|
| + const int use_420 = y_only || (xd->plane[1].subsampling_y == 1 &&
|
| + xd->plane[1].subsampling_x == 1);
|
| + LOOP_FILTER_MASK lfm;
|
| int mi_row, mi_col;
|
| - LOOP_FILTER_MASK lfm;
|
| - int use_420 = y_only || (xd->plane[1].subsampling_y == 1 &&
|
| - xd->plane[1].subsampling_x == 1);
|
|
|
| for (mi_row = start; mi_row < stop; mi_row += MI_BLOCK_SIZE) {
|
| - MODE_INFO **mi_8x8 = cm->mi_grid_visible + mi_row * cm->mi_stride;
|
| + MODE_INFO **mi = cm->mi_grid_visible + mi_row * cm->mi_stride;
|
|
|
| for (mi_col = 0; mi_col < cm->mi_cols; mi_col += MI_BLOCK_SIZE) {
|
| int plane;
|
| @@ -1210,21 +1210,22 @@
|
|
|
| // TODO(JBB): Make setup_mask work for non 420.
|
| if (use_420)
|
| - vp9_setup_mask(cm, mi_row, mi_col, mi_8x8 + mi_col, cm->mi_stride,
|
| + vp9_setup_mask(cm, mi_row, mi_col, mi + mi_col, cm->mi_stride,
|
| &lfm);
|
|
|
| for (plane = 0; plane < num_planes; ++plane) {
|
| if (use_420)
|
| vp9_filter_block_plane(cm, &xd->plane[plane], mi_row, &lfm);
|
| else
|
| - filter_block_plane_non420(cm, &xd->plane[plane], mi_8x8 + mi_col,
|
| + filter_block_plane_non420(cm, &xd->plane[plane], mi + mi_col,
|
| mi_row, mi_col);
|
| }
|
| }
|
| }
|
| }
|
|
|
| -void vp9_loop_filter_frame(VP9_COMMON *cm, MACROBLOCKD *xd,
|
| +void vp9_loop_filter_frame(YV12_BUFFER_CONFIG *frame,
|
| + VP9_COMMON *cm, MACROBLOCKD *xd,
|
| int frame_filter_level,
|
| int y_only, int partial_frame) {
|
| int start_mi_row, end_mi_row, mi_rows_to_filter;
|
| @@ -1238,7 +1239,7 @@
|
| }
|
| end_mi_row = start_mi_row + mi_rows_to_filter;
|
| vp9_loop_filter_frame_init(cm, frame_filter_level);
|
| - vp9_loop_filter_rows(cm->frame_to_show, cm, xd,
|
| + vp9_loop_filter_rows(frame, cm, xd,
|
| start_mi_row, end_mi_row,
|
| y_only);
|
| }
|
|
|