[Libva] [libva-intel-driver PATCH 1/2] SKL and BDW use the same PAK pipeline for H.264/MPEG-2 encoding

Xiang, Haihao haihao.xiang at intel.com
Thu Dec 11 17:40:52 PST 2014


Still use different functions if using GPU to construct the batchbuffer
for PAK

Signed-off-by: Xiang, Haihao <haihao.xiang at intel.com>
---
 src/gen9_mfc.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/src/gen9_mfc.c b/src/gen9_mfc.c
index 59256d0..bea11c3 100644
--- a/src/gen9_mfc.c
+++ b/src/gen9_mfc.c
@@ -2551,8 +2551,18 @@ static VAStatus gen9_mfc_pipeline(VADriverContextP ctx,
 
 Bool gen9_mfc_context_init(VADriverContextP ctx, struct intel_encoder_context *encoder_context)
 {
-    struct gen6_mfc_context *mfc_context = calloc(1, sizeof(struct gen6_mfc_context));
+    struct gen6_mfc_context *mfc_context = NULL;
 
+#if MFC_SOFTWARE_HASWELL
+    if ((encoder_context->codec == CODEC_H264) ||
+        (encoder_context->codec == CODEC_H264_MVC) ||
+        (encoder_context->codec == CODEC_MPEG2)) {
+
+        return gen8_mfc_context_init(ctx, encoder_context);
+    }
+#endif
+
+    mfc_context = calloc(1, sizeof(struct gen6_mfc_context));
     mfc_context->gpe_context.surface_state_binding_table.length = (SURFACE_STATE_PADDED_SIZE + sizeof(unsigned int)) * MAX_MEDIA_SURFACES_GEN6;
 
     mfc_context->gpe_context.idrt.max_entries = MAX_GPE_KERNELS;
-- 
1.9.1



More information about the Libva mailing list