Merge "Increase encoder buffer for multi-layer ARFs"

This commit is contained in:
Jingning Han
2018-09-05 14:30:19 +00:00
committed by Gerrit Code Review

View File

@@ -1099,7 +1099,7 @@ static vpx_codec_err_t encoder_encode(vpx_codec_alg_priv_t *ctx,
// There's no codec control for multiple alt-refs so check the encoder
// instance for its status to determine the compressed data size.
data_sz = ctx->cfg.g_w * ctx->cfg.g_h * get_image_bps(img) / 8 *
(cpi->multi_arf_allowed ? 8 : 2);
(cpi->multi_arf_allowed || cpi->multi_layer_arf ? 8 : 2);
if (data_sz < kMinCompressedSize) data_sz = kMinCompressedSize;
if (ctx->cx_data == NULL || ctx->cx_data_sz < data_sz) {
ctx->cx_data_sz = data_sz;