diff options
author | James Zern <jzern@google.com> | 2013-10-24 06:04:10 -0700 |
---|---|---|
committer | Gerrit Code Review <gerrit@gerrit.golo.chromium.org> | 2013-10-24 06:04:10 -0700 |
commit | eec622d178e2bdc1098fcb86e954800ce03138fa (patch) | |
tree | 6fec5a0c4b7cea01e37f5dfa34f559601a145e79 | |
parent | dea22b4bdade9a854cb3d395bc25551093aa42ef (diff) | |
parent | 3c038b6c407eb383e3c4fdd9229cc89257d46222 (diff) | |
download | libvpx-eec622d178e2bdc1098fcb86e954800ce03138fa.tar libvpx-eec622d178e2bdc1098fcb86e954800ce03138fa.tar.gz libvpx-eec622d178e2bdc1098fcb86e954800ce03138fa.tar.bz2 libvpx-eec622d178e2bdc1098fcb86e954800ce03138fa.zip |
Merge "vp9/extend_for_intra: avoid crossing tile boundary"
-rw-r--r-- | vp9/common/vp9_blockd.h | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/vp9/common/vp9_blockd.h b/vp9/common/vp9_blockd.h index 1a03269fb..4af521e38 100644 --- a/vp9/common/vp9_blockd.h +++ b/vp9/common/vp9_blockd.h @@ -439,16 +439,19 @@ static void extend_for_intra(MACROBLOCKD* const xd, BLOCK_SIZE plane_bsize, } if (xd->mb_to_bottom_edge < 0) { - const int bh = 4 << b_height_log2(plane_bsize); - const int umv_border_start = bh + (xd->mb_to_bottom_edge >> - (3 + pd->subsampling_y)); - int i; - const uint8_t c = buf[(umv_border_start - 1) * stride + x]; - uint8_t *d = &buf[umv_border_start * stride + x]; - - if (y + bh > umv_border_start) - for (i = 0; i < bh; ++i, d += stride) - *d = c; + if (xd->left_available || x >= 0) { + const int bh = 4 << b_height_log2(plane_bsize); + const int umv_border_start = + bh + (xd->mb_to_bottom_edge >> (3 + pd->subsampling_y)); + + if (y + bh > umv_border_start) { + const uint8_t c = buf[(umv_border_start - 1) * stride + x]; + uint8_t *d = &buf[umv_border_start * stride + x]; + int i; + for (i = 0; i < bh; ++i, d += stride) + *d = c; + } + } } } static void set_contexts_on_border(MACROBLOCKD *xd, |