summaryrefslogtreecommitdiff
path: root/src/i965_encoder.c
diff options
context:
space:
mode:
authorXiang, Haihao <haihao.xiang@intel.com>2016-01-19 13:23:36 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2016-05-09 16:52:22 +0800
commit0c1319692f8be32e90afd80861c40a449df160a2 (patch)
treee999328ddf64f64a6d008d481db6124cde2e2610 /src/i965_encoder.c
parent82a86f7a28671a7d996011925e6dee031edffd2b (diff)
downloadlibva-intel-driver-0c1319692f8be32e90afd80861c40a449df160a2.tar.gz
Add support for VAEntrypointEncSliceLP
VAEntrypointEncSliceLP is used to expose low power variant of slice level encoding entrypoint and we will implement low power encoding on SKL Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com> Reviewed-By: Sean V Kelley <sean.v.kelley@intel.com>
Diffstat (limited to 'src/i965_encoder.c')
-rw-r--r--src/i965_encoder.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/i965_encoder.c b/src/i965_encoder.c
index 3c5af18b..b8b9c692 100644
--- a/src/i965_encoder.c
+++ b/src/i965_encoder.c
@@ -694,6 +694,7 @@ intel_enc_hw_context_init(VADriverContextP ctx,
encoder_context->base.batch = intel_batchbuffer_new(intel, I915_EXEC_RENDER, 0);
encoder_context->input_yuv_surface = VA_INVALID_SURFACE;
encoder_context->is_tmp_id = 0;
+ encoder_context->low_power_mode = 0;
encoder_context->rate_control_mode = VA_RC_NONE;
encoder_context->quality_level = ENCODER_DEFAULT_QUALITY;
encoder_context->quality_range = 1;
@@ -708,7 +709,11 @@ intel_enc_hw_context_init(VADriverContextP ctx,
case VAProfileH264Main:
case VAProfileH264High:
encoder_context->codec = CODEC_H264;
- encoder_context->quality_range = ENCODER_QUALITY_RANGE;
+
+ if (obj_config->entrypoint == VAEntrypointEncSliceLP)
+ encoder_context->quality_range = ENCODER_LP_QUALITY_RANGE;
+ else
+ encoder_context->quality_range = ENCODER_QUALITY_RANGE;
break;
case VAProfileH264StereoHigh:
@@ -748,11 +753,16 @@ intel_enc_hw_context_init(VADriverContextP ctx,
}
}
- vme_context_init(ctx, encoder_context);
- if(obj_config->profile != VAProfileJPEGBaseline) {
- assert(encoder_context->vme_context);
- assert(encoder_context->vme_context_destroy);
- assert(encoder_context->vme_pipeline);
+ if (vme_context_init) {
+ vme_context_init(ctx, encoder_context);
+
+ if (obj_config->profile != VAProfileJPEGBaseline) {
+ assert(encoder_context->vme_context);
+ assert(encoder_context->vme_context_destroy);
+ assert(encoder_context->vme_pipeline);
+ }
+ } else {
+ encoder_context->low_power_mode = 1;
}
mfc_context_init(ctx, encoder_context);