summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiang, Haihao <haihao.xiang@intel.com>2016-09-28 08:42:01 +0800
committerSean V Kelley <seanvk@posteo.de>2016-09-28 13:41:32 -0700
commitf3d975c39ad1b63a3afa8cf1534e7a508deb2625 (patch)
tree7195c8e4a9bcbd9f952f23cc5858bc6e54dddec5
parent60a27d6bf7bf69accabe5b783000eb7aebbb2ed7 (diff)
Add CBR and VBR bitrate control flags for low power encode if possible
CBR and VBR for low power encode depend on the fully loaded HuC firmware. Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com> Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
-rw-r--r--src/i965_device_info.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/i965_device_info.c b/src/i965_device_info.c
index dc16197..4db6c51 100644
--- a/src/i965_device_info.c
+++ b/src/i965_device_info.c
@@ -319,6 +319,8 @@ static struct hw_codec_info chv_hw_codec_info = {
},
};
+static void gen9_hw_codec_preinit(VADriverContextP ctx, struct hw_codec_info *codec_info);
+
extern struct hw_context *gen9_enc_hw_context_init(VADriverContextP, struct object_config *);
extern void gen9_post_processing_context_init(VADriverContextP, void *, struct intel_batchbuffer *);
extern void gen9_max_resolution(struct i965_driver_data *, struct object_config *, int *, int *);
@@ -329,6 +331,7 @@ static struct hw_codec_info skl_hw_codec_info = {
.render_init = gen9_render_init,
.post_processing_context_init = gen9_post_processing_context_init,
.max_resolution = gen9_max_resolution,
+ .preinit_hw_codec = gen9_hw_codec_preinit,
.max_width = 4096, /* default. See max_resolution */
.max_height = 4096, /* default. See max_resolution */
@@ -869,3 +872,11 @@ static void gen7_hw_codec_preinit(VADriverContextP ctx, struct hw_codec_info *co
}
return;
}
+
+static void gen9_hw_codec_preinit(VADriverContextP ctx, struct hw_codec_info *codec_info)
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+
+ if (i965->intel.has_huc && codec_info->has_lp_h264_encoding)
+ codec_info->lp_h264_brc_mode |= (VA_RC_CBR | VA_RC_VBR);
+}