Commit Graph

18 Commits

Author SHA1 Message Date
Mark Thompson
6af014f402 vaapi_encode: Use gop_size consistently in RC parameters
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.)
2017-04-26 22:00:33 +01:00
Mark Thompson
d08e02d929 vaapi_h265: Fix build failure with old libva without 10-bit surfaces
10-bit surface support was added in libva 1.6.2, earlier versions
support H.265 encoding in 8-bit only.
2017-01-04 21:49:41 +00:00
Mark Thompson
7d81698b89 vaapi_h265: Fix CFR mode with framerate set in AVCodecContext
Same issue as 17a0f9481c.
2016-12-10 16:55:44 +00:00
Anton Khirnov
0bfdcce4d4 hevc: move the SliceType enum to hevc.h
Those values are decoder-independent and are also use by the VA-API
encoder.
2016-10-21 10:11:20 +02:00
Mark Thompson
f9bb356e0e vaapi_h265: Include header for slice types
The include was changed correctly in 4abe3b049d
but then mistakenly changed back by c359d624d3
(it's not just the NAL unit types which are used).
2016-10-17 20:53:28 +01:00
Anton Khirnov
c359d624d3 hevcdec: move decoder-independent declarations into a separate header
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.
2016-10-16 20:26:28 +02:00
Anton Khirnov
4abe3b049d hevc: rename hevc.[ch] to hevcdec.[ch]
This is more consistent with the rest of libav and frees up the hevc.h
name for decoder-independent shared declarations.
2016-10-16 20:26:17 +02:00
Mark Thompson
5a5df90d9c vaapi_h265: Add main 10 encode support 2016-10-02 20:23:18 +01:00
Mark Thompson
b8cac1e830 vaapi_h265: Fix buffering parameters
A decoder may need this to be set correctly to output frames in the
right order.
2016-10-02 20:23:18 +01:00
Mark Thompson
fc30a90898 vaapi_h265: Fix slice header writing
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.
2016-10-02 20:23:18 +01:00
Mark Thompson
892bbbcdc1 vaapi_encode: Check packed header capabilities
This improves behaviour with drivers which do not support packed
headers, such as AMD VCE on mesa/gallium.
2016-09-28 22:54:11 +01:00
Mark Thompson
80a5d05108 vaapi_encode: Refactor initialisation
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.
2016-09-28 22:54:10 +01:00
Mark Thompson
2940e196c5 vaapi_h265: cu_qp_delta should not be used in constant-QP mode 2016-06-09 21:15:39 +01:00
Vittorio Giovara
41ed7ab45f cosmetics: Fix spelling mistakes
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-05-04 18:16:21 +02:00
Mark Thompson
92fdea3747 vaapi_h265: Add -qp option, use it to replace use of -global_quality
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-04-15 10:07:05 +02:00
Mark Thompson
f70e462793 vaapi_h265: Add constant-bitrate encode support
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-04-15 10:07:05 +02:00
Mark Thompson
f6b8552369 vaapi_encode: Refactor slightly to allow easier setting of global options
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-04-15 10:07:04 +02:00
Mark Thompson
31fe1f2577 lavc: VAAPI H.265 encoder
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-03-30 09:11:25 +02:00