summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhong Li <zhong.li@intel.com>2014-08-07 22:05:43 -0600
committerZhao, Yakui <yakui.zhao@intel.com>2014-09-09 09:14:26 +0800
commitb18479e4fdd7af7cf2840542ef19dbe9114fdeaf (patch)
treeabecfbf85c488911727d27b662d2f25d4eabb9f3
parent1ac78501b0bc4d9dc872259681aa7bdff200aab9 (diff)
Remove gen7 only limitation for encoding configuration
Since all generations from gen6 can support avc encoding configuration, remove gen7 only limitation. MVC also can be support with little change, but it is low priority, it will be support when necessary and this function is stable. Signed-off-by: Zhong Li <zhong.li@intel.com> (cherry picked from commit f2178e267a67bdecab0a30502804c2ce5bccd0c2)
-rwxr-xr-xsrc/i965_drv_video.c4
-rw-r--r--src/i965_encoder.c8
2 files changed, 5 insertions, 7 deletions
diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c
index 7f35f01..100ed9b 100755
--- a/src/i965_drv_video.c
+++ b/src/i965_drv_video.c
@@ -676,7 +676,9 @@ i965_GetConfigAttributes(VADriverContextP ctx,
case VAConfigAttribEncQualityRange:
if (entrypoint == VAEntrypointEncSlice) {
attrib_list[i].value = 1;
- if(IS_GEN7(i965->intel.device_info))
+ if (profile == VAProfileH264ConstrainedBaseline ||
+ profile == VAProfileH264Main ||
+ profile == VAProfileH264High )
attrib_list[i].value = ENCODER_QUALITY_RANGE;
break;
}
diff --git a/src/i965_encoder.c b/src/i965_encoder.c
index f1c1f3d..f66d889 100644
--- a/src/i965_encoder.c
+++ b/src/i965_encoder.c
@@ -375,6 +375,7 @@ intel_enc_hw_context_init(VADriverContextP ctx,
case VAProfileH264Main:
case VAProfileH264High:
encoder_context->codec = CODEC_H264;
+ encoder_context->quality_range = ENCODER_QUALITY_RANGE;
break;
case VAProfileH264StereoHigh:
@@ -424,13 +425,8 @@ gen6_enc_hw_context_init(VADriverContextP ctx, struct object_config *obj_config)
struct hw_context *
gen7_enc_hw_context_init(VADriverContextP ctx, struct object_config *obj_config)
{
- struct intel_encoder_context *encoder_context;
- encoder_context = (struct intel_encoder_context *)intel_enc_hw_context_init(ctx, obj_config, gen7_vme_context_init, gen7_mfc_context_init);
-
- encoder_context->quality_range = ENCODER_QUALITY_RANGE;
-
- return (struct hw_context *)encoder_context;
+ return intel_enc_hw_context_init(ctx, obj_config, gen7_vme_context_init, gen7_mfc_context_init);
}
struct hw_context *