Skip to content

DV P5 displaying a green-purple color shift #176

Closed

Description

@ijuniorfu

What happened?

Image

Steps to reproduce

No response

AetherEngine version or commit SHA

3e6bdbc

Host app

AetherPlayer

Platform

macOS

OS version

macOS 26.5.1

Device / chip

Mac mini m4

Playback path

Software (dav1d) host

Source media (for playback bugs)

MKV, HEVC, Dolby Vision Profile5, 3840x2160

Image

Error codes / log lines


Anything else

p5.error.log.txt

Activity

  1. added
    bug
    on Jul 21, 2026
  2. DrHurt commented on Jul 21, 2026

    @DrHurt
    Contributor

    P5 cannot be correctly decoded by software path as it has no HDR10/HLG fallback layer like P8.x

    Why are you using the software path with P5?

  3. ijuniorfu commented on Jul 21, 2026

    @ijuniorfu
    Author

    P5 cannot be correctly decoded by software path as it has no HDR10/HLG fallback layer like P8.x

    Why are you using the software path with P5?

    I don't know, but this video will be like this. The other p5 is hardware

  4. DrHurt commented on Jul 21, 2026

    @DrHurt
    Contributor

    So you’re saying you’re not manually forcing software decode then…

    Odd. This is a routing bug then! HEVC P5 should always go down the native AVPlayer pipeline.

    Let’s see what Vincent has to say. Might have to do with the recent VT probe changes.

  5. added a commit that references this issue on Jul 21, 2026
  6. superuser404notfound commented on Jul 21, 2026

    @superuser404notfound
    Owner

    Fixed in 5.17.5 (PR #182).

    DrHurt called it: this was a routing bug, and it traces back to the VideoToolbox capability probe added for #2. That probe asks VT whether it can hardware-decode the stream by building a plain HEVC format description from the raw hvcC config record. For DV Profile 5 that question is misleading: the native path does not play the bare hvcC, it remuxes to dvh1 + dvcC and Apple's system DV decoder handles it. VT rejects the bare P5 hvcC with -12906, so the probe reported "not hardware-decodable" even on your M4 (your log: canHardwareDecode codec=173 3840x2160 -> false (status=-4)), and the #2 fallback routed the file to the software host. libavcodec then decoded the IPT-PQ-c2 signal as regular YCbCr, which is exactly the green and purple cast in your screenshot. Whether VT happens to accept the bare hvcC varies with the file's exact config record, which is why your other P5 file stayed on the hardware path.

    Since Profile 5 has no HDR10/HLG/SDR-compatible base layer, the software path can never render it with correct color, so 5.17.5 exempts P5 from that probe entirely: HEVC streams whose Dolby Vision configuration says profile 5 now always stay on the native AVPlayer path (the probe is not even run for them). P7 and P8.x keep the fallback since their base layer decodes with correct color in software.

    AetherPlayer main is already bumped to 5.17.5 (8b6f432). Could you retest with that? Expected: the file from the report plays on the hardware path with correct color, and Stats shows VideoToolbox HEVC (HW) instead of libavcodec HEVC (SW).

  7. DrHurt commented on Jul 21, 2026

    @DrHurt
    Contributor

    I’m worried about this probe causing false negatives in the future and causing compatible files to fail.

    Would it not be worth removing the probe and reducing unnecessary checks? (Unless other functionality is gated on it)

  8. added a commit that references this issue on Jul 21, 2026
  9. superuser404notfound commented on Jul 21, 2026

    @superuser404notfound
    Owner

    Fair concern, but removing the probe would regress the case it was built for, which is your Intel Mac mini report (#2 in the AetherPlayer tracker): H.264 High 4:2:2/4:4:4/High-10 and HEVC Rext reach readyToPlay on the native path and then render nothing, because AVPlayer has no software decoder fallback the way QuickTime does. The probe is what routes those to libavcodec so they play at all. It stays VOD-only and treats anything it cannot classify (missing or Annex-B extradata, format description failure) as native, so it only ever acts on a definite VT rejection.

    What the P5 bug actually exposed was narrower than "the probe produces false negatives": for every non-DV stream, the probe tests exactly the hvcC/avcC that the native remux plays, so its answer is representative. DV was the one case where the probed route (bare hvcC as plain HEVC) and the played route (dvh1 + dvcC through Apple's DV decoder) diverge, and that divergence is now closed: P5 skips the probe entirely as of 5.17.5.

    I also just released 5.18.0, which closes the class of failure structurally rather than per-trigger: IPT-only DV (HEVC P5, and AV1 Profile 10.0, which has the same no-base-layer shape) can no longer start on the software path through any route (forward-only sources included). If it ever would, the load fails with a clear "requires a hardware playback path" error instead of playing green and purple.

    So the worst a future false negative can do now is an unnecessary software decode of a stream the software path renders with correct color, it costs CPU, never correctness. Given that, I'd rather keep the black-screen protection than trade it for one fewer probe. If a concrete file ever shows the probe misjudging a non-DV format, that would be a bug report I'd want, the canHardwareDecode log line makes it easy to spot.

  10. ijuniorfu commented on Jul 22, 2026

    @ijuniorfu
    Author

    It has been resolved; the display is normal.

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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions