summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_encoder.h
diff options
context:
space:
mode:
Diffstat (limited to 'vp9/encoder/vp9_encoder.h')
-rw-r--r--vp9/encoder/vp9_encoder.h18
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)]