Haswell: Disable Picture ID Remapping for AVC decoding
authorXiang, Haihao <haihao.xiang@intel.com>
Mon, 15 Oct 2012 15:10:18 +0000 (11:10 -0400)
committerXiang, Haihao <haihao.xiang@intel.com>
Tue, 23 Oct 2012 05:50:28 +0000 (13:50 +0800)
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
src/gen75_mfd.c
src/i965_defines.h

index ec0d51e..1aa41bc 100644 (file)
@@ -788,6 +788,28 @@ gen75_mfd_avc_qm_state(VADriverContextP ctx,
 }
 
 static void
+gen75_mfd_avc_picid_state(VADriverContextP ctx,
+                      struct decode_state *decode_state,
+                      struct gen7_mfd_context *gen7_mfd_context)
+{
+    struct i965_driver_data *i965 = i965_driver_data(ctx);
+    struct intel_batchbuffer *batch = gen7_mfd_context->base.batch;
+
+    BEGIN_BCS_BATCH(batch, 10);
+    OUT_BCS_BATCH(batch, MFD_AVC_PICID_STATE | (10 - 2));
+    OUT_BCS_BATCH(batch, 1); // disable Picture ID Remapping
+    OUT_BCS_BATCH(batch, 0);
+    OUT_BCS_BATCH(batch, 0);
+    OUT_BCS_BATCH(batch, 0);
+    OUT_BCS_BATCH(batch, 0);
+    OUT_BCS_BATCH(batch, 0);
+    OUT_BCS_BATCH(batch, 0);
+    OUT_BCS_BATCH(batch, 0);
+    OUT_BCS_BATCH(batch, 0);
+    ADVANCE_BCS_BATCH(batch);
+}
+
+static void
 gen75_mfd_avc_directmode_state_bplus(VADriverContextP ctx,
                               VAPictureParameterBufferH264 *pic_param,
                               VASliceParameterBufferH264 *slice_param,
@@ -1328,6 +1350,7 @@ gen75_mfd_avc_decode_picture(VADriverContextP ctx,
     gen75_mfd_bsp_buf_base_addr_state(ctx, decode_state, MFX_FORMAT_AVC, gen7_mfd_context);
     gen75_mfd_avc_qm_state(ctx, decode_state, gen7_mfd_context);
     gen75_mfd_avc_img_state(ctx, decode_state, gen7_mfd_context);
+    gen75_mfd_avc_picid_state(ctx, decode_state, gen7_mfd_context);
 
     for (j = 0; j < decode_state->num_slice_params; j++) {
         assert(decode_state->slice_params && decode_state->slice_params[j]->buffer);
@@ -2148,7 +2171,6 @@ gen75_mfd_vc1_directmode_state_bplus(VADriverContextP ctx,
     ADVANCE_BCS_BATCH(batch);
 }
 
-
 static void
 gen75_mfd_vc1_directmode_state(VADriverContextP ctx,
                               struct decode_state *decode_state,
index 2c17950..cf9babd 100755 (executable)
 #define MFX_AVC_REF_IDX_STATE                   MFX(2, 1, 0, 4)
 #define MFX_AVC_WEIGHTOFFSET_STATE              MFX(2, 1, 0, 5)
 
+#define MFD_AVC_PICID_STATE                     MFX(2, 1, 1, 5)
 #define MFD_AVC_BSD_OBJECT                      MFX(2, 1, 1, 8)
 
 #define MFC_AVC_FQM_STATE                       MFX(2, 1, 2, 2)