Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Colors reversed with hdmi devices #127

Open
grmilbrand opened this issue Feb 1, 2025 · 14 comments
Open

Colors reversed with hdmi devices #127

grmilbrand opened this issue Feb 1, 2025 · 14 comments

Comments

@grmilbrand
Copy link

grmilbrand commented Feb 1, 2025

I have an LG OLED55C6P and running PicCap and HyperHDR on the tv's WebOS 3.4.
The video preview looks fine when it's direct from the TV (menu bars), but when I have an input device plugged in like a ShieldTV 2015 or an Onn Streaming box, the colors are reversed in the live preview. (Blue is Red)

@satgit62
Copy link

satgit62 commented Feb 1, 2025

I have an LG OLED55C6P and running PicCap and HyperHDR on the tv's WebOS 3.4. The video preview looks fine when it's direct from the TV (menu bars), but when I have an input device plugged in like a ShieldTV 2015 or an Onn Streaming box, the colors are reversed in the live preview. (Blue is Red)

Hi, have you switched on the HDMI ULTRA HD Deep Colour option on your TV's HDMI IN? Can you post a HyperHDR log?
What versions of PicCap and HyperHDR are you using?
Image

@grmilbrand
Copy link
Author

yes, all three inputs are set to UltraHD Deep Color.
The TV colors are fine but anything thru HDMI is wrong.
live preview:
Image
actual TV image:
Image

Log File:
2025-02-01T09:00:54.829Z [CORE] TTY is not attached to the log output 2025-02-01T09:00:54.858Z [MAIN] Database path: '/home/root/.hyperhdr/db/hyperhdr.db', readonlyMode = disabled 2025-02-01T09:00:54.858Z [MAIN] Starting HyperHdr - 20.0.0.0, (HEAD detached at v20.0.0.0) (awawa-dev-9e960c9/52f12b4-1711236142), built: Mar 28 2024:19:17:18 2025-02-01T09:00:54.858Z [MAIN] Set user data path to '/home/root/.hyperhdr' 2025-02-01T09:00:54.858Z [INSTANCE_CFG] Loading instance configuration 2025-02-01T09:00:54.870Z [DB] Database opened: /home/root/.hyperhdr/db/hyperhdr.db 2025-02-01T09:00:54.963Z [INSTANCE_CFG] Settings database initialized 2025-02-01T09:00:54.974Z [SOUND_GRABBER] Sound device is disabled 2025-02-01T09:00:55.002Z [DAEMON] The AVF grabber can not be instantiated, because it has been left out from the build 2025-02-01T09:00:55.002Z [DAEMON] The MF grabber can not be instantiated, because it has been left out from the build 2025-02-01T09:00:55.002Z [DAEMON] !The v4l2 grabber can not be instantiated, because it has been left out from the build 2025-02-01T09:00:55.020Z [DAEMON] The USB grabber was disabled during build. FlatbufferServer now controlls the HDR state. 2025-02-01T09:00:55.021Z [JSONSERVER] (JsonServer.cpp:26) Created new instance 2025-02-01T09:00:55.023Z [JSONSERVER] Started on port 19444 2025-02-01T09:00:55.025Z [SSDP] (SSDPHandler.cpp:31) SSDPHandler is initialized 2025-02-01T09:00:55.008Z [HYPERHDR0] Starting the instance 2025-02-01T09:00:55.008Z [INSTANCE_CFG0] Loading instance configuration 2025-02-01T09:00:55.009Z [DB] Database opened: /home/root/.hyperhdr/db/hyperhdr.db 2025-02-01T09:00:55.088Z [INSTANCE_CFG0] Settings database initialized 2025-02-01T09:00:55.088Z [COMPONENTCTRL0] (ComponentController.cpp:31) ComponentController is initialized. Components are ENABLED 2025-02-01T09:00:55.094Z [MUXER0] (Muxer.cpp:55) Muxer initialized 2025-02-01T09:00:55.095Z [BLACKBORDER] Set mode to: default 2025-02-01T09:00:55.095Z [COMPONENTCTRL0] Blackborder detector: enabled 2025-02-01T09:00:55.095Z [IMAGETOLED_MNG0] (ImageToLedManager.cpp:192) Set LED mapping type to advanced 2025-02-01T09:00:55.095Z [IMAGETOLED_MNG0] (ImageToLedManager.cpp:176) setSparseProcessing to 1 2025-02-01T09:00:55.095Z [IMAGETOLED_MNG0] (ImageToLedManager.cpp:103) ImageToLedManager initialized 2025-02-01T09:00:55.097Z [COLORSPACE_CALIBRATION0] classicMode: yes, gammas:[1.50, 1.50, 1.50], saturation: 1.00, luminance: 1.00, backLight: [enabled, threshold: 1, colored: yes] 2025-02-01T09:00:55.097Z [LED_CALIBRATION0] (LedCalibration.cpp:101) Calibration config '0' for LED segment: [0, 99] 2025-02-01T09:00:55.101Z [HYPERHDR0] Led strip RGB order is: rgb 2025-02-01T09:00:55.102Z [SMOOTHING0] High resolution clock is NOT STEADY! 2025-02-01T09:00:55.102Z [SMOOTHING0] Clearing queued colors before: enabling 2025-02-01T09:00:55.102Z [SMOOTHING0] Smoothing queue is cleared 2025-02-01T09:00:55.102Z [COMPONENTCTRL0] Smoothing: enabled 2025-02-01T09:00:55.102Z [SMOOTHING0] Creating config (0) => type: Alternative, dirMode: false, pause: false, settlingTime: 150ms, interval: 20ms (50Hz), antiFlickTres: 32, antiFlickStep: 2, antiFlickTime: 250 2025-02-01T09:00:55.102Z [SMOOTHING0] Clearing queued colors before: enabling. Smoothing configuration changed: restarting timer. 2025-02-01T09:00:55.103Z [SMOOTHING0] Smoothing queue is cleared 2025-02-01T09:00:55.103Z [SMOOTHING0] Selecting config (0) => type: Alternative, directMode: false, pause: false, settlingTime: 150ms, interval: 20ms (50Hz), antiFlickTres: 32, antiFlickStep: 2, antiFlickTime: 250 2025-02-01T09:00:55.103Z [SMOOTHING0] Selecting config (0) => type: Alternative, directMode: false, pause: false, settlingTime: 150ms, interval: 20ms (50Hz), antiFlickTres: 32, antiFlickStep: 2, antiFlickTime: 250 2025-02-01T09:00:55.104Z [LEDDEVICE0_UDPRAW] Start LedDevice 'udpraw'. 2025-02-01T09:00:55.104Z [LEDDEVICE0_UDPRAW] (LedDevice.cpp:337) deviceConfig: [{"colorOrder":"rgb","currentLedCount":100,"host":"","port":5568,"refreshTime":20,"smoothingRefreshTime":20,"type":"udpraw"}] 2025-02-01T09:00:55.104Z [LEDDEVICE0_UDPRAW] Ignoring user LED refresh rate. Forcing smoothing refresh rate = 50.00 Hz 2025-02-01T09:00:55.104Z [LEDDEVICE0_UDPRAW] (LedDevice.cpp:423) Refresh rate = 50.00 Hz 2025-02-01T09:00:55.104Z [LEDDEVICE0_UDPRAW] (LedDevice.cpp:373) Device is not ready to start a timer 2025-02-01T09:00:55.104Z [LEDDEVICE0_UDPRAW] (LedDevice.cpp:433) Refresh interval updated to 20ms 2025-02-01T09:00:55.106Z [HYPER_MANAGER] HyperHDR instance 'First LED instance' has been started 2025-02-01T09:00:55.106Z [LEDDEVICE0_UDPRAW] Device 'udpraw' is disabled due to an error: 'Failed resolving IP-address for [], (1) No host name given' 2025-02-01T09:00:55.107Z [HYPERHDR0] The instance is running 2025-02-01T09:00:55.107Z [MUXER0] Register new input 'System/VIDEOGRABBER' with priority 240 as inactive 2025-02-01T09:00:55.107Z [WEBSERVER] Initialize Webserver 2025-02-01T09:00:55.107Z [COMPONENTCTRL0] Video capture device: enabled 2025-02-01T09:00:55.107Z [FLATBUFSERVER] Started on port 19400 2025-02-01T09:00:55.107Z [FLATBUFSERVER] Started local domain socket server: 'hyperhdr-domain' 2025-02-01T09:00:55.108Z [NETFORWARDER] Forwarder has changed state to disabled 2025-02-01T09:00:55.129Z [WEBSERVER] Apply Webserver settings 2025-02-01T09:00:55.129Z [WEBSERVER] Set document root to: :/www 2025-02-01T09:00:55.130Z [WEBSERVER] Started: 'HyperHDR WebServer (HTTP)' on port: 8090 2025-02-01T09:00:55.130Z [SSDP] (SSDPHandler.cpp:93) The local address is empty 2025-02-01T09:00:55.130Z [WEBSERVER] Initialize Webserver 2025-02-01T09:00:55.130Z [WEBSERVER] Apply Webserver settings 2025-02-01T09:00:55.130Z [WEBSERVER] Set document root to: :/www 2025-02-01T09:00:55.142Z [WEBSERVER] Setup SSL certificate 2025-02-01T09:00:55.142Z [WEBSERVER] Setup private SSL key 2025-02-01T09:00:55.143Z [WEBSERVER] Started: 'HyperHDR WebServer (HTTPS)' on port: 8092 2025-02-01T09:00:55.143Z [SSDP] (SSDPHandler.cpp:42) SSDPHandler is initializing 2025-02-01T09:00:55.144Z [SSDP] (SSDPHandler.cpp:196) The local address is: 192.168.1.56 2025-02-01T09:00:55.144Z [SSDP] (SSDPServer.cpp:95) Initialize the SSDP server 2025-02-01T09:00:55.145Z [WEBSERVER] (StaticFileServing.cpp:68) SSDP description is set up 2025-02-01T09:00:55.145Z [SSDP] Starting the SSDP server 2025-02-01T09:00:55.333Z [MUXER0] Set visible priority to 255 2025-02-01T09:00:55.333Z [HYPERHDR0] New priority[255], previous [255] 2025-02-01T09:00:55.333Z [HYPERHDR0] No source left -> switch LED-Device off 2025-02-01T09:00:55.333Z [SMOOTHING0] Clearing queued colors before: disabling 2025-02-01T09:00:55.333Z [SMOOTHING0] Smoothing queue is cleared 2025-02-01T09:00:55.333Z [LEDDEVICE0_UDPRAW] (LedDevice.cpp:297) Disable the device 2025-02-01T09:00:55.333Z [COLORSPACE_CALIBRATION0] (ColorSpaceCalibration.cpp:225) setBackLightEnabled: 0 2025-02-01T09:00:55.987Z [FLATBUFSERVER] (FlatBufferServer.cpp:138) New connection from ::ffff:127.0.0.1 2025-02-01T09:00:56.006Z [MUXER0] Register new input 'webos@::ffff:127.0.0.1/FLATBUFSERVER' with priority 150 as inactive 2025-02-01T09:00:56.006Z [MUXER0] Priority 150 is now active 2025-02-01T09:00:56.006Z [MUXER0] Set visible priority to 150 2025-02-01T09:00:56.006Z [HYPERHDR0] New priority[150], previous [255] 2025-02-01T09:00:56.006Z [HYPERHDR0] New source available -> switch LED-Device on 2025-02-01T09:00:56.006Z [SMOOTHING0] Clearing queued colors before: enabling 2025-02-01T09:00:56.007Z [SMOOTHING0] Smoothing queue is cleared 2025-02-01T09:00:56.007Z [COLORSPACE_CALIBRATION0] (ColorSpaceCalibration.cpp:225) setBackLightEnabled: 1 2025-02-01T09:00:56.007Z [LEDDEVICE0_UDPRAW] (LedDevice.cpp:337) deviceConfig: [{"colorOrder":"rgb","currentLedCount":100,"host":"","port":5568,"refreshTime":20,"smoothingRefreshTime":20,"type":"udpraw"}] 2025-02-01T09:00:56.007Z [LEDDEVICE0_UDPRAW] Ignoring user LED refresh rate. Forcing smoothing refresh rate = 50.00 Hz 2025-02-01T09:00:56.007Z [LEDDEVICE0_UDPRAW] (LedDevice.cpp:423) Refresh rate = 50.00 Hz 2025-02-01T09:00:56.007Z [LEDDEVICE0_UDPRAW] (LedDevice.cpp:373) Device is not ready to start a timer 2025-02-01T09:00:56.007Z [LEDDEVICE0_UDPRAW] (LedDevice.cpp:433) Refresh interval updated to 20ms 2025-02-01T09:00:56.007Z [IMAGETOLED_MNG0] Total index number is: 1400 (memory: 1400). User sparse processing is: enabled, image size: 320 x 180, area number: 100 2025-02-01T09:00:56.007Z [LEDDEVICE0_UDPRAW] Device 'udpraw' is disabled due to an error: 'Failed resolving IP-address for [], (1) No host name given' 2025-02-01T09:00:56.007Z [IMAGETOLED_MNG0] Total index number is: 1386 (memory: 1386). User sparse processing is: enabled, image size: 320 x 180, area number: 100 2025-02-01T09:00:56.007Z [LEDDEVICE0_UDPRAW] Could not initialize the device before enabling 2025-02-01T09:00:56.648Z [SERVICE_mDNS] Starting the network discovery thread 2025-02-01T09:00:57.066Z [NET_DISCOVERY] Found HyperHDR at 192.168.1.146:8090 (raspberrypi.local) 2025-02-01T09:00:58.092Z [WEBSOCKET] (WebSocketClient.cpp:39) New connection from ::ffff:192.168.1.52 2025-02-01T09:01:03.033Z [IMAGETOLED_MNG0] Total index number is: 1400 (memory: 1400). User sparse processing is: enabled, image size: 320 x 180, area number: 100 2025-02-01T09:01:11.806Z [IMAGETOLED_MNG0] Total index number is: 1176 (memory: 1176). User sparse processing is: enabled, image size: 320 x 180, area number: 100 2025-02-01T09:01:17.146Z [IMAGETOLED_MNG0] Total index number is: 1400 (memory: 1400). User sparse processing is: enabled, image size: 320 x 180, area number: 100 2025-02-01T09:02:47.887Z [WEBSOCKET] (HyperAPI.cpp:957) log streaming activated for client ::ffff:192.168.1.52 2025-02-01T09:02:53.247Z [PERFORMANCE] [INSTANCE0: FPS = 29.92, processed = 1796] 2025-02-01T09:03:51.820Z [IMAGETOLED_MNG0] Total index number is: 1400 (memory: 1400). User sparse processing is: enabled, image size: 320 x 180, area number: 100 2025-02-01T09:03:53.238Z [PERFORMANCE] [INSTANCE0: FPS = 40.04, processed = 2402] 2025-02-01T09:04:01.529Z [IMAGETOLED_MNG0] Total index number is: 1400 (memory: 1400). User sparse processing is: enabled, image size: 320 x 180, area number: 100 2025-02-01T09:04:12.090Z [IMAGETOLED_MNG0] Total index number is: 1190 (memory: 1190). User sparse processing is: enabled, image size: 320 x 180, area number: 100 2025-02-01T09:04:21.966Z [IMAGETOLED_MNG0] Total index number is: 1400 (memory: 1400). User sparse processing is: enabled, image size: 320 x 180, area number: 100 2025-02-01T09:04:51.897Z [IMAGETOLED_MNG0] Total index number is: 1400 (memory: 1400). User sparse processing is: enabled, image size: 320 x 180, area number: 100 2025-02-01T09:04:53.232Z [PERFORMANCE] [INSTANCE0: FPS = 59.94, processed = 3596] 2025-02-01T09:05:01.556Z [IMAGETOLED_MNG0] Total index number is: 1400 (memory: 1400). User sparse processing is: enabled, image size: 320 x 180, area number: 100 2025-02-01T09:05:12.101Z [IMAGETOLED_MNG0] Total index number is: 1190 (memory: 1190). User sparse processing is: enabled, image size: 320 x 180, area number: 100 2025-02-01T09:05:21.927Z [IMAGETOLED_MNG0] Total index number is: 1400 (memory: 1400). User sparse processing is: enabled, image size: 320 x 180, area number: 100 2025-02-01T09:05:53.242Z [PERFORMANCE] [INSTANCE0: FPS = 59.91, processed = 3595] 2025-02-01T09:06:53.236Z [PERFORMANCE] [INSTANCE0: FPS = 59.91, processed = 3594]

@awawa-dev
Copy link

awawa-dev commented Feb 1, 2025

U and V chroma planes in the source (webos) are swapped?

@grmilbrand
Copy link
Author

Thaks to you both!
any advice on how to test this? anyhere I can modify to rectify it?

@awawa-dev
Copy link

awawa-dev commented Feb 1, 2025

probably backend issue or this device mixes up the UV planes and needs workaround

@satgit62
Copy link

satgit62 commented Feb 1, 2025

probably backend issue or this device mixes up the UV planes and needs workaround

Hello @awawa-dev, I would also be interested to know if this can be taken into account in the backend. There is someone else with almost the same problem.

@awawa-dev
Copy link

awawa-dev commented Feb 1, 2025

the problem is capturing but probably can be easy fixed as additional option in piccap&backend. Or there is a bug in backend but probably it would cause massive problems for other devices.

@satgit62
Copy link

satgit62 commented Feb 1, 2025

the problem is capturing but probably can be easy fixed as additional option in piccap&backend. Or there is a bug in backend but probably it would cause massive problems for other devices.

I have tested with the following devices via HDMI and there were no colour display problems like here: PlayStation, Amazon FireTV stick, Apple TV, laptop and VU+ Duo 4k SE/Ultimo 4K Enigma2 satellite receiver.

@awawa-dev
Copy link

I guess it rather depends on the webos or the device its running on. Not the connected players.

@awawa-dev
Copy link

awawa-dev commented Feb 1, 2025

If NV12 is active then mode YUV to rgb conversion is also done by LUTs but I suppose all the affected users use the same prepared LUTs by you? Otherwise without NV12 enabled all is done the old way on the device by backend all alone before sending to HyperHDR.

@grmilbrand
Copy link
Author

Yes, I tested with an Onn Streaming stick with Android TV, and the Shield 2015. I could probably get access to a Firestick and maybe a newer Shield to test. I can also try running my laptop thru it

@grmilbrand
Copy link
Author

Laptop shows the same inverse colors thru the hdmi. Let me know if you want me to test any fixes

@satgit62
Copy link

satgit62 commented Feb 1, 2025

Laptop shows the same inverse colors thru the hdmi. Let me know if you want me to test any fixes

I see from your log that you are using HyperHDR v20.0.0.0. What version of PicCap do you have installed? Are you using the old backends or the new ones with NV12 support? They only work correctly with HyperHDR v21beta1. Can you post a HiperHDR log after a reboot, switch to a channel or video, and save the log as a text file? I can't tell from the log which LUT is loaded by HyperHDR.

@satgit62
Copy link

satgit62 commented Feb 1, 2025

If NV12 is active then mode YUV to rgb conversion is also done by LUTs but I suppose all the affected users use the same prepared LUTs by you? Otherwise without NV12 enabled all is done the old way on the device by backend all alone before sending to HyperHDR.

I think that before NV12, webOS HyperHDR always used the 50MB flat_lut_lin_tables.3d from /media/developer/apps/usr/palm/services/org.webosbrew.hyperhdr.loader.service/hyperhdr/.
When using NV12, only 150MB LUT's are supported, so we have removed the flat_lut_lin_tables.3d because if it is present, it will be loaded first, resulting in an error loop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants