diff options
author | Mark Thompson <sw@jkqxz.net> | 2018-12-20 20:39:56 +0000 |
---|---|---|
committer | Mark Thompson <sw@jkqxz.net> | 2019-01-23 23:04:11 +0000 |
commit | 5fdcf85bbffe7451c227478fda62da5c0938f27d (patch) | |
tree | e780fe3a5b8289e4c0cd8fe9700583452e8a06c0 /libavcodec/vaapi_encode_h265.c | |
parent | 26ce3a43a35fe3a43c895945252aa22c6b46ffb7 (diff) |
vaapi_encode: Convert to send/receive API
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.
Diffstat (limited to 'libavcodec/vaapi_encode_h265.c')
-rw-r--r-- | libavcodec/vaapi_encode_h265.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libavcodec/vaapi_encode_h265.c b/libavcodec/vaapi_encode_h265.c index 8d715f6e93..58005c03a3 100644 --- a/libavcodec/vaapi_encode_h265.c +++ b/libavcodec/vaapi_encode_h265.c @@ -1082,7 +1082,9 @@ static const VAAPIEncodeProfile vaapi_encode_h265_profiles[] = { static const VAAPIEncodeType vaapi_encode_type_h265 = { .profiles = vaapi_encode_h265_profiles, - .flags = FLAG_SLICE_CONTROL, + .flags = FLAG_SLICE_CONTROL | + FLAG_B_PICTURES | + FLAG_NON_IDR_KEY_PICTURES, .configure = &vaapi_encode_h265_configure, @@ -1237,7 +1239,8 @@ AVCodec ff_hevc_vaapi_encoder = { .id = AV_CODEC_ID_HEVC, .priv_data_size = sizeof(VAAPIEncodeH265Context), .init = &vaapi_encode_h265_init, - .encode2 = &ff_vaapi_encode2, + .send_frame = &ff_vaapi_encode_send_frame, + .receive_packet = &ff_vaapi_encode_receive_packet, .close = &vaapi_encode_h265_close, .priv_class = &vaapi_encode_h265_class, .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE, |