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.

DM8168 VIP -> CSC color space conversion

Expert 1915 points

Hello,


My input is 24bit RGB, my OMX application has the following configuration:

RGB24 -> VIP / CSC -> DEI / SC -> H264ENC ->File

It works fine, colors look ok, but I have overflows (off-color borders on edges). I assume this due to the VIP/CSC using a limited color space (ITU R709 maybe?) so I have overflows on full range color signals.

How can I configure the CSC (part of the VFCC?) via  OMX?

I assume the CSC is enabled by default? What does it expect, what are the default settings?

My current VFCC config:

  sHwPortParam.eCaptMode = OMX_VIDEO_CaptureModeSC_DISCRETESYNC_ACTVID_VSYNC;
  sHwPortParam.eVifMode = OMX_VIDEO_CaptureVifMode_24BIT;
  sHwPortParam.eInColorFormat = OMX_COLOR_Format24bitRGB888;
  sHwPortParam.eScanType = OMX_VIDEO_CaptureScanTypeProgressive;

Is the paramPort.format.video.eColorFormat output be OMX_COLOR_FormatYUV420SemiPlanar setting correct?

Regards,

Lo

  • This could be from color decimation or from the scaler. I don't think this is CSC since CSC is not a spatial filter so can only convert a pixel color to another pixel color. there is no dependence on surrounding pixels i.e. edges.

    Scaling is a spatial filter so could introduce edge artifacts.

    Going from 444 format (RGB24 input) to 420 format used by H.264 is also a spatial filter and can cause edge color issues.

    Unfortunately it is simply impossible to maintain sharp color transitions when using 420 color space.

    BR,

    Steve

  • Hi Steve,

    I still have color issues, but I also have this problem:

    It looks like the VIP by default samples on the rising edge, I need to sample on the falling edge.

    Can I control the PIXCLK_EDGE_POLARITY bit from OMX?

    When I flip the bit manually it works. Great workaround but I'd like to fix this permanently.

    Regards,

    Post Lo

  • Can you check Capture component in the OMX? it is contrallable in the driver, but not sure if it is from OMX.

     

    Regards,

    Brijesh

  • Hi Lo2,

    There is no OMX Index available to set pixel_edge_polarity in VFCC OMX component.

    If you have OMX overlay code you can modify VFCC create arguments as shown below.

    In omx_vfcc_drvif.c, the function _OMX_VFCCMapOmxSettingsToDrvCreateArgs() sets  

    pCreateArgs->vipParserPortConfig = NULL;

    If you want to set only pixel_edge polarity to falling edge, you can set this as shown below.

    Vps_VipPortConfig vipPortCfg;

    vipPortCfg.ctrlChanSel = (UInt32)VPS_VIP_CTRL_CHAN_DONT_CARE;
    vipPortCfg.ancChSel8b = (UInt32)VPS_VIP_ANC_CH_SEL_DONT_CARE;
    vipPortCfg.pixClkEdgePol = (UInt32)VPS_VIP_PIX_CLK_EDGE_POL_FALLING;

    vipPortCfg.invertFidPol = (UInt32)VPS_VIP_VALUE_DONT_CARE;
    vipPortCfg.embConfig.errCorrEnable = (UInt32)VPS_VIP_VALUE_DONT_CARE;
    vipPortCfg.embConfig.srcNumPos = (UInt32)VPS_VIP_SRC_NUM_POS_DONT_CARE;
    vipPortCfg.embConfig.isMaxChan3Bits = (UInt32)VPS_VIP_VALUE_DONT_CARE;

    vipPortCfg.disConfig.fidSkewPostCnt = (UInt32)VPS_VIP_VALUE_DONT_CARE;
    vipPortCfg.disConfig.fidSkewPreCnt = (UInt32)VPS_VIP_VALUE_DONT_CARE;
    vipPortCfg.disConfig.lineCaptureStyle = (UInt32)VPS_VIP_LINE_CAPTURE_STYLE_DONT_CARE;
    vipPortCfg.disConfig.fidDetectMode = (UInt32)VPS_VIP_FID_DETECT_MODE_DONT_CARE;
    vipPortCfg.disConfig.actvidPol = (UInt32)VPS_VIP_POLARITY_DONT_CARE;
    vipPortCfg.disConfig.vsyncPol = (UInt32)VPS_VIP_POLARITY_DONT_CARE;
    vipPortCfg.disConfig.hsyncPol = (UInt32)VPS_VIP_POLARITY_DONT_CARE;
    vipPortCfg.disConfig.hsyncPol = (UInt32)VPS_VIP_POLARITY_DONT_CARE;

    pCreateArgs->vipParserPortConfig = &vipPortCfg;

    Thanks