Skip to content

Commit

Permalink
stop restricting videos based on bitdepth
Browse files Browse the repository at this point in the history
  • Loading branch information
cewert committed Oct 15, 2024
1 parent 3fbe253 commit 2166735
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 39 deletions.
39 changes: 2 additions & 37 deletions source/utils/deviceCapabilities.bs
Original file line number Diff line number Diff line change
Expand Up @@ -416,12 +416,7 @@ end function
function getCodecProfiles() as object
myGlobal = m.global
globalUserSettings = myGlobal.session.user.settings
displayMaxBitDepth = myGlobal.device.videoBitDepth
if displayMaxBitDepth = invalid
displayMaxBitDepth = "8"
else
displayMaxBitDepth = displayMaxBitDepth.toStr()
end if

codecProfiles = []
profileSupport = {
"h264": {},
Expand Down Expand Up @@ -631,12 +626,6 @@ function getCodecProfiles() as object
"Value": "true",
"IsRequired": false
},
{
"Condition": "LessThanEqual",
"Property": "VideoBitDepth",
"Value": "8",
"IsRequired": false
},
{
"Condition": "EqualsAny",
"Property": "VideoProfile",
Expand Down Expand Up @@ -696,13 +685,7 @@ function getCodecProfiles() as object
"Property": "VideoLevel",
"Value": mpeg2Levels.join("|"),
"IsRequired": false
},
{
"Condition": "LessThanEqual",
"Property": "VideoBitDepth",
"Value": displayMaxBitDepth,
"IsRequired": false
},
}
]
}

Expand Down Expand Up @@ -738,12 +721,6 @@ function getCodecProfiles() as object
"Type": "Video",
"Codec": "av1",
"Conditions": [
{
"Condition": "LessThanEqual",
"Property": "VideoBitDepth",
"Value": displayMaxBitDepth,
"IsRequired": false
},
{
"Condition": "EqualsAny",
"Property": "VideoProfile",
Expand Down Expand Up @@ -803,12 +780,6 @@ function getCodecProfiles() as object
"Type": "Video",
"Codec": "hevc",
"Conditions": [
{
"Condition": "LessThanEqual",
"Property": "VideoBitDepth",
"Value": displayMaxBitDepth,
"IsRequired": false
},
{
"Condition": "NotEquals",
"Property": "IsAnamorphic",
Expand Down Expand Up @@ -878,12 +849,6 @@ function getCodecProfiles() as object
"Type": "Video",
"Codec": "vp9",
"Conditions": [
{
"Condition": "LessThanEqual",
"Property": "VideoBitDepth",
"Value": displayMaxBitDepth,
"IsRequired": false
},
{
"Condition": "EqualsAny",
"Property": "VideoProfile",
Expand Down
2 changes: 0 additions & 2 deletions source/utils/globals.bs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ end sub
' Save information from roDeviceInfo to m.global.device
sub SaveDeviceToGlobal()
deviceInfo = CreateObject("roDeviceInfo")
displayProperties = deviceInfo.GetDisplayProperties()

' remove special characters
regex = CreateObject("roRegex", "[^a-zA-Z0-9\ \-\_]", "")
Expand Down Expand Up @@ -99,7 +98,6 @@ sub SaveDeviceToGlobal()
end if
videoWidth = heightToWidth[videoHeight]
if extraData <> invalid and extraData = "b10" then bitDepth = 10
if bitDepth = 8 and displayProperties.HdrSeamless then bitDepth = 10
if videoHeight = "4320" then bitDepth = 12

m.global.addFields({
Expand Down

0 comments on commit 2166735

Please sign in to comment.