[Libva] [PATCH] STDE Optimization: Added code in the unit test to support optimization of STDE.
Sirisha Muppavarapu
sirisha.muppavarapu at intel.com
Mon Dec 15 11:32:00 PST 2014
The current enhancement will support STDE optimization for STDE factors:
0(default), 3, 6 and 9
---
test/videoprocess/process.cfg | 4 ++++
test/videoprocess/videoprocess.cpp | 10 +++++++++-
2 files changed, 13 insertions(+), 1 deletion(-)
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,
--
1.9.1
More information about the Libva
mailing list