HDMI Full Range Color

Post Reply
crashoverride
Posts: 4317
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Contact:

HDMI Full Range Color

Unread post by crashoverride » Wed Feb 22, 2017 6:50 am

I would like to ask the community for help with testing.

The current HDMI driver seems to set "limited" color range (RGB 16-235):
https://github.com/hardkernel/linux/blo ... #L316-L318

Code: Select all

enum hdmi_color_range {
	hdmi_color_range_LIM, hdmi_color_range_FUL,
};
https://github.com/hardkernel/linux/blo ... 4091-L4094

Code: Select all

	data32  = 0;
	data32 |= (((0 == hdmi_color_range_FUL) ? 1 : 0) << 2);
	data32 |= (0 << 0);
	hdmitx_wr_reg(HDMITX_DWC_FC_AVICONF3,   data32);

The above code "(0 == hdmi_color_range_FUL)" will always evaluate to false.

I have changed that line to enable full color (RGB 0-255) :

Code: Select all

data32 |= 1 << 2;
This should affect anyone using a computer monitor instead of a TV. It should also affect those using LCD displays with DVI/HDMI panel chips. The expected result is that blacks are blacker and whites are whiter improving contrast. This should produce a more vivid picture (less washed out/low contrast).

It appears to work for my 5" LCD shield (not from hardkernel), but I am unsure if its just "all in my head" (subjective). I do not currently have a method to conclusively test and verify the result. Therefore, I would like to ask anyone using a computer monitor or HDMI LCD shield to test and report their findings.

User avatar
rooted
Posts: 6440
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Contact:

Re: HDMI Full Range Color

Unread post by rooted » Thu Feb 23, 2017 1:42 am

I would test this on the VU7+ which looks like it's 16bit color but don't have a 64bit system setup to compile.

The color is just terrible on the 7+.

User avatar
odroid
Site Admin
Posts: 30044
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Contact:

Re: HDMI Full Range Color

Unread post by odroid » Thu Feb 23, 2017 10:05 am

I tried on my 22inch HDMI monitor.
But my old eyes couldn't catch any difference. :(

joy
Posts: 680
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Contact:

Re: HDMI Full Range Color

Unread post by joy » Tue Feb 28, 2017 5:38 pm

Hi, crashoverride.

Nice finding! The routine has a problem.
In u-boot driver, there is a related argument but it's also the static macro value defined as '0'.
https://github.com/hardkernel/u-boot/bl ... set.c#L710

I don't have much knowledge about display color specs,
so I'm trying to find the method how to determine rgb color range whether the output is rgb full or rgb limited,
and found a link.
http://www.neogaf.com/forum/showthread.php?t=1248012
You can find one picture in this site
and they said that if display supports rgb full, the picture will have the first box in the top left be barely visible with the following squares becoming lighter.
I have several monitors.
With one of them, I couldn't see any squares in the black box and its edid says its default default color space is sRGB.
With another some monitors, the squares are visible.

And I've checked two cases with your patch and without your patch on C2,
I expected there is any difference but the result is same.
For both cases, the squares inside black box are shown well.
Also I tried to measure differences using rgb 256 color chart and so on, I can't catch difference.
Maybe my eyes are old, too. :(
It looks the result says the two cases are rgb full.

So can you share any test method or check point if you know it?
How did you check the result?

crashoverride
Posts: 4317
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Contact:

Re: HDMI Full Range Color

Unread post by crashoverride » Tue Feb 28, 2017 6:05 pm

joy wrote:So can you share any test method or check point if you know it?
How did you check the result?
I could not find a way to test it. The display I am testing on has very poor viewable angle. Even a slight change in viewing angle makes the screen appear brighter or dimmer. This is the reason I wanted other's observation reports. I could not devise a method to conclusively test.

Would it be possible to raise the issue with Amlogic regarding the code in question? Perhaps they can offer a patch or additional information.

joy
Posts: 680
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Contact:

Re: HDMI Full Range Color

Unread post by joy » Tue Feb 28, 2017 6:25 pm

crashoverride wrote: Would it be possible to raise the issue with Amlogic regarding the code in question? Perhaps they can offer a patch or additional information.
Okay. Good idea.
I will check it with AMLogic.

joy
Posts: 680
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Contact:

Re: HDMI Full Range Color

Unread post by joy » Wed Mar 08, 2017 10:28 am

We got a response from AMLogic.
They say, HDMI is just a transmitter
and the RGB range is decided by picture/video content.
As I understand, the meaning is both of full rgb and limited rgb are supported without the modification.

I don't understand it fully yet.
So, I'm checking the operation more by sending additional e-mails again.

poptmartone
Posts: 52
Joined: Wed Aug 03, 2016 10:39 pm
languages_spoken: english italian
ODROIDs: ODROID C2
Contact:

Re: HDMI Full Range Color

Unread post by poptmartone » Thu Mar 23, 2017 6:47 am

Hi everyone, any good news about it? However thanks for your work, it gives me the hope to see good colours with my VU7+ instead of those sad shades of colours.

joy
Posts: 680
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Contact:

Re: HDMI Full Range Color

Unread post by joy » Thu Mar 23, 2017 11:29 am

Sorry for late response.
Actually, we just got the same feedback that picture contents decide RGB range and it means there is no dependency of those source code and register setting,
and no further information of those register setting from AMLogic.
So I'm checking more test methods with adjusted HDMI driver that crashoverride mentioned,
and looking into more by testing VU7+ and other monitors.

User avatar
JimmyS
Posts: 55
Joined: Sun Apr 22, 2018 9:37 pm
languages_spoken: english
ODROIDs: C2
Contact:

Re: HDMI Full Range Color

Unread post by JimmyS » Sat Jan 05, 2019 6:28 pm

Hi joy,

just hit this tema also, with Odroid C2.

I am using Panasonic TV as "detector" (it detects Rpi2 Full/Limited settings well), but with Odroid C2 Ive got Limited RGB Range with echo "rgb,10bit" > /sys/class/amhdmitx/amhdmitx0/attr :(

Code: Select all

Jan 05 10:25:29 CoreELEC kernel: hdmitx: video: Bit depth: 10-bit, Colour range RGB: limited, YCC: limited, Colourspace: RGB

I understand, that output from Kodi is different topic, but, for GPU range settings there are
  • hdmi_pixel_encoding on Pi platform
  • xrandr --set "Broadcast RGB" "Full" on linux
So, how it this could be
RGB range is decided by picture/video content
true? Isnt that apply only First chain of Videoplayer(Kodi) --> GPU --> TV, not GPU itself ?

I would like to set Colour Range RGB on hdmitx to Full, but dont know how (in ELEC).
Odroid C2 + ??? - proof of concept, trying to find out best ELEC version supporting: GPIO IR, Mysql(for Kodi library), DVB-T2 drivers, TVHeadend. Not sucessfull yet.

6x RPi2 + Various TV's + LE 7.0.3, 2x Win7 Kodi 16.1 + MySQL from vPeter's LAMP plugin as Library DB + .zip patch + EAC3 patch .

User avatar
JimmyS
Posts: 55
Joined: Sun Apr 22, 2018 9:37 pm
languages_spoken: english
ODROIDs: C2
Contact:

Re: HDMI Full Range Color

Unread post by JimmyS » Mon Jan 07, 2019 6:26 pm

I tested also
echo "full,rgb,10bit" > /sys/devices/virtual/amhdmitx/amhdmitx0/attr

got

Code: Select all

[150857.907303@0] hdmitx: video: Bit depth: 10-bit, Colour range RGB: full, YCC: full, Colourspace: RGB
But test results are the same, TV detects signal as Full, but actual picture is as the signal was Limited: colours are washed out and when its manually switched to the Limited Range (on TV), pictore is OK again. So it seems I still get Limited video range, despite hdmitx message :(

Note: the same TV detects hdmi_pixel_encoding changes on Rpi (Setup Limited/Full range on Rpi) correctly. Video source is the same, Kodi on *ELEC.
Last edited by JimmyS on Tue Jan 08, 2019 4:16 pm, edited 1 time in total.
Odroid C2 + ??? - proof of concept, trying to find out best ELEC version supporting: GPIO IR, Mysql(for Kodi library), DVB-T2 drivers, TVHeadend. Not sucessfull yet.

6x RPi2 + Various TV's + LE 7.0.3, 2x Win7 Kodi 16.1 + MySQL from vPeter's LAMP plugin as Library DB + .zip patch + EAC3 patch .

joy
Posts: 680
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Contact:

Re: HDMI Full Range Color

Unread post by joy » Tue Jan 08, 2019 12:29 pm

Hi Jimmys,

Could you try forcergb option?

Please refer to this wiki page.
https://wiki.odroid.com/odroid-c2/troub ... ?s[]=force

User avatar
JimmyS
Posts: 55
Joined: Sun Apr 22, 2018 9:37 pm
languages_spoken: english
ODROIDs: C2
Contact:

Re: HDMI Full Range Color

Unread post by JimmyS » Tue Jan 08, 2019 5:04 pm

Hello,
I actually dont have problems with green/magenta colours - so I believe I dont need forcergb as it is. For me, rgb,10bit works good, and TV/projector recognizes signal fine, as RGB, video with Limited Range and coulours are OK.

Only thing which seems to not working quite properly is Full Range settings full, rgb,10bit. Hdmitx shows

Code: Select all

hdmitx: video: Bit depth: 10-bit, Colour range RGB: full, YCC: full, Colourspace: RGB
but the image is “greyed/washed”, After switching TV manually to Limited range picture looks OK. So Odroids output acts as Limited signal range. From that behauviour it seems that actual picture video range is Limited, and Odroid just sends some informations along with video signal, which reporting the video signal as Full (when its actually Limited).

Its not a "big deal", if display (TV/projector/monitor) is supports Limited Range, but without this Full/Limit settings the "Home Theatre addicts" cant properly setup/influence best handling (as many scalings as possible) of video picture in chain Player -> Odroids GPU -> Display. I did proper tests to know, what possibilities are on Odroid, and I think there is something strange about that Full Range option on Amlogic. Although I must admit that quality of picture
Full, Limited, Limited -- This should be avoided since there are two levels of scaling which will likely cause unnecessary banding.
isnt bad ;)
Odroid C2 + ??? - proof of concept, trying to find out best ELEC version supporting: GPIO IR, Mysql(for Kodi library), DVB-T2 drivers, TVHeadend. Not sucessfull yet.

6x RPi2 + Various TV's + LE 7.0.3, 2x Win7 Kodi 16.1 + MySQL from vPeter's LAMP plugin as Library DB + .zip patch + EAC3 patch .

Post Reply

Return to “General Topics”

Who is online

Users browsing this forum: Baidu [Spider] and 0 guests