diff options
author | Dmitry Kovalev <dkovalev@google.com> | 2014-04-10 18:18:41 -0700 |
---|---|---|
committer | Gerrit Code Review <gerrit@gerrit.golo.chromium.org> | 2014-04-10 18:18:41 -0700 |
commit | c8406c65594529bbd97b0a2fa5823e6c9c8a8a19 (patch) | |
tree | 53472b91efd42766334c0b957e6012d363f54fb7 /vp9 | |
parent | 5053845a70de37291dfae8258a33041bcd15e4d9 (diff) | |
parent | c8167f5ba7168d8a384eade87841be90ba3b43d2 (diff) | |
download | libvpx-c8406c65594529bbd97b0a2fa5823e6c9c8a8a19.tar libvpx-c8406c65594529bbd97b0a2fa5823e6c9c8a8a19.tar.gz libvpx-c8406c65594529bbd97b0a2fa5823e6c9c8a8a19.tar.bz2 libvpx-c8406c65594529bbd97b0a2fa5823e6c9c8a8a19.zip |
Merge "Fixing invalid ref buffer in vp9_diamond_search_sad_c()."
Diffstat (limited to 'vp9')
-rw-r--r-- | vp9/encoder/vp9_mcomp.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/vp9/encoder/vp9_mcomp.c b/vp9/encoder/vp9_mcomp.c index f7a02a4a7..37201a933 100644 --- a/vp9/encoder/vp9_mcomp.c +++ b/vp9/encoder/vp9_mcomp.c @@ -993,20 +993,21 @@ int vp9_diamond_search_sad_c(const MACROBLOCK *x, const MV fcenter_mv = {center_mv->row >> 3, center_mv->col >> 3}; const int *mvjsadcost = x->nmvjointsadcost; int *mvsadcost[2] = {x->nmvsadcost[0], x->nmvsadcost[1]}; - const uint8_t *best_address; + const uint8_t *best_address, *in_what_ref; int best_sad = INT_MAX; int best_site = 0; int last_site = 0; int i, j, step; clamp_mv(ref_mv, x->mv_col_min, x->mv_col_max, x->mv_row_min, x->mv_row_max); - best_address = get_buf_from_mv(in_what, ref_mv); + in_what_ref = get_buf_from_mv(in_what, ref_mv); + best_address = in_what_ref; *num00 = 0; *best_mv = *ref_mv; // Check the starting position best_sad = fn_ptr->sdf(what->buf, what->stride, - in_what->buf, in_what->stride, 0x7fffffff) + + best_address, in_what->stride, 0x7fffffff) + mvsad_err_cost(best_mv, &fcenter_mv, mvjsadcost, mvsadcost, sad_per_bit); i = 1; @@ -1060,7 +1061,7 @@ int vp9_diamond_search_sad_c(const MACROBLOCK *x, break; }; #endif - } else if (best_address == in_what->buf) { + } else if (best_address == in_what_ref) { (*num00)++; } } |