summaryrefslogtreecommitdiff
path: root/vp8/encoder
diff options
context:
space:
mode:
authorJohn Koleszar <jkoleszar@google.com>2011-05-28 00:05:12 -0400
committerJohn Koleszar <jkoleszar@google.com>2011-05-28 00:05:12 -0400
commitd63ce5db34815029159b2ed87e3c6ce65c276662 (patch)
treecc0d8f4cc4e68303683a7b097c5169237c6cce16 /vp8/encoder
parent2fa7fe66c41b85b71d74d14a64bf731673f8bc10 (diff)
parent4a4ade6dc8d6b4af4848c830a359b4a0fc81d1a5 (diff)
downloadlibvpx-d63ce5db34815029159b2ed87e3c6ce65c276662.tar
libvpx-d63ce5db34815029159b2ed87e3c6ce65c276662.tar.gz
libvpx-d63ce5db34815029159b2ed87e3c6ce65c276662.tar.bz2
libvpx-d63ce5db34815029159b2ed87e3c6ce65c276662.zip
Merge remote branch 'origin/master' into experimental
Change-Id: Ie2a4927754a9c220b30a84fc7e1372e565fe9eec
Diffstat (limited to 'vp8/encoder')
-rw-r--r--vp8/encoder/onyx_if.c42
-rw-r--r--vp8/encoder/rdopt.c11
2 files changed, 26 insertions, 27 deletions
diff --git a/vp8/encoder/onyx_if.c b/vp8/encoder/onyx_if.c
index 0baf84c19..8a9dfb40b 100644
--- a/vp8/encoder/onyx_if.c
+++ b/vp8/encoder/onyx_if.c
@@ -1049,11 +1049,9 @@ void vp8_set_speed_features(VP8_COMP *cpi)
{
sf->auto_filter = 0; // Faster selection of loop filter
-#if CONFIG_REALTIME_ONLY
sf->search_method = HEX;
-#else
- sf->search_method = DIAMOND;
-#endif
+ //sf->search_method = DIAMOND;
+
sf->iterative_sub_pixel = 0;
cpi->mode_check_freq[THR_V_PRED] = 4;
@@ -3180,15 +3178,21 @@ void update_reference_frames(VP8_COMMON *cm)
if (cm->copy_buffer_to_arf == 1)
{
- yv12_fb[cm->lst_fb_idx].flags |= VP8_ALT_FLAG;
- yv12_fb[cm->alt_fb_idx].flags &= ~VP8_ALT_FLAG;
- cm->alt_fb_idx = cm->lst_fb_idx;
+ if(cm->alt_fb_idx != cm->lst_fb_idx)
+ {
+ yv12_fb[cm->lst_fb_idx].flags |= VP8_ALT_FLAG;
+ yv12_fb[cm->alt_fb_idx].flags &= ~VP8_ALT_FLAG;
+ cm->alt_fb_idx = cm->lst_fb_idx;
+ }
}
else /* if (cm->copy_buffer_to_arf == 2) */
{
- yv12_fb[cm->gld_fb_idx].flags |= VP8_ALT_FLAG;
- yv12_fb[cm->alt_fb_idx].flags &= ~VP8_ALT_FLAG;
- cm->alt_fb_idx = cm->gld_fb_idx;
+ if(cm->alt_fb_idx != cm->gld_fb_idx)
+ {
+ yv12_fb[cm->gld_fb_idx].flags |= VP8_ALT_FLAG;
+ yv12_fb[cm->alt_fb_idx].flags &= ~VP8_ALT_FLAG;
+ cm->alt_fb_idx = cm->gld_fb_idx;
+ }
}
}
@@ -3206,15 +3210,21 @@ void update_reference_frames(VP8_COMMON *cm)
if (cm->copy_buffer_to_gf == 1)
{
- yv12_fb[cm->lst_fb_idx].flags |= VP8_GOLD_FLAG;
- yv12_fb[cm->gld_fb_idx].flags &= ~VP8_GOLD_FLAG;
- cm->gld_fb_idx = cm->lst_fb_idx;
+ if(cm->gld_fb_idx != cm->lst_fb_idx)
+ {
+ yv12_fb[cm->lst_fb_idx].flags |= VP8_GOLD_FLAG;
+ yv12_fb[cm->gld_fb_idx].flags &= ~VP8_GOLD_FLAG;
+ cm->gld_fb_idx = cm->lst_fb_idx;
+ }
}
else /* if (cm->copy_buffer_to_gf == 2) */
{
- yv12_fb[cm->alt_fb_idx].flags |= VP8_GOLD_FLAG;
- yv12_fb[cm->gld_fb_idx].flags &= ~VP8_GOLD_FLAG;
- cm->gld_fb_idx = cm->alt_fb_idx;
+ if(cm->alt_fb_idx != cm->gld_fb_idx)
+ {
+ yv12_fb[cm->alt_fb_idx].flags |= VP8_GOLD_FLAG;
+ yv12_fb[cm->gld_fb_idx].flags &= ~VP8_GOLD_FLAG;
+ cm->gld_fb_idx = cm->alt_fb_idx;
+ }
}
}
}
diff --git a/vp8/encoder/rdopt.c b/vp8/encoder/rdopt.c
index ef976f2a0..21f44d9ac 100644
--- a/vp8/encoder/rdopt.c
+++ b/vp8/encoder/rdopt.c
@@ -1204,11 +1204,6 @@ static void rd_check_segment(VP8_COMP *cpi, MACROBLOCK *x,
c = &x->block[n];
e = &x->e_mbd.block[n];
- if (cpi->sf.search_method == HEX)
- bestsme = vp8_hex_search(x, c, e, bsi->ref_mv,
- &mode_mv[NEW4X4], step_param, sadpb, &num00, v_fn_ptr, x->mvsadcost, x->mvcost, bsi->ref_mv);
-
- else
{
bestsme = cpi->diamond_search_sad(x, c, e, &bsi->mvp,
&mode_mv[NEW4X4], step_param,
@@ -2131,12 +2126,6 @@ void vp8_rd_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, int
step_param = sr;
// Initial step/diamond search
- if (cpi->sf.search_method == HEX)
- {
- bestsme = vp8_hex_search(x, b, d, &best_ref_mv, &d->bmi.mv, step_param, sadpb/*x->errorperbit*/, &num00, &cpi->fn_ptr[BLOCK_16X16], x->mvsadcost, x->mvcost, &best_ref_mv);
- mode_mv[NEWMV].as_int = d->bmi.mv.as_int;
- }
- else
{
bestsme = cpi->diamond_search_sad(x, b, d, &mvp, &d->bmi.mv, step_param, sadpb / 2/*x->errorperbit*/, &num00, &cpi->fn_ptr[BLOCK_16X16], x->mvcost, &best_ref_mv); //sadpb < 9
mode_mv[NEWMV].as_int = d->bmi.mv.as_int;