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.

Display using V4L2 without color conversion

I'm using V4L2 to display a videostream in YUY422 (YUYV) format. The output port is configured for embedded sync and automatically convert the pixel values from the 8-bit 0-255 range to 16-235 range. Is there a way to disable this compression ? According to VPSS user guide, there doesn't seems to be any ioctrl to control that feature... 

Any idea of how to disable this ?

Pierre-Olivier

  • Hi,

    You can set the HDMI in discrete sync mode, but discrete sync mode wont work with interlaced output, here is the way to change it to discrete sync mode,

    echo 0 > /sys/devices/platform/vpss/display0/enabled

    echo triplediscrete,rgb888,0/0/0/0/ > /sys/devices/platform/vpss/display0/output

    echo 1 > /sys/devices/platform/vpss/display0/enabled

  • Actually i'm working on a 16-bit bus. Both embedded and discrete sync have the same behavior:

    echo "double,yuv422spuv,0/0/0/0" > /sys/devices/platform/vpss/display1/output

    echo "doublediscrete,yuv422spuv,0/0/0/0" > /sys/devices/platform/vpss/display1/output

    The buffer passed to v4l2 is converted from 0-255  to 16-235 (Y pixel value). 

    In V4L2 I use the following:

    /* Set the image size to 1920x1080 and pixel format to YUV422 */
    fmt.fmt.pix.width = m_Width;
    fmt.fmt.pix.height = m_Height;
    fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_YUYV;
    ret = ioctl(m_display_fd, VIDIOC_S_FMT, &fmt);

    Can I disable that conversion ?