Hi,

Following* is another attempt, eliminating all global state (and making the 
user set it up instead).

* Patch 1 loses all of the initialisation code while changing the hardware 
context structure to both be compatible with the one currently used by the 
decoder and to support locking.

* Patch 2 adds the initialisation code in a simpler form, and hacks it rather 
nastily into the ffmpeg driver in order to demonstrate this all working (a new 
top-level option -vaapi).  The hwaccel helper stays the same.  The setup here 
is not sensible yet, it needs to be integrated more coherently.

* Patches 3-5 are essentially the same as before, except they now receive the 
hardware context through a user-set option rather than from global state.


Problems:

* The decoder should also be updated to lock its use of the hardware context, 
but I have not done that here due to compatibility concerns.

* The vaapi filter doesn't actually work from the ffmpeg driver now - I'm not 
seeing how to pass the required extra option into the filter graph without 
ridiculous hackery.

* It still needs libva at least 1.6 to build at all (ran into this trying to 
build on Ubuntu 14.04; no H.265 in headers means it doesn't build at all).


Decode and encode:

./ffmpeg -vaapi :0 -hwaccel vaapi -i in.mp4 -an -c:v vaapi_h264 -qp 26 
-idr_interval 120 out.mp4


Comments invited.

Thanks,

- Mark


(*Or <http://www.jkqxz.net/~mrt/ffmpeg-vaapi/>.)
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to