[vlc-devel] [Patches]: Video Decoder Acceleration (VDA) avcodec module for Mac OS X

Sebastien Zwickert dilaroga at gmail.com
Sun Mar 25 16:34:14 CEST 2012


On Nov 13, 2011, at 11:21 PM, Sebastien Zwickert wrote:
> 
>>> [...]
>>> +static int Extract( vlc_va_t *p_external, picture_t *p_picture, AVFrame *p_ff )
>>> +{
>>> +    VLC_UNUSED( p_ff );
>>> +    vlc_va_vda_t *p_va = vlc_va_vda_Get( p_external );
>>> +
>>> +    if ( !p_va->top_frame )
>>> +    {
>>> +        msg_Dbg( p_va->p_log, "Decoder is buffering...");
>>> +        return VLC_EGENERIC;
>>> +    }
>>> +
>>> +    CVPixelBufferRef cv_buffer = p_va->top_frame->cv_buffer;
>>> +    vda_CopyCVBuffer( p_picture, cv_buffer );
>>> +
>>> +    return VLC_SUCCESS;
>>> +}
>>> +
>>> +static void Release( vlc_va_t *p_external, AVFrame *p_ff )
>>> +{
>>> +    VLC_UNUSED( p_ff );
>>> +    VLC_UNUSED( p_external );
>>> +}
>> 
>> I am a bit dubious about the way you implemented the surface
>> attachment to the picture.
>> To have it correctly working you should attach the correct surface to its
>> associated AVFrame buffer. Otherwise I don't think the picture order will
>> be the correct one.
> 
> The surface is output by the vda decoder via a callback.

*asynchronous* callback.


Patch in attachment updated with minors changes and the availability to
select the VDA output pixel format in the users's settings.

I've put a VLC testing build that supports VDA on : 
http://dilaroga.free.fr/vlc_vda/vlc-2.1.0-git.dmg

and more info on :
https://github.com/dilaroga/ffmpeg-vda/wiki

Best regards,
Sebastien.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20120325/6176ca91/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-avcodec-Mac-OS-X-Video-Acceleration-VDA-support.patch
Type: application/octet-stream
Size: 16244 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20120325/6176ca91/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20120325/6176ca91/attachment-0001.html>


More information about the vlc-devel mailing list