Hello i am interested in doing hardware accelerated decoding for my ffmpeg based multimedia program using VA API .... i am kind of a beginner and does not understand very well as how VAAPI interacts with ffmpeg libraries .... what i have seen from the source code of ffmpeg is that some parts of VAAPI (decoding parts) are already implemented inside ffmpeg source code (libavcodec/vaapi.c and others) ......

what i am confused is as how should i activate the VAAPI acceleration while processing my video via libav* libraries .

filling up vaapi_context as suggested in api documentation and then putting vaapi_context into AVCodecContext::hwaccel_context does nothing ... and AVCodecContext::hwaccel is also empty ....

as what i have observed from the source code is that libav* libraries set hwaccel after it recognizes the hardware accelerated decoder using ff_find_hwaccel <libavcodec_2internal_8h.html#a2168f59dcf72bc6ddd10cddc2ff0b966>() inside setup_hwaccel_for_pixfmt <mpeg12dec_8c.html#a5340d7538dc153223eb4fed064c19423>() function. ff_find_hwaccel() compares both codec id and pixelformat to detect which hardware accelerator to load ... ff_find_hwaccel() searches for codec id and pixelfromat described in AVCodecContext to find out what harware accelerator to use . in case for mpeg2 codec ff_find_hwaccel() searches for codec id of mpeg2 and pixelformat " /PIX_FMT_VAAPI_VLD" /inside AVCodecContext . ff_find_hwaccel() is successful in finding the mpeg2 codec id inside AVCodecContext structure returned from AVFormatContext but it fails to find the "PIX_FMT_VAAPI_VLD" and does not activate the hardware acceleration ....

what i need to know is what should i do to activate the VAAPI hardware acceleration , a simple example would be helpful , and please also don't prescribe me to see splited deskop examples
or look at the code of VLC play and MPlayer .
_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user

Reply via email to