Skip to content

[bug] Replan skips DV Profile 8.1 to HDR10 fallback after native-DV decoder failure #652

Closed

Description

@tomislav

What happened

Playback Protocol v3 can skip a valid Dolby Vision Profile 8.1 to HDR10 fallback after a native-Dolby-Vision plan fails.

This was observed while investigating #648, but it is independent of Safari's HTTP transport. Any client/output route that advertises both native DV Profile 8 and HDR10 can encounter it after the native-DV recipe reports a decoder failure.

Reproduction conditions

  • Source dynamic range: Dolby Vision
  • Source profile: 8
  • Dolby Vision level: 6
  • Base-layer compatibility ID: 1
  • Client advertises native DV Profile 8 support
  • Client also advertises HDR10 support within the source's resolution, frame-rate, and bitrate bounds
  • Server has the validated DV RPU strip transformation
  • Per-source RPU probe returns can_strip=true
  • The native-DV preserve plan's plan_attempt_key is included in the replan's attempted keys

Actual behavior

The initial plan correctly preserves native Dolby Vision.

After the client reports decoder_error, the replan excludes that exact attempted plan but returns:

{
  "outcome": "adaptation_unavailable",
  "terminal": {
    "reason": "hdr_transcode_unsupported",
    "message": "This HDR source requires video encoding, but no validated HDR-preserving or tone-map recipe is installed.",
    "retryable": false
  }
}

No DV-to-HDR10 strip plan is attempted, despite the client supporting HDR10 and the source being confirmed strippable.

Expected behavior

Once the native-DV preserve recipe has failed for the current output route, the planner should select a distinct server remux recipe that strips the Dolby Vision RPU and preserves the compatible HDR10 base layer.

The fallback plan should have:

  • A different plan_id and plan_attempt_key
  • Effective dynamic range hdr10
  • The validated server DV-to-HDR10 transformation
  • An HDR10 video claim
  • A degradation warning explaining that Dolby Vision metadata was removed

Only after both the native-DV and valid HDR10-remux alternatives are exhausted or unavailable should the planner return a terminal.

Root cause

The planner correctly determines that the Profile 8.1 source is eligible for an HDR10 strip:

return source.DVProfile == 7 ||
    source.DVProfile == 8 && source.DVBLCompatID == 1

However, construction of the strip recipe is gated by:

dvStrip := dvStripEligible && (source.DVProfile == 7 || !rangeOK)

The client still advertises native DV support during replanning, so rangeOK remains true even though the native-DV recipe just failed. For Profile 8, dvStrip therefore remains false.

The attempted-key check excludes the failed native-DV plan, but it does not make the alternate HDR10 recipe eligible. Planning then falls through to hdr_transcode_unsupported.

Suggested fix

Model native-DV preservation and DV-to-HDR10 stripping as separately enumerable candidates.

For a Profile 8.1 source, allow the strip candidate when:

  • native DV is not eligible, or
  • the corresponding native-DV preserve plan has already been attempted for this output context.

Do not remove the client's general DV capability claim globally; the failure belongs to the attempted recipe/output route. The alternate plan already has a distinct identity because its transformation list and effective dynamic range differ.

Regression coverage

Add a planner/replan test with:

DV P8.1 source with BL compatibility ID 1
+ output supports native DV P8 and HDR10
+ server strip transformation available
+ source RPU is strippable
+ native-DV preserve plan_attempt_key already attempted
=> select DV-to-HDR10 remux

Also verify:

  1. The fallback key differs from the failed preserve key.
  2. The fallback effective range and claims are HDR10.
  3. A second failure exhausts the HDR10 recipe instead of retrying it indefinitely.
  4. A non-strippable source still returns the appropriate conversion terminal.
  5. A client without HDR10 support does not receive this fallback.

Related

AI involvement in this report

AI-assisted; the real playback failure, route events, normalized capabilities, replan response, and RPU strip result were human verified.

AI tool + model

OpenAI Codex / GPT-5

Confirmations

  • Reproduced on a real deployment
  • Verified the client advertised both native DV and HDR10
  • Verified the source RPU was strippable
  • Verified the replan returned hdr_transcode_unsupported
  • Deployment-specific names and paths have been removed

Activity

  1. added
    bug
    triaged
    and removed
    triaged
    on Sep 20, 2026
  2. added theissue type on Sep 20, 2026
  3. removed
    bug
    on Sep 20, 2026
  4. added a commit that references this issue on Sep 27, 2026
    1149439
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions