diff options
author | Dmitry Kovalev <dkovalev@google.com> | 2013-11-22 10:51:38 -0800 |
---|---|---|
committer | Gerrit Code Review <gerrit@gerrit.golo.chromium.org> | 2013-11-22 10:51:38 -0800 |
commit | e0ec61187ec07e981570efb1e80fc91ba27905a1 (patch) | |
tree | 8b331d4aa52d53e963971ca86b34e0478120e5e8 /vp9 | |
parent | 384089004dca21bfd00c56419ead03fa1458d1fd (diff) | |
parent | 7c8cac3c21f9ed0f0e6c5fede1c58979fabaae4a (diff) | |
download | libvpx-e0ec61187ec07e981570efb1e80fc91ba27905a1.tar libvpx-e0ec61187ec07e981570efb1e80fc91ba27905a1.tar.gz libvpx-e0ec61187ec07e981570efb1e80fc91ba27905a1.tar.bz2 libvpx-e0ec61187ec07e981570efb1e80fc91ba27905a1.zip |
Merge "Removing txfrm_block_to_raster_xy() call from extend_for_intra()."
Diffstat (limited to 'vp9')
-rw-r--r-- | vp9/common/vp9_blockd.h | 13 | ||||
-rw-r--r-- | vp9/decoder/vp9_decodeframe.c | 2 | ||||
-rw-r--r-- | vp9/encoder/vp9_encodemb.c | 2 |
3 files changed, 7 insertions, 10 deletions
diff --git a/vp9/common/vp9_blockd.h b/vp9/common/vp9_blockd.h index 7b147b424..df963d1cc 100644 --- a/vp9/common/vp9_blockd.h +++ b/vp9/common/vp9_blockd.h @@ -384,21 +384,18 @@ static void txfrm_block_to_raster_xy(BLOCK_SIZE plane_bsize, } static void extend_for_intra(MACROBLOCKD *xd, BLOCK_SIZE plane_bsize, - int plane, int block, TX_SIZE tx_size) { + int plane, int aoff, int loff) { struct macroblockd_plane *const pd = &xd->plane[plane]; uint8_t *const buf = pd->dst.buf; const int stride = pd->dst.stride; - - int x, y; - txfrm_block_to_raster_xy(plane_bsize, tx_size, block, &x, &y); - x = x * 4 - 1; - y = y * 4 - 1; + const int x = aoff * 4 - 1; + const int y = loff * 4 - 1; // Copy a pixel into the umv if we are in a situation where the block size // extends into the UMV. // TODO(JBB): Should be able to do the full extend in place so we don't have // to do this multiple times. if (xd->mb_to_right_edge < 0) { - const int bw = 4 << b_width_log2(plane_bsize); + const int bw = 4 * num_4x4_blocks_wide_lookup[plane_bsize]; const int umv_border_start = bw + (xd->mb_to_right_edge >> (3 + pd->subsampling_x)); @@ -409,7 +406,7 @@ static void extend_for_intra(MACROBLOCKD *xd, BLOCK_SIZE plane_bsize, if (xd->mb_to_bottom_edge < 0) { if (xd->left_available || x >= 0) { - const int bh = 4 << b_height_log2(plane_bsize); + const int bh = 4 * num_4x4_blocks_high_lookup[plane_bsize]; const int umv_border_start = bh + (xd->mb_to_bottom_edge >> (3 + pd->subsampling_y)); diff --git a/vp9/decoder/vp9_decodeframe.c b/vp9/decoder/vp9_decodeframe.c index c65d209bf..916cb424e 100644 --- a/vp9/decoder/vp9_decodeframe.c +++ b/vp9/decoder/vp9_decodeframe.c @@ -318,7 +318,7 @@ static void predict_and_reconstruct_intra_block(int plane, int block, dst = &pd->dst.buf[4 * y * pd->dst.stride + 4 * x]; if (xd->mb_to_right_edge < 0 || xd->mb_to_bottom_edge < 0) - extend_for_intra(xd, plane_bsize, plane, block, tx_size); + extend_for_intra(xd, plane_bsize, plane, x, y); vp9_predict_intra_block(xd, block >> (tx_size << 1), b_width_log2(plane_bsize), tx_size, mode, diff --git a/vp9/encoder/vp9_encodemb.c b/vp9/encoder/vp9_encodemb.c index b80107ea0..22ab26daf 100644 --- a/vp9/encoder/vp9_encodemb.c +++ b/vp9/encoder/vp9_encodemb.c @@ -562,7 +562,7 @@ void vp9_encode_block_intra(int plane, int block, BLOCK_SIZE plane_bsize, src_diff = &p->src_diff[4 * (j * diff_stride + i)]; if (xd->mb_to_right_edge < 0 || xd->mb_to_bottom_edge < 0) - extend_for_intra(xd, plane_bsize, plane, block, tx_size); + extend_for_intra(xd, plane_bsize, plane, i, j); // if (x->optimize) // vp9_optimize_b(plane, block, plane_bsize, tx_size, x, args->ctx); |