Media (Intel® Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools like Intel® oneAPI Video Processing Library and Intel® Media SDK
Announcements
The Intel Media SDK project is no longer active. For continued support and access to new features, Intel Media SDK users are encouraged to read the transition guide on upgrading from Intel® Media SDK to Intel® Video Processing Library (VPL), and to move to VPL as soon as possible.
For more information, see the VPL website.

Asynchronous Pipeline: VPP(f1) --> ENCODE(f2) --> SYNC(f1) --> SYNC(f2)

vitm__vit
Beginner
410 Views

This question is appeared as a result of the discussion:
https://software.intel.com/en-us/forums/intel-media-sdk/topic/780765

vitm: Let's focus on asynchronous pipeline.
It consists of two operations:

VPP(f1) --> ENCODE(f2) --> SYNC(f1) --> SYNC(f2)

Liu, Mark (Intel):
there is mistake in your post. MSDK is a hardware based library, so all the key operations are asynchnized, your pipe line description should be:

VPP(f1) --> SYNC(f1) --> ENCODE(f2) -->SYNC(f2)

This is critical since without the first sync operation, the second enc operation might wait forever for the surface be available.

I do not agree with this answer.

What does documentation say
mediasdk-man.pdf
chapter: Asynchronous Pipeline ( page 21-22 )

To construct an asynchronous pipeline:

The application passes the output of an upstream SDK function to the input of the downstream SDK function

The application only needs to synchronize after the last SDK function.
Explicit synchronization of intermediate results is not required and in fact can slow performance.

For performance considerations, the application must submit multiple operations and delays synchronization as much as possible.

The operation sequence,
ENCODE(f1) → ENCODE(f2) → SYNC(f1) → SYNC(f2) is recommended,

compared with:
ENCODE(f1) → SYNC(f1) → ENCODE(f2) → SYNC(f2)

------------------------------

Where is the mistake ?

0 Kudos
3 Replies
Mark_L_Intel1
Moderator
410 Views

Both are wrong,

You only need one sync operation, so it should like:

VPP(f1) --> ENCODE(f2) -->SYNC(f2)

You can also check this with our tutorial code and thanks for chasing this down to correct my mistake.

Mark

0 Kudos
vitm__vit
Beginner
410 Views

:) it is not wrong

both operations are working:

ENCODE(f1) → SYNC(f1) → ENCODE(f2) → SYNC(f2)
ENCODE(f1) → ENCODE(f2) → SYNC(f2)

both taken from Intel documentation.
We just should take in account performance impact of additional SYNC() operation:

Explicit synchronization of intermediate results is not required and in fact can slow performance.

ok, thanks

0 Kudos
Mark_L_Intel1
Moderator
410 Views

Yes, I agree.

Mark

0 Kudos
Reply