Moving loopfilter struct to VP9_COMMON.
Loop filter configuration doesn't belong to macroblock, so moving it from
MACROBLOCKD to VP9_COMMON. Also moving the declaration of loopfilter struct
from vp9_blockd.h to vp9_loopfilter.h.
Change-Id: I4b3e34be9623b47cda35f9b1f9951f8c5b1d5d28
diff --git a/vp9/decoder/vp9_decodframe.c b/vp9/decoder/vp9_decodframe.c
index 58fe52c..66ca507 100644
--- a/vp9/decoder/vp9_decodframe.c
+++ b/vp9/decoder/vp9_decodframe.c
@@ -599,7 +599,7 @@
lf_data->xd = pbi->mb;
lf_data->y_only = 0;
}
- vp9_loop_filter_frame_init(pc, &pbi->mb, pbi->mb.lf.filter_level);
+ vp9_loop_filter_frame_init(pc, &pbi->mb, pc->lf.filter_level);
}
for (mi_row = pc->cur_tile_mi_row_start; mi_row < pc->cur_tile_mi_row_end;
@@ -813,7 +813,7 @@
int frame_to_show = cm->ref_frame_map[vp9_rb_read_literal(rb, 3)];
ref_cnt_fb(cm->fb_idx_ref_cnt, &cm->new_fb_idx, frame_to_show);
pbi->refresh_frame_flags = 0;
- xd->lf.filter_level = 0;
+ cm->lf.filter_level = 0;
return 0;
}
@@ -897,7 +897,7 @@
if (cm->frame_type == KEY_FRAME || cm->error_resilient_mode || cm->intra_only)
vp9_setup_past_independence(cm, xd);
- setup_loopfilter(&xd->lf, rb);
+ setup_loopfilter(&cm->lf, rb);
setup_quantization(pbi, rb);
setup_segmentation(&xd->seg, rb);
@@ -961,7 +961,7 @@
xd->corrupted = 0;
new_fb->corrupted = 0;
pbi->do_loopfilter_inline =
- (pc->log2_tile_rows | pc->log2_tile_cols) == 0 && pbi->mb.lf.filter_level;
+ (pc->log2_tile_rows | pc->log2_tile_cols) == 0 && pc->lf.filter_level;
if (!pbi->decoded_key_frame && !keyframe)
return -1;
diff --git a/vp9/decoder/vp9_onyxd_if.c b/vp9/decoder/vp9_onyxd_if.c
index 91e26ec..db4a5bb 100644
--- a/vp9/decoder/vp9_onyxd_if.c
+++ b/vp9/decoder/vp9_onyxd_if.c
@@ -136,7 +136,7 @@
// vp9_init_dequantizer() for every frame.
vp9_init_dequantizer(&pbi->common);
- vp9_loop_filter_init(&pbi->common, &pbi->mb.lf);
+ vp9_loop_filter_init(&pbi->common, &pbi->common.lf);
pbi->common.error.setjmp = 0;
pbi->decoded_key_frame = 0;
@@ -359,7 +359,7 @@
if (!pbi->do_loopfilter_inline) {
/* Apply the loop filter if appropriate. */
- vp9_loop_filter_frame(cm, &pbi->mb, pbi->mb.lf.filter_level, 0, 0);
+ vp9_loop_filter_frame(cm, &pbi->mb, pbi->common.lf.filter_level, 0, 0);
}
#if WRITE_RECON_BUFFER == 2
@@ -424,7 +424,7 @@
*time_end_stamp = 0;
#if CONFIG_POSTPROC
- ret = vp9_post_proc_frame(&pbi->common, &pbi->mb.lf, sd, flags);
+ ret = vp9_post_proc_frame(&pbi->common, &pbi->common.lf, sd, flags);
#else
if (pbi->common.frame_to_show) {