Media (Intel® oneAPI 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 sign-in experience has changed to support enhanced security controls. If you sign in, click here for more information.
3001 Discussions

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

vitm__vit
Beginner
240 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
240 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

vitm__vit
Beginner
240 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

Mark_L_Intel1
Moderator
240 Views

Yes, I agree.

Mark

Reply