aboutsummaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_non_greedy_mv.h
diff options
context:
space:
mode:
authorAngie Chiang <angiebird@google.com>2019-08-21 15:49:13 -0700
committerAngie Chiang <angiebird@google.com>2019-08-27 15:57:21 -0700
commit2981cfac00342163b976f7dbcf72573448f3793b (patch)
treefb03fda226c8d77a92200dcaeec19d8a591f2f1f /vp9/encoder/vp9_non_greedy_mv.h
parentd0e5b82084fa29e49289edd0c3d860ea67d1f585 (diff)
downloadlibvpx-2981cfac00342163b976f7dbcf72573448f3793b.tar.gz
Add motion_filed_info in VP9_COMP
Call vp9_alloc_motion_field_info and vp9_free_motion_field_info properly Change-Id: I79fcb1fd37ee5e95bf7febb728480583ebd5a065
Diffstat (limited to 'vp9/encoder/vp9_non_greedy_mv.h')
-rw-r--r--vp9/encoder/vp9_non_greedy_mv.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/vp9/encoder/vp9_non_greedy_mv.h b/vp9/encoder/vp9_non_greedy_mv.h
index 49723ce13..a3f111894 100644
--- a/vp9/encoder/vp9_non_greedy_mv.h
+++ b/vp9/encoder/vp9_non_greedy_mv.h
@@ -24,6 +24,8 @@ extern "C" {
#define MF_LOCAL_STRUCTURE_SIZE 4
#define SQUARE_BLOCK_SIZES 4
+typedef enum Status { STATUS_OK = 0, STATUS_FAILED = 1 } Status;
+
typedef struct MotionField {
int ready;
BLOCK_SIZE bsize;
@@ -36,6 +38,7 @@ typedef struct MotionField {
typedef struct MotionFieldInfo {
int frame_num;
+ int allocated;
MotionField (*motion_field_array)[3][SQUARE_BLOCK_SIZES];
} MotionFieldInfo;
@@ -77,11 +80,11 @@ static INLINE BLOCK_SIZE square_block_idx_to_bsize(int square_block_idx) {
return BLOCK_INVALID;
}
-void vp9_alloc_motion_field_info(MotionFieldInfo *motion_field_info,
- int frame_num, int mi_rows, int mi_cols);
+Status vp9_alloc_motion_field_info(MotionFieldInfo *motion_field_info,
+ int frame_num, int mi_rows, int mi_cols);
-void vp9_alloc_motion_field(MotionField *motion_field, BLOCK_SIZE bsize,
- int block_rows, int block_cols);
+Status vp9_alloc_motion_field(MotionField *motion_field, BLOCK_SIZE bsize,
+ int block_rows, int block_cols);
void vp9_free_motion_field(MotionField *motion_field);