summaryrefslogtreecommitdiffstats
path: root/libavfilter/qsvvpp.c
Commit message (Collapse)AuthorAgeFilesLines
* lavf/qsvvpp: add P010 output format supportZhong Li2019-06-101-0/+1
| | | | Signed-off-by: Zhong Li <zhong.li@intel.com>
* lavf/qsvvpp: add extra_hw_frames supportZhong Li2019-06-101-0/+2
| | | | | | | | | | | | extra_hw_frames is needed for some cases. (eg: qsv decoding + qsv vpp + qsv look_ahead encoding, transcoding failed if no extra_hw_frames supported: ffmpeg -hwaccel qsv -c:v h264_qsv -i bbb_sunflower_1080p_30fps_normal_2000frames.mp4 \ -vf vpp_qsv=w=1280:h=720:extra_hw_frames=100 -v verbose -c:v h264_qsv \ -look_ahead 1 -look_ahead_depth 100 out1.mp4 ) Signed-off-by: Zhong Li <zhong.li@intel.com>
* lavf/qsvvpp: avoid the double-free when working in sys memory modeLinjie Fu2019-05-301-1/+0
| | | | | | | | | | | | | | | | Currently, picref will be freed by calling av_frame_free(&picref) in submit_frame() in qsvvpp.c when working in system memory mode,and normally it is freed in filter_frame() in vf_vpp_qsv.c when working in other modes. Double free happens when working in system memory mode, remove to fix the memory issue. Reproduce: ffmpeg -init_hw_device qsv=foo -filter_hw_device foo -f rawvideo -pix_fmt nv12 -s:v 852x480 \ -i 852x480.nv12 -vf 'vpp_qsv=w=500:h=400' -f rawvideo -pix_fmt nv12 qsv.nv12 Signed-off-by: Linjie Fu <linjie.fu@intel.com> Signed-off-by: Zhong Li <zhong.li@intel.com>
* lavu/hwcontext_qsv: Add support for AV_PIX_FMT_BGRA.Zhong Li2018-10-111-1/+1
| | | | | | | | | | | | | | | | | RGB32(AV_PIX_FMT_BGRA on intel platforms) format may be used as overlay with alpha blending. So add AV_PIX_FMT_BGRA format support. One example of alpha blending overlay: ffmpeg -hwaccel qsv -c:v h264_qsv -i BA1_Sony_D.jsv -filter_complex 'movie=lena-rgba.png,hwupload=extra_hw_frames=16[a];[0:v][a]overlay_qsv=x=10:y=10' -c:v h264_qsv -y out.mp4 Rename RGB32 to be BGRA to make it clearer as Mark Thompson's suggestion. V2: Add P010 format support else will introduce HEVC 10bit encoding regression. Thanks for LinJie's discovery. Signed-off-by: Zhong Li <zhong.li@intel.com> Verified-by: Fu, Linjie <linjie.fu@intel.com>
* Merge commit 'e05e5920a4e1f1f15cc8a7c843159d519f6ec18e'James Almer2018-09-111-0/+5
|\ | | | | | | | | | | | | * commit 'e05e5920a4e1f1f15cc8a7c843159d519f6ec18e': qsv: Error out if getting session handle failed in avfilter Merged-by: James Almer <jamrial@gmail.com>
| * qsv: Error out if getting session handle failed in avfilterZhong Li2018-08-231-0/+5
| | | | | | | | | | | | | | | | | | Solve some issues found by an automated code scansion. Suppress the complain "variables 'handle' is used but maybe uninitialized". Signed-off-by: Zhong Li <zhong.li@intel.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | lavf/qsv: clone the frame which may be managed by frameworkRuiling Song2018-04-211-2/+2
| | | | | | | | | | | | | | | | | | | | 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 'cca5e4f040971db6de0bfe6968f00c021d8a9c42'James Almer2018-04-131-3/+6
|\ \ | |/ | | | | | | | | | | * commit 'cca5e4f040971db6de0bfe6968f00c021d8a9c42': qsv: adding Multi Frame Encode support Merged-by: James Almer <jamrial@gmail.com>
| * qsv: adding Multi Frame Encode supportMaxym Dmytrychenko2018-04-081-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 'ea25ccd1b2a980df8d43cc1f86a23e3c094090a6'James Almer2017-11-111-0/+3
|\ \ | |/ | | | | | | | | | | * commit 'ea25ccd1b2a980df8d43cc1f86a23e3c094090a6': qsv: Join the derived session to the parent Merged-by: James Almer <jamrial@gmail.com>
| * qsv: Join the derived session to the parentLuca Barbato2017-09-271-0/+3
| | | | | | | | | | Should improve the performance on multiple transcoding from a single source.
* | 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/+727
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>
OpenPOWER on IntegriCloud