summaryrefslogtreecommitdiff
path: root/libavcodec/qsvenc.h
Commit message (Collapse)AuthorAge
* lavc/qsvenc: switch to new FIFO APIAnton Khirnov2022-02-07
|
* lavc/qsvenc: add tile encoding support for VP9Haihao Xiang2022-01-29
| | | | | | | Add -tile_rows and -tile_cols options to specify the number of tile rows and columns Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* libavcodec/qsvenc: Add intra refresh to hevc_qsv and add new intra refresh ↵Wenbin Chen2022-01-27
| | | | | | | | | | | | parameter Add intra refresh support to hevc_qsv as well. Add an new intra refresh type: "horizontal", and an new param ref_cycle_dist. This param specify the distance between the beginnings of the intra-refresh cycles in frames. Signed-off-by: Wenbin Chen <wenbin.chen@intel.com> Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* libavcodec/qsvenc: Add transform skip to hevc_qsvWenbin Chen2022-01-21
| | | | | | | | | Add transform_skip option to hevc_qsv. By enabling this option, the transform_skip_enabled_flag in PPS will be set to 1. This option is supported on the platform equal or newer than ICL. Signed-off-by: Wenbin Chen <wenbin.chen@intel.com> Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* libavcodec/qsvenc: Add low latency P-pyramid support to qsvWenbin Chen2022-01-21
| | | | | | | | | | | Add low latency P-pyramid support to qsv. This feature relates to command line option "-p_strategy". To enable this flag, user also need to set "-bf" to 0. P-strategy has two modes "1-simple" and "2-pyramid". The details of the two models refer to https://github.com/Intel-Media-SDK/MediaSDK/blob/master/doc/mediasdk-man.md#preftype Signed-off-by: Wenbin Chen <wenbin.chen@intel.com> Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* libavcodec/qsvenc: Add DisableDeblockingIdc support to qsvWenbin Chen2022-01-21
| | | | | | | | Add dblk_idc option to 264_qsv and hevc_qsv. Turining on this opion can disable deblocking. Signed-off-by: Wenbin Chen <wenbin.chen@intel.com> Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* lavc/qsvenc: allows the SDK runtime to choose LowPower/non-LowPower modesHaihao Xiang2021-08-12
| | | | | | | | | | | | | The SDK supports LowPower and non-LowPower modes, but some features are available only under one of the two modes. Currently non-LowPower mode is always chosen in FFmpeg if the mode is not set to LowPower explicitly. User will experience some SDK errors if a LowPower related feature is specified but the mode is not set to LowPower. With this patch, the mode is set to unknown by default in FFmpeg, the SDK is able to choose a workable mode for the specified features. Reviewed-by: Soft Works <softworkz@hotmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* libavcodec/qsvence: Use QSV encoder defaults as ffmpeg defaultsSoft Works2021-08-11
| | | | Signed-off-by: softworkz <softworkz@hotmail.com>
* lavc/qsvenc: pass the color properties to the SDKHaihao Xiang2021-08-04
| | | | | | | | | Otherwise the color properties won't be encoded into the bitstream header Reviewed-by: Xiang, Haihao <haihao.xiang@intel.com> Reviewed-by: Soft Works <softworkz@hotmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* 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.