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:
@@ -902,7 +902,9 @@ static const VAAPIEncodeProfile vaapi_encode_h264_profiles[] = {
|
||||
static const VAAPIEncodeType vaapi_encode_type_h264 = {
|
||||
.profiles = vaapi_encode_h264_profiles,
|
||||
|
||||
.flags = FLAG_SLICE_CONTROL,
|
||||
.flags = FLAG_SLICE_CONTROL |
|
||||
FLAG_B_PICTURES |
|
||||
FLAG_NON_IDR_KEY_PICTURES,
|
||||
|
||||
.configure = &vaapi_encode_h264_configure,
|
||||
|
||||
@@ -1095,7 +1097,8 @@ AVCodec ff_h264_vaapi_encoder = {
|
||||
.id = AV_CODEC_ID_H264,
|
||||
.priv_data_size = sizeof(VAAPIEncodeH264Context),
|
||||
.init = &vaapi_encode_h264_init,
|
||||
.encode2 = &ff_vaapi_encode2,
|
||||
.send_frame = &ff_vaapi_encode_send_frame,
|
||||
.receive_packet = &ff_vaapi_encode_receive_packet,
|
||||
.close = &vaapi_encode_h264_close,
|
||||
.priv_class = &vaapi_encode_h264_class,
|
||||
.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE,
|
||||
|
||||
Reference in New Issue
Block a user