From: Jingning Han Date: Tue, 28 Aug 2018 19:43:34 +0000 (-0700) Subject: Increase encoder buffer for multi-layer ARFs X-Git-Tag: v1.8.0~362^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6367818c500291bcde56cd126dace3b825be924a;p=libvpx Increase encoder buffer for multi-layer ARFs When multi-layer ARF mode is enabled, increase the encoder buffer to account for the situation where several ARFs are coded together in a frame packet. Change-Id: I4e53095f6b6ac5a3c8d79414411ac39880bf1523 --- diff --git a/vp9/vp9_cx_iface.c b/vp9/vp9_cx_iface.c index 074415b7f..251acf3c5 100644 --- a/vp9/vp9_cx_iface.c +++ b/vp9/vp9_cx_iface.c @@ -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;