summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSirisha Muppavarapu <sirisha.muppavarapu@intel.com>2014-03-25 15:04:29 -0700
committerXiang, Haihao <haihao.xiang@intel.com>2014-04-25 10:45:51 +0800
commitf044aab513e26a349fbe47742719785b6b6e529d (patch)
treeb9717dc78909ecab04a4d61d5b800fbbca3a92ab
parent61fbb1bba1ad8a41ffae4fd1ba90391adf819b6e (diff)
VPP: Enable Skin Tone Detection and Enhancement feature in the driver.
The VPP-STDE feature is enabled in the driver code for gen75 and gen8. In this commit, I added the filter and made appropriate changes to the hw_codec_info and the supporting methods. (cherry picked from commit 691b149b7afe578889a423841a29db3ac56aad83)
-rw-r--r--src/gen75_picture_process.c10
-rw-r--r--src/gen75_vpp_vebox.c6
-rwxr-xr-xsrc/i965_drv_video.c9
3 files changed, 19 insertions, 6 deletions
diff --git a/src/gen75_picture_process.c b/src/gen75_picture_process.c
index ad7d463..3c4fc0b 100644
--- a/src/gen75_picture_process.c
+++ b/src/gen75_picture_process.c
@@ -192,8 +192,9 @@ gen75_proc_picture(VADriverContextP ctx,
VAProcFilterParameterBuffer* filter =
(VAProcFilterParameterBuffer*)obj_buf-> buffer_store->buffer;
- if (filter->type == VAProcFilterNoiseReduction ||
- filter->type == VAProcFilterDeinterlacing ||
+ if (filter->type == VAProcFilterNoiseReduction ||
+ filter->type == VAProcFilterDeinterlacing ||
+ filter->type == VAProcFilterSkinToneEnhancement ||
filter->type == VAProcFilterColorBalance){
gen75_vpp_vebox(ctx, proc_ctx);
}else if(filter->type == VAProcFilterSharpening){
@@ -220,8 +221,9 @@ gen75_proc_picture(VADriverContextP ctx,
VAProcFilterParameterBuffer* filter =
(VAProcFilterParameterBuffer*)obj_buf-> buffer_store->buffer;
- if (filter->type != VAProcFilterNoiseReduction &&
- filter->type != VAProcFilterDeinterlacing &&
+ if (filter->type != VAProcFilterNoiseReduction &&
+ filter->type != VAProcFilterDeinterlacing &&
+ filter->type != VAProcFilterSkinToneEnhancement &&
filter->type != VAProcFilterColorBalance) {
printf("Do not support multiply filters outside vebox pipeline \n");
assert(0);
diff --git a/src/gen75_vpp_vebox.c b/src/gen75_vpp_vebox.c
index 8acf743..3895641 100644
--- a/src/gen75_vpp_vebox.c
+++ b/src/gen75_vpp_vebox.c
@@ -1186,6 +1186,9 @@ VAStatus gen75_vebox_process_picture(VADriverContextP ctx,
proc_ctx->filters_mask |= VPP_IECP_PRO_AMP;
proc_ctx->filter_iecp_amp = filter;
proc_ctx->filter_iecp_amp_num_elements = obj_buf->num_elements;
+ } else if (filter->type == VAProcFilterSkinToneEnhancement) {
+ proc_ctx->filters_mask |= VPP_IECP_STD_STE;
+ proc_ctx->filter_iecp_std = filter;
}
}
@@ -1483,6 +1486,9 @@ VAStatus gen8_vebox_process_picture(VADriverContextP ctx,
proc_ctx->filters_mask |= VPP_IECP_PRO_AMP;
proc_ctx->filter_iecp_amp = filter;
proc_ctx->filter_iecp_amp_num_elements = obj_buf->num_elements;
+ } else if (filter->type == VAProcFilterSkinToneEnhancement) {
+ proc_ctx->filters_mask |= VPP_IECP_STD_STE;
+ proc_ctx->filter_iecp_std = filter;
}
}
diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c
index 60174b2..efe4777 100755
--- a/src/i965_drv_video.c
+++ b/src/i965_drv_video.c
@@ -318,12 +318,13 @@ static struct hw_codec_info gen75_hw_codec_info = {
.has_di_motion_adptive = 1,
.has_di_motion_compensated = 1,
- .num_filters = 4,
+ .num_filters = 5,
.filters = {
{ VAProcFilterNoiseReduction, I965_RING_VEBOX },
{ VAProcFilterDeinterlacing, I965_RING_VEBOX },
{ VAProcFilterSharpening, I965_RING_NULL },
{ VAProcFilterColorBalance, I965_RING_VEBOX},
+ { VAProcFilterSkinToneEnhancement, I965_RING_VEBOX},
},
};
@@ -349,12 +350,13 @@ static struct hw_codec_info gen8_hw_codec_info = {
.has_di_motion_compensated = 1,
.has_vp8_decoding = 1,
- .num_filters = 4,
+ .num_filters = 5,
.filters = {
{ VAProcFilterNoiseReduction, I965_RING_VEBOX },
{ VAProcFilterDeinterlacing, I965_RING_VEBOX },
{ VAProcFilterSharpening, I965_RING_NULL }, /* need to rebuild the shader for BDW */
{ VAProcFilterColorBalance, I965_RING_VEBOX},
+ { VAProcFilterSkinToneEnhancement, I965_RING_VEBOX},
},
};
@@ -5120,6 +5122,9 @@ VAStatus i965_QueryVideoProcPipelineCaps(
if (deint->algorithm == VAProcDeinterlacingMotionAdaptive ||
deint->algorithm == VAProcDeinterlacingMotionCompensated);
pipeline_cap->num_forward_references++;
+ } else if (base->type == VAProcFilterSkinToneEnhancement) {
+ VAProcFilterParameterBuffer *stde = (VAProcFilterParameterBuffer *)base;
+ (void)stde;
}
}