VP8: Allocate cpi->mt_current_mb_col array lazily
authorWan-Teh Chang <wtc@google.com>
Wed, 4 Oct 2023 02:30:12 +0000 (19:30 -0700)
committerWan-Teh Chang <wtc@google.com>
Wed, 4 Oct 2023 20:05:18 +0000 (13:05 -0700)
commitc23da380a386e2cae2c757f06a2aebfd72451413
tree8817dba9eced6fbfe4cd77b554dd74da94039920
parent874bcaa164187c5b71ce1a9ecca79288d0a05d96
VP8: Allocate cpi->mt_current_mb_col array lazily

Add the mt_current_mb_col_size field to VP8_COMP to record the size of
the mt_current_mb_col array.

Move the allocation of the mt_current_mb_col array from
vp8_alloc_compressor_data() to vp8_encode_frame(), where the use of
mt_current_mb_col starts. Allocate mt_current_mb_col right before use
if mt_current_mb_col hasn't been allocated or if the current size is
incorrect.

Move the deallocation of the mt_current_mb_col array from
dealloc_compressor_data() to vp8cx_remove_encoder_threads().

Move the TODO(https://crbug.com/1486441) comment from
vp8/encoder/onyx_if.c to vp8/vp8_cx_iface.c.

Change-Id: Ic5a0793278c2cc94876669aaa0dd732412876673
vp8/encoder/encodeframe.c
vp8/encoder/ethreading.c
vp8/encoder/onyx_if.c
vp8/encoder/onyx_int.h
vp8/vp8_cx_iface.c