mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-21 06:20:09 +01:00
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.
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user