- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
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
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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,
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
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
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page