Bug KODI 18 - Incorrect Colour Reproduction
#1
Colour Reproduction in Kodi needs some attention. It adds some awful banding to perfectly smooth gradients.
I've made some screenshots of all Kodi renderers and MPC-HC and Windows Media Player as a comparison. Both MPC and WMP reproduce the test video accurately, Kodi unfortunately not.

Here is the source video and the gallery with screenshots:

Test Video

Screenshots

The video has 3 gradients: with colour steps from the left of 1, 2 and 3. The goal is to make the left part smooth as on the screenshots from wmp and mpc without any colour artifacts.

p.s. I'm aware of the newly introduced functions in kodi: dither and colour management. Kodi's dither only makes it worse as it simply degrades the colour bit depth. Icc profile does nothing.

p.s.2 I wrote a shader for MPC called Adaptive Displacement Debanding which is able to make all 3 parts of the test video smooth in full 8/10bit colour depth, so if you are interested in adding it to Kodi drop me a line, but first we need to make sure Kodi is able to reproduce the source material properly.
Reply
#2
Without a full debug log (posted to a public pastebin), this could be hardware specific to your graphic engine and panel. I note the absence of VLC in your line-up, which contains code Kodi shares. I did grab your sample, and played it directly on my Asus monitor and found it silky smooth on all players including Kodi, but the same sample played on my LG TV had quite bad banding, close to what you show in your images. I do pass through an AVR, so at this point, I have yet to determine the villain, but it looks like a rendering issue with some segment of the hardware.
Reply
#3
(2017-08-01, 16:49)PatK Wrote: Without a full debug log (posted to a public pastebin), this could be hardware specific to your graphic engine and panel. I note the absence of VLC in your line-up, which contains code Kodi shares.

I have tested it on GTX980, Intel integrated GPU and on Radeon HD6450 so I thought the log was irrelevant. I will install VLC and add one more screenshot. When I look at the Kodi output it looks like double colour space conversion to me. The video I posted is uncompressed to preserve the gradients untouched.

All my PCs have full range RGB pixel format set.

I've just refreshed your post. Would you post a screenshot of your Kodi output please. I would like to do a diff comparison in Photoshop with the original.
Reply
#4
http://i.imgur.com/9EFdZFi.png

Another variable in all this is the screen grabber and its system of handling pixels.
Reply
#5
Your screenshot shows the same behaviour, incorrect colour reproduction.
Here is your screenshot overlayed on the original with a Difference blending mode and boosted contrast to see anything.

https://postimg.org/image/4muhbfeyj/

update: when I overlay the mpc output with the original the diff result is pure black as it supposed to be.
update2: I seriously doubt the screen grabber affcts the colour in any way. pngs are lossless.
Reply
#6
Why would you use a raw RGB video? I am not sure how Kodi/FFmpeg handles RGB video.
Reply
#7
To rule out colour discrepancies caused by compression.
I've added a screenshot from VLC. I'ts the same as from mpc and wmp, so only Kodi reproduces the colours wrong from all 4 players.
Reply
#8
In all your comparisons, you didn't include the grabbed master image (nor VLC- at this point) but it's clear from my end that my monitor handles the images just fine with a few different viewers, while my TV does show this banding. In one case using Direct X handling, this would point in that direction, Software rendering would suggest o/s CPU rendering and then there's graphic card rendering through a manufacturer's interpretation. In the end, we're comparing static grabbed images and it seems you're holding up an MCP-HC grabbed image as the 'standard?' and using a diff between?
Reply
#9
I'm using a screenshot of an MPC output of my video. I compard it with my input picture from which I made an avi and it shows a black diff.
It's not the monitor, your screenshot is still showing colour artiffacts. I didn't even need to make a diff to see it. What is a grabbed master image?

update: I'm encoding a h.265 mkv now to see if it shows the same problems.
Reply
#10
My 10 year old LG TV is probably to blame for the banding issue, but the ASUS monitor with an AMD graphic card doesn't display issues (rolling the images through various viewers) which bring to mind too many variables. My presumption is that you have found Video levels and color space (wiki) but here it is just in case.

A screen grab of a mpc-hc video and using that as your basis of comparison for a diff file against other screen grabs is fraught with variables and in my mind would not constitute any real benchmark. I'm a little unsure how to set up some sort of reference system, but I suspect it would involve monitoring with an oscilloscope and not merely a visual judgement.

What is great about Kodi, is if you don't like the way it handles video but do like the library functions, then you can use just about any player using the External players (wiki) which would include mpc-hc
Reply
#11
As I said the MPC output is the same as the original picture pixel by pixel, so when saying compared to mpc = compared to the source image. it IS the reference.
I have all the colour management off on my system, so there are no other variables than the player's decoder. Leave your displays alone mate, you did not post the photo of your display device but a screenshot, it has nothing to do with your monitor or tv.

I do not need to study the theory about colour spaces and pixel formats. I write shaders, I know something about it already Smile
Reply

Logout Mark Read Team Forum Stats Members Help
KODI 18 - Incorrect Colour Reproduction0