summaryrefslogtreecommitdiff
path: root/libavcodec/vaapi_encode.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.
* vaapi_encode: Delete unused fieldMark Thompson2020-08-01
|
* vaapi_encode_h265: Fix ordering of tile dimensionsMark Thompson2020-08-01
| | | | | | | Dimensions are normally specified as width x height, and this will match the same option to libaom-av1. Remove the indirection through the private context at the same time.
* lavc/vaapi_encode: add tile slice encoding supportLinjie Fu2020-07-20
| | | | | | | | | | | | | | | | | | Add functions to initialize tile slice structure and make tile slice: - vaapi_encode_init_tile_slice_structure - vaapi_encode_make_tile_slice Tile slice is not allowed to cross the boundary of a tile due to the constraints of media-driver. Currently adding support for one slice per tile. N x N tile encoding is supposed to be supported with the the capability of ARBITRARY_MACROBLOCKS slice structures. N X 1 tile encoding should also work in ARBITRARY_ROWS slice structure. Signed-off-by: Linjie Fu <linjie.justin.fu@gmail.com>
* avcodec/encode: restructure the core encoding codeJames Almer2020-06-18
| | | | | | | | | | | | | | | | This commit follows the same logic as 061a0c14bb, but for the encode API: The new public encoding API will no longer be a wrapper around the old deprecated one, and the internal API used by the encoders now consists of a single receive_packet() callback that pulls frames as required. amf encoders adapted by James Almer librav1e encoder adapted by James Almer nvidia encoders adapted by James Almer MediaFoundation encoders adapted by James Almer vaapi encoders adapted by Linjie Fu v4l2_m2m encoders adapted by Andriy Gelman Signed-off-by: James Almer <jamrial@gmail.com>
* lavc/vaapi_encode: Add hardware config metadataMark Thompson2020-04-26
| | | | These encoders all accept VAAPI surfaces in a hardware frames context.
* vaapi_encode: Add ROI supportMark Thompson2019-07-28
|
* vaapi_encode: Refactor encode misc parameter buffer creationMark Thompson2019-06-03
| | | | | | This removes the use of the nonstandard combined structures, which generated some warnings with clang and will cause alignment problems with some parameter buffer types.
* vaapi_encode: Remove unused functionMark Thompson2019-06-03
|
* vaapi_encode: Warn if input has cropping informationMark Thompson2019-06-02
| | | | Cropping is not supported by VAAPI encode.
* vaapi_encode: Support more RC modesMark Thompson2019-02-25
| | | | | Allow setting the mode explicitly, and try to make a sensible choice given the available parameters if not.
* 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: Allocate picture-private data in generic codeMark Thompson2019-01-23
|
* vaapi_encode: Add flag to mark encoders supporting only constant-qualityMark Thompson2018-10-27
| | | | And set it for MJPEG.
* vaapi_encode: Support configurable slicesMark Thompson2018-10-27
| | | | | | This adds common code to query driver support and set appropriate address/size information for each slice. It only supports rectangular slices for now, since that is the most common use-case.
* 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: Add common options between all encodersMark Thompson2018-09-23
| | | | | The only common option here is low_power - it was previously supported for H.264 only, that specific option is removed.
* 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.
* lavc/vaapi_encode: Change the slice/parameter buffers to dynamic alloc.Jun Zhao2017-08-28
| | | | | | | | Change the slice/parameter buffers to be allocated dynamically. Signed-off-by: Wang, Yi A <yi.a.wang@intel.com> Signed-off-by: Jun Zhao <jun.zhao@intel.com> Signed-off-by: Mark Thompson <sw@jkqxz.net>
* vaapi_encode: Move quality option to common codeMark Thompson2017-08-20
| | | | | | | | | | | Use AVCodecContext.compression_level rather than a private option, replacing the H.264-specific quality option (which stays only for compatibility). This now works with the H.265 encoder in the i965 driver, as well as the existing cases with the H.264 encoder. (cherry picked from commit 19388a7200e5d99c703271f05dba1c806720e808)
* vaapi_encode: Pass framerate parameters to driverMark Thompson2017-02-08
| | | | | | | | | Only do this when building for a recent VAAPI version - initial driver implementations were confused about the interpretation of the framerate field, but hopefully this will be consistent everywhere once 0.40.0 is released. (cherry picked from commit ff35aa8ca4069bf1543adeec4c28e51e4a012eee)
* vaapi_encode: Add MPEG-2 supportMark Thompson2017-02-08
| | | | (cherry picked from commit ca6ae3b77a7e6600e517723b90e57527a47809de)
* vaapi_encode: Support forcing IDR frames via AVFrame.pict_typeMark Thompson2017-02-08
| | | | (cherry picked from commit a3c3a5eac20a51d402c332cdf5220fff40a7943f)
* vaapi_encode: Fix GOP sizingMark Thompson2017-02-08
| | | | | | | | This change makes the configured GOP size be respected exactly - previously the value could be exceeded slightly due to flaws in the frame type selection logic. (cherry picked from commit 37fab0661a760b2a9d727939d72e629acee1a6ef)
* vaapi_encode: Write sequence header as extradataMark Thompson2016-12-05
| | | | | | | Only works if packed headers are supported, where we can know the output before generating the first frame. (cherry picked from commit 0cf86fabfa5820596cca2cfead63c6f8df76c3f2)
* 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 '8a62d2c28fbacd1ae20c35887a1eecba2be14371'Hendrik Leppkes2016-11-13
|\ | | | | | | | | | | | | * commit '8a62d2c28fbacd1ae20c35887a1eecba2be14371': vaapi_encode: Maintain a pool of bitstream output buffers Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * vaapi_encode: Maintain a pool of bitstream output buffersMark Thompson2016-06-26
| | | | | | | | | | | | | | | | | | Previously we would allocate a new one for every frame. This instead maintains an AVBufferPool of them to use as-needed. Also makes the maximum size of an output buffer adapt to the frame size - the fixed upper bound was a bit too easy to hit when encoding large pictures at high quality.
* | Merge commit '19d7667a81499d4357ec8e0851701e17c238e584'Clément Bœsch2016-06-29
|\| | | | | | | | | | | | | * commit '19d7667a81499d4357ec8e0851701e17c238e584': vaapi_encode: Add support for writing arbitrary additional packed headers Merged-by: Clément Bœsch <clement@stupeflix.com>
| * vaapi_encode: Add support for writing arbitrary additional packed headersMark Thompson2016-06-09
| |
* | 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: Add support for codec-local optionsMark Thompson2016-04-15
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * vaapi_encode: Refactor slightly to allow easier setting of global optionsMark Thompson2016-04-15
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | Merge commit '104c804bcaac24b52eb51ed17df2fb311e6ae73e'Derek Buitenhuis2016-05-08
|/ | | | | | | * commit '104c804bcaac24b52eb51ed17df2fb311e6ae73e': lavc: VAAPI encode common infrastructure Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* lavc: VAAPI encode common infrastructureMark Thompson2016-03-30
Signed-off-by: Anton Khirnov <anton@khirnov.net>