History

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.

Mark Thompson committed 7 years ago

Commit 5fdcf851 parent 26ce3a49 files · +433 −331Browse files

Showing the changes to libavcodec/vaapi_encode_mpeg2.c (1 of 9 files). Show all

Unified · Split

libavcodec/vaapi_encode_mpeg2.c+4−1
@@ -563,6 +563,8 @@ static const VAAPIEncodeProfile vaapi_encode_mpeg2_profiles[] = { · 562 unmodified lines
563static const VAAPIEncodeType vaapi_encode_type_mpeg2 = {563static const VAAPIEncodeType vaapi_encode_type_mpeg2 = {
564 .profiles = vaapi_encode_mpeg2_profiles,564 .profiles = vaapi_encode_mpeg2_profiles,
565 565
566 .flags = FLAG_B_PICTURES,
567
566 .configure = &vaapi_encode_mpeg2_configure,568 .configure = &vaapi_encode_mpeg2_configure,
567 569
568 .sequence_params_size = sizeof(VAEncSequenceParameterBufferMPEG2),570 .sequence_params_size = sizeof(VAEncSequenceParameterBufferMPEG2),
@@ -689,7 +691,8 @@ AVCodec ff_mpeg2_vaapi_encoder = { · 120 unmodified lines
689 .id = AV_CODEC_ID_MPEG2VIDEO,691 .id = AV_CODEC_ID_MPEG2VIDEO,
690 .priv_data_size = sizeof(VAAPIEncodeMPEG2Context),692 .priv_data_size = sizeof(VAAPIEncodeMPEG2Context),
691 .init = &vaapi_encode_mpeg2_init,693 .init = &vaapi_encode_mpeg2_init,
692 .encode2 = &ff_vaapi_encode2,694 .send_frame = &ff_vaapi_encode_send_frame,
695 .receive_packet = &ff_vaapi_encode_receive_packet,
693 .close = &vaapi_encode_mpeg2_close,696 .close = &vaapi_encode_mpeg2_close,
694 .priv_class = &vaapi_encode_mpeg2_class,697 .priv_class = &vaapi_encode_mpeg2_class,
695 .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE,698 .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t