32 static void destroy_buffers(VADisplay display, VABufferID *buffers,
unsigned int n_buffers)
35 for (i = 0; i < n_buffers; i++) {
37 vaDestroyBuffer(display, buffers[i]);
45 VABufferID va_buffers[3];
46 unsigned int n_va_buffers = 0;
62 surface) != VA_STATUS_SUCCESS)
66 va_buffers, n_va_buffers) != VA_STATUS_SUCCESS)
82 VABufferID *slice_buf_ids;
83 VABufferID slice_param_buf_id, slice_data_buf_id;
96 slice_param_buf_id = 0;
98 VASliceParameterBufferType,
101 &slice_param_buf_id) != VA_STATUS_SUCCESS)
105 slice_data_buf_id = 0;
107 VASliceDataBufferType,
110 &slice_data_buf_id) != VA_STATUS_SUCCESS)
126 type, size, 1,
NULL, buf_id) == VA_STATUS_SUCCESS)
127 vaMapBuffer(vactx->
display, *buf_id, &data);
150 VASliceParameterBufferBase *slice_param;
169 slice_param->slice_data_size =
size;
171 slice_param->slice_data_flag = VA_SLICE_DATA_FLAG_ALL;
const uint8_t * slice_data
Pointer to slice data buffer base.
uint32_t iq_matrix_buf_id
VAIQMatrixBuffer ID.
static int render_picture(struct vaapi_context *vactx, VASurfaceID surface)
int ff_vaapi_common_end_frame(MpegEncContext *s)
Common AVHWAccel.end_frame() implementation.
uint32_t bitplane_buf_id
VABitPlaneBuffer ID (for VC-1 decoding)
uint32_t context_id
Context ID (video decode pipeline)
av_dlog(ac->avr,"%d samples - audio_convert: %s to %s (%s)\n", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt), use_generic?ac->func_descr_generic:ac->func_descr)
This structure is used to share data between the Libav library and the client video application...
unsigned int slice_params_alloc
Size of pre-allocated slice_params.
void av_freep(void *arg)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc() and set the pointer ...
void * hwaccel_context
Hardware accelerator context.
static void * alloc_buffer(struct vaapi_context *vactx, int type, unsigned int size, uint32_t *buf_id)
uint32_t slice_data_size
Current size of slice data.
void * av_fast_realloc(void *ptr, unsigned int *size, size_t min_size)
Reallocate the given block if it is not large enough, otherwise do nothing.
void * ff_vaapi_alloc_pic_param(struct vaapi_context *vactx, unsigned int size)
Allocate a new picture parameter buffer.
static void destroy_buffers(VADisplay display, VABufferID *buffers, unsigned int n_buffers)
static int commit_slices(struct vaapi_context *vactx)
Picture * current_picture_ptr
pointer to the current picture
unsigned int slice_param_size
Size of a VASliceParameterBuffer element.
void * display
Window system dependent data.
VASliceParameterBufferBase * ff_vaapi_alloc_slice(struct vaapi_context *vactx, const uint8_t *buffer, uint32_t size)
Allocate a new slice descriptor for the input slice.
uint32_t * slice_buf_ids
Slice parameter/data buffer IDs.
void ff_draw_horiz_band(MpegEncContext *s, int y, int h)
unsigned int slice_count
Number of slices currently filled in.
unsigned int slice_buf_ids_alloc
Size of pre-allocated slice_buf_ids.
struct AVCodecContext * avctx
void * ff_vaapi_alloc_iq_matrix(struct vaapi_context *vactx, unsigned int size)
Allocate a new IQ matrix buffer.
static VASurfaceID ff_vaapi_get_surface_id(Picture *pic)
Extract VASurfaceID from a Picture.
unsigned int n_slice_buf_ids
Number of effective slice buffer IDs to send to the HW.
void * slice_params
Pointer to VASliceParameterBuffers.
uint8_t * ff_vaapi_alloc_bitplane(struct vaapi_context *vactx, uint32_t size)
Allocate a new bit-plane buffer.
uint32_t pic_param_buf_id
VAPictureParameterBuffer ID.