diff --git a/vp9/common/vp9_blockd.c b/vp9/common/vp9_blockd.c index 8cc6571144e3061fad05a4aab4727961678a4ea0..d918bedc6701376e2591453dbfe20f96145bc18b 100644 --- a/vp9/common/vp9_blockd.c +++ b/vp9/common/vp9_blockd.c @@ -98,16 +98,6 @@ void vp9_foreach_transformed_block(const MACROBLOCKD* const xd, vp9_foreach_transformed_block_in_plane(xd, bsize, plane, visit, arg); } -void vp9_foreach_transformed_block_uv(const MACROBLOCKD* const xd, - BLOCK_SIZE bsize, - foreach_transformed_block_visitor visit, - void *arg) { - int plane; - - for (plane = 1; plane < MAX_MB_PLANE; plane++) - vp9_foreach_transformed_block_in_plane(xd, bsize, plane, visit, arg); -} - void vp9_set_contexts(const MACROBLOCKD *xd, struct macroblockd_plane *pd, BLOCK_SIZE plane_bsize, TX_SIZE tx_size, int has_eob, int aoff, int loff) { diff --git a/vp9/common/vp9_blockd.h b/vp9/common/vp9_blockd.h index 348aa640f02d3bd4cb2e06338afac6f00bf52c16..c22c621984dbde3f09acd541f87c7c8f11c14388 100644 --- a/vp9/common/vp9_blockd.h +++ b/vp9/common/vp9_blockd.h @@ -313,11 +313,6 @@ void vp9_foreach_transformed_block( const MACROBLOCKD* const xd, BLOCK_SIZE bsize, foreach_transformed_block_visitor visit, void *arg); - -void vp9_foreach_transformed_block_uv( - const MACROBLOCKD* const xd, BLOCK_SIZE bsize, - foreach_transformed_block_visitor visit, void *arg); - static INLINE void txfrm_block_to_raster_xy(BLOCK_SIZE plane_bsize, TX_SIZE tx_size, int block, int *x, int *y) { diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c index e888b9ad5535b151e60882abf3369d8afeba492d..1b106f4c7e1d28dbd1fd6dce7fdad50f10b43800 100644 --- a/vp9/encoder/vp9_encodeframe.c +++ b/vp9/encoder/vp9_encodeframe.c @@ -2847,9 +2847,10 @@ static void encode_superblock(VP9_COMP *cpi, TOKENEXTRA **t, int output_enabled, } if (!is_inter_block(mbmi)) { + int plane; mbmi->skip_coeff = 1; - vp9_encode_intra_block_y(x, MAX(bsize, BLOCK_8X8)); - vp9_encode_intra_block_uv(x, MAX(bsize, BLOCK_8X8)); + for (plane = 0; plane < MAX_MB_PLANE; ++plane) + vp9_encode_intra_block_plane(x, MAX(bsize, BLOCK_8X8), plane); if (output_enabled) sum_intra_stats(&cm->counts, mi); } else { diff --git a/vp9/encoder/vp9_encodemb.c b/vp9/encoder/vp9_encodemb.c index 2c65351640977831b3dbf60f925ef7bdc6f6cb1b..ad28f318ae72b76d1ed7411bc4b9d610718e1063 100644 --- a/vp9/encoder/vp9_encodemb.c +++ b/vp9/encoder/vp9_encodemb.c @@ -659,18 +659,13 @@ void vp9_encode_block_intra(MACROBLOCK *x, int plane, int block, } -void vp9_encode_intra_block_y(MACROBLOCK *x, BLOCK_SIZE bsize) { +void vp9_encode_intra_block_plane(MACROBLOCK *x, BLOCK_SIZE bsize, int plane) { const MACROBLOCKD *const xd = &x->e_mbd; struct encode_b_args arg = {x, NULL, &xd->mi_8x8[0]->mbmi.skip_coeff}; - vp9_foreach_transformed_block_in_plane(xd, bsize, 0, encode_block_intra, + vp9_foreach_transformed_block_in_plane(xd, bsize, plane, encode_block_intra, &arg); } -void vp9_encode_intra_block_uv(MACROBLOCK *x, BLOCK_SIZE bsize) { - const MACROBLOCKD *const xd = &x->e_mbd; - struct encode_b_args arg = {x, NULL, &xd->mi_8x8[0]->mbmi.skip_coeff}; - vp9_foreach_transformed_block_uv(xd, bsize, encode_block_intra, &arg); -} int vp9_encode_intra(MACROBLOCK *x, int use_16x16_pred) { MB_MODE_INFO * mbmi = &x->e_mbd.mi_8x8[0]->mbmi; @@ -680,6 +675,6 @@ int vp9_encode_intra(MACROBLOCK *x, int use_16x16_pred) { mbmi->tx_size = use_16x16_pred ? (mbmi->sb_type >= BLOCK_16X16 ? TX_16X16 : TX_8X8) : TX_4X4; - vp9_encode_intra_block_y(x, mbmi->sb_type); + vp9_encode_intra_block_plane(x, mbmi->sb_type, 0); return vp9_get_mb_ss(x->plane[0].src_diff); } diff --git a/vp9/encoder/vp9_encodemb.h b/vp9/encoder/vp9_encodemb.h index cd7c46b58ce5a0e6ba738588bff03071118f3405..cf7097ddefa47cbbde337b83433e734b1c3761aa 100644 --- a/vp9/encoder/vp9_encodemb.h +++ b/vp9/encoder/vp9_encodemb.h @@ -34,8 +34,7 @@ void vp9_encode_block_intra(MACROBLOCK *x, int plane, int block, BLOCK_SIZE plane_bsize, TX_SIZE tx_size, unsigned char *skip_coeff); -void vp9_encode_intra_block_y(MACROBLOCK *x, BLOCK_SIZE bsize); -void vp9_encode_intra_block_uv(MACROBLOCK *x, BLOCK_SIZE bsize); +void vp9_encode_intra_block_plane(MACROBLOCK *x, BLOCK_SIZE bsize, int plane); int vp9_encode_intra(MACROBLOCK *x, int use_16x16_pred);