aboutsummaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_mbgraph.c
diff options
context:
space:
mode:
Diffstat (limited to 'vp9/encoder/vp9_mbgraph.c')
-rw-r--r--vp9/encoder/vp9_mbgraph.c30
1 files changed, 11 insertions, 19 deletions
diff --git a/vp9/encoder/vp9_mbgraph.c b/vp9/encoder/vp9_mbgraph.c
index 7c2790cb9..2f20a8fe6 100644
--- a/vp9/encoder/vp9_mbgraph.c
+++ b/vp9/encoder/vp9_mbgraph.c
@@ -98,8 +98,7 @@ static int do_16x16_motion_search(VP9_COMP *cpi, const MV *ref_mv,
// If the current best reference mv is not centered on 0,0 then do a 0,0
// based search as well.
if (ref_mv->row != 0 || ref_mv->col != 0) {
- unsigned int tmp_err;
- MV zero_ref_mv = { 0, 0 }, tmp_mv;
+ MV zero_ref_mv = { 0, 0 };
tmp_err =
do_16x16_motion_iteration(cpi, &zero_ref_mv, &tmp_mv, mb_row, mb_col);
@@ -238,7 +237,7 @@ static void update_mbgraph_frame_stats(VP9_COMP *cpi,
xd->mi[0] = &mi_local;
mi_local.sb_type = BLOCK_16X16;
mi_local.ref_frame[0] = LAST_FRAME;
- mi_local.ref_frame[1] = NONE;
+ mi_local.ref_frame[1] = NO_REF_FRAME;
for (mb_row = 0; mb_row < cm->mb_rows; mb_row++) {
MV gld_left_mv = gld_top_mv;
@@ -289,7 +288,7 @@ static void separate_arf_mbs(VP9_COMP *cpi) {
int *arf_not_zz;
CHECK_MEM_ERROR(
- cm, arf_not_zz,
+ &cm->error, arf_not_zz,
vpx_calloc(cm->mb_rows * cm->mb_cols * sizeof(*arf_not_zz), 1));
// We are not interested in results beyond the alt ref itself.
@@ -334,23 +333,16 @@ static void separate_arf_mbs(VP9_COMP *cpi) {
}
}
- // Only bother with segmentation if over 10% of the MBs in static segment
- // if ( ncnt[1] && (ncnt[0] / ncnt[1] < 10) )
- if (1) {
- // Note % of blocks that are marked as static
- if (cm->MBs)
- cpi->static_mb_pct = (ncnt[1] * 100) / (cm->mi_rows * cm->mi_cols);
+ // Note % of blocks that are marked as static
+ if (cm->MBs)
+ cpi->static_mb_pct = (ncnt[1] * 100) / (cm->mi_rows * cm->mi_cols);
- // This error case should not be reachable as this function should
- // never be called with the common data structure uninitialized.
- else
- cpi->static_mb_pct = 0;
-
- vp9_enable_segmentation(&cm->seg);
- } else {
+ // This error case should not be reachable as this function should
+ // never be called with the common data structure uninitialized.
+ else
cpi->static_mb_pct = 0;
- vp9_disable_segmentation(&cm->seg);
- }
+
+ vp9_enable_segmentation(&cm->seg);
// Free localy allocated storage
vpx_free(arf_not_zz);