Commit 254a4c03 authored by Yunqing Wang's avatar Yunqing Wang Committed by Gerrit Code Review
Browse files

Merge "Allocate tile data adaptively to accommodate the frame size increase"

parents 07799ef2 2c838ede
......@@ -3786,9 +3786,13 @@ void vp9_init_tile_data(VP9_COMP *cpi) {
TOKENEXTRA *pre_tok = cpi->tile_tok[0][0];
int tile_tok = 0;
if (cpi->tile_data == NULL) {
if (cpi->tile_data == NULL || cpi->allocated_tiles < tile_cols * tile_rows) {
if (cpi->tile_data != NULL)
vpx_free(cpi->tile_data);
CHECK_MEM_ERROR(cm, cpi->tile_data,
vpx_malloc(tile_cols * tile_rows * sizeof(*cpi->tile_data)));
cpi->allocated_tiles = tile_cols * tile_rows;
for (tile_row = 0; tile_row < tile_rows; ++tile_row)
for (tile_col = 0; tile_col < tile_cols; ++tile_col) {
TileDataEnc *tile_data =
......
......@@ -306,6 +306,7 @@ typedef struct VP9_COMP {
YV12_BUFFER_CONFIG scaled_last_source;
TileDataEnc *tile_data;
int allocated_tiles; // Keep track of memory allocated for tiles.
// For a still frame, this flag is set to 1 to skip partition search.
int partition_search_skippable_frame;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment