From ffd01929f15d1044ac164b56bdf9dd83c5823625 Mon Sep 17 00:00:00 2001 From: hui su Date: Mon, 12 Sep 2016 15:08:24 -0700 Subject: [PATCH] Refactor VP8IteratorNext(). Change-Id: I7055d3ee3bd7ed5e78e94ae82cb858fa7db3ddc0 --- src/enc/iterator.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/enc/iterator.c b/src/enc/iterator.c index 99d960a5..a611d89f 100644 --- a/src/enc/iterator.c +++ b/src/enc/iterator.c @@ -309,14 +309,14 @@ void VP8IteratorSaveBoundary(VP8EncIterator* const it) { } int VP8IteratorNext(VP8EncIterator* const it) { + if (++it->x_ == it->enc_->mb_w_) { + VP8IteratorSetRow(it, ++it->y_); + } else { it->preds_ += 4; it->mb_ += 1; it->nz_ += 1; it->y_top_ += 16; it->uv_top_ += 16; - it->x_ += 1; - if (it->x_ == it->enc_->mb_w_) { - VP8IteratorSetRow(it, ++it->y_); } return (0 < --it->count_down_); }