capi: add dovi_rpu_remove_cmv40_metadata (strip CMv4.0 to CMv2.9)#400
Open
pannal wants to merge 1 commit into
Open
capi: add dovi_rpu_remove_cmv40_metadata (strip CMv4.0 to CMv2.9)#400pannal wants to merge 1 commit into
pannal wants to merge 1 commit into
Conversation
Owner
|
Seems OK after |
Exposes the existing DoviRpu::remove_cmv40_extension_metadata() via the C API, mirroring dovi_rpu_add_cmv40_safe_default_metadata. Strips CMv4.0 extension metadata from a parsed RPU, leaving a CMv2.9-only RPU; no-op if CMv4.0 is not present. Returns 0 on success, -1 on error, following the dovi_rpu_remove_mapping convention. Consumer: CoreELEC/Kodi on Amlogic, for old DV TVs that fail to fall back from CMv4.0 and black-screen on CMv4.0 content.
86a742a to
17ebb13
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Exposes the existing
DoviRpu::remove_cmv40_extension_metadata()through the C API. It mirrorsdovi_rpu_add_cmv40_safe_default_metadatafrom #393.It strips the CMv4.0 extension metadata from a parsed RPU and leaves a CMv2.9-only RPU. No-op when no CMv4.0 is present. Returns
0on success and-1on error, same asdovi_rpu_remove_mapping.Why
On Amlogic (CoreELEC/Kodi), some old Dolby Vision TVs do not fall back from CMv4.0 and just black-screen on CMv4.0 content. Handing them a plain CMv2.9 RPU (parse, remove, write back) gets them a picture, and it keeps the bitstream work inside libdovi like the append path does.
Notes
remove_cmv40_extension_metadata()already exists and is covered by the editor--remove-cmv4path (rpu::editor::remove_cmv4). Nothing existing changes.cargo build --features capiandcargo test --no-default-features --features internal-font --test mod editor(8/8, includingremove_cmv4).add_*/remove_*naming, but rename it if you would rather, same as add dovi_rpu_set_cmv40_default for appending CMv4.0 to CMv2.9 RPUs #393.