[Libva] [PATCH] VP8 HWEnc: Alloc larger memory for internal buffer

Zhong Li zhong.li at intel.com
Fri Apr 24 01:51:00 PDT 2015


It is to prevent the internal bitstream buffer overflow when qp is low.

Signed-off-by: Zhong Li <zhong.li at intel.com>
---
 src/gen8_mfc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gen8_mfc.c b/src/gen8_mfc.c
index 77c9a10..35d6084 100644
--- a/src/gen8_mfc.c
+++ b/src/gen8_mfc.c
@@ -3714,9 +3714,9 @@ static void gen8_mfc_vp8_init(VADriverContextP ctx,
     assert(bo);
     mfc_context->vp8_state.frame_header_bo = bo;
 
-    mfc_context->vp8_state.intermediate_buffer_max_size = width_in_mbs * height_in_mbs * 256 * 9;
+    mfc_context->vp8_state.intermediate_buffer_max_size = width_in_mbs * height_in_mbs * 384 * 9;
     for(i = 0; i < 8; i++) {
-        mfc_context->vp8_state.intermediate_partition_offset[i] = width_in_mbs * height_in_mbs * 256 * (i + 1);
+        mfc_context->vp8_state.intermediate_partition_offset[i] = width_in_mbs * height_in_mbs * 384 * (i + 1);
     }
     dri_bo_unreference(mfc_context->vp8_state.intermediate_bo);
     bo = dri_bo_alloc(i965->intel.bufmgr,
-- 
1.9.1



More information about the Libva mailing list