diff options
author | Angie Chiang <angiebird@google.com> | 2018-12-31 20:56:31 -0800 |
---|---|---|
committer | Angie Chiang <angiebird@google.com> | 2019-01-03 17:53:14 -0800 |
commit | 3271a7ed6c976fd6d25c144c19170bac9b57367b (patch) | |
tree | 8e0c6aae5893358ff01e311f97719e4c31e5bd3f /vp9/encoder/vp9_encoder.c | |
parent | 23f8b831776824e2b95db70979addd1e4623b746 (diff) | |
download | libvpx-3271a7ed6c976fd6d25c144c19170bac9b57367b.tar libvpx-3271a7ed6c976fd6d25c144c19170bac9b57367b.tar.gz libvpx-3271a7ed6c976fd6d25c144c19170bac9b57367b.tar.bz2 libvpx-3271a7ed6c976fd6d25c144c19170bac9b57367b.zip |
Increase memory size in non-greedy-mv
The smallest block size of motion field is 4x4, but the mi_unit
size is 8x8, therefore the number of units of motion field is
"mi_rows * mi_cols * 4".
Change-Id: I95292904d757705d39b78af5d0cf2d25f376c642
Diffstat (limited to 'vp9/encoder/vp9_encoder.c')
-rw-r--r-- | vp9/encoder/vp9_encoder.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/vp9/encoder/vp9_encoder.c b/vp9/encoder/vp9_encoder.c index 339aa4eed..fb0cc23e5 100644 --- a/vp9/encoder/vp9_encoder.c +++ b/vp9/encoder/vp9_encoder.c @@ -6436,15 +6436,17 @@ static void init_tpl_buffer(VP9_COMP *cpi) { // TODO(angiebird): This probably needs further modifications to support // frame scaling later on. if (cpi->feature_score_loc_alloc == 0) { + // The smallest block size of motion field is 4x4, but the mi_unit is 8x8, + // therefore the number of units is "mi_rows * mi_cols * 4" here. CHECK_MEM_ERROR( cm, cpi->feature_score_loc_arr, - vpx_calloc(mi_rows * mi_cols, sizeof(*cpi->feature_score_loc_arr))); - CHECK_MEM_ERROR( - cm, cpi->feature_score_loc_sort, - vpx_calloc(mi_rows * mi_cols, sizeof(*cpi->feature_score_loc_sort))); - CHECK_MEM_ERROR( - cm, cpi->feature_score_loc_heap, - vpx_calloc(mi_rows * mi_cols, sizeof(*cpi->feature_score_loc_heap))); + vpx_calloc(mi_rows * mi_cols * 4, sizeof(*cpi->feature_score_loc_arr))); + CHECK_MEM_ERROR(cm, cpi->feature_score_loc_sort, + vpx_calloc(mi_rows * mi_cols * 4, + sizeof(*cpi->feature_score_loc_sort))); + CHECK_MEM_ERROR(cm, cpi->feature_score_loc_heap, + vpx_calloc(mi_rows * mi_cols * 4, + sizeof(*cpi->feature_score_loc_heap))); cpi->feature_score_loc_alloc = 1; } |