Dolby Vision profile 5 is common, and on an Android TV box or phone without a Dolby Vision decoder it plays green and purple. Here is how Yonto…
Dolby Vision profile 5 is common, and on an Android TV box or phone without a Dolby Vision decoder it plays green and purple. Here is how Yonto Player draws them with the right colours anyway, on top of media3 (ExoPlayer), with the GPU doing the colour work. Why profile 5 is the hard one Profile 8 carries an HDR10, HLG or SDR picture under the Dolby Vision layer, so a device that knows nothing about Dolby Vision can still show something sensible. Profile 5 has no such fallback.
The picture is coded in Dolby's own IPT-PQ-c2 colour space, and every frame carries an RPU (Reference Processing Unit) with the metadata that turns it back into light. Skip the RPU and decode it as plain HEVC, and you are looking at IPT values as if they were YCbCr, which is where the green and purple come from. media3 maps Dolby Vision profiles 4, 8 and 9 to an HEVC decoder when no Dolby Vision decoder is present.
Profile 5 it leaves alone, which makes sense, since there is no base layer to show. So on most phones and many TV boxes it finds no decoder at all. The plan If the device has a Dolby Vision decoder, use it, as before. Otherwise decode the track as HEVC Main 10. Read each frame's RPU on its way into the decoder. Have the decoder render into a SurfaceTexture instead of the screen. Apply the RPU on the GPU, tone-map to SDR, and draw to the screen.
Choosing the decoder The video renderer is media3's MediaCodecVideoRenderer with getDecoderInfos overridden. media3's own choice comes first, so a real Dolby Vision decoder always wins. Only when that list is empty and the track is profile 5 (codecs dvhe.05 or dvh1.05) does it fall back to the plain HEVC decoders, keeping only those whose capabilities list the Main 10 profile (or list nothing, which some decoders do). The codec is then configured as HEVC with KEY_PROFILE set to Main 10.
Reading the RPU The RPU travels as an HEVC NAL unit of type 62, whose two-byte header is 7C 01. In onQueueInputBuffer the renderer looks at each access unit just before it goes to the decoder, finds the last RPU in it from the end, strips the emulation-prevention bytes, checks its CRC-32 and parses it. The parser is plain Kotlin in the shared core, since nothing in it is Android's. Two things make this harder than it sounds.
This is a source-linked briefing. Read the original report from Dev Community .