Revert "skip un-neccessary motion search in the first pass"

This patch appears to have introduced non-determinism and/or
mismatch from debug vs release.

This reverts commit 5daef90efc.

Change-Id: I80081e55cfeaaa821b510b58a4e6e6328003c7da
This commit is contained in:
Paul Wilkins 2014-06-13 18:52:19 +01:00
Родитель 3082565b8d
Коммит af8d4054d6
1 изменённых файлов: 52 добавлений и 70 удалений

Просмотреть файл

@ -596,26 +596,10 @@ void vp9_first_pass(VP9_COMP *cpi) {
if (cm->current_video_frame > 0) {
int tmp_err, motion_error;
int_mv mv, tmp_mv;
int raw_motion_error;
struct buf_2d unscaled_last_source_buf_2d;
xd->plane[0].pre[0].buf = first_ref_buf->y_buffer + recon_yoffset;
motion_error = get_prediction_error(bsize, &x->plane[0].src,
&xd->plane[0].pre[0]);
// compute the motion error of the zero motion vector using the last
// source frame as the reference
// skip the further motion search on reconstructed frame
// if this error is small
unscaled_last_source_buf_2d.buf = cpi->unscaled_last_source->y_buffer
+ recon_yoffset;
unscaled_last_source_buf_2d.stride =
cpi->unscaled_last_source->y_stride;
raw_motion_error = get_prediction_error(bsize, &x->plane[0].src,
&unscaled_last_source_buf_2d);
// TODO(pengchong): Replace the hard-coded threshold
if (raw_motion_error > 25) {
// Assume 0,0 motion with no mv overhead.
mv.as_int = tmp_mv.as_int = 0;
@ -628,8 +612,7 @@ void vp9_first_pass(VP9_COMP *cpi) {
motion_error = (int)(motion_error * error_weight);
}
// If the current best reference mv is not centered on 0,0
// then do a 0,0
// If the current best reference mv is not centered on 0,0 then do a 0,0
// based search as well.
if (best_ref_mv.as_int) {
tmp_err = INT_MAX;
@ -681,7 +664,6 @@ void vp9_first_pass(VP9_COMP *cpi) {
} else {
sr_coded_error += motion_error;
}
}
// Start by assuming that intra mode is best.
best_ref_mv.as_int = 0;