summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_firstpass.c
diff options
context:
space:
mode:
authorScott LaVarnway <slavarnway@google.com>2016-03-30 04:47:39 -0700
committerScott LaVarnway <slavarnway@google.com>2016-03-30 04:47:39 -0700
commitba962a5f370d85a5fb8abf8aa67c7d5fb416f01c (patch)
tree3d2c797531e32765d8ae4100165b290589a82b85 /vp9/encoder/vp9_firstpass.c
parentaea8d97a74ae8102a864baa1439dd4f4f25555e9 (diff)
downloadlibvpx-ba962a5f370d85a5fb8abf8aa67c7d5fb416f01c.tar
libvpx-ba962a5f370d85a5fb8abf8aa67c7d5fb416f01c.tar.gz
libvpx-ba962a5f370d85a5fb8abf8aa67c7d5fb416f01c.tar.bz2
libvpx-ba962a5f370d85a5fb8abf8aa67c7d5fb416f01c.zip
VP9: Eliminate up_available and left_available
Use above_mi and left_mi instead. Change-Id: I0b50e232c31d11da30aa2fb6f91a695aaf725e0c
Diffstat (limited to 'vp9/encoder/vp9_firstpass.c')
-rw-r--r--vp9/encoder/vp9_firstpass.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/vp9/encoder/vp9_firstpass.c b/vp9/encoder/vp9_firstpass.c
index 10fd6c02c..3ad175eb2 100644
--- a/vp9/encoder/vp9_firstpass.c
+++ b/vp9/encoder/vp9_firstpass.c
@@ -563,6 +563,7 @@ void vp9_first_pass(VP9_COMP *cpi, const struct lookahead_entry *source) {
double intra_factor;
double brightness_factor;
BufferPool *const pool = cm->buffer_pool;
+ MODE_INFO mi_above, mi_left;
// First pass code requires valid last and new frame buffers.
assert(new_yv12 != NULL);
@@ -695,6 +696,12 @@ void vp9_first_pass(VP9_COMP *cpi, const struct lookahead_entry *source) {
mb_row << 1, num_8x8_blocks_high_lookup[bsize],
mb_col << 1, num_8x8_blocks_wide_lookup[bsize],
cm->mi_rows, cm->mi_cols);
+ // Are edges available for intra prediction?
+ // Since the firstpass does not populate the mi_grid_visible,
+ // above_mi/left_mi must be overwritten with a nonzero value when edges
+ // are available. Required by vp9_predict_intra_block().
+ xd->above_mi = (mb_row != 0) ? &mi_above : NULL;
+ xd->left_mi = (mb_col > tile.mi_col_start) ? &mi_left : NULL;
// Do intra 16x16 prediction.
x->skip_encode = 0;