diff options
author | James Zern <jzern@google.com> | 2013-10-23 21:33:11 +0200 |
---|---|---|
committer | James Zern <jzern@google.com> | 2013-10-24 14:21:24 +0200 |
commit | 3c038b6c407eb383e3c4fdd9229cc89257d46222 (patch) | |
tree | 804306774b1ee38ff46dec68f5eb9f9bf3649912 /vp9/common/vp9_blockd.h | |
parent | 34d6077c9303ac4530d5d28edb39a354592d72c7 (diff) | |
download | libvpx-3c038b6c407eb383e3c4fdd9229cc89257d46222.tar libvpx-3c038b6c407eb383e3c4fdd9229cc89257d46222.tar.gz libvpx-3c038b6c407eb383e3c4fdd9229cc89257d46222.tar.bz2 libvpx-3c038b6c407eb383e3c4fdd9229cc89257d46222.zip |
vp9/extend_for_intra: avoid crossing tile boundary
Change-Id: I0d8a71778aa3c73b8b1673e14053074bb866548b
Diffstat (limited to 'vp9/common/vp9_blockd.h')
-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 81554470c..ab267a581 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, |