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/TDA2EVM5777: VPE output buffer pitch is less than width

Part Number: TDA2EVM5777
Other Parts Discussed in Thread: TDA2

Tool/software: Linux

Dear experts,

In VisoinSDK 3.6 Linux_all/Bios_all on TDA2 EVM. Capture(720P) -> VPE(600x600) -> Display(600x600 inside 1080P HDMI)

I ran into a problem that VPE's output buffer size is less than the width I provided. DSS init will fail because input pitch is less than 600. I found that in VPE code:

vpeLink_drvCommon.c@ line 481, function VpeLink_drvCreateOutObj,

                /*Width aligned to satisfy encoder requirement*/
-                pFormat->width = VpsUtils_floor(pFormat->width, 16U);
+                pFormat->width = VpsUtils_align(pFormat->width, 16U);
                pFormat->pitch[0] =
                    VpsUtils_align(pFormat->width, VPS_BUFFER_ALIGNMENT);

Please help to confirm is it correct? by default it will get 592, after modification, it will get 608.

Thanks & Best Regards!

ZM

  • I think width is 592, but pitch will still more than width, isn't it?
    pitch is calculated from the aligned/floored pitch.

    Rgds,
    Brijesh
  • Hi Brijesh,

    Our customer's algorithm wants 600x600 image. If VPE outputs 592x592, it means 8 pixels data is lost/incorrect. if output data is 608x608, it is larger than 600x600, which make sense. the algorithm can only take 600x600 from it, all 600x600 is correct.

    From the example in the description, displayLink is configured 600x600, this is not same with VPE, which will cause assertion.

    Thanks & Best Regards!
    ZM
  • Ming,

    Can you show the display error? Ideally it should not.
    Display just works based on what is sent by the previous link. in this case, it will just display 592 pixels, if the pitch and width are correct. The last 8 pixels will be back ground color..

    The other way to fix is, to change the code to make it ceil, instead of floor.. But then you need to enable inline scalar, or crop the buffer..

    Is it possible to just comment out floor operation and check output? I am not sure why it is added.. I think width can be anything, does not necessarily required to be aligned to 16..

    Rgds,
    Brijesh
  • Hi Brijesh,

    1. VPE must output the exact size as we want, no matter the size is 16-aligned or not. It can provide a larger buffer for us to crop, but it shouldn't provide a smaller buffer. The patch at the beginning works for this. Please help to check if this logic is correct, since all our demo are 16-aligned.

    2. DisplayLink CreateParam is set from usecase, may not align with VPE. (From my understanding, we only configure displayLink's output size, input size is from previous link. There might be some debug work to do here. After changing VPE source code, this error disappear.)
    The error message is as follows.
    [HOST] [IPU2 ] 51.171140 s: DISPLAY: Create in progress !!!
    [HOST] [IPU2 ] 51.171597 s: dispcore/src/vpscore_dss.c @ Line 1079:
    [HOST] [IPU2 ] 51.171719 s: Pitch less than Width
    [HOST] [IPU2 ] 51.171811 s: dispdrv/src/vpsdrv_displayCore.c @ Line 304:
    [HOST] [IPU2 ] 51.171902 s: Set DSS parameter failed
    [HOST] [IPU2 ] 51.171963 s: Assertion @ Line: 459 in displayLink_drv.c: status==SYSTEM_LINK_STATUS_SOK : failed !!!

    Thanks & Best Regards!
    ZM
  • Great Ming, since the issue is resolved after changing VPE link, i am closing the thread..