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-03-27 09:11:02 +0800
commit691b149b7afe578889a423841a29db3ac56aad83 (patch)
tree3a5d3dcd2febb02eb2f77342148921459d43609a
parentb1319c7f7cb9d20179b20dac2308330bd0e51ffe (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.
-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 761361c..50c8249 100644
--- a/src/gen75_vpp_vebox.c
+++ b/src/gen75_vpp_vebox.c
@@ -1178,6 +1178,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;
}
}
@@ -1475,6 +1478,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 c9315dc..cc61ad3 100755
--- a/src/i965_drv_video.c
+++ b/src/i965_drv_video.c
@@ -330,12 +330,13 @@ static struct hw_codec_info gen75_hw_codec_info = {
.has_h264_mvc_decoding = 1,
.has_h264_mvc_encoding = 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},
},
};
@@ -364,12 +365,13 @@ static struct hw_codec_info gen8_hw_codec_info = {
.has_h264_mvc_decoding = 1,
.has_h264_mvc_encoding = 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},
},
};
@@ -5166,6 +5168,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;
}
}