summaryrefslogtreecommitdiff
path: root/libavfilter/qsvvpp.h
Commit message (Collapse)AuthorAgeFilesLines
* lavfi/qsv: use QSVVPPContext as base context in vf_vpp_qsv/vf_overlay_qsvHaihao Xiang2023-01-171-4/+4
| | | | | | | | | | | | | | The same members between QSVVPPContext and VPPContext are removed from VPPContext, and async_depth is moved from QSVVPPParam to QSVVPPContext so that all QSV filters using QSVVPPContext may support async depth. In addition, we may use QSVVPPContext as base context in other QSV filters in the future so that we may re-use functions defined in qsvvpp.c for other QSV filters. This commit shouldn't change the functionality of vpp_qsv / overlay_qsv. Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* libavfilter/qsvvpp: Change the alignment to meet the requirement of YUV420P ↵Wenbin Chen2022-12-081-0/+1
| | | | | | | | | | | | | | | | | | | | format When process yuv420 frames, FFmpeg uses same alignment on Y/U/V planes. VPL and MSDK use Y plane's pitch / 2 as U/V planes's pitch, which makes U/V planes 16-bytes aligned. We need to set a separate alignment to meet runtime's behaviour. Now alignment is changed to 16 so that the linesizes of U/V planes meet the requirment of VPL/MSDK. Add get_buffer.video callback to qsv filters to change the default get_buffer behaviour. Now the commandline works fine: ffmpeg -f rawvideo -pix_fmt yuv420p -s:v 3082x1884 \ -i ./3082x1884.yuv -vf 'vpp_qsv=w=2466:h=1508' -f rawvideo \ -pix_fmt yuv420p 2466_1508.yuv Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
* lavfi/qsv: create mfx session using oneVPL for qsv filtersHaihao Xiang2022-08-121-0/+5
| | | | | | | Use the mfxLoader handle in qsv hwdevice to create mfx session for qsv filters. This is in preparation for oneVPL support
* qsv: restrict OPAQUE memory to MFX_VERSION < 2.0Haihao Xiang2022-08-121-0/+3
| | | | | | | | OPAQUE memory isn't supported for MFX_VERSION >= 2.0[1][2]. This is in preparation for oneVPL support [1] https://spec.oneapi.io/versions/latest/elements/oneVPL/source/VPL_intel_media_sdk.html#msdk-full-name-feature-removals [2] https://github.com/oneapi-src/oneVPL
* qsv: restrict audio related code to MFX_VERSION < 2.0Haihao Xiang2022-08-121-0/+2
| | | | | | | | Audio isn't supported for MFX_VERSION >= 2.0[1][2]. This is in preparation for oneVPL support [1] https://spec.oneapi.io/versions/latest/elements/oneVPL/source/VPL_intel_media_sdk.html#msdk-full-name-feature-removals [2] https://github.com/oneapi-src/oneVPL
* qsv: remove mfx/ prefix from mfx headersHaihao Xiang2022-08-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The following Cflags has been added to libmfx.pc, so mfx/ prefix is no longer needed when including mfx headers in FFmpeg. Cflags: -I${includedir} -I${includedir}/mfx Some old versions of libmfx have the following Cflags in libmfx.pc Cflags: -I${includedir} We may add -I${includedir}/mfx to CFLAGS when running 'configure --enable-libmfx' for old versions of libmfx, if so, mfx headers without mfx/ prefix can be included too. If libmfx comes without pkg-config support, we may do a small change to the settings of the environment(e.g. set -I/opt/intel/mediasdk/include/mfx instead of -I/opt/intel/mediasdk/include to CFLAGS), then the build can find the mfx headers without mfx/ prefix After applying this change, we won't need to change #include for mfx headers when mfx headers are installed under a new directory. This is in preparation for oneVPL support (mfx headers in oneVPL are installed under vpl directory)
* lavfi/qsvvpp: switch to new FIFO APIAnton Khirnov2022-02-071-1/+1
|
* lavfi/qsvvpp: support async depthFei Wang2021-04-111-1/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Async depth will allow qsv filter cache few frames, and avoid force switch and end filter task frame by frame. This change will improve performance for some multi-task case, for example 1:N transcode( decode + vpp + encode) with all QSV plugins. Performance data test on my Coffee Lake Desktop(i7-8700K) by using the following 1:8 transcode test case improvement: 1. Fps improved from 55 to 130. 2. Render/Video usage improved from ~61%/~38% to ~100%/~70%.(Data get from intel_gpu_top) test CMD: ffmpeg -v verbose -init_hw_device qsv=hw:/dev/dri/renderD128 -filter_hw_device \ hw -hwaccel qsv -hwaccel_output_format qsv -c:v h264_qsv -i 1920x1080.264 \ -vf 'vpp_qsv=w=1280:h=720:async_depth=4' -c:v h264_qsv -r:v 30 -preset 7 -g 33 -refs 2 -bf 3 -q 24 -f null - \ -vf 'vpp_qsv=w=1280:h=720:async_depth=4' -c:v h264_qsv -r:v 30 -preset 7 -g 33 -refs 2 -bf 3 -q 24 -f null - \ -vf 'vpp_qsv=w=1280:h=720:async_depth=4' -c:v h264_qsv -r:v 30 -preset 7 -g 33 -refs 2 -bf 3 -q 24 -f null - \ -vf 'vpp_qsv=w=1280:h=720:async_depth=4' -c:v h264_qsv -r:v 30 -preset 7 -g 33 -refs 2 -bf 3 -q 24 -f null - \ -vf 'vpp_qsv=w=1280:h=720:async_depth=4' -c:v h264_qsv -r:v 30 -preset 7 -g 33 -refs 2 -bf 3 -q 24 -f null - \ -vf 'vpp_qsv=w=1280:h=720:async_depth=4' -c:v h264_qsv -r:v 30 -preset 7 -g 33 -refs 2 -bf 3 -q 24 -f null - \ -vf 'vpp_qsv=w=1280:h=720:async_depth=4' -c:v h264_qsv -r:v 30 -preset 7 -g 33 -refs 2 -bf 3 -q 24 -f null - Signed-off-by: Fei Wang <fei.w.wang@intel.com> Reviewed-by: Linjie Fu <linjie.justin.fu@gmail.com> Signed-off-by: Zhong Li <zhongli_dev@126.com>
* lavf/qsv: Add functions to print mfx iopattern, warning and errorHaihao Xiang2021-01-231-0/+9
| | | | | | | | It is a copy of the relevant part in lavc/qsv but use different function names to avoid multiple definition when linking lavc and lavf statically. Signed-off-by: Haihao Xiang <haihao.xiang@intel.com> Signed-off-by: Linjie Fu <linjie.justin.fu@gmail.com
* qsv: fix the dangerous macro definitionsZhong Li2019-03-281-2/+2
| | | | | Signed-off-by: Zhong Li <zhong.li@intel.com> Reviewed-by: Carl Eugen Hoyos <ceffmpeg@gmail.com>
* Merge commit 'cca5e4f040971db6de0bfe6968f00c021d8a9c42'James Almer2018-04-131-0/+8
|\ | | | | | | | | | | | | * commit 'cca5e4f040971db6de0bfe6968f00c021d8a9c42': qsv: adding Multi Frame Encode support Merged-by: James Almer <jamrial@gmail.com>
| * qsv: adding Multi Frame Encode supportMaxym Dmytrychenko2018-04-081-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Starting from API 1.25 helps to improve performance of the simultaneous encode, 1:N scenario, like: ./avconv -y -hwaccel qsv -c:v h264_qsv -r 30000/1001 -i ~/bbb_sunflower_1080p_60fps_normal.mp4 -vframes 600 -an \ -filter_complex "split=2[s1][s2]; [s1]scale_qsv=1280:720[o1]; [s2]scale_qsv=960:540[o2]" \ -map [o1] -c:v h264_qsv -b:v 3200k -minrate 3200k -maxrate 3200k -f rawvideo /tmp/3200a.264 \ -map [o2] -c:v h264_qsv -b:v 1750k -minrate 1750k -maxrate 1750k -f rawvideo /tmp/1750a.264 Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
* | Merge commit 'a5a6ac1a123a927e5bed984ed757a29b7ff87dab'James Almer2017-11-111-4/+4
|/ | | | | | | | * commit 'a5a6ac1a123a927e5bed984ed757a29b7ff87dab': libavfilter/overlay_qsv: Add QSV overlay vpp filter libavfilter/vf_vpp: Add common filters of the qsv vpp Merged-by: James Almer <jamrial@gmail.com>
* libavfilter/overlay_qsv: Add QSV overlay vpp filterHuang, Zhengxu2017-09-171-0/+66
The filter supports two inputs and (implicitly) scaling the second input during composition, unlike the software overlay. The code has been separated into common interface and qsv overlay implementation. The common part mainly creates the qsv session and manages the surface which is nearly the same for all qsv filters. So the qsvvpp.c/qsvvpp.h API can be used by other QSV vpp filters to reduce code redundancy. Usage: -hwaccel qsv -c:v mpeg2_qsv -r 25 -i in.m2v -hwaccel qsv -c:v h264_qsv -i in.h264 -filter_complex "overlay_qsv=eof_action=repeat:x=(W-w)/2:y=(H-h)/2" -b 2M -maxrate 3M -c:v h264_qsv -y out.h264 Two inputs should have different sizes otherwise one will be completely covered or you need to scale the second input as follows: -hwaccel qsv -c:v mpeg2_qsv -r 25 -i in.m2v -hwaccel qsv -c:v h264_qsv -i in.h264 -filter_complex "overlay_qsv=w=720:h=576:x=(W-w)/2:y=(H-h)/2" -b 2M -maxrate 3M -c:v h264_qsv -y out.h264 Signed-off-by: ChaoX A Liu <chaox.a.liu@gmail.com> Signed-off-by: Zhengxu Huang <zhengxu.maxwell@gmail.com> Signed-off-by: Andrew Zhang <huazh407@gmail.com> Change-Id: I5c381febb0af6e2f9622c54ba00490ab99d48297 Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>