ref: 2336853be1f387f08e16a0b13d24d8da22b35583
parent: 326b73e41e1fcbc0ddf90971cab203a09ca812ce
parent: a8ba34d2994f9b85af885d66da5ca8ef6d8094f2
author: Dmitry Kovalev <[email protected]>
date: Fri Jan 3 10:04:53 EST 2014
Merge "Pre planes configuration cleanup."
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -2583,19 +2583,13 @@
if (output_enabled)
sum_intra_stats(cm, mi);
} else {
- int idx = cm->ref_frame_map[get_ref_frame_idx(cpi, mbmi->ref_frame[0])];
- YV12_BUFFER_CONFIG *ref_fb = &cm->yv12_fb[idx];
- YV12_BUFFER_CONFIG *second_ref_fb = NULL;
- if (has_second_ref(mbmi)) {
- idx = cm->ref_frame_map[get_ref_frame_idx(cpi, mbmi->ref_frame[1])];
- second_ref_fb = &cm->yv12_fb[idx];
+ int ref;
+ const int is_compound = has_second_ref(mbmi);
+ for (ref = 0; ref < 1 + is_compound; ++ref) {
+ YV12_BUFFER_CONFIG *cfg = &cm->yv12_fb[cm->ref_frame_map[
+ get_ref_frame_idx(cpi, mbmi->ref_frame[ref])]];
+ setup_pre_planes(xd, ref, cfg, mi_row, mi_col, xd->scale_factors[ref]);
}
-
- assert(cm->frame_type != KEY_FRAME);
-
- setup_pre_planes(xd, 0, ref_fb, mi_row, mi_col, xd->scale_factors[0]);
- setup_pre_planes(xd, 1, second_ref_fb, mi_row, mi_col,
- xd->scale_factors[1]);
vp9_build_inter_predictors_sb(xd, mi_row, mi_col, MAX(bsize, BLOCK_8X8));
}