Skip to content

Commit e682acf

Browse files
slkanthiarjunbinu
authored andcommitted
Add caps implementation for params
"LocalContrastEnhancement" "MPEGNoiseReduction" "DigitalNoiseReduction" "AISuperResolution" "MEMC"
1 parent c83c7cf commit e682acf

File tree

3 files changed

+106
-5
lines changed

3 files changed

+106
-5
lines changed

AVOutput/AVOutputTV.cpp

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,11 @@ namespace Plugin {
408408
registerMethod("getDVCalibrationCaps", &AVOutputTV::getDVCalibrationCaps, this);
409409
registerMethod("getPictureModeCapsV2", &AVOutputTV::getPictureModeCapsV2, this);
410410
registerMethod("getAutoBacklightModeCapsV2", &AVOutputTV::getAutoBacklightModeCapsV2, this);
411+
registerMethod("getLocalContrastEnhancementCaps", &AVOutputTV::getLocalContrastEnhancementCaps, this);
412+
registerMethod("getMPEGNoiseReductionCaps", &AVOutputTV::getMPEGNoiseReductionCaps, this);
413+
registerMethod("getDigitalNoiseReductionCaps", &AVOutputTV::getDigitalNoiseReductionCaps, this);
414+
registerMethod("getAISuperResolutionCaps", &AVOutputTV::getAISuperResolutionCaps, this);
415+
registerMethod("getMEMCCaps", &AVOutputTV::getMEMCCaps, this);
411416

412417
LOGINFO("Exit\n");
413418
}
@@ -743,7 +748,42 @@ namespace Plugin {
743748
return getCapsV2([this](tvContextCaps_t** context_caps, int* max_precision) {
744749
return this->GetPrecisionDetailCaps(max_precision, context_caps);
745750
},
746-
"PrecisionDetails", parameters, response);
751+
"PrecisionDetail", parameters, response);
752+
}
753+
754+
uint32_t AVOutputTV::getLocalContrastEnhancementCaps(const JsonObject& parameters, JsonObject& response) {
755+
return getCapsV2([this](tvContextCaps_t** context_caps, int* max_val) {
756+
return this->GetLocalContrastEnhancementCaps(max_val, context_caps);
757+
},
758+
"LocalContrastEnhancement", parameters, response);
759+
}
760+
761+
uint32_t AVOutputTV::getMPEGNoiseReductionCaps(const JsonObject& parameters, JsonObject& response) {
762+
return getCapsV2([this](tvContextCaps_t** context_caps, int* max_val) {
763+
return this->GetMPEGNoiseReductionCaps(max_val, context_caps);
764+
},
765+
"MPEGNoiseReduction", parameters, response);
766+
}
767+
768+
uint32_t AVOutputTV::getDigitalNoiseReductionCaps(const JsonObject& parameters, JsonObject& response) {
769+
return getCapsV2([this](tvContextCaps_t** context_caps, int* max_val) {
770+
return this->GetDigitalNoiseReductionCaps(max_val, context_caps);
771+
},
772+
"DigitalNoiseReduction", parameters, response);
773+
}
774+
775+
uint32_t AVOutputTV::getAISuperResolutionCaps(const JsonObject& parameters, JsonObject& response) {
776+
return getCapsV2([this](tvContextCaps_t** context_caps, int* max_val) {
777+
return this->GetAISuperResolutionCaps(max_val, context_caps);
778+
},
779+
"AISuperResolution", parameters, response);
780+
}
781+
782+
uint32_t AVOutputTV::getMEMCCaps(const JsonObject& parameters, JsonObject& response) {
783+
return getCapsV2([this](tvContextCaps_t** context_caps, int* max_val) {
784+
return this->GetMEMCCaps(max_val, context_caps);
785+
},
786+
"MEMC", parameters, response);
747787
}
748788

749789
uint32_t AVOutputTV::getLowLatencyStateCapsV2(const JsonObject& parameters, JsonObject& response) {

AVOutput/AVOutputTV.h

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,11 @@ class AVOutputTV : public AVOutputBase {
260260
DECLARE_JSON_RPC_METHOD(getDVCalibrationCaps)
261261
DECLARE_JSON_RPC_METHOD(getPictureModeCapsV2)
262262
DECLARE_JSON_RPC_METHOD(getAutoBacklightModeCapsV2)
263+
DECLARE_JSON_RPC_METHOD(getLocalContrastEnhancementCaps)
264+
DECLARE_JSON_RPC_METHOD(getMPEGNoiseReductionCaps)
265+
DECLARE_JSON_RPC_METHOD(getDigitalNoiseReductionCaps)
266+
DECLARE_JSON_RPC_METHOD(getAISuperResolutionCaps)
267+
DECLARE_JSON_RPC_METHOD(getMEMCCaps)
263268

264269
/*Set API's*/
265270
DECLARE_JSON_RPC_METHOD(setBacklight)
@@ -461,6 +466,11 @@ class AVOutputTV : public AVOutputBase {
461466
tvError_t GetTVPictureModeCaps(tvPQModeIndex_t** mode, size_t* num_pic_modes, tvContextCaps_t** context_caps);
462467
tvError_t GetBacklightModeCaps(tvBacklightMode_t** backlight_mode, size_t* num_backlight_mode, tvContextCaps_t** context_caps);
463468

469+
tvError_t GetLocalContrastEnhancementCaps(int* maxLocalContrastEnhancement, tvContextCaps_t** context_caps);
470+
tvError_t GetMPEGNoiseReductionCaps(int* maxMPEGNoiseReduction, tvContextCaps_t** context_caps);
471+
tvError_t GetDigitalNoiseReductionCaps(int* maxDigitalNoiseReduction, tvContextCaps_t** context_caps);
472+
tvError_t GetAISuperResolutionCaps(int* maxAISuperResolution, tvContextCaps_t** context_caps);
473+
tvError_t GetMEMCCaps(int* maxMEMC, tvContextCaps_t** context_caps);
464474
uint32_t getCapsV2(
465475
const std::function<tvError_t(tvContextCaps_t**, int*)>& getCapsFunc,
466476
const char* key,
@@ -544,7 +554,7 @@ class AVOutputTV : public AVOutputBase {
544554
tvError_t m_lowLatencyStateStatus = tvERROR_NONE;
545555

546556
int m_maxPrecision = 0;
547-
tvContextCaps_t* m_presicionCaps = nullptr;
557+
tvContextCaps_t* m_presicionDetailCaps = nullptr;
548558
tvError_t m_presicionStatus = tvERROR_NONE;
549559

550560
int m_maxLocalContrastEnhancement = 0;

AVOutput/AVOutputTVHelper.cpp

Lines changed: 54 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1354,6 +1354,24 @@ namespace Plugin {
13541354
//LowLatencyState
13551355
m_lowLatencyStateStatus = GetLowLatencyStateCaps(&m_maxlowLatencyState, &m_lowLatencyStateCaps);
13561356

1357+
// PrecisionDetail
1358+
m_presicionStatus = GetPrecisionDetailCaps(&m_maxPrecision, &m_presicionDetailCaps);
1359+
1360+
// LocalContrastEnhancement
1361+
m_localContrastEnhancementStatus = GetLocalContrastEnhancementCaps(&m_maxLocalContrastEnhancement, &m_localContrastEnhancementCaps);
1362+
1363+
// MPEGNoiseReduction
1364+
m_MPEGNoiseReductionStatus = GetMPEGNoiseReductionCaps(&m_maxMPEGNoiseReduction, &m_MPEGNoiseReductionCaps);
1365+
1366+
// DigitalNoiseReduction
1367+
m_digitalNoiseReductionStatus = GetDigitalNoiseReductionCaps(&m_maxDigitalNoiseReduction, &m_digitalNoiseReductionCaps);
1368+
1369+
// AISuperResolution
1370+
m_AISuperResolutionStatus = GetAISuperResolutionCaps(&m_maxAISuperResolution, &m_AISuperResolutionCaps);
1371+
1372+
// MEMC
1373+
m_MEMCStatus = GetMEMCCaps(&m_maxMEMC, &m_MEMCCaps);
1374+
13571375
// Sync CMS and WB
13581376
syncCMSParams();
13591377
syncWBParams();
@@ -2802,6 +2820,12 @@ namespace Plugin {
28022820
else if (paramName == "PictureMode") caps = m_pictureModeCaps;
28032821
else if (paramName == "AspectRatio") caps = m_aspectRatioCaps;
28042822
else if (paramName == "LowLatencyState") caps = m_lowLatencyStateCaps;
2823+
else if (paramName == "PrecisionDetail") caps = m_presicionDetailCaps;
2824+
else if (paramName == "LocalContrastEnhancement") caps = m_localContrastEnhancementCaps;
2825+
else if (paramName == "MPEGNoiseReduction") caps = m_MPEGNoiseReductionCaps;
2826+
else if (paramName == "DigitalNoiseReduction") caps = m_digitalNoiseReductionCaps;
2827+
else if (paramName == "AISuperResolution") caps = m_AISuperResolutionCaps;
2828+
else if (paramName == "MEMC") caps = m_MEMCCaps;
28052829
else {
28062830
LOGERR("Unknown tr181ParamName: %s", paramName.c_str());
28072831
return nullptr;
@@ -3280,13 +3304,40 @@ tvError_t AVOutputTV::GetHueCaps(int* max_hue, tvContextCaps_t** context_caps) {
32803304
return GetCaps("Hue", max_hue, context_caps);
32813305
}
32823306

3283-
tvError_t AVOutputTV::GetPrecisionDetailCaps(int* max_precision, tvContextCaps_t** context_caps) {
3284-
return GetCaps("PrecisionDetails", max_precision, context_caps);
3285-
}
32863307
tvError_t AVOutputTV::GetLowLatencyStateCaps(int* max_latency, tvContextCaps_t ** context_caps){
32873308
return GetCaps("LowLatencyState", max_latency, context_caps);
32883309
}
32893310

3311+
// PrecisionDetail
3312+
tvError_t AVOutputTV::GetPrecisionDetailCaps(int * maxPrecision, tvContextCaps_t ** context_caps) {
3313+
return GetCaps("PrecisionDetail", maxPrecision, context_caps);
3314+
}
3315+
3316+
// LocalContrastEnhancement
3317+
tvError_t AVOutputTV::GetLocalContrastEnhancementCaps(int * maxLocalContrastEnhancement, tvContextCaps_t ** context_caps) {
3318+
return GetCaps("LocalContrastEnhancement", maxLocalContrastEnhancement, context_caps);
3319+
}
3320+
3321+
// MPEGNoiseReduction
3322+
tvError_t AVOutputTV::GetMPEGNoiseReductionCaps(int * maxMPEGNoiseReduction, tvContextCaps_t ** context_caps) {
3323+
return GetCaps("MPEGNoiseReduction", maxMPEGNoiseReduction, context_caps);
3324+
}
3325+
3326+
// DigitalNoiseReduction
3327+
tvError_t AVOutputTV::GetDigitalNoiseReductionCaps(int * maxDigitalNoiseReduction, tvContextCaps_t ** context_caps) {
3328+
return GetCaps("DigitalNoiseReduction", maxDigitalNoiseReduction, context_caps);
3329+
}
3330+
3331+
// AISuperResolution
3332+
tvError_t AVOutputTV::GetAISuperResolutionCaps(int * maxAISuperResolution, tvContextCaps_t ** context_caps) {
3333+
return GetCaps("AISuperResolution", maxAISuperResolution, context_caps);
3334+
}
3335+
3336+
// MEMC
3337+
tvError_t AVOutputTV::GetMEMCCaps(int * maxMEMC, tvContextCaps_t ** context_caps) {
3338+
return GetCaps("MEMC", maxMEMC, context_caps);
3339+
}
3340+
32903341
tvError_t AVOutputTV::GetColorTemperatureCaps(tvColorTemp_t** color_temp, size_t* num_color_temp, tvContextCaps_t** context_caps) {
32913342
LOGINFO("Entry\n");
32923343
JsonObject root;

0 commit comments

Comments
 (0)