summaryrefslogtreecommitdiff
path: root/libavcodec/qsvenc.h
Commit message (Collapse)AuthorAge
* lavc: Mark hw_config pointer arrays as constMark Thompson2020-11-08
| | | | They are read-only just like the HWConfig structures they point to.
* lavc/qsvenc: Add hardware config metadataMark Thompson2020-04-26
| | | | | | All of these encoders can accept libmfx surfaces directly in a hardware frames context, or they can accept software frames if a suitable device is supplied to use.
* lavc/qsvenc: add Tiles encode support for HEVCLinjie Fu2019-12-12
| | | | | | | | | | | | | | | | | | | | | | Add -tile_rows and -tile_cols option to specify the number of tile rows and columns for ICL+ (gen 11) platform. A tile must wholly contain all the slices within it. Slices cannot cross tile boundaries. So the slice number would be implicitly resized to the max(nSlice, nTile). Example: ffmpeg -v verbose -hwaccel qsv -init_hw_device qsv=hw -filter_hw_device hw -f rawvideo -s:v 1920x1080 -i ./input.nv12 -vf format=nv12,hwupload=extra_hw_frames=64 -c:v hevc_qsv -tile_rows 2 -tile_cols 2 -slices 4 -y output.h265 Also dump the actual quantity of encoded tiled rows and columns in run time. Fix the enhancement #8400. Signed-off-by: Linjie Fu <linjie.fu@intel.com>
* lavc/qsvenc: Fix some code indentationsLinjie Fu2019-11-28
| | | | Signed-off-by: Linjie Fu <linjie.fu@intel.com>
* lavc/qsvenc: enable vp9 encoderZhong Li2019-11-03
| | | | | | | | | | 1. must enable low_power mode since just VDENC can be supported by iHD driver right now 2. Coding option1 and extra_data are not supported by MSDK 3. IVF header will be inserted in MSDK by default, but it is not needed for FFmpeg, so disable it. Signed-off-by: Zhong Li <zhongli_dev@126.com>
* lavc/qsv: Fix MSDK initialization failure in system memory modeZhong Li2019-09-26
| | | | | | | | | | | | MSDK does not create internal acceleration device on Linux, So MFXVideoCORE_SetHandle() is necessary. It has been added for ff_qsv_init_session_device(). But missed for ff_qsv_init_internal_session() due to commit 1f26a23 overwrited commit db89f45 Fix #7030 Signed-off-by: Zhong Li <zhong.li@intel.com>
* lavc/qsvenc: enable hevc gpb optionZhong Li2019-04-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | GPB is the default type, just contains forward references but the slice_type is B slice with higher encoding efficiency than regular P slice, but lower performance. Add an option to allow user to set regular P slice. Fix ticket#6870 Test data on Intel Kabylake (i7-7567U CPU @ 3.50GHz): 1. ffmpeg -hwaccel qsv -c:v h264_qsv -i bbb_sunflower_1080p_30fps_normal.mp4 -vsync passthrough -vframes 1000 -c:v hevc_qsv -gpb 0 -bf 0 -q 25 test_gpb_off_bf0_kbl.mp4 transcoding fps: 85 encoded file size of test_gpb_off_bf0_kbl.mp4: 21960100 (bytes) 2. ffmpeg -hwaccel qsv -c:v h264_qsv -i bbb_sunflower_1080p_30fps_normal.mp4 -vsync passthrough -vframes 1000 -c:v hevc_qsv -gpb 1 -bf 0 -q 25 test_gpb_on_bf0_kbl.mp4 transcoding fps: 79 encoded file size oftest_gpb_on_bf0_kbl.mp4: 21211449 (bytes) In this case, enable gpb can bring about 7% performance drop but 3.4% encoding efficiency improvment. Signed-off-by: Zhong Li <zhong.li@intel.com>
* lavc/qsvenc: get vps extradata from MSDKZhong Li2019-04-01
| | | | | Signed-off-by: Zhong Li <zhong.li@intel.com> Reviewed-by: Mark Thompson <sw@jkqxz.net>
* lavc/qsvenc: expose low_power as a common option for QSV encoderLinjie Fu2019-04-01
| | | | | | | | Always exposes low_power option for all qsv encoder, and reports a warning if VDENC is not supported in current version of MSDK. Signed-off-by: Linjie Fu <linjie.fu@intel.com> Signed-off-by: Zhong Li <zhong.li@intel.com>
* lavc/qsvenc_h264: remove the privite option trellisZhong Li2019-03-28
| | | | | | | | | | | | | | | | | | There are many problems of current qsv trellis option: 1. Duplicated with AVCodecContext definition 2. MFX_TRELLIS_XXX is introduced by MSDK API 1.17 Currently Without MSDK API checking thus may cause compilation issue. 3. user is inclined to enable trellis when set "-trellis 1", but actually it is to disable since MFX_TRELLIS_OFF is equal to 1. 4. It is too complex for user to enable trellis for every frame(I/P/B). Just simply remove the private option, and switch to the AVCodecContext definition. Compatibility should not a big problem (except can't exact map) since the option name is same as AVCodecContext. Signed-off-by: Zhong Li <zhong.li@intel.com> Reviewed-by: Carl Eugen Hoyos <ceffmpeg@gmail.com> Reviewed-by: Moritz Barsnick <barsnick@gmx.net>
* lavc/qsvenc: make the queried libmfx version easily reusedZhong Li2019-03-28
| | | | Signed-off-by: Zhong Li <zhong.li@intel.com>
* lavc/qsvenc: enable QVBR modeZhong Li2019-01-25
| | | | | | | | | | | | | | | | | QVBR mode is to use the variable bitrate control algorithm with constant quality. mfxExtCodingOption3 should be supported to enable QVBR mode. It is neccesary to specify a max_rate for QVBR, else it may be ICQ mode. Example usage: ffmpeg -hwaccel qsv -c:v h264_qsv -i input.mp4 -c:v h264_qsv -global_quality 25 -maxrate 2M test_qvbr.mp4 -v verbose Clip QVBR quality range to be [0, 51] as Mark's commments. It is similar to qp range of CQP but possibly should be updated when VP8/VP9 encoding can be supported. Reviewed-by: Mark Thompson <sw@jkqxz.net> Signed-off-by: Zhong Li <zhong.li@intel.com>
* lavc/qsvenc: add VDENC support for H264Linjie Fu2019-01-10
| | | | | | | | | | | | | | | Add VDENC(lowpower mode) support for QSV H264 It's an experimental function(like lowpower in vaapi) with some limitations: - CBR/VBR require HuC which should be explicitly loaded via i915 module parameter(i915.enable_guc=2 for linux kernel version >= 4.16) Use option "-low_power 1" to enable VDENC. Add in dump_video_param() to show the status of VDENC in runtime log. Signed-off-by: Linjie Fu <linjie.fu@intel.com> Signed-off-by: Zhong Li <zhong.li@intel.com>
* lavc/qsvenc: add an option to set h264 pps for every frameZhong Li2018-12-07
| | | | | | | | | RepeatPPS is enabled by default in mfx. It is not necessary mostly and wasting encoding bits. Add an option to control it and disable it by default. Reviewed-by: Mark Thompson <sw@jkqxz.net> Signed-off-by: Zhong Li <zhong.li@intel.com>
* lavc/qsvenc: add forced_idr optionZhong Li2018-11-30
| | | | | | | This option can be used to repect original input I/IDR frame type. Reviewed-by: Mark Thompson <sw@jkqxz.net> Signed-off-by: Zhong Li <zhong.li@intel.com>
* lavc/qsvenc: enable ICQ and ICQ_LA on LinuxZhong Li2018-11-30
| | | | | | | ICQ/ICQ_LA are enabled with MSDK V1.28 Reviewed-by: Mark Thompson <sw@jkqxz.net> Signed-off-by: Zhong Li <zhong.li@intel.com>
* Merge commit 'c1bcd321ea2c2ae1765a1e64f03278712221d726'James Almer2018-09-02
|\ | | | | | | | | | | | | * commit 'c1bcd321ea2c2ae1765a1e64f03278712221d726': avcodec/qsv: fix async support Merged-by: James Almer <jamrial@gmail.com>
| * avcodec/qsv: fix async supportDmitry Rogozhkin2018-07-26
| | | | | | | | | | | | | | | | | | | | | | Current implementations of qsv components incorrectly work with async level, they actually try to work in async+1 level stepping into MFX_WRN_DEVICE_BUSY and polling loop. This change address this misbehaviour. Signed-off-by: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com> Cc: Maxym Dmytrychenko <maxim.d33@gmail.com> Cc: Zhong Li <zhong.li@intel.com> Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
* | Merge commit '4ce701b4e640d4723a4005d664f31f8342fac40e'James Almer2018-09-02
|\| | | | | | | | | | | | | * commit '4ce701b4e640d4723a4005d664f31f8342fac40e': qsvenc: remove vcm option on Linux Merged-by: James Almer <jamrial@gmail.com>
| * qsvenc: remove vcm option on LinuxZhong Li2018-06-11
| | | | | | | | | | | | | | | | | | 1. vcm mode is only available for H264. 2. vcm is not supported on Linux, but it is shown when run "./avconv -h encoder=h264_qsv |grep vcm". This shouldn't happen. Signed-off-by: Zhong Li <zhong.li@intel.com> Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
* | lavc/qsvenc: add quality status to side_dataZhong Li2018-08-22
| | | | | | | | | | | | | | | | Add fix a memory leak issue as James's comments. V2: use a local pict_type since coded_frame is deprecated. Signed-off-by: Zhong Li <zhong.li@intel.com>
* | lavc/qsvenc: expose qp of encoded framesZhong Li2018-08-07
| | | | | | | | | | | | | | Requirement from ticket #7254. Currently only H264 supported by MSDK. Signed-off-by: Zhong Li <zhong.li@intel.com>
* | avcodec/qsvenc: fix version detection on cygwinTimo Rothenpieler2018-06-27
| |
* | Merge commit 'cca5e4f040971db6de0bfe6968f00c021d8a9c42'James Almer2018-04-13
|\| | | | | | | | | | | | | * commit 'cca5e4f040971db6de0bfe6968f00c021d8a9c42': qsv: adding Multi Frame Encode support Merged-by: James Almer <jamrial@gmail.com>
| * qsv: adding Multi Frame Encode supportMaxym Dmytrychenko2018-04-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 'deefca02c275ce4bc5ccbee690463ffef81a18b8'James Almer2018-03-29
|\| | | | | | | | | | | | | * commit 'deefca02c275ce4bc5ccbee690463ffef81a18b8': qsvenc: add the Access Unit Delimiter NAL Unit support Merged-by: James Almer <jamrial@gmail.com>
| * qsvenc: add the Access Unit Delimiter NAL Unit supportZhong Li2018-03-16
| | | | | | | | | | Signed-off-by: Zhong Li <zhong.li@intel.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
| * lavc/qsv: default la_ds to MFX_LOOKAHEAD_DS_UNKNOWNRuiling Song2018-02-12
| | | | | | | | | | | | | | | | MFX_LOOKAHEAD_DS_UNKNOWN means auto. -1 is not a valid value. Signed-off-by: Ruiling Song <ruiling.song@intel.com> Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
* | Merge commit '8bb9824fcbc5a6ebf68391d70a2c4f03447990d2'Mark Thompson2018-02-12
|\| | | | | | | | | | | | | * commit '8bb9824fcbc5a6ebf68391d70a2c4f03447990d2': qsvenc: AVBR is not supported on non-windows OS Merged-by: Mark Thompson <sw@jkqxz.net>
| * qsvenc: AVBR is not supported on non-windows OSZhong Li2018-02-12
| | | | | | | | | | | | | | AVBR is supported from API 1.3 but only available for Windows Signed-off-by: Zhong Li <zhong.li@intel.com> Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
* | Merge commit '508378556631dc18d32247b4a4e35703758e1ca9'James Almer2017-12-14
|\| | | | | | | | | | | | | * commit '508378556631dc18d32247b4a4e35703758e1ca9': qsv: Support explicit lookahead downscaling Merged-by: James Almer <jamrial@gmail.com>
| * qsv: Support explicit lookahead downscalingLuca Barbato2017-12-12
| |
* | Merge commit 'bddb2ce179c57db6e3c79fdc3363c165d90850b0'James Almer2017-12-14
|\| | | | | | | | | | | | | * commit 'bddb2ce179c57db6e3c79fdc3363c165d90850b0': lavc/qsvenc: ICQ/VCM/QVBR are not avilable on Linux Merged-by: James Almer <jamrial@gmail.com>
| * lavc/qsvenc: ICQ/VCM/QVBR are not avilable on LinuxLi, Zhong2017-12-12
| | | | | | | | | | Signed-off-by: Zhong Li <zhong.li@intel.com> Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
* | Merge commit 'b843b343d8a3210ae37a2342b1904a5bd1e5fc6e'James Almer2017-11-29
|\| | | | | | | | | | | | | * commit 'b843b343d8a3210ae37a2342b1904a5bd1e5fc6e': qsvenc: cavlc option is only available for h264 Merged-by: James Almer <jamrial@gmail.com>
| * qsvenc: cavlc option is only available for h264Li, Zhong2017-11-24
| | | | | | | | | | | | | | | | Moving option definition to h264 implementation and fixing command line defaults in order to properly respect cavlc input value Signed-off-by: Zhong Li <zhong.li@intel.com> Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
| * qsvenc: Make sure the interlaced encoding worksAaron Levinson2017-04-23
| | | | | | | | | | | | | | And reduce the vertical alignment constraint when possible to reduce the memory usage. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
| * qsv: Set the correct range for la_depthLuca Barbato2017-01-13
| | | | | | | | Setting an invalid range for it makes the encoder behave inconsistently.
| * qsvenc: support getting the session from an AVHWFramesContextAnton Khirnov2016-06-21
| |
* | qsvenc: Make sure the interlaced encoding worksAaron Levinson2017-05-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Purpose: qsvenc: make sure that interlaced encoding works. Also, reduce the vertical alignment constraint when possible to reduce memory usage. Note: Most of this code used to be present in ffmpeg and was eliminated in revision 1f26a23 on Oct. 31, 2016 (qsv: Merge libav implementation, at https://github.com/FFmpeg/FFmpeg/commit/1f26a231bb065276cd80ce02957c759f3197 edfa#diff-7d84a34d58597bb7aa4b8239dca1f9f8). Already applied to libav. Reviewed-by: Luca Barbato <lu_zero@gentoo.org> (cherry picked from commit 8fd8f91e47f33cd82371a97ac81afc476144964f) Signed-off-by: Mark Thompson <sw@jkqxz.net> Signed-off-by: Aaron Levinson <alevinsn@aracnet.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | qsv: Merge libav implementationMark Thompson2016-10-31
| | | | | | | | | | | | | | Merged as-at libav 398f015, and therefore includes outstanding skipped merges 04b17ff and 130e1f1. All features not in libav are preserved, and no options change.
* | Merge commit '9cac1b4b4f1532fb2aeef54799285360656be5eb'Derek Buitenhuis2016-02-16
|\| | | | | | | | | | | | | * commit '9cac1b4b4f1532fb2aeef54799285360656be5eb': qsvenc: Add private option to replace coder_type Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * qsvenc: Add private option to replace coder_typeVittorio Giovara2016-01-25
| | | | | | | | Missing from be00ec832c519427cd92218abac77dafdc1d5487.
* | Merge commit '0e6c8532215790bbe560a9eea4f3cc82bb55cf92'Derek Buitenhuis2016-01-27
|\| | | | | | | | | | | | | * commit '0e6c8532215790bbe560a9eea4f3cc82bb55cf92' lavc: Move b_frame_strategy and b_sensitivity to codec private options Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * lavc: Move b_frame_strategy and b_sensitivity to codec private optionsVittorio Giovara2016-01-21
| | | | | | | | | | | | | | | | | | | | The b_frame_strategy option is only used by mpegvideoenc, qsv, x264, and xavs, while b_sensitivity is only used by mpegvideoenc. These are very codec-specific options, so deprecate the global variants. Set proper limits to the maximum allowed values. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | qsvenc: write a53 caption data to SEIWill Kelleher2015-11-30
| | | | | | | | | | | | Signed-off-by: Will Kelleher <wkelleher@gogoair.com> Previous version reviewed-by: Ivan Uskov <ivan.uskov@nablet.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit 'fc4c27c4edfc6a5f9bc7c696e823652474a65ce8'Hendrik Leppkes2015-11-29
|\| | | | | | | | | | | | | * commit 'fc4c27c4edfc6a5f9bc7c696e823652474a65ce8': qsvenc: expose additional encoding options Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * qsvenc: expose additional encoding optionsAnton Khirnov2015-11-20
| |
* | Merge commit 'e7d7cf86dcaba8eaaed62c80172ff0aff2588c2a'Hendrik Leppkes2015-11-29
|\| | | | | | | | | | | | | * commit 'e7d7cf86dcaba8eaaed62c80172ff0aff2588c2a': qsvenc: support more RC methods Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * qsvenc: support more RC methodsAnton Khirnov2015-11-20
| |