ffmpeg/fftools
Haihao Xiang ad67ea9eee ffmpeg_opt: consider HW acceleration method when selecting decoder
Usually a HW decoder is expected when user specifies a HW acceleration
method via -hwaccel option, however the current implementation doesn't
take HW acceleration method into account, it is possible to select a SW
decoder.

For example:
$ ffmpeg -hwaccel vaapi -i av1.mp4 -f null -
$ ffmpeg -hwaccel nvdec -i av1.mp4 -f null -
$ ffmpeg -hwaccel vdpau -i av1.mp4 -f null -
[...]
Stream #0:0 -> #0:0 (av1 (libdav1d) -> wrapped_avframe (native))

libdav1d is selected in this case even if vaapi, nvdec or vdpau is
specified.

After applying this patch, the native av1 decoder (with vaapi, nvdec or
vdpau support) is selected for decoding(libdav1d is still used for
probing format).
$ ffmpeg -hwaccel vaapi -i av1.mp4 -f null -
$ ffmpeg -hwaccel nvdec -i av1.mp4 -f null -
$ ffmpeg -hwaccel vdpau -i av1.mp4 -f null -
[...]
Stream #0:0 -> #0:0 (av1 (native) -> wrapped_avframe (native))

Tested-by: Mario Roy <marioeroy@gmail.com>
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2022-08-03 11:10:57 +08:00
..
Makefile fftools: add a multistream thread-safe queue 2022-07-23 11:53:19 +02:00
cmdutils.c fftools: Fix preset search pathes 2022-07-08 13:58:49 +02:00
cmdutils.h
ffmpeg.c fftools/ffmpeg: do not log to the decoder context 2022-07-28 16:37:16 +02:00
ffmpeg.h fftools/ffmpeg: deprecate the -map_channel option 2022-07-28 16:37:16 +02:00
ffmpeg_filter.c fftools/ffmpeg_filter: drop a block commented out since 2012 2022-07-28 16:37:16 +02:00
ffmpeg_hw.c
ffmpeg_mux.c fftools/ffmpeg_mux: move some functions closer to their only callers 2022-07-28 16:37:16 +02:00
ffmpeg_opt.c ffmpeg_opt: consider HW acceleration method when selecting decoder 2022-08-03 11:10:57 +08:00
ffplay.c fftools/ffplay: fix YUV conversion mode 2022-06-27 12:17:59 +02:00
ffprobe.c ffprobe: print AVFrame.duration 2022-07-19 12:27:18 +02:00
fopen_utf8.h
objpool.c fftools/objpool: Don't use return with expression when returning void 2022-07-23 18:58:35 +02:00
objpool.h fftools: add an object pool 2022-07-23 11:53:19 +02:00
opt_common.c
opt_common.h
sync_queue.c fftools/ffmpeg: replace AVFrame.pkt_duration with duration 2022-07-24 08:46:16 +02:00
sync_queue.h fftools/ffmpeg: use the sync queues to handle -frames 2022-07-23 11:53:19 +02:00
thread_queue.c fftools: add a multistream thread-safe queue 2022-07-23 11:53:19 +02:00
thread_queue.h fftools: add a multistream thread-safe queue 2022-07-23 11:53:19 +02:00