From 1d8563353cfdb6d9911698f1b347a06b671de2b5 Mon Sep 17 00:00:00 2001 From: Kinbay_Wu Date: Wed, 8 Jan 2025 09:24:16 +0800 Subject: [PATCH] Revert "Revert "[AMANDROIDS-185] [MT-1961] Implement VCOMPO_SetVideoSharpness and VCOMPO_GetVideoSharpness function"" This reverts commit ef93186c94fedd16de4ae38e7600ff259d75365a. --- libbtvoemhal/bfxat100/hal_vcompo.cpp | 30 +++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/libbtvoemhal/bfxat100/hal_vcompo.cpp b/libbtvoemhal/bfxat100/hal_vcompo.cpp index beee036..6527187 100644 --- a/libbtvoemhal/bfxat100/hal_vcompo.cpp +++ b/libbtvoemhal/bfxat100/hal_vcompo.cpp @@ -236,4 +236,32 @@ int HAL_VCOMPO_GetVideoSaturation(int *saturation) } return 0; -} \ No newline at end of file +} + +int HAL_VCOMPO_SetVideoSharpness(int sharpness) +{ + bool ret = false; + HAL_LOGD("%s<%s> ..sharpness %d\n", LOG_TAG, __FUNCTION__, sharpness); + const sp sws = getSystemControlService(); + + if (sws != nullptr) { + if(sws->setSharpness(sharpness, 1, 1) != -1) + ret = true; + HAL_LOGD("%s:%s v%d(SetVideoSharpness=%d)", LOG_TAG, __FUNCTION__, VERSION, sharpness); + } + + return ret; +} + +int HAL_VCOMPO_GetVideoSharpness(int *sharpness) +{ + HAL_LOGD("%s<%s> ..\n", LOG_TAG, __FUNCTION__); + const sp sws = getSystemControlService(); + + if((sharpness != nullptr) && (sws != nullptr)) { + *sharpness = sws->getSharpness(); + HAL_LOGD("%s:%s v%d(GetVideoSharpness=%d)", LOG_TAG, __FUNCTION__, VERSION, *sharpness); + } + + return 0; +} -- 2.25.1