Camera Man wrote
>
> Would you be able to post a small example that has working hardware
> acceleration? Or could you give a few tips about how to use the relevant
> vlc parts?
>
Almost the whole content of ${VLC_SOURCE_ROOT}/modules/codec/avcodec/dxva2.c
And also, if you intend to retrieve the decoded frame from the video memory
back to the system memory, you should adopt
${VLC_SOURCE_ROOT}/modules/codec/avcodec/copy.c, because usual memcpy()
heavily increases CPU load.
In your main code you setup 4 callbacks in AVCodecContext before opening it
Special check for CODEC_ID_MJPEG is required because both HW acceleration
and JPEG decoder use AVCodecContext::opaque but put different data in it.
Then, when avcodec_decode_video2() returns that it has got picture, you call
vlc_va_ExtractPicture() (or similar name).
--
View this message in context:
http://libav-api.1054858.n5.nabble.com/libav-api-Another-basic-questions-about-h264-decoding-tp5584833p5599986.html
Sent from the libav-api mailing list archive at Nabble.com.
_______________________________________________
libav-api mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-api