summaryrefslogtreecommitdiff
path: root/libavfilter/vf_vpp_qsv.c
Commit message (Collapse)AuthorAge
* lavfi/qsvvpp: support async depthFei Wang2021-04-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* lavfi: regroup formats lists in a single structure.Nicolas George2020-09-08
| | | | | | | | | | | | | | | It will allow to refernce it as a whole without clunky macros. Most of the changes have been automatically made with sed: sed -i ' s/-> *in_formats/->incfg.formats/g; s/-> *out_formats/->outcfg.formats/g; s/-> *in_channel_layouts/->incfg.channel_layouts/g; s/-> *out_channel_layouts/->outcfg.channel_layouts/g; s/-> *in_samplerates/->incfg.samplerates/g; s/-> *out_samplerates/->outcfg.samplerates/g; ' src/libavfilter/*(.)
* avfilter/vf_vpp_qsv: Fix leak of AVFilterFormats on errorAndreas Rheinhardt2020-08-23
| | | | | | | | | | | | | The vpp_qsv's query_formats function allocated two AVFilterFormats, before storing them permanently. If storing the first of them fails, the function simply returns and the second leaks. This has been fixed by only allocating the second AVFilterFormats structure after the first one has been successfully stored. Fixes Coverity issue #1422231. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* remove CHAR_MIN/CHAR_MAX usagePaul B Mahol2020-03-17
| | | | It is not needed at all.
* lavfi/qsvvpp: disable pass through mode if format changedZhong Li2019-08-20
| | | | | | Partly fix tiket#8065 Signed-off-by: Zhong Li <zhong.li@intel.com>
* lavf/vf_vpp_qsv: add support for QSV transpose filterLinjie Fu2019-08-07
| | | | | | | | | | | | | | | | | | | | Add transpose support for qsv_vpp with rotate and hflip: - rotate: [0, 3] support clockwise rotation of 0, 90, 180, 270; - hflip: [0, 1] support horizontal flip; Configure with: {"cclock_hflip","clock","cclock","clock_hflip","reversal","hflip","vflip"} CMD: ffmpeg -hwaccel qsv -c:v h264_qsv -i input.h264 -vf 'format=qsv,vpp_qsv=transpose=clock' -c:v h264_qsv output.h264 ffmpeg -init_hw_device qsv=hw -filter_hw_device hw -c:v h264_qsv -i input.h264 -vf 'hwupload=extra_hw_frames=64,format=qsv,vpp_qsv=transpose=cclock_hflip' -f rawvideo -pix_fmt nv12 ./transpose.yuv Signed-off-by: Linjie Fu <linjie.fu@intel.com> Signed-off-by: Zhong Li <zhong.li@intel.com>
* lavf/qsv_vpp: add frame format optionZhong Li2019-06-14
| | | | | | | | | 1. Currently output format is hard-coded as NV12, thus means CSC is always done for not NV12 input such as P010. Follow original input format as default output. 2. Add an option to specify output format. Signed-off-by: Zhong Li <zhong.li@intel.com>
* lavf/qsvvpp: add P010 output format supportZhong Li2019-06-10
| | | | Signed-off-by: Zhong Li <zhong.li@intel.com>
* lavf/qsv: clone the frame which may be managed by frameworkRuiling Song2018-04-21
| | | | | | | | | | For filters based on framesync, the input frame was managed by framesync, so we should not directly keep and destroy it, instead we make a clone of it here, or else double-free will occur. But for other filters not based on framesync, we still need to free the input frame inside filter_frame. Signed-off-by: Ruiling Song <ruiling.song@intel.com>
* Merge commit '29a8ed766354c45c9be4b8512c5b2eb25a450cdc'James Almer2018-04-13
|\ | | | | | | | | | | | | * commit '29a8ed766354c45c9be4b8512c5b2eb25a450cdc': lavf/qsvvpp: bypass vpp if not needed. Merged-by: James Almer <jamrial@gmail.com>
| * lavf/qsvvpp: bypass vpp if not needed.Zhong Li2018-04-08
| | | | | | | | | | | | | | | | | | | | Currently vpp pipeline is always created, even for the unnecessary cases such as setting the option "vpp_qsv=w=1280:h=720" for an input with native resolution 1280x720. Thus introduces unnecessary performance dropping, so bypass vpp if not needed. Signed-off-by: Zhong Li <zhong.li@intel.com> Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
* | lavf/qsv_vpp: check the return value of ff_formats_ref()Zhong Li2017-11-20
| | | | | | | | | | | | | | | | | | Fixes the build warning of "ignoring return value of ‘ff_formats_ref’, declared with attribute warn_unused_result" Signed-off-by: Zhong Li <zhong.li@intel.com> Reviewed-by: Carl Eugen Hoyos <ceffmpeg@gmail.com> Signed-off-by: Mark Thompson <sw@jkqxz.net>
* | avfilter/vf_*_qsv: Fix flagsMichael Niedermayer2017-11-13
| | | | | | | | | | Reviewed-by: Mark Thompson <sw@jkqxz.net> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit 'a5a6ac1a123a927e5bed984ed757a29b7ff87dab'James Almer2017-11-11
|/ | | | | | | | * 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/vf_vpp: Add common filters of the qsv vppHuang, Zhengxu2017-09-17
Add common filters of the qsv vpp features including scale,denosie, deinterlace,frc,crop and procAmp. Performance will be significantly reduced in the test if using cascade mode just like qsv framerate + qsv scale + qsv deinterlace + qsv denoise in separated way no matter in system or video memmory cases. And the code is so redundant because so much the same just as session and surface's creation and management. So we add a common qsv filter. Usage: -hwaccel qsv -c:v h264_qsv -r 25 -i in -vf vpp_qsv=w=iw/2:h=400:deinterlace=1:framerate=60:detail=50:denoise=50 -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: I130392ce722138c209ab658c5f03f0009b6e8024 Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>