How to use PARALLELdn operator after RemoveImage gracefully to reduce parallelism without having to use frame buffer?

  • How to use PARALLELdn operator after RemoveImage gracefully to reduce parallelism without having to use frame buffer?

    For example, the input parallelism is 4, and now RemoveImage is used to delete three images in a continuous sequence of four images and only one is retained. The remaining processing logic is actually sufficient when the parallelism is 1. We use PARALLELdn to reduce the parallelism to 1 in order to reduce resources, but must we use a frame buffer for this? After all, even if one image cannot be transmitted in time after the parallelism is reduced to 1.

  • Hello silverfly


    from a logical point of view this is not possible. You will need a frame buffer between RemoveImage and PARALLELdn to buffer the bursts.


    You can calculate the required buffer size by using a function for the input. Slope = input bandwith. Gap = frame gap minus a second function = parallel 1 e.g. 160MP/s. Maybe your previous buffers or a fifo can be sufficient.


    Johannes


    Johannes Trein
    Teamleader Applications and Development
    SiliconSoftware GmbH
    https://silicon.software/wp-content/uploads/siso-logo-animation.gif



  • Okay, thank you!


    I still don't know how to calculate the size of the buffer. Could you illustrate with my example, where the clock frequency is 62.5MHz.


    In my understanding, after using the RemoveImage operator to reduce the parallelism, an ImageFifo close to the size of an image frame is required anyway. Specificly, it should be ImageSize * OutputParallelism / InputParallelism, which is an unaffordable resource overhead.

  • Hi


    assume the following example:

    Input

    - CL-Base, 2 Tap @ 85MHz = 170MP/s

    - 16MP/image

    - 8fps

    - transfer time for 1 frame = 16 MP / 170MP/s = 0.1s


    Design:

    pasted-from-clipboard.png


    The camera peak bandwidth is 170MP/s

    The average camera bandwidth is 8fps * 16MP = 128MP/s

    --> Parallelism 4 is sufficient


    After "Remove3of4images":

    Peak bandwidth is still 170MP/s

    Average bandwith is 128MP/s / 4 = 32MP/s

    --> Parallelism 4 is sufficient


    After PARALLELdn the link bandwidth is 62.5MP/s. Therefore we need the buffer.


    To calculate the buffer fill level we subtract the output bandwidth from the input bandwidth to calculate the fill speed:

    Fill Speed = 170 MP/s - 62.5 MP/s = 107.5MP/s

    After one frame the buffer fill level is: 107.5MP/s * 0.1 sec = 10.75MP

    As there is a transfer gap after each frame the buffer has enogh time to get empty. It will be empty after 0.1s + 10.75MP/62.5MP/s = 0.272s which is equal to the maximum framerate of a 16MP image at parallel 1: 62.5MP/s / 16MP = 3.9fps --> 1/3.9fps = 0.256s (which is the same value as above with some rounding errors)

    pasted-from-clipboard.png


    The explanation above is only valid for line or pixel buffers like ImageBuffer or ImageFifo. If you are using a frame buffer you need to store the full image. See http://www.siliconsoftware.de/…ntent/library.Memory.html


    Johannes


    Johannes Trein
    Teamleader Applications and Development
    SiliconSoftware GmbH
    https://silicon.software/wp-content/uploads/siso-logo-animation.gif



  • Using the above we can write down a forumla for the fill level


    Buffer fill level = frame size * ( 1 - link bandwidth after buffer / peak bandwidh from camera)


    For the example we do have: 16MP * ( 1 - 62.5MP/s / 170MP/s) = 10.12MP


    Johannes Trein
    Teamleader Applications and Development
    SiliconSoftware GmbH
    https://silicon.software/wp-content/uploads/siso-logo-animation.gif