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.

Linux/TDA2PXEVM: Image data file (yuv or png) read and display

Part Number: TDA2PXEVM

Tool/software: Linux

Dear TI,

I want to read image data file (yuv or png) and display on monitor (HDMI).

I found there is a similar usecase which is null_src_dec_display usecase.
But null_src_dec_display usecase only supports mjpg or h.264.

What I have as a file on linux file system is yuv or png.
- png file is a normal png image file.
- yuv file is what I saved the ISP output as a binary file.
  Camera bayer raw data is processed by ISP on TDA2Px and I saved the ISP output (SYSTEM_DF_YUV420SP_UV) as a binary file.

In case of using png, is there any png decoder in vision SDK?
In case of using yuv, how can I relate the yuv data to Diplay Link (or IPC OUT/IN Link)?

Please, give me any advice or help.

Best regards.

  • Hi Jeong,

    We don't have a PNG library as part of VSDK, however there is an open source PNG decode library you may want to port in VSDK.
    github.com/.../upng

    It is possible to display a YUV image file to display. You need to set the display link properties to indicate this accordingly. You can refer to the display link properties set for the chains_lvdsVipSingleCam_SgxDisplay chain for more information.

    If you define your use-case using the Vision-SDK use-case generation tool, the links are automatically connected using IPC. Please refer to the Vision-SDK Linux user-guide and the Vision-SDK_UsecaseGen user guide for more information.

    Regards
    Shravan
  • Hello Shravan,

    Thank you for the answer.

    According to your suggestion (display link properties set in "chains_lvdsVipSingleCam_SgxDisplay"),
    I defined usecase as below:
    -------------------------
    NullSource (A15) -> SgxFrmcpy (A15) -> Display
    -------------------------

    And I generated _priv.h and _priv.c using generation tool.

    I also created .c file based on "null_src_decode_display" usecase (because of file input (nullsrc))
    and "lvds_vip_single_cam_view_sgx_display" usecase.

    But I encounted below run-time error.
    ================
    ASSERT (sgxFrmcpyLink_drv.c|SgxFrmcpyLink_drvDoProcessFrames|392)
    [HOST] [HOST ] 139.999328 s: SGXFRMCPY: ERROR: Recevied invalid buffer type !!!
    ================
    This error occured because my yuv data is not type of SYSTEM_BUFFER_TYPE_VIDEO_FRAME or SYSTEM_BUFFER_TYPE_VIDEO_FRAME_CONTAINER.

    In the sample usecase of "null_src_decode_display", chains_xxx_SetNullSrcPrms() function is defined as belows:
    -------------
    Void chains_xxx_SetNullSrcPrms(Chains_FileDisplayAppObj *pObj,
    NullSrcLink_CreateParams *pPrm)
    {
    ...
    pChInfo->flags = System_Link_Ch_Info_Set_Flag_Buf_Type(pChInfo->flags,
    /*SYSTEM_BUFFER_TYPE_VIDEO_FRAME*/
    SYSTEM_BUFFER_TYPE_BITSTREAM);
    ...
    }
    -------------
    If I change the flag from SYSTEM_BUFFER_TYPE_BITSTREAM to SYSTEM_BUFFER_TYPE_VIDEO_FRAME, another error happens.
    (My yuv data is one frame data.)

    How can I fix this problem?
    Can you give any advice?

    Thank you for your supports.

  • Is there a reason why your data is bitstream and not video_frame? SGX links do not support bitstream data
  • I just used the default value (SYSTEM_BUFFER_TYPE_BITSTREAM).
    But anyway, I found another way to fix it.
    Thank you for your concerns