summaryrefslogtreecommitdiffstats
path: root/libavcodec/qsvenc.c
Commit message (Collapse)AuthorAgeFilesLines
* qsv: adding Multi Frame Encode supportMaxym Dmytrychenko2018-04-081-1/+15
| | | | | | | | | | | | | | | | 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>
* qsvenc: add the Access Unit Delimiter NAL Unit supportZhong Li2018-03-161-0/+1
| | | | | Signed-off-by: Zhong Li <zhong.li@intel.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* qsvenc: Fix a typo of FrameRateExtD/FrameRateExtNZhong Li2018-03-161-1/+1
| | | | | Signed-off-by: Zhong Li <zhong.li@intel.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* qsvenc: Provide a detailed error message if the parameters are invalidZhong Li2018-03-051-6/+25
| | | | | | | | | Currently it always shows "Selected ratecontrol mode is not supported by the QSV runtime. Choose a different mode", but sometimes it is not accurate. Signed-off-by: Zhong Li <zhong.li@intel.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* qsvenc: AVBR is not supported on non-windows OSZhong Li2018-02-121-3/+14
| | | | | | | 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>
* qsv: Support explicit lookahead downscalingLuca Barbato2017-12-121-0/+4
|
* lavc/qsvenc: add error messeage if ICQ unsupported.Li, Zhong2017-12-121-0/+6
| | | | | Signed-off-by: Zhong Li <zhong.li@intel.com> Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
* lavc/qsvenc: set HRD buffer sizeLi, Zhong2017-12-121-0/+1
| | | | | | | | | | Hypothetical Reference Decoding (HRD) model assumes that data flows into a buffer of the fixed size BufferSizeInKB with a constant bitrate. Smaller BufferSizeInKB means smaller frame size variations, but more difficult to maintain HRD. Signed-off-by: Zhong Li <zhong.li@intel.com> Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
* qsvenc: cavlc option is only available for h264Li, Zhong2017-11-241-8/+9
| | | | | | | | 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>
* libavcodec/mjpeg_qsv: Add QSV MJPEG encoderHuang, Zhengxu2017-07-251-2/+93
| | | | | | | | | | | usage: -hwaccel qsv -c:v h264_qsv -i in -c:v mjpeg_qsv -global_quality 80 -f mjpeg out 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 Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
* qsvenc: Make sure the interlaced encoding worksAaron Levinson2017-04-231-6/+23
| | | | | | | And reduce the vertical alignment constraint when possible to reduce the memory usage. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* qsvenc: Use MFXVideoENCODE_Query() to update the parametersAaron Levinson2017-04-231-1/+9
| | | | | | | | Fill out the default/unset parameters with ones actually in use. Matches the current MediaSDK example code. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* qsvenc: Allow use of hw_device_ctx to make the internal sessionMark Thompson2017-04-021-0/+7
|
* qsv: Add ability to create a session from a deviceMark Thompson2017-04-021-3/+3
|
* qsv: Set the correct range for la_depthLuca Barbato2017-01-131-1/+1
| | | | Setting an invalid range for it makes the encoder behave inconsistently.
* qsv{enc,dec}: extend the internal frame allocatorAnton Khirnov2016-11-071-2/+1
| | | | | | | Handle the internal frame requests, which is required by the HEVC encoding plugin. Signed-off-by: Maxym Dmytrychenko <maxym.dmytrychenko@intel.com>
* qsv{dec,enc}: use a struct as a memory id with internal memory allocatorAnton Khirnov2016-11-071-0/+8
| | | | | | | This will allow implementing the allocator more fully, which is needed by the HEVC encoder plugin with video memory input. Signed-off-by: Maxym Dmytrychenko <maxym.dmytrychenko@intel.com>
* qsv{dec,enc}: always use an internal mfxFrameSurface1Anton Khirnov2016-11-071-16/+16
| | | | | | | | For encoding, this avoids modifying the input surface, which we are not allowed to do. This will also be useful in the following commits. Signed-off-by: Maxym Dmytrychenko <maxym.dmytrychenko@intel.com>
* qsvenc: print warnings from encode/initAnton Khirnov2016-07-221-0/+6
|
* qsvenc: do not re-execute encoding on all positive status codesAnton Khirnov2016-07-221-1/+1
| | | | It should only be done for DEVICE_BUSY/IN_EXECUTION
* qsv: print more complete error messagesAnton Khirnov2016-07-221-10/+10
| | | | Include the libmfx error code and its description
* qsvenc: take only the allocated dimensions from the frames contextAnton Khirnov2016-07-221-25/+25
| | | | | Other parameters, like the display size, should still be taken from the codec context.
* qsvenc: add support for p010Anton Khirnov2016-07-221-3/+13
|
* qsvenc: support getting the session from an AVHWFramesContextAnton Khirnov2016-06-211-23/+78
|
* qsvenc: store the sync point in heap memoryMaxym Dmytrychenko2016-02-241-7/+18
| | | | | | | | The QSV runtime expects the sync point address passed to MFXVideoENCODE_EncodeFrameAsync() to be valid until MFXVideoCORE_SyncOperation(). Signed-off-by: Anton Khirnov <anton@khirnov.net>
* qsvenc: Add private option to replace coder_typeVittorio Giovara2016-01-251-2/+8
| | | | Missing from be00ec832c519427cd92218abac77dafdc1d5487.
* qsvenc: fix a typoAnton Khirnov2016-01-231-1/+1
| | | | Introduced in 0e6c8532215790bbe560a9eea4f3cc82bb55cf92.
* lavc: Move b_frame_strategy and b_sensitivity to codec private optionsVittorio Giovara2016-01-211-1/+7
| | | | | | | | | | 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: split encoding frames and reading from the async FIFOAnton Khirnov2016-01-071-2/+18
| | | | | | This makes sure all the frames are returned at the end. Found-By: Maxym Dmytrychenko <maxym.dmytrychenko@intel.com>
* qsvenc: properly handle the warning from MFXVideoCORE_SyncOperationMaxym Dmytrychenko2016-01-071-1/+3
| | | | | | Same as what is done in 3b6473b43eb69fc3faaf69f7fd0b83b51db7607f. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* qsvenc: export CPB props side dataAnton Khirnov2015-12-061-0/+10
|
* qsvenc: expose additional encoding optionsAnton Khirnov2015-11-201-1/+51
|
* qsvenc: support more RC methodsAnton Khirnov2015-11-201-17/+119
|
* qsvenc: fix setting maxrate for VBRAnton Khirnov2015-11-201-1/+1
|
* qsvenc: print the actual video parameters used by MSDKAnton Khirnov2015-11-201-0/+255
|
* qsvenc: add an API for allocating opaque surfacesAnton Khirnov2015-10-161-4/+53
|
* qsvenc: cosmetics, reindentAnton Khirnov2015-10-161-33/+33
|
* qsvenc: set the timestamp for PIX_FMT_QSV frames as wellAnton Khirnov2015-10-161-5/+4
|
* qsvenc: support passing arbitrary external buffers to the encoderAnton Khirnov2015-10-161-4/+32
|
* qsvenc: do not try to close the encoder if the session is NULLAnton Khirnov2015-09-281-1/+2
|
* lavc: Consistently prefix input buffer definesVittorio Giovara2015-07-271-2/+2
| | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* lavc: AV-prefix all codec flagsVittorio Giovara2015-07-271-2/+2
| | | | | | Convert doxygen to multiline and express bitfields more simply. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* Deprecate avctx.coded_frameVittorio Giovara2015-07-201-0/+4
| | | | | | | | | | | | | | | | | The rationale is that coded_frame was only used to communicate key_frame, pict_type and quality to the caller, as well as a few other random fields, in a non predictable, let alone consistent way. There was agreement that there was no use case for coded_frame, as it is a full-sized AVFrame container used for just 2-3 int-sized properties, which shouldn't even belong into the AVCodecContext in the first place. The appropriate AVPacket flag can be used instead of key_frame, while quality is exported with the new AVPacketSideData quality factor. There is no replacement for the other fields as they were unreliable, mishandled or just not used at all. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* Gather all coded_frame allocations and free functions to a single placeVittorio Giovara2015-07-201-6/+0
| | | | | | | | | | | | | | Allocating coded_frame is what most encoders do anyway, so it makes sense to always allocate and free it in a single place. Moreover a lot of encoders freed the frame with av_freep() instead of the correct API av_frame_free(). This bring uniformity to encoder behaviour and prevents applications from erroneusly accessing this field when not allocated. Additionally this helps isolating encoders that export information with coded_frame, and heavily simplifies its deprecation. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* qsvenc: properly handle asynchronous encodingAnton Khirnov2015-07-191-15/+79
| | | | Wait for async_depth frames before syncing.
* lavc: add Intel libmfx-based HEVC encoderAnton Khirnov2015-07-081-11/+18
|
* lavc: add Intel libmfx-based MPEG2 encoderAnton Khirnov2015-07-081-4/+6
|
* lavc: add Intel libmfx-based H.264 encoderAnton Khirnov2015-03-271-0/+444
OpenPOWER on IntegriCloud