Pointer for 'm_gammaSrc'
#1
I want to edit the EOTF to compensate for the display's default gamma (tablet's 2.15, TV 2.6) and surround environment (black), so the system gamma is around 1.3.
I'm on Android so I found a reference here , the issue is I don't know where 'm_gammaSrc' and 'm_gammaDstInv' point to. I assume they would default to 2.4 but I searched on all the suspect files within the GLES folder, in xbmc/rendering files and also those in #include.

cpp:
#if defined(XBMC_COL_CONVERSION)
rgb.rgb = pow(max(vec3(0), rgb.rgb), vec3(m_gammaSrc));
rgb.rgb = max(vec3(0), m_primMat * rgb.rgb);
rgb.rgb = pow(rgb.rgb, vec3(m_gammaDstInv));
Reply
#2
All the gamma correction stuff is set in here: https://github.com/xbmc/xbmc/blob/master...Matrix.cpp.

But I somewhat doubt that you want to use shaders to manipulate the gamma. POWs are pretty expensive, so your tablet might not be able to render 60fps videos this way. It will result in a higher energy consumption.

On Android, Kodi uses a MediaCodec Surface to output videos in a efficient manner. The system driver should do the appropriate gamma conversion. I'm not knowledgeable in this area, but I would think that if the device drivers are outputting a wrong gamma, you are out of luck.
Reply
#3
Oh my god ,  they are using the wrong gamma? Default EOTF for all consumer media is BT.1886 ( 2.4 gamma).  At least they are 2.2 for both src and dst so the original gamma is preserved, but the colorimetry is going to suffer as it won't be in display referred linear space.

I can apply an OOTF to the shader so the system gamma is adjusted for my display EOTF and dark surround. I would have to test how it performs , I have  a Chromecast HD and a Galaxy Tab S7 FE wifi, so on one side it will perform surely bad and the other might give me battery consumption issues. In any case for both I'm already using shaders for SD sources for the HQ upscalers. They only work for H.263 streams for some reason, so I'll have to ask later.
Reply

Logout Mark Read Team Forum Stats Members Help
Pointer for 'm_gammaSrc'0