I am trying to increase my encode performance, and am wanting to understand the optimal operation sequence of Encode() and SyncOperation() calls. The sdk manual notes:
For performance considerations, the application must submit multiple operations and delays synchronization as much as possible, which gives the SDK flexibility to organize internal pipelining. For example, the operation sequence, ENCODE(f1) ENCODE(f2) SYNC(f1) SYNC(f2) is recommended, compared with ENCODE(f1) SYNC(f1) ENCODE(f2) SYNC(f2).
Suppose I have multiple streams A and B to encode simultaneously and I submit them as follows:
- Encode(A1), Encode(B1), Encode(A2), Encode(B2)
My possible SyncOperation sequences are as follows:
#1. Sync(A1), Sync(A2), Sync(B1), Sync(B2)
#2. Sync(A1), Sync(B1), Sync(A2), Sync(B2)
Will the performance be the same? #1 better? #2 better? Does it matter if they are a joined session or not (they are not currently JoinSession'ed)?