summaryrefslogtreecommitdiff
path: root/libavcodec/vaapi_encode_h264.c
Commit message (Collapse)AuthorAge
* vaapi_h264: Enable VBR modeMark Thompson2017-02-08
| | | | | | | | | | Default to using VBR when a target bitrate is set, unless the max rate is also set and matches the target. Changes to the Intel driver mean that min_qp is also respected in this case, so set a codec default to unset the value rather than using the current default inherited from the MPEG-4 part 2 encoder. (cherry picked from commit eddfb57210298a0a94472794485400a3a6c76196)
* vaapi_h264: Scale log2_max_pic_order_cnt_lsb with max_b_framesMark Thompson2017-02-08
| | | | | | | | | Before this change, it was possible to overflow pic_order_cnt_lsb and generate a stream with invalid POC numbering. This makes sure that the field is large enough that a single IDR B* P sequence uses fewer than half the available POC lsb values. (cherry picked from commit 89725a8512721fffd190021ded2d3f5b42e20e2a)
* lavc/vaapi_encode_h264: disable B frames in baseline profileJun Zhao2017-01-09
| | | | | | | | | Disable B frames when using baseline/constrained baseline profile, following H.264 spec Annex A.2.1. Signed-off-by: Jun Zhao <jun.zhao@intel.com> Signed-off-by: Yi A Wang <yi.a.wang@intel.com> Signed-off-by: Mark Thompson <sw@jkqxz.net>
* vaapi_encode: Fix format specifier for bitrate loggingMark Thompson2016-11-21
| | | | | Same as e0df56f25d09b14f5315799338be246806c46806. This was accidentally reintroduced while merging c8241e730f116f1c9cfc0b34110aa7f052e05332.
* lavc/vaapi_encode_h264: fix poc incorrect issue after meeting idr frame.Jun Zhao2016-11-21
| | | | | | | | | | | when meeting IDR frame, vaapi_encode_h264 poc number don't reset, now fix this issue based on h264 spec. Some decoder don't care this case, but this fix will enhance the encoder action. Before this fix, poc number is negative in some case. Reviewed-by: Jun Zhao <jun.zhao@intel.com> Signed-off-by: Wang, Yi A <yi.a.wang@intel.com> Signed-off-by: Mark Thompson <sw@jkqxz.net>
* vaapi_h264: Write bitstream restriction fieldsMark Thompson2016-11-21
| | | | (cherry picked from commit ec17ab381ede4f31c4bdd2767d8f62d24aaf430a)
* vaapi_h264: Fix CFR mode with frame_rate set in AVCodecContextMark Thompson2016-11-21
| | | | (cherry picked from commit 17a0f9481cf07af0feb3838ca315b970117e8000)
* vaapi_h264: Set max_num_ref_frames to 1 when not using B framesMark Thompson2016-11-21
| | | | (cherry picked from commit 956a54129db522998a5abae869568dae2c9774cb)
* 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)
* vaapi_h264: Fix HRD bit_rate/cpb_size scalingMark Thompson2016-11-21
| | | | | | | There should be an extra offset of 6 on bit_rate_scale and of 4 on cpb_size_scale which were not accounted for here. (cherry picked from commit 3a9662af6c741f8354b1ca97642f78f5c02e2e8f)
* 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 '5c2fb561d94fc51d76ab21d6f7cc5b6cc3aa599c'James Almer2016-08-01
|\ | | | | | | | | | | | | | | | | | | | | | | | | * commit '5c2fb561d94fc51d76ab21d6f7cc5b6cc3aa599c': h264: add H264_ prefix to the NAL unit types Conflicts: libavcodec/h264_parse.c libavcodec/h264_parser.c libavcodec/h264_slice.c libavcodec/h264dec.c Merged-by: James Almer <jamrial@gmail.com>
| * h264: add H264_ prefix to the NAL unit typesAnton Khirnov2016-06-21
| | | | | | | | | | This will prevent conflicts e.g. in code that deals with both h264 and hevc.
* | Merge commit '251cbb44003caf179fb17afbb8a6c56643c2a646'Clément Bœsch2016-07-29
|\| | | | | | | | | | | | | * commit '251cbb44003caf179fb17afbb8a6c56643c2a646': h264: create a new header for common h264 definitions Merged-by: Clément Bœsch <u@pkh.me>
| * h264: create a new header for common h264 definitionsAnton Khirnov2016-06-21
| | | | | | | | | | | | Move the NAL unit types into it. This will allow to stop including the whole decoder-specific h264dec.h in some code that is unrelated to the decoder and only needs some enum values.
* | Merge commit '9df889a5f116c1ee78c2f239e0ba599c492431aa'Clément Bœsch2016-07-29
|\| | | | | | | | | | | | | * commit '9df889a5f116c1ee78c2f239e0ba599c492431aa': h264: rename h264.[ch] to h264dec.[ch] Merged-by: Clément Bœsch <u@pkh.me>
| * h264: rename h264.[ch] to h264dec.[ch]Anton Khirnov2016-06-21
| | | | | | | | This is more consistent with the naming of other decoders.
* | avcodec/vaapi_encode_h264: Use av_clip_uintp2()Michael Niedermayer2016-07-10
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit '02fa1ad9266f9b1ea11565ac2f93f45853e351e8'Clément Bœsch2016-06-29
|\| | | | | | | | | | | | | * commit '02fa1ad9266f9b1ea11565ac2f93f45853e351e8': vaapi_h264: Add source version identifier as unregistered SEI Merged-by: Clément Bœsch <clement@stupeflix.com>
| * vaapi_h264: Add source version identifier as unregistered SEIMark Thompson2016-06-09
| | | | | | | | | | Contains the libavcodec version, the VAAPI version and the libva driver vendor string.
* | Merge commit '48e2967cd50c2e1a2a539fd697d20ead2c5c4cc8'Clément Bœsch2016-06-29
|\| | | | | | | | | | | | | * commit '48e2967cd50c2e1a2a539fd697d20ead2c5c4cc8': vaapi_h264: Add support for SEI messages Merged-by: Clément Bœsch <clement@stupeflix.com>
| * vaapi_h264: Add support for SEI messagesMark Thompson2016-06-09
| | | | | | | | | | Send buffering_period and pic_timing messages when in modes targetting bitrate. Also adds NAL HRD parameters to VUI.
* | Merge commit '081961f819c0b16c7a860d7da7d39f1fd91bd2f0'Clément Bœsch2016-06-29
|\| | | | | | | | | | | | | * commit '081961f819c0b16c7a860d7da7d39f1fd91bd2f0': vaapi_h264: Add support for VUI parameters Merged-by: Clément Bœsch <clement@stupeflix.com>
| * vaapi_h264: Add support for VUI parametersMark Thompson2016-06-09
| | | | | | | | Supports aspect ratio, colour format and timing information.
* | Merge commit 'a86aa16088ad7f22a8918d71adb8c040d6033d84'Hendrik Leppkes2016-06-26
|\| | | | | | | | | | | | | * commit 'a86aa16088ad7f22a8918d71adb8c040d6033d84': vaapi_h264: Add trivial support for low-power encoding Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * vaapi_h264: Add trivial support for low-power encodingMark Thompson2016-05-27
| | | | | | | | | | | | Experimental; requires Skylake and VAAPI 0.39.1 (not yet released). Also increases the allowed range of the quality option - in low-power mode, the Intel driver supports levels 1-8 (and 0 meaning default).
* | Merge commit 'b51c7c6b8a5b35cfd06cb9655f9ec4c9f0ddd81b'Hendrik Leppkes2016-06-26
|\| | | | | | | | | | | | | * commit 'b51c7c6b8a5b35cfd06cb9655f9ec4c9f0ddd81b': vaapi_h264: Fix frame_num after non-reference frames Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * vaapi_h264: Fix frame_num after non-reference framesMark Thompson2016-05-27
| | | | | | | | | | | | | | Non-reference frames (nal_ref_idc == 0) should be discardable, so frame_num does not advance after them. Before this change, a stream containing unreferenced B-frames would be rejected by the reference decoder.
* | Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb'Clément Bœsch2016-06-21
|\| | | | | | | | | | | | | * commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb': cosmetics: Fix spelling mistakes Merged-by: Clément Bœsch <u@pkh.me>
| * cosmetics: Fix spelling mistakesVittorio Giovara2016-05-04
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | vaapi_encode_h26[45]: Reject bitrate targets higher than 2^31Mark Thompson2016-06-10
| |
* | lavc/vaapi_encoder_{h264,h265}: fix bad format warningMatthieu Bouron2016-06-03
| |
* | 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_h264: Add encode quality option (for quality-speed tradeoff)Mark Thompson2016-04-15
| | | | | | | | | | | | Only supported on VAAPI 0.36 and higher. Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * vaapi_h264: Add -qp option, use it to replace use of -global_qualityMark Thompson2016-04-15
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * vaapi_h264: Add constant-bitrate encode supportMark 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 '2c62fcdf5d617791a653d7957d449f75569eede0'Derek Buitenhuis2016-05-08
|/ | | | | | | * commit '2c62fcdf5d617791a653d7957d449f75569eede0': lavc: VAAPI H.264 encoder Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* lavc: VAAPI H.264 encoderMark Thompson2016-03-30
Signed-off-by: Anton Khirnov <anton@khirnov.net>