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.

RTOS: Captured video frame quality through VIP is very poor

Tool/software: TI-RTOS

Hi all,

We are using the ADV7182 video decoder on DRA74xx processor through VIP and VPDMA using IPU1. We are using custom driver similar to vision sdks for accessing the VIP/VPDMA.

The frames are captured properly but the video quality captured is very low. The video decoder configuration looks Ok and we are using the recommended configuration from AnalogDevices. 

The input format is y(4:2:0) embedded sync. It is converted to y(4:2:2) before sending to display area.

Looks Odd and Even fields are also properly received . We make minor adjustment in DDR area to change the start address of odd and even field based on field_id. Kindly let us know where there could be issue regarding video quality.

*The image on the right top is the back camera output

With regards,

Jeyaseelan

  • Jeyaseelan,

    VIP is just the port, it captures the frame as it received from the external decoder. Unless you enabled any of the internal processing. it will just dump the data into memory.. Could you check if any processing module, scalar, color space conversion, is enabled in VIP path?

    Rgds,
    Brijesh
  • Hi Brijesh,

    Do you mean to say that the CSC and SC block inside VIP. As far the path for y:4: 2:2 to y:4:2:0 to VPDMA, inside VIP , it looks passes through CSC and CHR_DS1 . We use some CSC co-efficients as below to CSC base block within VIP.
    /* default colorspace coefficients */

    static struct colorspace_coeffs colorspace_coeffs[4] = {
    {//[CSC_COEFFS_VIDEO_RANGE_Y2R] =
    {
    /* SDTV */
    0x0400, 0x0000, 0x057D, 0x0400, 0x1EA7, 0x1D35,
    0x0400, 0x06EF, 0x1FFE, 0x0D40, 0x0210, 0x0C88,
    },
    {
    /* HDTV */
    0x0400, 0x0000, 0x0629, 0x0400, 0x1F45, 0x1E2B,
    0x0400, 0x0742, 0x0000, 0x0CEC, 0x0148, 0x0C60,
    },
    },
    {//[CSC_COEFFS_GRAPHICS_RANGE_Y2R] =
    {
    /* SDTV */
    0x04A8, 0x1FFE, 0x0662, 0x04A8, 0x1E6F, 0x1CBF,
    0x04A8, 0x0812, 0x1FFF, 0x0C84, 0x0220, 0x0BAC,
    },
    {
    /* HDTV */
    0x04A8, 0x0000, 0x072C, 0x04A8, 0x1F26, 0x1DDE,
    0x04A8, 0x0873, 0x0000, 0x0C20, 0x0134, 0x0B7C,
    },
    },
    {//[CSC_COEFFS_VIDEO_RANGE_R2Y] =
    {
    /* SDTV */
    0x0132, 0x0259, 0x0075, 0x1F50, 0x1EA5, 0x020B,
    0x020B, 0x1E4A, 0x1FAB, 0x0000, 0x0200, 0x0200,
    },
    {
    /* HDTV */
    0x00DA, 0x02DC, 0x004A, 0x1F88, 0x1E6C, 0x020C,
    0x020C, 0x1E24, 0x1FD0, 0x0000, 0x0200, 0x0200,
    },
    },
    {//[CSC_COEFFS_GRAPHICS_RANGE_R2Y] =
    {
    /* SDTV */
    0x0107, 0x0204, 0x0064, 0x1F68, 0x1ED6, 0x01C2,
    0x01C2, 0x1E87, 0x1FB7, 0x0040, 0x0200, 0x0200,
    },
    {
    /* HDTV */
    0x04A8, 0x0000, 0x072C, 0x04A8, 0x1F26, 0x1DDE,
    0x04A8, 0x0873, 0x0000, 0x0C20, 0x0134, 0x0B7C,
    },
    },
    };

    Even if i do not set these co-efficients , still the quality is not improved.By default this CSC co-efficient is set to
    {//[CSC_COEFFS_VIDEO_RANGE_Y2R] =
    {
    /* SDTV */
    0x0400, 0x0000, 0x057D, 0x0400, 0x1EA7, 0x1D35,
    0x0400, 0x06EF, 0x1FFE, 0x0D40, 0x0210, 0x0C88,
    },
    Removing this also do not make any difference. SC also looks not used within VIP. Can you clarify where to check for changes to be done ,  whether on display (DSS side ) or in VIP side.

    With regards,
    Jeyaseelan

  • Hi Brijesh,

    Is the CSC co-efficient values what we use, is correct for y4:2:2 to y:4:2:0 conversion ? Actually when we face the camera straight, the camera quality looks a bit better. Only the sides looks a bit not clear.

    *i disabled the DSS scaling to zoom ,and displayed the same scale configured for VPDMA width , height 720*240 . There is not much difference. I feel the dss do not have any effect over the ones captured from VIP

    With regards,
    Jeyaseelan
  • Jeyaseelan,

    CSC is not used for YUV422 to YUV420 conversion..
    Even if you disable scaling, there could be color conversion in DSS.
    I would suggest first you check the capture output and see if it looks ok.. Essentially, identify the module, which introducing artifacts..

    Rgds,
    Brijesh