Strategy for Mapping LUTs to the GPU - Is this still current for the Xavier NX

Can some tell me if the formula for scale and offset has changed for mapping 3d luts to the GPU? See 24.2.1 Strategy for Mapping LUTs to the GPU with this link - Chapter 24. Using Lookup Tables to Accelerate Color Transformations | NVIDIA Developer

Thanks.

Hi,
Could you share which interface you would like to use, OpenGL or EGL? Which APIs are called? Some algorithms may be applicable for dGPU and not on Jetson platforms. Please share more information about your use-case.

I’m using Cuda, my issue is I’m seeing off by one error for part of the range for pixel values from 0-255. Example red is 159 and the processed value is 158, same for 192 is 191 and 233 is 232. Conversely 0,31,95, 127 and 255 are correct. When I do the same processing using matlab all the numbers are correct. Any ideas where to look or how to take the next divide and conqueror debug step? Thanks. I thought first place to look is to confirm the scale and offset mapping is still correct or is different for Xavier NX.

Hi,

Please share which function is called for the conversion.

HI,

I’m using the same as in the link I sent. See Example 24-1.

Hi,
Do you mean you use this code:

void main(in float2 sUV
          : TEXCOORD0, out half4 cOut
          : COLOR0, const uniform samplerRECT imagePlane,
            const uniform sampler3D lut, const uniform float3 lutSize)
{
  // Get the image color
  half3 rawColor = texRECT(imagePlane, sUV).rgb;
  // Compute the 3D LUT lookup scale/offset factor
  half3 scale = (lutSize - 1.0) / lutSize;
  half3 offset = 1.0 / (2.0 * lutSize);
  // ****** Apply 3D LUT color transform! **************
  // This is our dependent texture read; The 3D texture's
  // lookup coordinates are dependent on the
  // previous texture read's result
  cOut.rgb = tex3D(lut, scale * rawColor + offset);

Yes, is the scale and offset described in the example still valid for Xavier NX? Thanks.

Hi,
We have checked it and it should be same on Xavier series. Mostly likely the deviation is from precision:

OpenGL ES Programming Tips — NVIDIA Jetson Linux Developer Guide 1 documentation

Thanks for the confirmation

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.