summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Grange <agrange@google.com>2015-03-04 12:49:58 -0800
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>2015-03-04 12:49:58 -0800
commit4b546583c4123c82bbcc84fc78efb8dbd2495b9c (patch)
tree2be5f0d2efa42e8da9342e97898950b7ae86aeaf
parent2f06f5087ec97282133c4b1f954dba66d2c9bb05 (diff)
parentfed9e1fee9a7ccf807774b853347d1406afa7e3e (diff)
downloadlibvpx-4b546583c4123c82bbcc84fc78efb8dbd2495b9c.tar
libvpx-4b546583c4123c82bbcc84fc78efb8dbd2495b9c.tar.gz
libvpx-4b546583c4123c82bbcc84fc78efb8dbd2495b9c.tar.bz2
libvpx-4b546583c4123c82bbcc84fc78efb8dbd2495b9c.zip
Merge "Small rationalization of code in vp9_first_pass"
-rw-r--r--vp9/encoder/vp9_firstpass.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/vp9/encoder/vp9_firstpass.c b/vp9/encoder/vp9_firstpass.c
index 35cf88117..6c8bbdb6d 100644
--- a/vp9/encoder/vp9_firstpass.c
+++ b/vp9/encoder/vp9_firstpass.c
@@ -493,10 +493,6 @@ void vp9_first_pass(VP9_COMP *cpi, const struct lookahead_entry *source) {
assert(new_yv12 != NULL);
assert((lc != NULL) || frame_is_intra_only(cm) || (lst_yv12 != NULL));
- recon_y_stride = new_yv12->y_stride;
- recon_uv_stride = new_yv12->uv_stride;
- uv_mb_height = 16 >> (new_yv12->y_height > new_yv12->uv_height);
-
#if CONFIG_FP_MB_STATS
if (cpi->use_fp_mb_stats) {
vp9_zero_array(cpi->twopass.frame_mb_stats_buf, cm->initial_mbs);
@@ -548,10 +544,6 @@ void vp9_first_pass(VP9_COMP *cpi, const struct lookahead_entry *source) {
gld_yv12 = NULL;
}
- recon_y_stride = new_yv12->y_stride;
- recon_uv_stride = new_yv12->uv_stride;
- uv_mb_height = 16 >> (new_yv12->y_height > new_yv12->uv_height);
-
set_ref_ptrs(cm, xd,
(cpi->ref_frame_flags & VP9_LAST_FLAG) ? LAST_FRAME: NONE,
(cpi->ref_frame_flags & VP9_GOLD_FLAG) ? GOLDEN_FRAME : NONE);
@@ -588,6 +580,10 @@ void vp9_first_pass(VP9_COMP *cpi, const struct lookahead_entry *source) {
// Tiling is ignored in the first pass.
vp9_tile_init(&tile, cm, 0, 0);
+ recon_y_stride = new_yv12->y_stride;
+ recon_uv_stride = new_yv12->uv_stride;
+ uv_mb_height = 16 >> (new_yv12->y_height > new_yv12->uv_height);
+
for (mb_row = 0; mb_row < cm->mb_rows; ++mb_row) {
MV best_ref_mv = {0, 0};