After playing an HDR video on iPhone for a while, the HDR effect disappears and the screen brightness decrease

When i use AVPlayer to obtain the video frame CVPixelBufferRef of an HDR video, and use AVSampleBufferDisplayLayer to display it on the screen, after a period of time, the HDR video content and screen gradually darken, losing the HDR effect.

Steps to reproduce:

  1. Create an AVPlayer to loop an HDR video, specify the video frame format as kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange
  2. Create a timer to get the video frame CVPixelBufferRef at 30 frames per second
  3. Use AVSampleBufferDisplayLayer to display CVPixelBufferRef on the screen
  4. Don't operate the phone, wait for a period of time (such as 40 minutes), the HDR effect disappears and the screen darkens

Note:

  1. You need to use an iPhone device, iOS 18.5 and below operating system
  2. You need to ensure that the HDR video is played in a loop, that is, to ensure that the screen continues to display HDR content, wait for a period of time, depending on different devices, you need to wait for 20-40 minutes.
  3. In the iPhone Photos app,the same problem will occur after playing HDR video in a loop for a long time

Expected Results:

When rendering HDR content for a long time, it is guaranteed that there is always an HDR effect, and the HDR content and screen will not be darkened.

Current Results:

After about 20-40 minutes, the HDR effect disappears and the screen darkens.

Why does it work fine on iPad devices, such as iPad Pro 12.9-Inch 5G, but not on any iPhone?

I provided my test project in the bug report FB18502486.

My question is why in my iPhone (eg iPhone15, iPhone 12 Pro, etc..), when i loop an HDR video in Photos APP or display HDR content on the screen via AVSampleBufferDisplayLayer, just wait after 20-40 minutes, the display will dim and the current EDRHeadroom will be reduced gradually, and the operating system will tonemap it to SDR. However, this issue does not occur on the iPad.

Note: the screen brightness don't decrease,but as as the current EDRHeadroom is reduced, the display will gradually dim, and the HDR content will eventually be tone-mapped to SDR by the operating system.

After playing an HDR video on iPhone for a while, the HDR effect disappears and the screen brightness decrease
 
 
Q