From 39a9b6bc31b0e5280b94a1f822f46736a7cbe571 Mon Sep 17 00:00:00 2001 From: Zhao Yakui Date: Wed, 27 Mar 2013 09:26:32 +0800 Subject: [PATCH] Handle the bit length of last dword for INSERT_OBJECT on BDW Otherwise it can't insert the content of INSERT_OBJECT command during encoding, which causes that the encoded clip can't be parsed by player. Signed-off-by: Zhao Yakui --- src/gen8_mfc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gen8_mfc.c b/src/gen8_mfc.c index 1deaae3..b3c1b02 100644 --- a/src/gen8_mfc.c +++ b/src/gen8_mfc.c @@ -367,6 +367,9 @@ gen8_mfc_avc_insert_object(VADriverContextP ctx, struct intel_encoder_context *e if (batch == NULL) batch = encoder_context->base.batch; + if (data_bits_in_last_dw == 0) + data_bits_in_last_dw = 32; + BEGIN_BCS_BATCH(batch, lenght_in_dws + 2); OUT_BCS_BATCH(batch, MFX_INSERT_OBJECT | (lenght_in_dws + 2 - 2)); -- 2.7.4