@@ -32,36 +32,6 @@ static bool m_isDalsEnabled = false;
32
32
namespace WPEFramework {
33
33
namespace Plugin {
34
34
35
- tvContentFormatType_t AVOutputTV::getContentFormatIndex (tvVideoHDRFormat_t formatToConvert)
36
- {
37
- /* default to SDR always*/
38
- tvContentFormatType_t ret = tvContentFormatType_NONE;
39
- switch (formatToConvert) {
40
- case tvVideoHDRFormat_HLG:
41
- ret = tvContentFormatType_HLG;
42
- break ;
43
-
44
- case tvVideoHDRFormat_HDR10:
45
- ret = tvContentFormatType_HDR10;
46
- break ;
47
-
48
- case tvVideoHDRFormat_HDR10PLUS:
49
- ret = tvContentFormatType_HDR10PLUS;
50
- break ;
51
-
52
- case tvVideoHDRFormat_DV:
53
- ret = tvContentFormatType_DOVI;
54
- break ;
55
-
56
- case tvVideoHDRFormat_SDR:
57
- case tvVideoHDRFormat_NONE:
58
- default :
59
- ret = tvContentFormatType_SDR;
60
- break ;
61
- }
62
- return ret;
63
- }
64
-
65
35
int AVOutputTV::getPictureModeIndex (std::string pqparam)
66
36
{
67
37
int index = -1 ;
@@ -265,14 +235,19 @@ namespace Plugin {
265
235
int AVOutputTV::getDolbyModeIndex (const char * dolbyMode)
266
236
{
267
237
int mode = 0 ;
268
- tvDolbyMode_t dolbyModes[tvMode_Max];
269
- tvDolbyMode_t *dolbyModesPtr = dolbyModes; // Pointer to statically allocated tvDolbyMode_t array
238
+ tvDolbyMode_t dolbyModes[tvMode_Max] = { tvDolbyMode_Invalid } ;
239
+ tvDolbyMode_t *dolbyModesPtr[tvMode_Max] = { 0 };
270
240
unsigned short totalAvailable = 0 ;
271
241
242
+ for (int i = 0 ; i < tvMode_Max; i++)
243
+ {
244
+ dolbyModesPtr[i] = &dolbyModes[i];
245
+ }
246
+
272
247
// Set an initial value to indicate the mode type
273
248
dolbyModes[0 ] = tvDolbyMode_Dark;
274
249
275
- tvError_t ret = GetTVSupportedDolbyVisionModes (& dolbyModesPtr, &totalAvailable);
250
+ tvError_t ret = GetTVSupportedDolbyVisionModes (dolbyModesPtr, &totalAvailable);
276
251
if (ret == tvERROR_NONE) {
277
252
for (int count = 0 ; count < totalAvailable; count++) {
278
253
if (strncasecmp (dolbyMode, getDolbyModeStringFromEnum (dolbyModes[count]).c_str (), strlen (dolbyMode))==0 ) {
@@ -925,26 +900,6 @@ namespace Plugin {
925
900
return ret;
926
901
}
927
902
928
- tvContentFormatType_t AVOutputTV::convertFormatStringToTVContentFormat (const char *format)
929
- {
930
- tvContentFormatType_t ret = tvContentFormatType_SDR;
931
-
932
- if ( strncmp (format," sdr" ,strlen (format)) == 0 || strncmp (format," SDR" ,strlen (format)) == 0 ) {
933
- ret = tvContentFormatType_SDR;
934
- }
935
- else if ( strncmp (format," hdr10" ,strlen (format)) == 0 || strncmp (format," HDR10" ,strlen (format))==0 ) {
936
- ret = tvContentFormatType_HDR10;
937
- }
938
- else if ( strncmp (format," hlg" ,strlen (format)) == 0 || strncmp (format," HLG" ,strlen (format)) == 0 ) {
939
- ret = tvContentFormatType_HLG;
940
- }
941
- else if ( strncmp (format," dolby" ,strlen (format)) == 0 || strncmp (format," DOLBY" ,strlen (format)) == 0 ) {
942
- ret=tvContentFormatType_DOVI;
943
- }
944
-
945
- return ret;
946
- }
947
-
948
903
tvError_t AVOutputTV::updateAVoutputTVParamToHAL (std::string forParam, paramIndex_t indexInfo, int value,bool setNotDelete)
949
904
{
950
905
tvError_t ret = tvERROR_NONE;
@@ -1654,32 +1609,6 @@ namespace Plugin {
1654
1609
return 0 ;
1655
1610
}
1656
1611
1657
- int AVOutputTV::ConvertHDRFormatToContentFormat (tvhdr_type_t hdrFormat)
1658
- {
1659
- int ret=tvContentFormatType_SDR;
1660
- switch (hdrFormat)
1661
- {
1662
- case HDR_TYPE_SDR:
1663
- ret=tvContentFormatType_SDR;
1664
- break ;
1665
- case HDR_TYPE_HDR10:
1666
- ret=tvContentFormatType_HDR10;
1667
- break ;
1668
- case HDR_TYPE_HDR10PLUS:
1669
- ret=tvContentFormatType_HDR10PLUS;
1670
- break ;
1671
- case HDR_TYPE_DOVI:
1672
- ret=tvContentFormatType_DOVI;
1673
- break ;
1674
- case HDR_TYPE_HLG:
1675
- ret=tvContentFormatType_HLG;
1676
- break ;
1677
- default :
1678
- break ;
1679
- }
1680
- return ret;
1681
- }
1682
-
1683
1612
void AVOutputTV::getDimmingModeStringFromEnum (int value, std::string &toStore)
1684
1613
{
1685
1614
const char *color_temp_string[] = {
0 commit comments