[FFmpeg-devel] LibVA hardware acceleration support for ffmpeg command line.

belcampo belcampo
Sun Aug 8 17:46:02 CEST 2010


Meekys wrote:
> Hey all,
> 
> I've been poking around at the ffmpeg code a bit the last couple of 
> weeks trying to get the ffmpeg command line tool to support hardware 
> acceleration.
> 
> I've come up with the following:
> ffmpeg-va.patch
>    Patch for ffmpeg.c
> ffmpeg-va.h, ffmpeg-va.c
>    Basic video acceleration framework (based off the vlc hwaccel code)
> ffmpeg-va-vaapi.c
>    VAAPI implementation of the hardware acceleration. (also based off 
> the vlc hwaccel code)
> 
> To get this to run, copy the files into the ffmpeg source directory and 
> apply the patch to ffmpeg.c
> 
> After running ./configure you will also need to modify the following 
> files. (No patches for these at this stage)
> Makefile
>  Add a line: ffmpeg_g$(EXESUF): FF_EXTRALIBS += $(VA_LIBS)
>  Before: ffplay_g$(EXESUF): FF_EXTRALIBS += $(SDL_LIBS)
> config.mak
>  Add a line: VA_LIBS=-L/usr/lib -lva -lva-x11
>  Before: SDL_LIBS=-L/usr/lib -lSDL
> 
> Feedback is welcome. It's probably quite specific to my setup currently, 
> so maybe some changes are required.
Did some short tests which went well, but now I run out of memory very 
soon. After 182 frames I need from 300MB -> 585MB of memory.

Performance wise on a short clip, with BBC-HD material 1080i -> 576p on 
a low-power Acer Revo, I get improvement
1Core 14.4%
2Cores 20.8%
4Cores 19.0%
> 
> Testing on my machine, I was able to get an improvement from ~19fps to 
> ~26fps on some 1080p samples.
> 
> Enjoy :-)
> 
> Cheers
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel




More information about the ffmpeg-devel mailing list