summaryrefslogtreecommitdiff
path: root/libavcodec/vaapi_encode_h265.c
Commit message (Collapse)AuthorAge
* 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_h265: Move options and common structures into contextMark Thompson2018-08-27
| | | | Matching previous commit for H.264.
* vaapi_encode_h265: Insert content light level informationHaihao Xiang2018-05-10
| | | | Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* vaapi_encode_h265: Insert mastering display colour volumeHaihao Xiang2018-05-10
| | | | | | | '-sei xxx' is added to control SEI insertion, so far only mastering display colour volume is available for testing. Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* Merge commit 'ce5870a3a8f2b10668ee4f04c2ae0287f66f31b2'Mark Thompson2018-02-21
|\ | | | | | | | | | | | | | | | | * commit 'ce5870a3a8f2b10668ee4f04c2ae0287f66f31b2': cbs: Refcount all the things! Some changes for bitstream API. Merged-by: Mark Thompson <sw@jkqxz.net>
| * cbs: Refcount all the things!Mark Thompson2018-02-20
| | | | | | | | | | | | | | | | This makes it easier for users of the CBS API to get alloc/free right - all subelements use the buffer API so that it's clear how to free them. It also allows eliding some redundant copies: the packet -> fragment copy disappears after this change if the input packet is refcounted, and more codec-specific cases are now possible (but not included in this patch).
* | Merge commit '67eb2b16daa77f6ba3e04a28ca18e53193723b7f'Mark Thompson2018-02-21
|\| | | | | | | | | | | | | * commit '67eb2b16daa77f6ba3e04a28ca18e53193723b7f': vaapi_h265: Mark unused entries in RefPicList[01] as explicitly invalid Merged-by: Mark Thompson <sw@jkqxz.net>
| * vaapi_h265: Mark unused entries in RefPicList[01] as explicitly invalidMark Thompson2018-02-20
| | | | | | | | | | The iHD driver looks at entries beyond num_ref_idx_l[01]_active_minus1 for unknown reasons.
| * cbs: Allocate the context inside the init functionMark Thompson2018-02-20
| | | | | | | | | | ... instead of making callers allocate it themselves. This is more consistent with other APIs in libav.
| * 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>. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
| * vaapi_h265: Add named options for setting profile and levelMark Thompson2017-12-06
| | | | | | | | Also fixes the default, which previously contained a nonsense value.
| * vaapi_h265: Enable VBR modeJun Zhao2017-12-02
| | | | | | | | | | | | | | | | To match vaapi_h264. From ffmpeg commit 385cafb07ac1e46433931ea9749a134efd7350be. Signed-off-by: Mark Thompson <sw@jkqxz.net>
* | 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.
* | vaapi_h265: Add named options for setting profile and levelMark Thompson2017-12-04
| | | | | | | | Also fixes the default, which previously contained a nonsense value.
* | Merge commit 'f940c859c23ae201b0170cf541ea8f6b7a52dd49'James Almer2017-11-11
|\| | | | | | | | | | | | | * commit 'f940c859c23ae201b0170cf541ea8f6b7a52dd49': Revert "vaapi_h265: Reduce the amount of padding in the stream" Merged-by: James Almer <jamrial@gmail.com>
| * Revert "vaapi_h265: Reduce the amount of padding in the stream"Mark Thompson2017-09-12
| | | | | | | | | | | | | | This reverts commit a14a12ca137bf1526452b97bedfc9f7b301d4e04. The CTU size is always 32x32; the surface size is what actually sets the desired property, and it is already correct.
* | Merge commit 'a14a12ca137bf1526452b97bedfc9f7b301d4e04'James Almer2017-11-11
|\| | | | | | | | | | | | | * commit 'a14a12ca137bf1526452b97bedfc9f7b301d4e04': vaapi_h265: Reduce the amount of padding in the stream Merged-by: James Almer <jamrial@gmail.com>
| * vaapi_h265: Reduce the amount of padding in the streamMark Thompson2017-08-13
| | | | | | | | | | | | It is not necessary to pad to the CTU size. The CB size of 8x8 should be sufficient, but due to constraints in the Intel driver (the one usable implementation of this) it has to be padded to 16x16 like in H.264.
| * vaapi_h265: Add support for AUD NAL unitsMark Thompson2017-08-13
| | | | | | | | Matching the H.264 encoder.
| * vaapi_h265: Convert to use coded bitstream infrastructureMark Thompson2017-08-13
| | | | | | | | | | Also improves the metadata and generally makes the configuration a bit cleaner.
| * vaapi_encode: Use gop_size consistently in RC parametersMark Thompson2017-04-26
| | | | | | | | | | | | | | | | The non-H.26[45] codecs already use this form. Since we don't currently generate I frames for codecs which support them separately to IDR, the p_per_i variable is set to infinity by default so that it doesn't interfere with any other calculation. (All the code for I frames still exists, and it works for H.264 if set manually.)
| * vaapi_h265: Fix build failure with old libva without 10-bit surfacesMark Thompson2017-01-04
| | | | | | | | | | 10-bit surface support was added in libva 1.6.2, earlier versions support H.265 encoding in 8-bit only.
| * vaapi_h265: Fix CFR mode with framerate set in AVCodecContextMark Thompson2016-12-10
| | | | | | | | Same issue as 17a0f9481cf07af0feb3838ca315b970117e8000.
* | vaapi_h265: Add support for AUD NAL unitsMark Thompson2017-10-17
| | | | | | | | | | | | Matching the H.264 encoder. (cherry picked from commit e3e8eab359238486dc233f7aa89b7bb3cb19ec38)
* | vaapi_h265: Convert to use coded bitstream infrastructureMark Thompson2017-10-17
| | | | | | | | | | | | | | Also improves the metadata and generally makes the configuration a bit cleaner. (cherry picked from commit ac12486714b48f9bd5d9167f90b77c936751d6ef)
* | lavc/vaapi_encode_h265: Enable VBR modeJun Zhao2017-08-28
| | | | | | | | | | | | | | Follow vaapi_h264 style, enable the VBR mode. Signed-off-by: Jun Zhao <jun.zhao@intel.com> Signed-off-by: Mark Thompson <sw@jkqxz.net>
* | lavc/vaapi_encode_h265: Remove duplicate slice_segment_address.Jun Zhao2017-07-18
| | | | | | | | | | | | | | | | the VAEncSliceParameterBufferHEVC in libva have support this field, so remove the duplicate field in VAAPIEncodeH265MiscSliceParams. Signed-off-by: Jun Zhao <jun.zhao@intel.com> Signed-off-by: Mark Thompson <sw@jkqxz.net>
* | vaapi_encode: Use gop_size consistently in RC parametersMark Thompson2017-06-14
| | | | | | | | | | | | | | | | | | | | The non-H.26[45] codecs already use this form. Since we don't currently generate I frames for codecs which support them separately to IDR, the p_per_i variable is set to infinity by default so that it doesn't interfere with any other calculation. (All the code for I frames still exists, and it works for H.264 if set manually.) (cherry picked from commit 6af014f4028238b4c50f1731b3369a41d65fa9c4)
* | Merge commit '0bfdcce4d42a6e654c00ea5f9237dc987626457f'James Almer2017-03-23
|\| | | | | | | | | | | | | * commit '0bfdcce4d42a6e654c00ea5f9237dc987626457f': hevc: move the SliceType enum to hevc.h Merged-by: James Almer <jamrial@gmail.com>
| * hevc: move the SliceType enum to hevc.hAnton Khirnov2016-10-21
| | | | | | | | | | Those values are decoder-independent and are also use by the VA-API encoder.
* | Merge commit 'f9bb356e0eb38ab4df32df8276b71a0b2626538f'James Almer2017-03-23
|\| | | | | | | | | | | | | * commit 'f9bb356e0eb38ab4df32df8276b71a0b2626538f': vaapi_h265: Include header for slice types Merged-by: James Almer <jamrial@gmail.com>
| * vaapi_h265: Include header for slice typesMark Thompson2016-10-17
| | | | | | | | | | | | The include was changed correctly in 4abe3b049d987420eb891f74a35af2cebbf52144 but then mistakenly changed back by c359d624d3efc3fd1d83210d78c4152bd329b765 (it's not just the NAL unit types which are used).
* | Merge commit 'c359d624d3efc3fd1d83210d78c4152bd329b765'James Almer2017-03-23
|\| | | | | | | | | | | | | * commit 'c359d624d3efc3fd1d83210d78c4152bd329b765': hevcdec: move decoder-independent declarations into a separate header Merged-by: James Almer <jamrial@gmail.com>
| * hevcdec: move decoder-independent declarations into a separate headerAnton Khirnov2016-10-16
| | | | | | | | | | | | | | This way they can be reused by other code without including the whole decoder-specific hevcdec.h Also, add the HEVC_ prefix to them, since similarly named values exist for H.264 as well and are sometimes used in the same code.
* | Merge commit '4abe3b049d987420eb891f74a35af2cebbf52144'Clément Bœsch2017-03-23
|\| | | | | | | | | | | | | * commit '4abe3b049d987420eb891f74a35af2cebbf52144': hevc: rename hevc.[ch] to hevcdec.[ch] Merged-by: Clément Bœsch <u@pkh.me>
| * hevc: rename hevc.[ch] to hevcdec.[ch]Anton Khirnov2016-10-16
| | | | | | | | | | This is more consistent with the rest of libav and frees up the hevc.h name for decoder-independent shared declarations.
| * vaapi_h265: Add main 10 encode supportMark Thompson2016-10-02
| |
| * vaapi_h265: Fix buffering parametersMark Thompson2016-10-02
| | | | | | | | | | A decoder may need this to be set correctly to output frames in the right order.
| * vaapi_h265: Fix slice header writingMark Thompson2016-10-02
| | | | | | | | | | | | | | | | | | | | | | This was not observed earlier because the only syntax element which it normally misses with the current setup is slice_qp_delta, but that is always going to be zero (in IDR frames QP isn't varied on the slice) which will always exp-golomb code as a single 1 bit. The immediately following part is the byte alignment, which is always a 1 bit followed by 0s which are ignored, so as long as the bitstream is never aligned at that point we will never notice because the only difference is that an ignored bit is a 1 instead of a 0.
| * 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_h265: Fix CFR mode with framerate set in AVCodecContextMark Thompson2017-02-08
| | | | | | | | | | | | Same issue as 17a0f9481cf07af0feb3838ca315b970117e8000. (cherry picked from commit 7d81698b89172d2dcf1b78d4b42ba86262360559)
* | vaapi_h265: Add main 10 encode supportMark Thompson2017-02-08
| | | | | | | | | | (cherry picked from commit 5a5df90d9c05d86d9b0564b8b40b6d64a324df5e) (cherry picked from commit d08e02d929ff8be5f56bb1da0e439bf1ae557552)
* | vaapi_encode: Fix format specifier for bitrate loggingMark Thompson2016-11-21
| | | | | | | | | | Same as e0df56f25d09b14f5315799338be246806c46806. This was accidentally reintroduced while merging c8241e730f116f1c9cfc0b34110aa7f052e05332.
* | vaapi_h265: Fix buffering parametersMark Thompson2016-11-21
| | | | | | | | | | | | | | A decoder may need this to be set correctly to output frames in the right order. (cherry picked from commit b8cac1e83066aa87e8402c146c81b77a11b5eec3)
* | vaapi_h265: Fix slice header writingMark Thompson2016-11-21
| | | | | | | | | | | | | | | | | | | | | | | | | | This was not observed earlier because the only syntax element which it normally misses with the current setup is slice_qp_delta, but that is always going to be zero (in IDR frames QP isn't varied on the slice) which will always exp-golomb code as a single 1 bit. The immediately following part is the byte alignment, which is always a 1 bit followed by 0s which are ignored, so as long as the bitstream is never aligned at that point we will never notice because the only difference is that an ignored bit is a 1 instead of a 0. (cherry picked from commit fc30a90898e419cee7c7cb496976da6337d0bf3e)
* | 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)
* | lavc/vaapi_encode_h26x: Fix a crash if "." is not the decimal separator.Carl Eugen Hoyos2016-08-05
| | | | | | | | | | | | Fixes Debian bugs #831529, #831909, #832964. Signed-off-by: Mark Thompson <sw@jkqxz.net>
* | Merge commit '2940e196c5e439d9869f8c02a49a318d0847453c'Clément Bœsch2016-06-29
|\| | | | | | | | | | | | | * commit '2940e196c5e439d9869f8c02a49a318d0847453c': vaapi_h265: cu_qp_delta should not be used in constant-QP mode Merged-by: Clément Bœsch <clement@stupeflix.com>