diff options
author | Haihao Xiang <haihao.xiang@intel.com> | 2021-09-17 22:05:21 +0800 |
---|---|---|
committer | Haihao Xiang <haihao.xiang@intel.com> | 2022-08-03 11:10:57 +0800 |
commit | ad67ea9eeed2cc8edab8662b7503ce4a49247b1d (patch) | |
tree | 0acbba56bf0446d68df3beabc7563d510b1d0fc5 /libavformat/data_uri.c | |
parent | df5defe15a29dfca5f13224eb5da821095f6c745 (diff) | |
download | ffmpeg-ad67ea9eeed2cc8edab8662b7503ce4a49247b1d.tar.gz |
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>
Diffstat (limited to 'libavformat/data_uri.c')
0 files changed, 0 insertions, 0 deletions