How to set the output to Full RGB

Hi,

I’ve got my Vero 4K+ today and hooked it up to my AVR. Unfortunately I have some color space issues (all images are too bright). All devices connected to my AVR are outputting the signal in RGB Full (4K, 10Bit, 30 Hz).

That’s why I need to get Full RGB out of OSMC as well. I have tried the OSMC GUI setting “Force RGB” and the following command:

echo 1 > /sys/class/amhdmitx/amhdmitx0/output_rgb

In all cases I am able to get a RGB image, but it’s always Limited RGB. How do I get Full RGB
(also known as PC levels)?

echo full | sudo tee /sys/class/amhdmitx/amhdmitx/attr

and it’s better to use the GUI setting for RGB as it will persist over a re-boot. To persist the full setting, you need to add

echo full > /sys/class/amhdmitx/amhdmitx0/attr

to rc.local.

Out of curiosity, why do you need RGB? Your display must be able to handle YUV otherwise we would send RGB automatically.

Thanks for the quick reply. Unfortunatly setting the attribute does not have any effect. I am now only using the GUI setting for forcing RGB output and I have also set the attribute you have suggested:

root@Vero:/home/osmc# cat /sys/class/amhdmitx/amhdmitx0/attr 
full

I am still only getting limited RGB. :frowning:

Out of curiosity, why do you need RGB? Your display must be able to handle YUV otherwise we would send RGB automatically.

I actually want to use the Vero 4K not only for movie playback but also for browsing photos on a calibrated TV. These photos (obviously) have RGB colors and a color depth of 10 bit so you generally don’t want them to be converted into any other color space. The display also handles YCbCr 4:4:4, but with YCbCr 4:4:4 the colors cannot be 100% accurate any more due to rounding errors when converting RGB Full to 4:4:4 (not a Vero issue, this is by design).

Any other ideas how to get Full RGB?

What does cat /sys/class/amhdmitx/amhdmitx0/config say?

It’s actually looking good I think:

root@Vero:/home/osmc# cat /sys/class/amhdmitx/amhdmitx0/config                                                                                                         
cur_VIC: 95                                                                                                                                                            
VIC: 95 3840x2160p30hz                                                                                                                                                 
Colour depth: 10-bit                                                                                                                                                                                                                                         
Colourspace: RGB                                                                                                                                                                                                                                             
Colour range: full                                                                                                                                                                                                                                           
EOTF: SDR                                                                                                                                                                                                                                                    
YCC colour range: full                                                                                                                                                                                                                                       
PLL clock: 0xc000029a, Vid clock div 0x000b0000                                                                                                                                                                                                              
audio config: on                                                                                                                                                                                                                                             
3D config: off  

But somehow Full RGB is still not used when decoding movies.

OK thanks. Let me check what’s going on.

I always thought & read it’s better to send RGB to TV no? That’s what my PC Intel HD GPU is set to (Limited->Full->Limited).

Would be interested in knowing why Vero outputs YUV.

I always thought & read it’s better to send RGB to TV no?

Yes, you generally always want to use RGB wherever possible. For pictures this is obvious (as they are RGB-native), but even for movies you should use RGB. Although movies are generally encoded with YCbCr 4:2:0 chroma subsampling (probably the reason why people think YCbCr as HDMI output format is better), RGB should still be the first choice. In order to explain why RGB should be preferred, let me give you an example. This is what the conversion chain looks for a movie when you set your output to YCbCr:

  1. A random movie file with YCbCr 4:2:0 is being played back
  2. For decoding it is converted automatically to RGB. This applies both to software decoders and hardware decoders. I am not aware of any decoder that does native YCbCr decoding without internally converting the image to RGB.
  3. After decoding, the image needs to be sent to the display (e.g. a TV). When the output is set to YCbCr the decoded image is converted again from RGB to YCbCr (e.g. 4:4:4).
  4. The TV then receives the YCbCr image.
  5. Since the actually display panels only understand RGB the TV needs to convert the YCbCr image back to RGB before it can be sent to the panel.

So by setting the output to YCbCr you’ll get two additional (and useless) conversion steps. If you are using 4:2:2 as output you’ll definitely lose information. But even 4:4:4 ↔ Full RGB conversions are not transparent, as there will be rounding errors leading to inaccurate colors and potentially color banding. Especially when you are doing this conversion twice (one on the sender, one in the display).

If you are using a full RGB chain this is what the image processing pipeline looks like for a normal movie:

  1. A random movie file with YCbCr 4:2:0 is being played back
  2. For decoding it is converted automatically to RGB.
  3. The decoded RGB image can be sent without conversion to the display
  4. The display (TV) can show the native RGB image directly on it’s RGB panel, without color space conversion

For more information about this you might want to have a look at MadVR (madVR - high quality video renderer (GPU assisted) - Doom9's Forum). MadVR will obviously not work on OSMC hardware, but they explain the concepts and drawbacks of color space conversions quite well on that forum.

That’s what my PC Intel HD GPU is set to (Limited->Full->Limited).

You should go with RGB Full in the entire chain if you can change your source and display to Full RGB.

But we are getting a little off topic. I still need a solution for setting the Vero 4K+ to Full RGB. Right now I am stuck with Limited RGB (which is actually giving me worse results than 4:4:4).

@grahamh Any ideas?

1 Like

I’m having to unpick the actual matrices they use. Might take some time…

It shouldn’t if you set your TV to limited range. I know you don’t want to have to do that.

The thing is that all other devices (PC, Xbox, UHD-BD) connected to my AVR are set to RGB Full, so my TV also must be set to RGB Full for this particular HDMI port. I cannot mess with the TV’s RGB level settings every time I want to use the Vero.

Thanks for looking into this. Right now I am thinking of returning the 4K+, as RGB really is a dealbreaker for me. Never had an issue with this kind of thing with Kodi on PC (neither on Linux nor on Windows), so I expected this to just work. Would this be covered by the 7 day return policy?

I guess so, but this will get solved.

Agreed that RGB output is preferable as long as Step 2 holds true for the Vero. Does beg the question why Vero outputs YCbCr as default instead of RGB - hopefully not some conversions involved to do that.

Thanks for MadVR link but seems to go against the Kodi wiki on the subject which basically says Limited->FULL->Limited (for video content) to avoid scaling issues :slight_smile:

https://forum.kodi.tv/showthread.php?tid=252023

Which Combination to Use
Out of the eight combinations, only three have correct video levels by the time they reach the TV:

  1. Full,Full,Full – Both Desktop & Video Content will look correct but video content is also scaled during the Y’CbCr –> RGB color space transformation. BtB & WtW are clipped so calibration will be more difficult

  2. Full, Limited, Limited – This should be avoided since there are two levels of scaling which will likely cause unnecessary banding.

  3. Limited, Full, Limited – Best option for embedded video player as there is zero video content scaling during the Y’CbCr –> RGB color space transformation. BtB & WtW are preserved to make calibration easier. If using a Desktop it will look overly dark

From my experimentation (and some desperation with Wintel HD), seems to hold true in practise as well for PC. However, for Vero, I just flipped to RGB and did a quick calibration and the colours are wrong levels compared to my reference BluRay player. Vero YCrYBr looks perfect.

Beats me ……

There is hardly any modern day display that I know of that does internal processing in RGB. If you input RGB singal, for internal processing the display will convert it back to YCbCr.

On Amlogic Android boxes, picture processing is also limited to 16-235 (and equivalent higher bit depths). So, you will only get clipped output even when you force RGB full output. I haven’t checked how it is on the Vero.

1 Like

That kinda makes sense. Does explain why Vero YCbCr output looks perfect and matches my BluRay (which, tbf, I seem to remember setting to YCbYCr cuz I could not get the colours right with RGB).

What format are these photos in? Bit depth for photos is either 8-bits or 16-bits per channel.

The panel only understands RGB, that’s for sure. So if you input YCbCr there needs to be at least one conversion step in the TV. How can you be so sure that the image processing (scaling, applying filters) is taking place before the RGB conversion? The math is much easier (and more accurate) in RGB, so for the TV it would definitely make sense to process the RGB image instead of the YCbCr image if you have the choice. For RGB signals which come in through HDMI this would mean that no additional conversion needs to take place.

And afterall TVs are not too different from computer monitors, which usually can only process RGB (because it is easier). But since none of us knows the guts of their TV for sure I am going to ask the Panasonic support about this. They should know how their TVs do the processing. I’ll report back.

Anyway I’d suggest looking at the MadVR section on the Doom9 forums (link in my other post). Those guys know what they are doing.

Whait, what? :hushed: Is this a hardware limitation? I cannot view my photos without losing quality then?

Just checked, they are normal JPEG images with sRGB profile and only 8-bit color depth (not 10 bit). The RAW images from my camera are 12-bit (ARW format), but obviously I don’t display them using the Vero.

RGB processing is computationally tasking compared to color difference processing (YCbCr) where the luminance and chrominance components are separate. You can get RGB processing on TVs with game/pc modes which disable all internal video processing. You can take a look at the old posts on Doom9 , Kodi forums on this matter. It has been brought up from the days of Pioneer KURO plasma TVs which was the best known example of a display doing RGB internal processing.

As I mentioned in the post, I haven’t checked how Kodi processes pictures in OSMC. It is correctly processed on native Linux/Windows. With SoC designs, true hardware limitations are limited. If this is an issue on OSMC, it can be fixed.

2 Likes

I, for one, would be quite interested in the results if you ever do.

Just to add to the thesis that TV Panels are native YCbCr, i experimented a little using AVSHD Calibration. Tv set to BluRay mode (not PC).

My BluRay player set to YCbCR has perfect colour mapping and Grayscale Ramp. Setting it to output RGB and the colour & tint calibration are off. No matter what, they do not line up.

Vero 4K+ - same as above.

Wintel PC HD4000 Graphics - this is a struggle. Cannot get perfect no matter what combinations i use. But i think this more Kodi on Wintel issue. Seem to remember Media Classic/MadVR etc being perfect.

I didn’t get a chance to try on my Xbox but, as you say, am suspecting that perfect colour/tint is only possible with RGB when the TV is set to PC level.

As long as you are not looking at photos you should be fine with YCbCR then.

Display panels are always RGB only, I think nobody here questioned that. If you feed YCbCr to a TV it must be converted at some point, that’s without doubt.

The question is how the TV behaves if you feed an RGB image to it. wesk05 claims that the TV converts RGB signals to YCbCr, applies filters/scaling and then converts it back to RGB in order to feed it to the panel. I’d say that the TV does not convert the RGB signal to YCbCr, as it does not make sense. But nobody can tell for sure, that’s why I have asked the Panasonic TV support about this (don’t have an answer yet).

The Game Mode that wesk05 also mentioned is an interesting thought, though. I have been using "PC Mode" for my HDMI port since I got my TV, as my PC is also hooked up to my AVR. Maybe that’s the reason I am getting a perfect image from my PC (which I have also used for calibration).

That’s why you should be using either Kodi DSPlayer or MPC-BE within Kodi on the PC platform in order to profit from MadVR. It gives you a Full RGB image processing pipeline. Plain Kodi on PC also gave me not more than just an “okay” image quality. With Kodi/MadVR I got a perfect image (especially with NGU scaling in High/Very High, but this comparison is not really fair).

Maybe the PC mode which I am using for the AVR HDMI port might actually be the reason why Full RGB signals are looking much better on my TV.

It probably differs from TV to TV, also depending on the settings. That’s why we need the possibility to use RGB Full on the Vero 4K+. For some people this might not improve things, for others it does.