History

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".

Angie Chiang committed 7 years ago

Commit 3271a7e1 parent 23f8b831 file · +9 −7Browse files

Unified · Split

vp9/encoder/vp9_encoder.c+9−7
@@ -6436,15 +6436,17 @@ static void init_tpl_buffer(VP9_COMP *cpi) { · 6435 unmodified lines
64366436 // TODO(angiebird): This probably needs further modifications to support
64376437 // frame scaling later on.
64386438 if (cpi->feature_score_loc_alloc == 0) {
6439+ // The smallest block size of motion field is 4x4, but the mi_unit is 8x8,
6440+ // therefore the number of units is "mi_rows * mi_cols * 4" here.
64396441 CHECK_MEM_ERROR(
64406442 cm, cpi->feature_score_loc_arr,
6441− vpx_calloc(mi_rows * mi_cols, sizeof(*cpi->feature_score_loc_arr)));
6442− CHECK_MEM_ERROR(
6443− cm, cpi->feature_score_loc_sort,
6444− vpx_calloc(mi_rows * mi_cols, sizeof(*cpi->feature_score_loc_sort)));
6445− CHECK_MEM_ERROR(
6446− cm, cpi->feature_score_loc_heap,
6447− vpx_calloc(mi_rows * mi_cols, sizeof(*cpi->feature_score_loc_heap)));
6443+ vpx_calloc(mi_rows * mi_cols * 4, sizeof(*cpi->feature_score_loc_arr)));
6444+ CHECK_MEM_ERROR(cm, cpi->feature_score_loc_sort,
6445+ vpx_calloc(mi_rows * mi_cols * 4,
6446+ sizeof(*cpi->feature_score_loc_sort)));
6447+ CHECK_MEM_ERROR(cm, cpi->feature_score_loc_heap,
6448+ vpx_calloc(mi_rows * mi_cols * 4,
6449+ sizeof(*cpi->feature_score_loc_heap)));
64486450
64496451 cpi->feature_score_loc_alloc = 1;
64506452 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t