diff options
Diffstat (limited to 'vp9/common')
-rw-r--r-- | vp9/common/vp9_blockd.h | 16 | ||||
-rw-r--r-- | vp9/common/vp9_rtcd_defs.sh | 6 |
2 files changed, 14 insertions, 8 deletions
diff --git a/vp9/common/vp9_blockd.h b/vp9/common/vp9_blockd.h index 715df98bd..76f80d4d7 100644 --- a/vp9/common/vp9_blockd.h +++ b/vp9/common/vp9_blockd.h @@ -340,7 +340,7 @@ struct buf_2d { int stride; }; -struct mb_plane { +struct macroblockd_plane { DECLARE_ALIGNED(16, int16_t, qcoeff[64 * 64]); DECLARE_ALIGNED(16, int16_t, dqcoeff[64 * 64]); DECLARE_ALIGNED(16, uint16_t, eobs[256]); @@ -360,7 +360,7 @@ struct mb_plane { BLOCK_OFFSET((x)->plane[2].field, ((i) - 20), 16)) typedef struct macroblockd { - struct mb_plane plane[MAX_MB_PLANE]; + struct macroblockd_plane plane[MAX_MB_PLANE]; /* 16 Y blocks, 4 U, 4 V, each with 16 entries. */ BLOCKD block[24]; @@ -924,6 +924,18 @@ static INLINE void foreach_predicted_block_uv( foreach_predicted_block_in_plane(xd, bsize, plane, visit, arg); } } +static int raster_block_offset(MACROBLOCKD *xd, BLOCK_SIZE_TYPE bsize, + int plane, int block) { + const int bw = b_width_log2(bsize) - xd->plane[plane].subsampling_x; + const int stride = 4 << bw; + const int y = 4 * (block >> bw), x = 4 * (block & ((1 << bw) - 1)); + return y * stride + x; +} +static int16_t* raster_block_offset_int16(MACROBLOCKD *xd, + BLOCK_SIZE_TYPE bsize, + int plane, int block, int16_t *base) { + return base + raster_block_offset(xd, bsize, plane, block); +} #if CONFIG_CODE_ZEROGROUP static int get_zpc_used(TX_SIZE tx_size) { diff --git a/vp9/common/vp9_rtcd_defs.sh b/vp9/common/vp9_rtcd_defs.sh index 1f838a574..020841c42 100644 --- a/vp9/common/vp9_rtcd_defs.sh +++ b/vp9/common/vp9_rtcd_defs.sh @@ -617,12 +617,6 @@ prototype int vp9_block_error "int16_t *coeff, int16_t *dqcoeff, int block_size" specialize vp9_block_error mmx sse2 vp9_block_error_sse2=vp9_block_error_xmm -prototype void vp9_subtract_b "struct block *be, struct blockd *bd, int pitch" -# TODO(jingning): The prototype function in c has been changed to remove -# the use of predictor buffer in MACROBLOCKD. Need to modify the mmx and sse2 -# versions accordingly. -specialize vp9_subtract_b - # # Structured Similarity (SSIM) # |