sabaatworld / HyperionScreenCap

Screen capture program for Hyperion ambilight. Updated to support DirectX 11, multiple displays and multiple Hyperion servers.
MIT License
118 stars 18 forks source link

DirectX11 messes with HDR #36

Open oepoemoepoe opened 4 years ago

oepoemoepoe commented 4 years ago

When using the DirectX11 mode, it somehow discards HDR. I have non-HDR coloring (e.g. red turns to orange and everything is brighter). This does not occur in DirectX9 mode or when ScreenCap is turned off. I am using MPC-BE with madVR to play a 4K HDR movie.

What might be the reason? I am happy to try out any suggestions. Thanks!

sabaatworld commented 4 years ago

Even with HDR, I remember noticing that it would record screen in 8-bit color instead of 10-bit. Maybe there's an API for DirectX that supports 10-bit.

oepoemoepoe commented 4 years ago

Are you talking about DirectX9 oder 11 mode? Wouldn't that mean that the colors sent to Hyperion are terribly wrong? They did not seem noticeably wrong to me...

sabaatworld commented 4 years ago

I believe in both modes, the colors are being sent as 8-bit. The API used to capture the screen in either mode return 8-bit image, even if the screen is running in HDR mode.

If now they have added some APIs to capture HDR and Hyperion supports 10-bit colors, we can try to find some way to send it over, but I'm not sure about either of those.

pho084 commented 4 years ago

Hi

i too have noticed all kind of weird behaviour with HDR and Hyp.Screen Cap. It seems that while HSC is running as soon as an application tries to go exclusive-full-screen said application's "handling" of the HDR metadata is overwritten and windows desktop settings kick in.

to reproduce this: when windows HDR is enabled and i run an application with HDR support (e.g. a game) and then enable ScreenCap from within the game, the screen will "add" windows HDR "on top" of the game settings resulting in a overly bright / saturated image or washed out colors.

This only occurs in fullscreen mode though (bc. windowed/borderless uses desktop settings anyway).

So it would be great if HSC supported HDR-full screen.

(the only app that i found which kind of circumvents this issue for video-playback is the experimental kodi-19-matrix with hdr support if you enable "refresh rate / resolution change on playback" and have HSC running beforehand. I haven't found a workaround for games demanding full-screen mode though)

sabaatworld commented 3 years ago

I'm not sure if I understand the HDR metadata part. Can you please explain?

ClassicGOD commented 3 years ago

I believe in both modes, the colors are being sent as 8-bit. The API used to capture the screen in either mode return 8-bit image, even if the screen is running in HDR mode.

If now they have added some APIs to capture HDR and Hyperion supports 10-bit colors, we can try to find some way to send it over, but I'm not sure about either of those.

Hi, total DX noob here but I noticed HDR colors being washed out so I came here to check if there is a solution in the works. From my research IDXGIOutput5::DuplicateOutput1 allows you to select output format including 10bit ones. I don't think Hyperion supports 10bit formats so probably the grabber would have to do some tone mapping. There is a fork of Hyperion - https://github.com/awawa-dev/HyperHDR that aims to correct washed out images but only for USB Grabbers at this moment.

ktaeleman commented 1 year ago

I've opened a pull request that fixes HDR mode DX11 Capture.

https://github.com/sabaatworld/HyperionScreenCap/pull/61