summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSirisha Muppavarapu <sirisha.muppavarapu@intel.com>2014-12-15 11:32:00 -0800
committerXiang, Haihao <haihao.xiang@intel.com>2014-12-16 12:53:33 +0800
commit3f41b7582431e0e7a02fbf98d324361f60e88ac6 (patch)
tree047db96ea7a9dbd33c4eb9eee297bc90fc296a83
parent33cf544c2c381adeb4b119af1015b8e653c8b724 (diff)
downloadlibva-3f41b7582431e0e7a02fbf98d324361f60e88ac6.tar.gz
STDE Optimization: Added code in the unit test to support optimization of STDE.
The current enhancement will support STDE optimization for STDE factors: 0(default), 3, 6 and 9
-rw-r--r--test/videoprocess/process.cfg4
-rw-r--r--test/videoprocess/videoprocess.cpp10
2 files changed, 13 insertions, 1 deletions
diff --git a/test/videoprocess/process.cfg b/test/videoprocess/process.cfg
index aac5fef..3981193 100644
--- a/test/videoprocess/process.cfg
+++ b/test/videoprocess/process.cfg
@@ -77,3 +77,7 @@ COLOR_BALANCE_SATURATION: 1.0
COLOR_BALANCE_BRIGHTNESS: 20
#(0.0 ~ 10.0, default 1.0)
COLOR_BALANCE_CONTRAST: 1.2
+
+#5.6 Skin Tone Detection and Enhancement parameters
+ # (One of 0, 3, 6, 9, default = 0)
+STDE_FACTOR: 9
diff --git a/test/videoprocess/videoprocess.cpp b/test/videoprocess/videoprocess.cpp
index f979c2a..b7bdda3 100644
--- a/test/videoprocess/videoprocess.cpp
+++ b/test/videoprocess/videoprocess.cpp
@@ -511,9 +511,17 @@ skintone_filter_init(VABufferID *filter_param_buf_id)
VAStatus va_status = VA_STATUS_SUCCESS;
VAProcFilterParameterBuffer stde_param;
VABufferID stde_param_buf_id;
+ uint8_t stde_factor = 0;
+
+ if (read_value_uint8(g_config_file_fd, "STDE_FACTOR", &stde_factor)) {
+ printf("Read STDE Factor failed, use default value");
+ stde_factor = 0;
+ }
+
+ printf("Applying STDE factor: %d\n", stde_factor);
stde_param.type = VAProcFilterSkinToneEnhancement;
- stde_param.value = 0;
+ stde_param.value = stde_factor;
va_status = vaCreateBuffer(va_dpy, context_id,
VAProcFilterParameterBufferType, sizeof(stde_param), 1,