[Libva] [PATCH 2/2] jpeg enc/dec gen9: Allow up to 16K JPEG max resolution on gen9
U. Artie Eoff
ullysses.a.eoff at intel.com
Fri Apr 1 16:23:07 UTC 2016
Allow up to 16K * 16K 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 92faa4ff1092..cde35f73dfdd 100644
--- a/src/gen9_mfd.c
+++ b/src/gen9_mfd.c
@@ -2109,3 +2109,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 = 16384;
+ *h = 16384;
+ } 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 6ac1d0cc412a..1d04663650b4 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,
@@ -375,9 +377,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 = 64,
.min_linear_hpitch = 16,
@@ -427,9 +430,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 = 64,
.min_linear_hpitch = 16,
--
2.1.0
More information about the Libva
mailing list