TDA4VH-Q1: Need clarity on openvx/tiovx pipeline and batch processing

Part Number: TDA4VH-Q1

Tool/software:

Hi TI,

I have a doubt about openvx/tiovx batch processing and pipeline. 

Usecase: I have five separate cameras connected to separate ports. These camera images are being processed in five separate graphs having capture nodes, ldc, viss, scaler etc.

Now, I need to take each ldc node output image and process them in a separate pipeline. All ldc output images are of same resolution.

Q1. How can I synchronize two graphs running in separate threads ? Suppose in the above case the five graphs are running slower than the new pipeline, will the new pipeline still enqueue the reference having old data or it will wait for the new data to come? how the new pipeline will use the ldc output buffer of main pipelines?

Q2. Can I do batch processing in the above usecase ?

Q3. Is there any difference(resource consumption wise and fps wise) between implementing separate pipeline for each ldc output(first implementation option) or creating a single pipeline for all ldc outputs (second implementation option)?

Q4. My understanding is that in the second case, each node's output object array will have five objects and further nodes will be replicated based on the number of objects in the input object array(correct me if I am wrong). The replicated nodes will use the same target assigned to the original node?(Need clarity on this).

Q5. What will happen if the target reaches 100% load? Will the framework take care of this and assign the rest of the replicated nodes a second target? I don't think tiovx framework give flexibility to application to assign separate target to replicated node. 

Q6. Now, Will both implementations here consume same amount of resources?

One advantage I see in the first implementation is that we have an option to assign desired target to the other nodes which we cannot do in the second implementation.

Thanks and Regards,
Lalit

  • Hi,

    Q1. How can I synchronize two graphs running in separate threads ? Suppose in the above case the five graphs are running slower than the new pipeline, will the new pipeline still enqueue the reference having old data or it will wait for the new data to come? how the new pipeline will use the ldc output buffer of main pipelines?

    Synchronization of 2 graphs should be done by the application. It could be done by setting the source node's input of both the graph as graph parameter and the application shall feed the same frames to both the graphs.

     Can I do batch processing in the above usecase ?

    Could you elaborate what you mean by batch processing here?

    Q3. Is there any difference(resource consumption wise and fps wise) between implementing separate pipeline for each ldc output(first implementation option) or creating a single pipeline for all ldc outputs (second implementation option)?

    Q4. My understanding is that in the second case, each node's output object array will have five objects and further nodes will be replicated based on the number of objects in the input object array(correct me if I am wrong). The replicated nodes will use the same target assigned to the original node?(Need clarity on this).

    Yes, in this case, the object array is used, so the synchronization is done by the framework as it is in the same graph. The target used by all the replicated nodes will be the same.

    Q5. What will happen if the target reaches 100% load? Will the framework take care of this and assign the rest of the replicated nodes a second target? I don't think tiovx framework give flexibility to application to assign separate target to replicated node. 

    Target is nothing but a task running on the core. So, if all nodes are on same task, then they are executed one after the other. If they are different targets (i.e. not replicated node) then unless the target priorities are not same, the tasks will be executed one after the other (but in this case, not in any particular order. It would be based on task scheduling)

    Q6. Now, Will both implementations here consume same amount of resources?

    In case of 2 graphs, there will be few additional resources like a bit more object descriptor of the second graph. Apart from that, the number of buffers and other data objects depends on the way the code is written

    Regards,

    Nikhil