summaryrefslogtreecommitdiff
path: root/libavcodec/vaapi_encode_mjpeg.c
Commit message (Collapse)AuthorAge
* vaapi_encode_mjpeg: Use common quality optionMark Thompson2019-02-25
| | | | | | Doesn't change anything, but makes the behaviour better match that of the other codecs (the CONSTANT_QUALITY_ONLY flag already ensures that CQP is the only RC mode selectable for MJPEG).
* libavcodec/cbs: Stop needlessly reallocating the units arrayAndreas Rheinhardt2019-02-25
| | | | | | | | | | | | | | | | | Currently, a fragment's unit array is constantly reallocated during splitting of a packet. This commit changes this: One can keep the units array by distinguishing between the number of allocated and the number of valid units in the units array. The more units a packet is split into, the bigger the benefit. So MPEG-2 benefits the most; for a video coming from an NTSC-DVD (usually 32 units per frame) the average cost of cbs_insert_unit (for a single unit) went down from 6717 decicycles to 450 decicycles (based upon 10 runs with 4194304 runs each); if each packet consists of only one unit, it went down from 2425 to 448; for a H.264 video where most packets contain nine units, it went from 4431 to 450. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@googlemail.com>
* vaapi_encode: Convert to send/receive APIMark Thompson2019-01-23
| | | | | | | | | | | | | This attaches the logic of picking the mode of for the next picture to the output, which simplifies some choices by removing the concept of the picture for which input is not yet available. At the same time, we allow more complex reference structures and track more reference metadata (particularly the contents of the DPB) for use in the codec-specific code. It also adds flags to explicitly track the available features of the different codecs. The new structure also allows open-GOP support, so that is now available for codecs which can do it.
* vaapi_encode: Add flag to mark encoders supporting only constant-qualityMark Thompson2018-10-27
| | | | And set it for MJPEG.
* vaapi_encode_mjpeg: Mark as intra-onlyMark Thompson2018-09-23
|
* vaapi_encode_mjpeg: Use CBS to store parameters and write headersMark Thompson2018-09-23
| | | | Also adds greyscale, 4:2:2, 4:4:4 and RGB support.
* vaapi_encode: Clean up the packed header configurationMark Thompson2018-09-23
| | | | | | Add a larger warning more clearly explaining the consequences of missing packed header support in the driver. Also only write the extradata if the user actually requests it via the GLOBAL_HEADER flag.
* vaapi_encode: Clean up the GOP structure configurationMark Thompson2018-09-23
| | | | | | Choose what types of reference frames will be used based on what types are available, and make the intra-only mode explicit (GOP size one, which must be used for MJPEG).
* vaapi_encode: Clean up rate control configurationMark Thompson2018-09-23
| | | | | | Query which modes are supported and select between VBR and CBR based on that - this removes all of the codec-specific rate control mode selection code.
* vaapi_encode: Choose profiles dynamicallyMark Thompson2018-09-23
| | | | | | | | | | | Previously there was one fixed choice for each codec (e.g. H.265 -> Main profile), and using anything else then required an explicit option from the user. This changes to selecting the profile based on the input format and the set of profiles actually supported by the driver (e.g. P010 input will choose Main 10 profile for H.265 if the driver supports it). The entrypoint and render target format are also chosen dynamically in the same way, removing those explicit selections from the per-codec code.
* vaapi_encode: Remove common priv_data and options fieldsMark Thompson2018-08-27
| | | | | The codec-specific context now contains both the common context and the codec-specific options directly.
* vaapi_encode_mjpeg: Move common structure into contextMark Thompson2018-08-27
|
* avcodec: add metadata to identify wrappers and hardware decoderswm42017-12-14
| | | | | | | | | | | | | | | | | | | | | Explicitly identify decoder/encoder wrappers with a common name. This saves API users from guessing by the name suffix. For example, they don't have to guess that "h264_qsv" is the h264 QSV implementation, and instead they can just check the AVCodec .codec and .wrapper_name fields. Explicitly mark AVCodec entries that are hardware decoders or most likely hardware decoders with new AV_CODEC_CAPs. The purpose is allowing API users listing hardware decoders in a more generic way. The proposed AVCodecHWConfig does not provide this information fully, because it's concerned with decoder configuration, not information about the fact whether the hardware is used or not. AV_CODEC_CAP_HYBRID exists specifically for QSV, which can have software implementations in case the hardware is not capable. Based on a patch by Philip Langdale <philipl@overt.org>. Merges Libav commit 47687a2f8aca3f65b6fdd117b1cb66a7409a7fd1.
* Merge commit 'fd9212f2edfe9b107c3c08ba2df5fd2cba5ab9e3'James Almer2017-09-26
|\ | | | | | | | | | | | | * commit 'fd9212f2edfe9b107c3c08ba2df5fd2cba5ab9e3': Mark some arrays that never change as const. Merged-by: James Almer <jamrial@gmail.com>
| * Mark some arrays that never change as const.Anton Khirnov2017-02-01
| |
| * vaapi_encode: Check packed header capabilitiesMark Thompson2016-09-28
| | | | | | | | | | This improves behaviour with drivers which do not support packed headers, such as AMD VCE on mesa/gallium.
| * vaapi_encode: Refactor initialisationMark Thompson2016-09-28
| | | | | | | | | | | | | | | | This allows better checking of capabilities and will make it easier to add more functionality later. It also commonises some duplicated code around rate control setup and adds more comments explaining the internals.
* | vaapi_encode: Check packed header capabilitiesMark Thompson2016-11-21
| | | | | | | | | | | | | | This improves behaviour with drivers which do not support packed headers, such as AMD VCE on mesa/gallium. (cherry picked from commit 892bbbcdc171ff0d08d69636a240ffb95f54243c)
* | vaapi_encode: Refactor initialisationMark Thompson2016-11-21
| | | | | | | | | | | | | | | | | | | | This allows better checking of capabilities and will make it easier to add more functionality later. It also commonises some duplicated code around rate control setup and adds more comments explaining the internals. (cherry picked from commit 80a5d05108cb218e8cd2e25c6621a3bfef0a832e)
* | Merge commit '92fdea37477b5a2d1329e5ef0773e24473fa8f12'Derek Buitenhuis2016-05-11
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are all trivial to merge. * commit '92fdea37477b5a2d1329e5ef0773e24473fa8f12': vaapi_h265: Add -qp option, use it to replace use of -global_quality vaapi_h265: Add constant-bitrate encode support vaapi_h264: Add encode quality option (for quality-speed tradeoff) vaapi_h264: Add -qp option, use it to replace use of -global_quality vaapi_encode: Add support for codec-local options vaapi_h264: Add constant-bitrate encode support vaapi_encode: Refactor slightly to allow easier setting of global options Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * vaapi_encode: Refactor slightly to allow easier setting of global optionsMark Thompson2016-04-15
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | Merge commit '83f230c2445a94fdd94c66504482217fcece5909'Derek Buitenhuis2016-05-08
|/ | | | | | | * commit '83f230c2445a94fdd94c66504482217fcece5909': lavc: VAAPI MJPEG encoder Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* lavc: VAAPI MJPEG encoderMark Thompson2016-03-30
Signed-off-by: Anton Khirnov <anton@khirnov.net>