hyperion-project / hyperion.ng

The successor to Hyperion aka Hyperion Next Generation
https://hyperion-project.org/
MIT License
2.95k stars 370 forks source link

HDR tone mapping and FPS software limit feature... partially implemented. #927

Closed awawa-dev closed 3 years ago

awawa-dev commented 3 years ago

final_lut_fps_limit_2020_08_01_patch.diff.txt lut_rgb.zip

Feature request

What problem does this feature solve?

Using most of the video grabbers or matrix/scallers with HDR content causes color degradation (bleak colors). We can't repair the hardware but we can somehow corrected it using 3D LUT HDR to SDR tone mapping.

HDR test file: "HDR10-Sony-Bravia-OLED demo" (before and after) 03 03-corrected 07 07-corrected 08 08-corrected 12 12-corrected 25 25-corrected 28 28-corrected

Clipboard01

What does the proposed API look like?

I've prepared patch using solution from fast-hdr project. The attached RGB LUT file (lut_rgb.3d) must be present in the Hyperion configuration folder. There is also new settings that allows skipping frames to save resources.

Are you willing to work on this yourself?

Yes, it's already implemented.

AalianKhan commented 3 years ago

Is this related to this problem I am having? #822

awawa-dev commented 3 years ago

Is this related to this problem I am having? #822

It's hard to say. I would need screenshots from Hyperion www capture live preview to see if it can help. The translation used in that particular 3d lut matrix is for bt2020 in bt709 colorspace (bt709 is used in modern 1080p/4k grabbers/splitters/scalers/matrix et, even though that they can't handle bt2020 correctly). Older analog devices could use different colorspace (for ex. I suppose that utv007 clones are using bt601 for pal/secam, my old clone doesn't handle bt2020/HDR signal at all).

AalianKhan commented 3 years ago

Hey @awawa-dev What screenshots do you need? My particular setup includes a wled instance with a raspberry Pi 3 and a Logitech C270. I'm not a programer as such but I am was just wondering if it is possible for Hyperion to auto correct the colors. For example a wizard comes up and you show a picture of red, then Hyperion knows the value should be red but it may not see red so it assigns the color of sees and sends red to the LEDs. Again I am not a programer so I am not sure.

awawa-dev commented 3 years ago

You can send me (on private message on hyperion-project.org forum, user: awawa) screenshots from this Hyperion preview section, but as I wrote before it means to solve bt2020 in bt709 issues and positive result will be a lucky shot (using cameras it's an analog solution and too much interferences could play significant distortion, different results for day/night): image

If anyone wants to test results you can send me your screens too. But please verify on 100% that the captured content is BT2020, I have attached in the first post how it will possible look (otherwise that test will say nothing).

arifroni commented 3 years ago

Hello, i have been looking for a solution for 4K hdr setup. I am thinking of buying a HDFURY Dr.HDMI 4K. this way i plan to use a constant sync for my AVR/shield. then i want to use a splitter (out1: 4K HDR (to TV) & out2: 1080p HDR to some grabber (any suggestion would be nice)). problem is with the HDR signal in the pi.

then i came across to this thread and now i am asking would my setup will solve the HDR issue if i use the HDR>SDR LUT? what is mjpeg capture device? any suggestion? amazon.de link would be nice.