diff options
author | Angie Chiang <angiebird@google.com> | 2018-12-22 16:42:28 -0800 |
---|---|---|
committer | Angie Chiang <angiebird@google.com> | 2019-01-03 17:53:14 -0800 |
commit | 23f8b831776824e2b95db70979addd1e4623b746 (patch) | |
tree | d90b9c53107245ffbb56f2d6cfb30bc1dbedc2da /vp9/encoder/vp9_encoder.h | |
parent | c4c5c1d7e49d8a63e1f5f102587ec1951b368f4f (diff) | |
download | libvpx-23f8b831776824e2b95db70979addd1e4623b746.tar libvpx-23f8b831776824e2b95db70979addd1e4623b746.tar.gz libvpx-23f8b831776824e2b95db70979addd1e4623b746.tar.bz2 libvpx-23f8b831776824e2b95db70979addd1e4623b746.zip |
Build pyramid motion field
Change-Id: I43fd61f7946a8a96d444dab5e94a9b01483ffab7
Diffstat (limited to 'vp9/encoder/vp9_encoder.h')
-rw-r--r-- | vp9/encoder/vp9_encoder.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/vp9/encoder/vp9_encoder.h b/vp9/encoder/vp9_encoder.h index e4175f6ed..18adfebfe 100644 --- a/vp9/encoder/vp9_encoder.h +++ b/vp9/encoder/vp9_encoder.h @@ -342,6 +342,24 @@ static INLINE int get_square_block_idx(BLOCK_SIZE bsize) { return -1; } +static INLINE BLOCK_SIZE square_block_idx_to_bsize(int square_block_idx) { + if (square_block_idx == 0) { + return BLOCK_4X4; + } + if (square_block_idx == 1) { + return BLOCK_8X8; + } + if (square_block_idx == 2) { + return BLOCK_16X16; + } + if (square_block_idx == 3) { + return BLOCK_32X32; + } + printf("ERROR: invalid square_block_idx\n"); + assert(0); + return BLOCK_INVALID; +} + static INLINE int_mv *get_pyramid_mv(const TplDepFrame *tpl_frame, int rf_idx, BLOCK_SIZE bsize, int mi_row, int mi_col) { return &tpl_frame->pyramid_mv_arr[rf_idx][get_square_block_idx(bsize)] |