Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Widen support for HEVC Main 10 #3281

Merged
merged 3 commits into from
Jan 27, 2024

Conversation

lawadr
Copy link
Contributor

@lawadr lawadr commented Jan 4, 2024

Previously the HEVC codec profile only flagged support for HEVC Main 10 when MediaCodec advertised its support for level 5 (main tier) or above. This meant devices that support only levels 4 or 4.1 (such as the Chromecast with Google TV HD) would transcode HEVC Main 10 content even when supported.

This change lowers the requirement from level 5 to level 4 and also adds additional profiles specifically for HEVC Main and Main 10 with conditions on the level so that levels beyond what is supported by MediaCodec get transcoded.

The result is that HEVC Main 10 level 5 videos get transcoded on devices supporting only 4.1, but HEVC Main 10 level 4.1 content plays back directly.

Previously the HEVC codec profile only flagged support for HEVC Main 10
when MediaCodec advertised its support for level 5 (main tier) or above.
This meant devices that support only levels 4 or 4.1 (such as the
Chromecast with Google TV HD) would transcode HEVC Main 10 content even
when supported.

This change lowers the requirement from level 5 to level 4 and also adds
additional profiles specifically for HEVC Main and Main 10 with
conditions on the level so that levels beyond what is supported by
MediaCodec get transcoded.

The result is that HEVC Main 10 level 5 videos get transcoded on devices
supporting only 4.1, but HEVC Main 10 level 4.1 content plays back
directly.
}
}

private fun getDecoderLevel(mime: String, profile: Int) : Int {

Check warning

Code scanning / detekt

Excessive nesting leads to hidden complexity. Prefer extracting code to make it easier to understand. Warning

Function getDecoderLevel is nested too deeply.
@nielsvanvelzen nielsvanvelzen added the enhancement New feature or request label Jan 20, 2024
@nielsvanvelzen nielsvanvelzen added this to the v0.17.0 milestone Jan 27, 2024
@nielsvanvelzen nielsvanvelzen added the backportable Change may be backported to a point release (remove label once cherrypicked) label Jan 27, 2024
@nielsvanvelzen nielsvanvelzen enabled auto-merge (rebase) January 27, 2024 11:05
@nielsvanvelzen
Copy link
Member

Thank you!

@nielsvanvelzen nielsvanvelzen merged commit d466420 into jellyfin:master Jan 27, 2024
4 checks passed
@nielsvanvelzen nielsvanvelzen removed the backportable Change may be backported to a point release (remove label once cherrypicked) label Feb 11, 2024
@nielsvanvelzen nielsvanvelzen modified the milestones: v0.17.0, v0.16.5 Feb 11, 2024
@nielsvanvelzen nielsvanvelzen modified the milestones: v0.16.5, v0.16.6 Feb 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants