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 too saturated with Kodi versions > 19.1 #21081
Comments
Is hard imagine what happens without debug log. Please, provide debug log and exact AMD driver version you are using. Mentioned PR enables 10-bit for SDR when is detected capable system. No one else has reported problems with this. |
This is not driver default format. Usually is 8 bit RGB. Probably is bad idea force a pixel format (not default) from AMD driver because Kodi and Windows needs change format when switching Windows HDR ON/OFF. I'm pretty sure resetting driver settings to "factory defaults" should fix your issue (clean driver install). |
The 10 Bit Pixel format setting is not default, but (sometimes) that is the only way to get the Full RGB option in AMD drivers, and make black actually black and not grey. The 10 Bit Pixel Format setting is enabled, but in the display settings it's set to 8 bit and Full RGB: I just reinstalled the driver, did a factory reset, and left the 10 bit setting disabled, but that doesn't make a difference. I'm using driver version 21.10.2, but I tried with other versions (22.2.2 and 21.8.2) and resetted the drivers everytime. I've been doing some more testing, and it seems Kodi changes the colors of the entire screen. If I boot my PC and start Kodi, everyting looks normal. If I then play a video file, everything gets saturated. Even if I stop playing the video, the Kodi menu is more saturated than normal, and even Windows itself looks different. Almost like HDR is enabled or something (but it isn't). If i then reboot, everything looks normal again until I play a video. And I tried multiple video files, h264, h265. It seems to be with all SDR content. Attached is the debug log for when I played a video file and the problem occured. |
In the meantime I reinstalled Windows, and used an older Windows version (20H2). Same problem, it looks fine with 19.1, and then I install 19.4 and it looks bad. |
Try with DXVA2 disabled to see if is related to video decoding only |
I tried that before, and it does look a little bit better, but still far from normal unfortunately. I made some pictures so you can see the differences a little bit. Standard Kodi 19.4, looks bad: I also have another debug log from the modified Kodi version: And one with Kodi 19.4 original, but with DXVA2 disabled: And in both of these logs the 10-Bit Pixel Format setting in the AMD drivers is still disabled. |
Okay. but what I don't understand is why only you have this issue. Also Kodi cannot change entire video output when it is not running.
To me looks like 10 bit SDR change (mentioned PR) is triggering some profile switching in AMD driver video settings or even TV settings. Maybe some video profile (Game mode, cinema mode, sports, etc.) has wrong or very saturated adjustments. Then yes, this PR triggers the issue for you but the root cause is some incorrect setting somewhere in your setup.
If screenshots are correct this is also indicating that it's some post-processing maybe in AVR or TV. If it was Kodi the oversaturated image would also be seen in the screenshots. |
Yes, I figured that Kodi did not actually changed the "image" of the video to make it more saturated, but that Kodi makes my TV to make it look this way. Thats why I said earlier it looked like HDR mode was on, because even Windows looks different (while Kodi was running, and I opened a different program). And because I couldn't find anything about this problem, I also figured that it was probably a very specific combination of my hardware that causes this. But I can reproduce the error consistently, with various driver versions, and on different installations of Windows with different versions. It happens everytime. So it's possible it's a (although rare) bug in this new DX swapchain feature right?
So it's not my TV, but it seems my videocard is just not compatible with the new DX swapchain feature. I noticed that when it looks bad, my TV shows BT.2020 colorspace, is that correct? When I hooked my regular PC to my TV it didn't show that. Is there nothing else that can be done about this then, you're sure it's not a bug? The only option is to buy a new videocard? |
Thank you for all the tests done. This provides valuable information. No doubt the reason it happens is the wrong BT.2020 color space. I should set BT.709 for SDR even if it's 10 bit. This is probably a bug in the AMD driver in combination with something else on your system. BT.2020 color space only should be used for HDR. I think the driver interprets that when 10 bits are used the signal is HDR and this is incorrect because 10 bits can be used also for SDR and BT.709. Maybe AMD driver has some option related to color space to force BT.709 / BT.2020 somewhere. But I don't have any AMD HW to investigate this. Kodi v20 has a new option in settings to disable 10-bit for SDR (or enable it even is not HDR display) I can also provide you a Matrix build with 10-bit disabled for SDR (it's almost the same as what you've already done by reverting the PR). It is also usual that the TV's has some option in HDMI settings to set the color space: "BT.709/BT.2020/AdobeRGB/Auto" maybe you can change it here and set BT.709 instead of "Auto" (if the TV uses separate settings for HDR/SDR because for HDR needs BT2020). Anyway, for me, all these are workarounds. The bug would be: "AMD driver outputs wrong color space BT.2020 when video signal is 10-bit RGB SDR" |
Thank you as well for helping, at least I kinda know what the problem is now. I checked my TV and driver settings, but can't find anything that's actually usable. Apparently there is a secret menu on the TV in which you can force it, but I'm not going to do that everytime I switch between SDR and HDR. I will just keep using my current 19.4 build, and switch to v20 beta's when they are out. I think this can be closed then? |
Yes, we will close it. In any case, I will keep it in mind if someone else reports same issue in the future. |
Hello there, answering to @thexai , I'd like to report same behavior here, I had difficulties to describe my issue in google and found your thread that looks terribly like what I am experiencing for some videos (did not narrowed it down, but the ones I am thinking about are HEVC) My videos appear red/dark as described and shown in screenshots above when viewed in Kodi only. I tried many settings in kodi without success. I don't have the knowledge of @Sjoerdfc to try and compile my own kodi version. Following your discussion my workaround discovered this evening is to activate HDR mode on windows (win+B) and configure my screen on HDR mode (as I do for vidéos games). That way, the videos is less saturated and seems normal. I did not had the opportunity to look at many other videos to test. If you want, I can run some logs with specifics videos or settings as I have absolutely no knowledge in terms of programming, but I like to help. BR |
Hi @hebusthib1, unfortunately I don't think this will be fixed, at least that was what I understood from @thexai, so I don't think providing logs will help. If you want to be sure its the same problem as I had, the easiest way is to download Kodi 19.1. This problem started with 19.2, so with 19.1 everything should look normal. You can download it here: https://mirrors.kodi.tv/releases/windows/win64/kodi-19.1-Matrix-x64.exe If 19.1 works, then it's the same problem as I had, and I can send you my custom 19.4 version if you want. And as @thexai said, there should be an option to disable this in Kodi 20, so then it shouldn't be a problem anymore. |
And just curious, do you also have an LG OLED TV? |
Hi @Sjoerdfc , thanks for your reply. I just tested the 19.1 version on my computer and the video looks fine. So it seems that it is the same issue. I don't own an LG OLED TV, and my TV is not HDR compatible, so I did not bother to take some comparative tests. On my TV, I have an android tv box that delivers the signal through HDMI, and no issue. So I arrive to the same conclusion that it is link to HDR compatibility of the monitor. I would be very interrested in your 19.4 version if it is not too much work on your side. |
Here is my custom version: https://mega.nz/file/WEsREB5Y#5OBRTCSzOmKaI8q6XD_EkvB8XBXITaBmkDz7ANJfuxU It's standard Kodi 19.4, just with the swapchain changes reverted. I'm currently using this version, and switching to Kodi 20 beta's when they are available. Let me know if it works. |
Thanks a lot, |
Reverted swapchain improvements from xbmc#19775. In some rare cases, including mine, they caused video to be very saturated, as described in this issue: xbmc#21081
Since seems that it affects more AMD setups, I am proposing a fix: Matrix test build: If it's confirmed that it solves the issue, the changes will be applied to master and backport to Matrix (v19.5) |
Yep, your test build fixes it for me @thexai. My TV doesn't show BT2020, and it shows it's using 8 bit swapchain in the debug log, so everything seems as it should. Thanks! |
Hello, |
I would sure love to try this build. I recently converted one of my Kodi machine from LibreeElec with Kodi 19.4 to Windows with Kodi 19.4 (without changing any hardware nor display) and have exactly this same issue on Windows but with Intel GPU. I never saw anything like this on Linux/LibreElec. With Windows/Kodi, If I play a TV a show like Orville when they show reds or Oranges it is WAY TOO SATURATED . Still over saturated on blues but not as distorted, "Bright white" commercials have been seen "clipping" the whites. My Intel GPU driver supports the choice of "limited" or "Full" range on some displays like the one I set it up on , it gave me that option. Once I moved it back to the (very old Sharp 30 Inch 720P LCD) display where it has been with LibreElec, the Intel driver no longer shows that (full / limited) option , but reducing Kodi to "limited" seems to help but is not a real fix. Also there is a major difference between Software and Hardware decoded video. Software decoded video looks normal. Both Mpeg2 from PVR/HDHomerun (older version) , and H264 have the same issue when hardware decoded. If I play a different format (not hardware decoded) or turn off hardware decoding , video playback is no longer over-saturated. HELP! Had I known I would destroy this set up I would have left it! |
Until now this problem only occured with AMD graphics, so I'm not sure if its the same issue. The easiest way is to try version 19.1 first. The change that caused this problem was made in 19.2. You can download 19.1 here: https://mirrors.kodi.tv/releases/windows/win64/kodi-19.1-Matrix-x64.exe . You can just install it over version 19.4, you don't need to uninstall anything. If everything looks normal again with 19.1, than it seems Intel graphics can have the same issue. |
Here are my results . BTW this is on the Chromebox CN60 With standard Intel Hardware. Of course using MrChromebox's hack. Installing Kodi 19.1 seemed to make no difference. Here are 4 screenshots. To be clear these were done on Kodi 19.1 which seems to have many of the same issues as I have seen on 19.4. 000 and 001 are with Limited HDMI range (one dark, then one bright) 002 and 003 are with Full HDMI range (one dark, then one bright) Both of the darker and less saturated images were with software decode AND DXVA2 Acceleration disabled Both of the brighter and more saturated images were with DXVA decode and DXVA2 Acceleration enabled. My Like OTA ATSC TV from a HD Homerun Dual is much the same, despite it being a different CODEC. It too is hardware encoded and appears more "normal" when hardware decoding and acceleration are off. I am not a windows guy but I can say I have used Kodi on Mac, Ubuntu and LibreElec extensively since like V10 of Kodi. I only did this box this way to run a windows Utility on it as it was "always on" . Prior to that I have only rarely installed Kodi on Windows. turns out after uploading the attached files here, the names are all changed but obviously which are darker and brighter and more saturated. You can reference the "end time" in the images to get an idea which is which if you want the finer details. I almost think the software decode is too washed out and the hardware decode is too saturated. You can also see on the hardware decode that the faces start to "clip" or "wash out" . Also the hardware decode images lose all detail in the red dress. I have seen in fact in the recent episode of Orville where detail in saturated colors is completely lost and colors just become "blotches" like the red dress here. If curious of the source this is from an Ausie Toyota Commercial from my recording of Orville from the SBS Australia stream. |
Unfortunately it seems you have a different issue. This issue was caused by a specific change which was made in Kodi 19.2. So if you still have the problem with Kodi 19.1 your issue is completely different than this. The problem we had was also not visible in screenshots, since this problem caused the actual TV to make everything too saturated. On screenshots everything looks fine (that's why I took actual photos earlier in this issue). If you think the fault is in Kodi than you should open a new issue I think. Did you try playing the same media with MPC-BE for example, also with and without DXVA? |
MPC-BE? I do not know windows Acronyms. I know I can play the same media flawlessly on ALL the same hardware but with LibreElec and Kodi 19.X. I guess my expectations of Windows, a commercial operating system, are too high and should stick to Linux. I can not believe I am the only one with Kodi on Windows with Intel hardware that has this issue. |
Hello all, I wanted to take another look at this issue now that I'm active again. I thought that maybe the drivers were fixed and the workaround could be removed/modified. I'm wondering if it's the same for others and if I forgot some details (special type of video or any video?) |
I don't know exactly what the workaround is you're talking about, but this problem still exists for me with the latest AMD drivers (v23.4.1) and Kodi 20.1. The problem is that apparently my video card and/or TV thinks that SDR content with 10 bit colors is supposed to be the BT.2020 color space. But the BT.2020 color space should only be used for HDR. So my TV used the BT.2020 for SDR 10 bit content, and then it looked way to saturated. It had nothing to do with DXVA decoding or something. Kodi 20 has an option in the menu to disable "10 bit for SDR". So even though the problem still exists, with this option I can disable the cause of the problem. Is this the workaround you're talking about? Because when this option is set to "auto detect" the problem disappears for me. Only when it's set to "Always" the problem shows itself again. Does this option needs to be removed or something? |
No, not talking about removing the option, it's meant for something else. Blacklisting AMD indefinitely isn't great. Thanks for confirming that the issue still exists. I wanted to try a different fix (that allows using 10 bit and SDR), but am unable to verify its effectiveness because it looks like I'm not impacted anymore, and was wondering what's going on. Would you be able to build and test a custom Kodi if I provide a git branch or a PR? Are you on Windows 10 22H2 and latest LG TV firmware? |
My LG is on the latest firmware for my model (65C7) as far as I know, v06.10.30. And I just updated Windows to the latest version, and I still have the issue. I can compile a custom version and test it if you want. |
Please try the branch crystalp/sdr-colorspace-fix Hopefully any setting of "Use 10 bit for SDR" will work for SDR playback. It's possible DXVA2 decoding/render method also play a part, I've seen Windows/DWM do strange things to the color space when I tried forcing it to weird values for testing. |
@CrystalP you can also use our jenkins to make personal windows builds and then link them here. |
I don't mind building it myself, I still had the old VM from last year anyway with everything installed. But I had some trouble building your branch @CrystalP. The 'genNsisInstaller.nsi' file in project/Win32BuildSetup has changed since the 20.1 release, and it gave an error in the end when it was trying to create a setup file: I copied this file from the 20.1 release, and then it did create the installer and completed the build. I don't know if I'm missing something, or if it's a bug in the kodi master branch. So I installed the custom build based of the sdr-colorspace-fix branch, and I do have some findings. It seems like your build unfortunately does not make a difference for me. When I set the SDR 10 bit option to 'Always' everything still looks very saturated, and my TV still switches to BT.2020. But just to be sure, I deleted the Kodi folder in Appdata/Roaming, to start with a completely fresh installation. And suddenly it seemed to work. The only thing I did was adding one folder with a video file, and setting the SDR 10 bit option to 'Always'. I then started to change more settings, to see if a different setting caused the problem, and I narrowed it down to the 'Adjust display refresh rate' setting. I always set this to 'On start/stop'. On a completely fresh installation, of your custom build or the official 20.1 build, when I set the 'Use 10 bit for SDR' to 'Always', it works fine. Everything looks normal, my TV does not switch to BT.2020. Here is the debug log of this situation: If I then change the setting 'Ajust display refresh rate' to 'On start/stop', and play the same file again, everything looks too saturated, and my TV switches to BT.2020. Here is the debug log of this situation: And again, this is with your custom build, but also with just regular 20.1. And I even reinstalled 19.4 just to check, and it's the same. If I enable 'Ajust display refresh rate' it looks bad, if I disable it everything is normal. I have no idea why I didn't found this last year when the problem first occurred. Maybe this changes everything? Maybe the cause is something completely different? |
@fritsch I didn't know, that would be very handy! how? @Sjoerdfc odd for the installer. Your workaround should be OK though. The difference with v20 is the removal of Windows 7 support and a button selected by default. Interesting results, thanks for the debug logs. Refresh rate switching didn't help reproduce on a 55C7. |
Please note that HDMI 2.0 does not support 4K@60Hz / RGB / 10 bit. Then surely the driver downgrades signal to 8-bit (with dither) just like it happens in Nvidia and Intel. That is, if the problem is in the TV (which is what we assume all the time) it does not matter if 10 bits do not reach it because they are not used in Kodi or they do not reach it because the driver converts 10-bit to 8-bit. In either case, for the TV it will be an 8-bit signal and does not triggers the issue. This may be the reason because not happens with "Adjust display refresh rate" = OFF
Is not blacklisted, it can continue to be used for everyone with setting "Use 10-bit for SDR = Always" and can be disabled for everyone with "Use 10-bit for SDR = Never". In Matrix it was a problem because the setting did not exist. It's a problem that seems to only occur with a certain TV - AMD graphics combination, so it's something that will never fully auto-detect itself and I think the way it stands now is the best thing to do. |
The PC is directly connected to the TV, yes. When the problem first occured last year it was connected though a Denon receiver. The issue occurs in both situations. When I switch the refresh rate in Windows to 23.976, start Kodi, and play a video file, the issue does not occur. So in this case the videocard actually should send a 10 bit signal to the TV (because of the lower refreshrate), but everything still looks fine. It appears the problem only shows itself when Kodi switches refresh rates. When I have Kodi in a window everything looks fine, the problem does not occur. But I think that's because (at least on my system) it doesnt change refresh rates in windowed mode. As soon as I hit the '' key (fullscreen shortcut) while playing a video file, my TV goes to black for a second because it's changing refresh rates, and everything looks bad again. |
I'm happy to test everything and check if this problem can be fixed, but maybe @thexai is right and it's best to leave it like this? I'm one of the few people who had this problem, there was only one other person earlier in this issue. The manual setting did not exist in Kodi 19, and in versions 19.2, 19.3 and 19.4 it was always on. So if this was a common problem more people would have surely said something. I'm just saying I don't know if it's worth the effort. If I buy a new HTPC and/or TV next year this problem will probably go away for me as well, and then nobody can test it anymore. If I understand correctly, there is still an AMD exception in the 'Auto Detect' option? Why not just remove the exception. I'm setting it to 'Never' anyway. |
@TheAxi good point about HDMI2.0 limitation, indeed a 10 bits back buffer for 8 bits output is useless. The same will happen for 8 bits SDR screens. There is an API to retrieve that information and this could be improved in a separate change. Since 4k/23.98 works fine when there is no switch, it seems to me the problem is probably that Windows/the driver doesn't have enough time for things to settle down when Kodi changes the refresh rate. Or maybe Kodi is not reacting to something that it should. @Sjoerdfc did you experiment with the "Delay after change of refresh rate" setting? It may have no effect though as it's hooked up with audio but not D3D stuff based on a quick look. It's not like AMD users are missing out on much with "Auto" defaulting to off, so yes it may not be worth the effort, I don't know how complicated it would be to delay some processing when switching refresh rates. At least the new information is valuable and written down now. |
|
@CrystalP, yes I tried setting the delay to Off, 1 second, or 5 seconds. Makes no difference. |
OK thanks for trying. That's not surprising as it doesn't delay "everything". |
Bug report
Describe the bug
I don't update Kodi often, and I was running 19.1 for a while. Recently I updated to 19.3, and I noticed the colors in every video were way too saturated. Everything is way too red, and unwatchable. It's not visible in screenshots. It looks like Kodi forces my TV to make everything saturated. If I play the same video files in MPC BE it looks fine.
Every version > 19.1 has this problem. If I install 19.1 everything is fine. If I install 19.2/3/4 everything looks too saturated and dark. I don't change any settings, just install a different version, and I immediately see the difference. I use standard settings in Kodi, with DXVA2 and HDR enabled. I tried changing these, but that doesn't make a difference.
My Kodi PC runs Windows 10, and has an Intel G4600 CPU and an AMD RX550 GPU. I have tried several AMD graphic driver versions, but that doesn't seem to make a difference. And as I said earlier, if I play a video with MPC BE it looks fine, but with Kodi > 19.1 it's too saturated.
My Kodi PC is connected to a LG OLED, which is HDR capable. If I play HDR movies with Kodi my TV switches to HDR mode. This issue seems to be only with SDR content though. The AMD graphic drivers are set to "10-Bit Pixel Format", and to RGB 4:4:4 Full RGB.
Expected Behavior
Video looks normal.
Actual Behavior
When upgrading to a Kodi version past 19.1, everything looks too saturated. Every video is too red/dark.
Possible Fix
I looked at the 19.2 changelog, and I saw several changes to HDR and other color related things. I narrowed it down to a few PR's, and started compiling my own versions of Kodi 19.4 with several files reverted to 19.1. In the end, I narrowed it down to PR #19775.
When I compile my own version of Kodi 19.4, everything looks dark/red/saturated. If I then manually revert the changes from PR #19775, everything looks as it should.
This pull request seems to change some HDR and color related stuff, but in my case this makes Kodi unusable, everything looks like crap. I can't find anything else about this, so apparently I am the only one with this problem. As far as I can tell, this isn't a setting or something, but an actual change in Kodi behavior right?
Debuglog
The debuglog can be found here:
Screenshots
Here are some links or screenshots to help explain the problem:
Additional context or screenshots (if appropriate)
Here is some additional context or explanation that might help:
Your Environment
Used Operating system:
Android
iOS
tvOS
Linux
OSX
Windows
Windows UWP
Operating system version/name: Windows 10 21H2
Kodi version: 19.4
note: Once the issue is made we require you to update it with new information or Kodi versions should that be required.
Team Kodi will consider your problem report however, we will not make any promises the problem will be solved.
The text was updated successfully, but these errors were encountered: