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.

Using VPP surfaces as D3D RenderTargets

froueint
Beginner
568 Views
Hi,

I want to feed DirectX surfaces to the VPP, and in turn, the encoder. My input is the back buffer of my DirectX app, so I would like to render the back buffer to the surfaces in the VPP surface pool. However,the VPP surfacepool is created usingIDirectXVideoAccelerationService::CreateSurface which doesn't allow setting the D3DUSAGE_RENDERTARGET flag; this means I can't use the surfaces in the surface pool as render targets. Is there any way to get around this?

Thanks in advance,
Farhad
0 Kudos
2 Replies
Petter_L_Intel
Employee
568 Views
Hi Farhad,

Unfortunately I believe this is a DirectX/DXVA limitation. I'm not aware of any techniques to achieve this except for plainly copying the surface from the render target to the VPP surface, which obviously will impact overall performance.

What operations of VPP are you planning to use? If only scaling and/or color conversion you may instead explore using StretchRect which may prove to be more efficient. But depending on your usage, it's unclear if it fits your needs.

If anyone else on this forum has any input on this subject please educate us.

Regards,
Petter
0 Kudos
froueint
Beginner
568 Views
Hi Petter,

I just use the VPP for color conversion (RGB->NV12) before feeding the frames to the encoder. But even if I don't use the VPP, I think I would still have the same issue with using the encoder surfaces as render targets since they're also created using the IDirectXVideoAccelerationService::CreateSurface call.

Thanks,
Farhad
0 Kudos
Reply