summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZhao Yakui <yakui.zhao@intel.com>2014-10-08 08:23:26 +0800
committerZhao, Yakui <yakui.zhao@intel.com>2014-10-08 08:23:26 +0800
commit80cc8a908a3cbef57e3fb25528a1474bd14a2817 (patch)
tree5d5ea6fcf71b3b88db7862fb69b392d15b59049f /src
parentfe3712b134068c1c25dc42e7dc908f2fa6d8aa0e (diff)
downloadlibva-intel-driver-80cc8a908a3cbef57e3fb25528a1474bd14a2817.tar.gz
libva-intel-driver-80cc8a908a3cbef57e3fb25528a1474bd14a2817.tar.bz2
libva-intel-driver-80cc8a908a3cbef57e3fb25528a1474bd14a2817.zip
Add one callback function for hw_codec_info to initialize hw_codec_info
V1->V2: Refine the call back function name from hw_codec_hook to preinit_hw_codec And it is called after VADriverContext is fully initialized. This is based on the comment from Gwenole Beauchesne. Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Diffstat (limited to 'src')
-rw-r--r--src/i965_drv_video.c3
-rw-r--r--src/i965_drv_video.h1
2 files changed, 4 insertions, 0 deletions
diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c
index a9d6700..3e479be 100644
--- a/src/i965_drv_video.c
+++ b/src/i965_drv_video.c
@@ -5669,6 +5669,9 @@ i965_Init(VADriverContextP ctx)
break;
}
+ if (i965->codec_info->preinit_hw_codec)
+ i965->codec_info->preinit_hw_codec(ctx, i965->codec_info);
+
if (i == ARRAY_ELEMS(i965_sub_ops)) {
switch (i965->intel.device_id) {
#undef CHIPSET
diff --git a/src/i965_drv_video.h b/src/i965_drv_video.h
index a72bb64..025bef1 100644
--- a/src/i965_drv_video.h
+++ b/src/i965_drv_video.h
@@ -336,6 +336,7 @@ struct hw_codec_info
struct hw_context *(*proc_hw_context_init)(VADriverContextP, struct object_config *);
bool (*render_init)(VADriverContextP);
void (*post_processing_context_init)(VADriverContextP, void *, struct intel_batchbuffer *);
+ void (*preinit_hw_codec)(VADriverContextP, struct hw_codec_info *);
int max_width;
int max_height;