diff options
author | Dmitry Kovalev <dkovalev@google.com> | 2014-04-11 13:46:54 -0700 |
---|---|---|
committer | Gerrit Code Review <gerrit@gerrit.golo.chromium.org> | 2014-04-11 13:46:54 -0700 |
commit | cfae0270561aea4e2f02b71b09839bb8cb93b231 (patch) | |
tree | ba8f700fa4f53699128c7dffdec92ddf5fd07096 /vp9 | |
parent | 36d12b6e93541811930fb065ecff5564ab5f2e9f (diff) | |
parent | 79dd5e7a5a43b96d0f20a6dc4734cfb2acd95890 (diff) | |
download | libvpx-cfae0270561aea4e2f02b71b09839bb8cb93b231.tar libvpx-cfae0270561aea4e2f02b71b09839bb8cb93b231.tar.gz libvpx-cfae0270561aea4e2f02b71b09839bb8cb93b231.tar.bz2 libvpx-cfae0270561aea4e2f02b71b09839bb8cb93b231.zip |
Merge "Renaming zz_motion_search() to get_block_variance()."
Diffstat (limited to 'vp9')
-rw-r--r-- | vp9/encoder/vp9_firstpass.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/vp9/encoder/vp9_firstpass.c b/vp9/encoder/vp9_firstpass.c index 3324b9c60..06f7426b2 100644 --- a/vp9/encoder/vp9_firstpass.c +++ b/vp9/encoder/vp9_firstpass.c @@ -376,15 +376,12 @@ static vp9_variance_fn_t get_block_variance_fn(BLOCK_SIZE bsize) { } } -static unsigned int zz_motion_search(const MACROBLOCK *x) { - const MACROBLOCKD *const xd = &x->e_mbd; - const uint8_t *const src = x->plane[0].src.buf; - const int src_stride = x->plane[0].src.stride; - const uint8_t *const ref = xd->plane[0].pre[0].buf; - const int ref_stride = xd->plane[0].pre[0].stride; +static unsigned int get_prediction_error(BLOCK_SIZE bsize, + const struct buf_2d *src, + const struct buf_2d *ref) { unsigned int sse; - vp9_variance_fn_t fn = get_block_variance_fn(xd->mi[0]->mbmi.sb_type); - fn(src, src_stride, ref, ref_stride, &sse); + const vp9_variance_fn_t fn = get_block_variance_fn(bsize); + fn(src->buf, src->stride, ref->buf, ref->stride, &sse); return sse; } @@ -632,7 +629,8 @@ void vp9_first_pass(VP9_COMP *cpi) { int_mv mv, tmp_mv; xd->plane[0].pre[0].buf = first_ref_buf->y_buffer + recon_yoffset; - motion_error = zz_motion_search(x); + motion_error = get_prediction_error(bsize, &x->plane[0].src, + &xd->plane[0].pre[0]); // Assume 0,0 motion with no mv overhead. mv.as_int = tmp_mv.as_int = 0; @@ -668,7 +666,8 @@ void vp9_first_pass(VP9_COMP *cpi) { int gf_motion_error; xd->plane[0].pre[0].buf = gld_yv12->y_buffer + recon_yoffset; - gf_motion_error = zz_motion_search(x); + gf_motion_error = get_prediction_error(bsize, &x->plane[0].src, + &xd->plane[0].pre[0]); first_pass_motion_search(cpi, x, &zero_mv, &tmp_mv.as_mv, &gf_motion_error); |