how to use GetRenderTargetData to download the texture to a D3DPOOL_SYSTEMMEM texture,

how to use GetRenderTargetData to download the texture to a D3DPOOL_SYSTEMMEM texture,

Post by feli » Tue, 06 Jan 2004 10:25:08


can i get the decoded video frame texture from VMR9 directly in the system
memory, not in the graphic memory?

the surface that vmr9 feeds from video frame:

Vmr9presentationInfo->lpSurf

seems residing in the video memory and
having the D3DPOOL_DEFAULT attribute of the texture,
which makes it unlockable.

i can use GetRenderTargetData to download the texture to a D3DPOOL_SYSTEMMEM
texture,
modify it,
and upload to graphic card memory using UpdateTexture.

but now the problem is:
as said on the net, the downloading speed of a graphic card is
much slower than that of uploading.
 
 
 

how to use GetRenderTargetData to download the texture to a D3DPOOL_SYSTEMMEM texture,

Post by MV » Tue, 06 Jan 2004 11:26:51

The point of the VMR9 using graphics memory is to get high frame rates and
low CPU usage. You can write your own custom-allocator presenter if you
want to store objects in system memory, but your CPU usage will skyrocket.

 
 
 

how to use GetRenderTargetData to download the texture to a D3DPOOL_SYSTEMMEM texture,

Post by feli » Tue, 06 Jan 2004 13:52:27

Yes, I experienced a high CPU usage rise.
But what if I want to use the CPU, not the GPU to do some frame
modification?
Even in the custom-allocator, the frame provided by VMR9 seems residing in
the video memory,
so I have to download it first, which consumes lots of FPS.
Is there any other good way?
Or do I have to fall back on the traditional DirectShow?
 
 
 

how to use GetRenderTargetData to download the texture to a D3DPOOL_SYSTEMMEM texture,

Post by MV » Tue, 06 Jan 2004 14:24:37


You are correct, it uses D3D memory with a custom allocator-presenter too.
So you would need to write your own renderer or do your image manipulation
in a transform filter before it gets to the VMR9.