This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to disable the luminance range clipping to 16-235

Hi,

Using the DM8148 EVM + Video conference daughter board and running the OpenMax demo "capture_encode" modified to capture the video signal from the hdmi receiver (Sii9135).

I noticed that the 8-bits value of the luminance (Y) is clipped to the range 16-235. So, my question is: How to have the full range of luminance (0-255)?

Here are what I found so far:

- I can disable the range clipping on hdmi receiver by setting the bit 0 of the register VID_MODE_2 to '0'. But the result is the same since the h.264 encoder and the hdmi transmitter probably expand the 16-236 range to 0-255. So, I have to find how to disable the range expansion;

- I tried the parameter "OMX_VIDEO_PARAM_VUIINFOTYPE.bFullRange" with index "OMX_TI_IndexParamVideoVUIsettings" for the h.264 encoder but without success. This parameter is documented as "indicate whether pixel value range is specified as full range or not (0 to 255)" (see OMX_TI_Video.h);

- I found the bit 4 of the register "VID_MODE" in HDMI transmitter that is documented as "Data range 16–235 to 0–255 expansion" (see sprugz8a.pdf). But, this is already set to '0' (disabled);

Thanks in advance. 

  • Hi,

    Answers inline,

    Stephane Rousseau said:
    I noticed that the 8-bits value of the luminance (Y) is clipped to the range 16-235. So, my question is: How to have the full range of luminance (0-255)?

    This is because SII9135 is being operated in embedded sync mode. So in embedded sync mode, video range is limited instead of full range. For getting full range SII9135 needs to be configured for discrete sync output to VIP. But because of DM8148 errata advisory 1.1.10 discrete sync is not possible with Sii9135 as of now.


    Regards,

    Hardik Shah

  • Thanks Hardik,

    In the embedded sync mode, it is not only the values ​​0 and 255 of the 8-bit luminance that is used? My problem is the luminance that is clipped to 16-235 (the values 0 to 15 and 236 to 255 are lost).

    Moreover, as described in my first post, if I put the bit 0 of register VID_MODE_2 to '0' (see file"vpsdrv_sii9135I2c.c" in VPSS), the luminance range becomes 1-254. This register bit is documented as "1: Range clip enable, 0: disable".

    So, actually my problem is not at the level of the capture but farther in the stream pipe (see my first post).