Handle the bit length of last dword for INSERT_OBJECT on BDW
authorZhao Yakui <yakui.zhao@intel.com>
Wed, 27 Mar 2013 01:26:32 +0000 (09:26 +0800)
committerXiang, Haihao <haihao.xiang@intel.com>
Thu, 27 Feb 2014 02:04:12 +0000 (10:04 +0800)
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 <yakui.zhao@intel.com>
src/gen8_mfc.c

index 1deaae3..b3c1b02 100644 (file)
@@ -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));