[Libva] [LIBVA-INTEL-DRIVER][PATCH 03/12] Add one field to keep the specific priv_state for encoding

Zhao Yakui yakui.zhao at intel.com
Tue May 24 12:00:29 UTC 2016


It will be better that it is allocated/initialized in calling the
XXX_vme_context_init callback function.

Signed-off-by: Zhao Yakui <yakui.zhao at intel.com>
Reviewed-by: Sean V Kelley <sean.v.kelley at intel.com>
---
 src/i965_encoder.c | 5 +++++
 src/i965_encoder.h | 1 +
 2 files changed, 6 insertions(+)

diff --git a/src/i965_encoder.c b/src/i965_encoder.c
index b5abed3..cee27fa 100644
--- a/src/i965_encoder.c
+++ b/src/i965_encoder.c
@@ -659,6 +659,11 @@ intel_encoder_context_destroy(void *hw_context)
     if (encoder_context->vme_context_destroy && encoder_context->vme_context)
        encoder_context->vme_context_destroy(encoder_context->vme_context);
 
+    if (encoder_context->enc_priv_state) {
+        free(encoder_context->enc_priv_state);
+        encoder_context->enc_priv_state = NULL;
+    }
+
     intel_batchbuffer_free(encoder_context->base.batch);
     free(encoder_context);
 }
diff --git a/src/i965_encoder.h b/src/i965_encoder.h
index 8a11029..ddfcf9f 100644
--- a/src/i965_encoder.h
+++ b/src/i965_encoder.h
@@ -61,6 +61,7 @@ struct intel_encoder_context
     unsigned int quality_range;
     void *vme_context;
     void *mfc_context;
+    void *enc_priv_state;
 
     unsigned int is_tmp_id:1;
     unsigned int low_power_mode:1;
-- 
1.8.2.1



More information about the Libva mailing list