1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-13 21:28:01 +02:00

lavc/vaapi_encode: Add hardware config metadata

These encoders all accept VAAPI surfaces in a hardware frames context.
This commit is contained in:
Mark Thompson 2020-04-13 16:33:17 +01:00
parent 5a1ff44907
commit 344e6c3ff1
8 changed files with 14 additions and 0 deletions

View File

@ -27,6 +27,11 @@
#include "vaapi_encode.h"
#include "avcodec.h"
const AVCodecHWConfigInternal *ff_vaapi_encode_hw_configs[] = {
HW_CONFIG_ENCODER_FRAMES(VAAPI, VAAPI),
NULL,
};
static const char * const picture_type_name[] = { "IDR", "I", "P", "B" };
static int vaapi_encode_make_packed_header(AVCodecContext *avctx,

View File

@ -31,6 +31,7 @@
#include "libavutil/hwcontext_vaapi.h"
#include "avcodec.h"
#include "hwconfig.h"
struct VAAPIEncodeType;
struct VAAPIEncodePicture;
@ -44,6 +45,8 @@ enum {
MAX_PARAM_BUFFER_SIZE = 1024,
};
extern const AVCodecHWConfigInternal *ff_vaapi_encode_hw_configs[];
enum {
PICTURE_TYPE_IDR = 0,
PICTURE_TYPE_I = 1,

View File

@ -1361,5 +1361,6 @@ AVCodec ff_h264_vaapi_encoder = {
AV_PIX_FMT_VAAPI,
AV_PIX_FMT_NONE,
},
.hw_configs = ff_vaapi_encode_hw_configs,
.wrapper_name = "vaapi",
};

View File

@ -1297,5 +1297,6 @@ AVCodec ff_hevc_vaapi_encoder = {
AV_PIX_FMT_VAAPI,
AV_PIX_FMT_NONE,
},
.hw_configs = ff_vaapi_encode_hw_configs,
.wrapper_name = "vaapi",
};

View File

@ -570,5 +570,6 @@ AVCodec ff_mjpeg_vaapi_encoder = {
AV_PIX_FMT_VAAPI,
AV_PIX_FMT_NONE,
},
.hw_configs = ff_vaapi_encode_hw_configs,
.wrapper_name = "vaapi",
};

View File

@ -707,5 +707,6 @@ AVCodec ff_mpeg2_vaapi_encoder = {
AV_PIX_FMT_VAAPI,
AV_PIX_FMT_NONE,
},
.hw_configs = ff_vaapi_encode_hw_configs,
.wrapper_name = "vaapi",
};

View File

@ -262,5 +262,6 @@ AVCodec ff_vp8_vaapi_encoder = {
AV_PIX_FMT_VAAPI,
AV_PIX_FMT_NONE,
},
.hw_configs = ff_vaapi_encode_hw_configs,
.wrapper_name = "vaapi",
};

View File

@ -296,5 +296,6 @@ AVCodec ff_vp9_vaapi_encoder = {
AV_PIX_FMT_VAAPI,
AV_PIX_FMT_NONE,
},
.hw_configs = ff_vaapi_encode_hw_configs,
.wrapper_name = "vaapi",
};