Le 2014-09-17 19:23, Luca Barbato a écrit :
On 17/09/14 17:51, Rémi Denis-Courmont wrote:
Note: There could also be a higher-level helper to allocate a VDPAU
video surface, or even to allocate a surface and associate it with an AVFrame. This is left for further study. In any case, the chroma type
and frame sizes are usually required by the application before any
surface is allocated (that affects at least both avconv and VLC).

Sounds interesting. Let's discuss it tomorrow =)

I have a patch that wraps VdpVideoSurface... but I decided to withhold it because I have two problems with it:

1) I am undecided whether it get the hardware context from the hwaccel_context, or from hwaccel_priv_data. The latter seems cleaner, but is only possible after hwaccel.init()

2) Unlike avconv, VLC needs to count references to the VDPAU video surfaces it gives to and takes (back) from libavcodec. For instance, the VDPAU deinterlacer will retain references to VDPAU video surfaces, while libavcodec may also do so for codec reference frames. Yet we don't want to leak AVFrame or AVBufferRef throughout the VLC code base all the way to the VDPAU video output via the VDPAU video filters. So we need to keep the VLC reference counting as it is - wrapped into a custom AVBufferRef.

--
Rémi Denis-Courmont
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to