ffmpeg/fftools
Haihao Xiang ecee3b07cd qsvdec: add support for HW_DEVICE_CTX method
This allows user set hw_device_ctx instead of hw_frames_ctx for QSV
decoders, hence we may remove the ad-hoc libmfx setup code from FFmpeg.

"-hwaccel_output_format format" is applied to QSV decoders after
removing the ad-hoc libmfx code. In order to keep compatibility with old
commandlines, the default format is set to AV_PIX_FMT_QSV, but this
behavior will be removed in the future. Please set "-hwaccel_output_format qsv"
explicitly if AV_PIX_FMT_QSV is expected.

The normal device stuff works for QSV decoders now, user may use
"-init_hw_device args" to initialise device and "-hwaccel_device
devicename" to select a device for QSV decoders.

"-qsv_device device" which was added for workarounding device selection
in the ad-hoc libmfx code still works

For example:

$> ffmpeg -init_hw_device qsv=qsv:hw_any,child_device=/dev/dri/card0
-hwaccel qsv -c:v h264_qsv -i input.h264  -f null -

/dev/dri/renderD128 is actually open for h264_qsv decoder in the above
command without this patch. After applying this patch, /dev/dri/card0
is used.

$> ffmpeg -init_hw_device vaapi=va:/dev/dri/card0 -init_hw_device
qsv=hw@va -hwaccel_device hw -hwaccel qsv -c:v h264_qsv -i input.h264
-f null -

device hw of type qsv is not usable in the above command without this
patch. After applying this patch, this command works as expected.

Reviewed-by: Soft Works <softworkz@hotmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-08-11 13:45:36 -03:00
..
Makefile qsvdec: add support for HW_DEVICE_CTX method 2021-08-11 13:45:36 -03:00
cmdutils.c fftools/cmdutils: Use av_strstart() instead of strncmp() 2021-08-11 16:24:36 +02:00
cmdutils.h fftools/cmdutils: Remove unused cpu_count 2021-08-08 18:40:46 +02:00
ffmpeg.c ffmpeg: fix order between field order autodetection and override 2021-07-25 22:40:49 +03:00
ffmpeg.h qsvdec: add support for HW_DEVICE_CTX method 2021-08-11 13:45:36 -03:00
ffmpeg_filter.c fftools/ffmpeg_filter: add a return at the end of non-void functions 2021-08-06 21:22:49 -03:00
ffmpeg_hw.c qsvdec: add support for HW_DEVICE_CTX method 2021-08-11 13:45:36 -03:00
ffmpeg_opt.c qsvdec: add support for HW_DEVICE_CTX method 2021-08-11 13:45:36 -03:00
ffmpeg_videotoolbox.c ffmpeg_videotoolbox: skip memory copy if hwaccel_output_format match 2021-06-10 19:54:03 +08:00
ffplay.c fftools: Don't set default swscale flags in ffmpeg/ffprobe/ffplay 2021-08-05 22:23:49 +08:00
ffprobe.c ffprobe: remove references to frame->pkt_pts 2021-08-07 10:16:07 -03:00