[vlc-devel] Direct3D9 + DXVA direct rendering

Rémi Denis-Courmont remi at remlab.net
Tue Apr 14 09:41:14 CEST 2015


Le 2015-04-14 09:03, Steve Lhomme a écrit :
>> Reference counting a picture pool makes no sense at this point 
>> though. The
>> pool is destroyed when its video output or video conversion filter 
>> is
>> destroyed. Even if the pool were not destroyed, there would be no 
>> ways to
>> allocate pictures from it. So it might as well be destroyed.
>>
>> The pictures within the pool are reference counted instead. Pictures 
>> will in
>> some corner cases outlive their pool.
>
> The surfaces in the picture_t are resources that belong to the D3D9
> device.

So what? It is not the first occurence of (pooled) picture resources 
depending on a device context. Again, the only reason to have a 
reference to the pool is to allocate picture from it. There is no point 
in allocating pictures from the pool of a destroyed video output or 
video conversion filter. Thus there is no point having (externally 
visible) reference counting for pools.

> But I have to dig deeper
> there. I may end up just using a simple picture_pool_t that will
> allocate surfaces one by one when it needs more.

Been there, done that. Decoding will fail unrecoverably if the GPU runs 
out of memory. You MUST reserve all necessary resources ahead of time 
*especially* when using dedicated hardware.

> Rather than a large
> fixed size I need now. If resource handling is done properly in the
> pool then that problem will be solved.

-- 
Rémi Denis-Courmont



More information about the vlc-devel mailing list