Commit 344e6c3f authored by Mark Thompson's avatar Mark Thompson

lavc/vaapi_encode: Add hardware config metadata

These encoders all accept VAAPI surfaces in a hardware frames context.
parent 5a1ff449
......@@ -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,
......
......@@ -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,
......
......@@ -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",
};
......@@ -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",
};
......@@ -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",
};
......@@ -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",
};
......@@ -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",
};
......@@ -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",
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment