80 "required to associate the processing device.\n");
124 vas = vaCreateConfig(ctx->
hwctx->
display, VAProfileNone,
126 if (vas != VA_STATUS_SUCCESS) {
128 "config: %d (%s).\n", vas, vaErrorStr(vas));
167 "size %dx%d (constraints: width %d-%d height %d-%d).\n",
199 "context for output: %d\n", err);
203 va_frames = output_frames->
hwctx;
211 if (vas != VA_STATUS_SUCCESS) {
213 "context: %d (%s).\n", vas, vaErrorStr(vas));
240 #define CS(av, va) case AVCOL_SPC_ ## av: return VAProcColorStandard ## va;
243 CS(SMPTE170M, SMPTE170M);
244 CS(SMPTE240M, SMPTE240M);
247 return VAProcColorStandardNone;
264 type, size, count, (
void*)data, &buffer);
265 if (vas != VA_STATUS_SUCCESS) {
267 "buffer (type %d): %d (%s).\n",
268 type, vas, vaErrorStr(vas));
275 "is %#x.\n", type, size, count, buffer);
281 VAProcPipelineParameterBuffer *
params,
282 VASurfaceID output_surface)
284 VABufferID params_id;
291 if (vas != VA_STATUS_SUCCESS) {
293 "%d (%s).\n", vas, vaErrorStr(vas));
299 VAProcPipelineParameterBufferType,
300 sizeof(*params), 1, params, ¶ms_id);
301 if (vas != VA_STATUS_SUCCESS) {
303 "%d (%s).\n", vas, vaErrorStr(vas));
305 goto fail_after_begin;
312 if (vas != VA_STATUS_SUCCESS) {
314 "%d (%s).\n", vas, vaErrorStr(vas));
316 goto fail_after_begin;
320 if (vas != VA_STATUS_SUCCESS) {
322 "%d (%s).\n", vas, vaErrorStr(vas));
324 goto fail_after_render;
330 if (vas != VA_STATUS_SUCCESS) {
332 "%d (%s).\n", vas, vaErrorStr(vas));
360 for (i = 0; i < VAProcFilterCount; i++)
This struct aggregates all the (hardware/vendor-specific) "high-level" state, i.e.
void av_buffer_unref(AVBufferRef **buf)
Free a given reference and automatically free the buffer if there are no more references to it...
VAAPI-specific data associated with a frame pool.
int ff_vaapi_vpp_config_input(AVFilterLink *inlink)
ptrdiff_t const GLvoid * data
int(* build_filter_params)(AVFilterContext *avctx)
int ff_vaapi_vpp_config_output(AVFilterLink *outlink)
int h
agreed upon image height
The driver does not destroy parameter buffers when they are used by vaRenderPicture().
int width
The allocated dimensions of the frames in this pool.
void * av_hwdevice_hwconfig_alloc(AVBufferRef *ref)
Allocate a HW-specific configuration structure for a given HW device.
enum AVPixelFormat format
The pixel format identifying the underlying HW surface type.
int max_width
The maximum size of frames in this hw_frames_ctx.
void av_hwframe_constraints_free(AVHWFramesConstraints **constraints)
Free an AVHWFrameConstraints structure.
AVFilterLink ** inputs
array of pointers to input links
#define av_assert0(cond)
assert() equivalent, that is always enabled.
AVColorSpace
YUV colorspace type.
void(* pipeline_uninit)(AVFilterContext *avctx)
int ff_vaapi_vpp_render_picture(AVFilterContext *avctx, VAProcPipelineParameterBuffer *params, VASurfaceID output_surface)
A link between two filters.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
VAAPI hardware pipeline configuration details.
AVBufferRef * input_frames_ref
void * priv
private data for use by the filter
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
simple assert() macros that are a bit more flexible than ISO C assert().
AVFilterFormats * in_formats
Lists of formats and channel layouts supported by the input and output filters respectively.
int av_hwframe_ctx_init(AVBufferRef *ref)
Finalize the context before use.
int ff_vaapi_vpp_make_param_buffers(AVFilterContext *avctx, int type, const void *data, size_t size, int count)
int w
agreed upon image width
int initial_pool_size
Initial size of the frame pool.
AVBufferRef * hw_frames_ctx
For hwaccel pixel formats, this should be a reference to the AVHWFramesContext describing the frames...
void ff_vaapi_vpp_pipeline_uninit(AVFilterContext *avctx)
AVFilterContext * src
source filter
VADisplay display
The VADisplay handle, to be filled by the user.
int min_width
The minimum size of frames in this hw_frames_ctx.
This struct describes the constraints on hardware frames attached to a given device with a hardware-s...
AVHWFramesConstraints * av_hwdevice_get_hwframe_constraints(AVBufferRef *ref, const void *hwconfig)
Get the constraints on HW frames given a device and the HW-specific configuration to be used with tha...
uint8_t * data
The data buffer.
VABufferID filter_buffers[VAProcFilterCount]
void * hwctx
The format-specific data, allocated and freed automatically along with this context.
unsigned int driver_quirks
Driver quirks to apply - this is filled by av_hwdevice_ctx_init(), with reference to a table of known...
This struct describes a set or pool of "hardware" frames (i.e.
AVFilterLink ** outputs
array of pointers to output links
static enum AVPixelFormat pix_fmts[]
enum AVPixelFormat output_format
AVVAAPIDeviceContext * hwctx
AVBufferRef * device_ref
A reference to the parent AVHWDeviceContext.
int ff_vaapi_vpp_query_formats(AVFilterContext *avctx)
void ff_vaapi_vpp_ctx_init(AVFilterContext *avctx)
AVBufferRef * av_hwframe_ctx_alloc(AVBufferRef *device_ref_in)
Allocate an AVHWFramesContext tied to a given device context.
AVBufferRef * av_buffer_ref(AVBufferRef *buf)
Create a new reference to an AVBuffer.
int ff_filter_init_hw_frames(AVFilterContext *avctx, AVFilterLink *link, int default_pool_size)
Perform any additional setup required for hardware frames.
int ff_vaapi_vpp_colour_standard(enum AVColorSpace av_cs)
AVHWFramesContext * input_frames
AVFilterContext * dst
dest filter
enum AVPixelFormat * valid_sw_formats
A list of possible values for sw_format in the hw_frames_ctx, terminated by AV_PIX_FMT_NONE.
VAConfigID config_id
ID of a VAAPI pipeline configuration.
VASurfaceID * surface_ids
The surfaces IDs of all surfaces in the pool after creation.
const char * av_get_pix_fmt_name(enum AVPixelFormat pix_fmt)
Return the short name for a pixel format, NULL in case pix_fmt is unknown.
enum AVPixelFormat sw_format
The pixel format identifying the actual data layout of the hardware frames.
AVPixelFormat
Pixel format.
void ff_vaapi_vpp_ctx_uninit(AVFilterContext *avctx)
AVFilterFormats * out_formats