[Libva] [intel-driver][PATCH 2/2] jpeg enc/dec gen9: Allow up to 8K JPEG max resolution on gen9
U. Artie Eoff
ullysses.a.eoff at intel.com
Tue Jun 7 20:28:03 UTC 2016
Allow up to 8K * 8K resolution for JPEG encode and decode on
gen9 HW (SKL,BXT,KBL).
Signed-off-by: U. Artie Eoff <ullysses.a.eoff at intel.com>
---
src/gen9_mfd.c | 14 ++++++++++++++
src/i965_device_info.c | 16 ++++++++++------
2 files changed, 24 insertions(+), 6 deletions(-)
diff --git a/src/gen9_mfd.c b/src/gen9_mfd.c
index f178c03fd4d0..5f4251492d6c 100644
--- a/src/gen9_mfd.c
+++ b/src/gen9_mfd.c
@@ -1989,3 +1989,17 @@ gen9_dec_hw_context_init(VADriverContextP ctx, struct object_config *obj_config)
return gen8_dec_hw_context_init(ctx, obj_config);
}
}
+
+void gen9_max_resolution(struct i965_driver_data *i965,
+ struct object_config *obj_config,
+ int *w, /* out */
+ int *h) /* out */
+{
+ if (obj_config->profile == VAProfileJPEGBaseline) {
+ *w = 8192;
+ *h = 8192;
+ } else {
+ *w = i965->codec_info->max_width;
+ *h = i965->codec_info->max_height;
+ }
+}
diff --git a/src/i965_device_info.c b/src/i965_device_info.c
index 96ea43c9f517..239961cd59e3 100644
--- a/src/i965_device_info.c
+++ b/src/i965_device_info.c
@@ -321,15 +321,17 @@ static struct hw_codec_info chv_hw_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 *);
static struct hw_codec_info skl_hw_codec_info = {
.dec_hw_context_init = gen9_dec_hw_context_init,
.enc_hw_context_init = gen9_enc_hw_context_init,
.proc_hw_context_init = gen75_proc_context_init,
.render_init = gen9_render_init,
.post_processing_context_init = gen9_post_processing_context_init,
+ .max_resolution = gen9_max_resolution,
- .max_width = 4096,
- .max_height = 4096,
+ .max_width = 4096, /* default. See max_resolution */
+ .max_height = 4096, /* default. See max_resolution */
.min_linear_wpitch = 128,
.min_linear_hpitch = 16,
@@ -378,9 +380,10 @@ static struct hw_codec_info bxt_hw_codec_info = {
.proc_hw_context_init = gen75_proc_context_init,
.render_init = gen9_render_init,
.post_processing_context_init = gen9_post_processing_context_init,
+ .max_resolution = gen9_max_resolution,
- .max_width = 4096,
- .max_height = 4096,
+ .max_width = 4096, /* default. See max_resolution */
+ .max_height = 4096, /* default. See max_resolution */
.min_linear_wpitch = 128,
.min_linear_hpitch = 16,
@@ -430,9 +433,10 @@ static struct hw_codec_info kbl_hw_codec_info = {
.proc_hw_context_init = gen75_proc_context_init,
.render_init = gen9_render_init,
.post_processing_context_init = gen9_post_processing_context_init,
+ .max_resolution = gen9_max_resolution,
- .max_width = 4096,
- .max_height = 4096,
+ .max_width = 4096, /* default. See max_resolution */
+ .max_height = 4096, /* default. See max_resolution */
.min_linear_wpitch = 128,
.min_linear_hpitch = 16,
--
2.1.0
More information about the Libva
mailing list