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
공지
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.
3085 토론

Using the output of a decoder (video_memory) in many encoders or vpp processors.

cedronius__anders
새로운 기여자 I
2,051 조회수

My decoder outputs a mfxFrameSurface1* (MFX_IOPATTERN_OUT_VIDEO_MEMORY) . Feeding one Encoder is simple and you basically just feed the mfxFrameSurface1* and off you go.

However since a session only supports one decoder/encoder/vpp adding another decoder to consume the  mfxFrameSurface1* is not possible as I understand it. 

I tried feeding the mfxFrameSurface1* to multiple encoders but then I get -> 

intel_transcoder: /opt/src/msdk/_studio/mfx_lib/shared/src/mfx_h264_encode_vaapi.cpp:3026: virtual mfxStatus MfxHwH264Encode::VAAPIEncoder::Execute(mfxHDLPair, const MfxHwH264Encode::DdiTask&, mfxU32, const MfxHwH264Encode::PreAllocatedVector&): Assertion `0x00000000 == vaSts' failed.

 
I guess it's due to the other encoders are using the same buffer in other sessions.

So I realise the 'problem' is that i need som kind of buffer management between the Producer (decoder) and Consumers (Encoder / VPP).

Is there a copy mfxFrameSurface1*?

I've looked at the multi-transcode sample but it's several 100kb of code and just too complex to understand for me what it's doing and there is no 'simple' multi_transcode example available that i've found. 


My system is : 
Ubuntu 20.04
bva info: VA-API version 1.10.0
libva info: User environment variable requested driver 'iHD'
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_9
libva info: va_openDriver() returns 0
MSDK 1.34 

Is there a simple up to date information about how to feed multiple consumers a mfxFrameSurface1* that resides in the video memory?

Thanks for helping,

/Anders


0 포인트
1 솔루션
Mark_L_Intel1
중재자
1,947 조회수

Hi Anders,


Did my answer solved your question?


Mark


원본 게시물의 솔루션 보기

0 포인트
4 응답
cedronius__anders
새로운 기여자 I
2,044 조회수

I meant to write ->  "adding another encoder to consume the  mfxFrameSurface1* is not possible as I understand it."

0 포인트
AthiraM_Intel
중재자
2,017 조회수

Hi,

 

We are forwarding your case to Subject matter Experts.


Thanks.


Mark_L_Intel1
중재자
1,978 조회수

Hi Anders,


Sorry for the late response. There seem to be 2 questions: multiple session and memory locking. Media SDK don't have specific memory locking APIs, so the general memory management should work.


For multi-session, would following document be helpful?

https://github.com/Intel-Media-SDK/MediaSDK/blob/master/doc/mediasdk-man.md#multiple-sessions


Mark


0 포인트
Mark_L_Intel1
중재자
1,948 조회수

Hi Anders,


Did my answer solved your question?


Mark


0 포인트
응답