33 static void destroy_buffers(VADisplay display, VABufferID *buffers,
unsigned int n_buffers)
36 for (i = 0; i < n_buffers; i++) {
38 vaDestroyBuffer(display, buffers[i]);
46 VABufferID va_buffers[3];
47 unsigned int n_va_buffers = 0;
63 surface) != VA_STATUS_SUCCESS)
67 va_buffers, n_va_buffers) != VA_STATUS_SUCCESS)
83 VABufferID *slice_buf_ids;
84 VABufferID slice_param_buf_id, slice_data_buf_id;
97 slice_param_buf_id = 0;
99 VASliceParameterBufferType,
102 &slice_param_buf_id) != VA_STATUS_SUCCESS)
106 slice_data_buf_id = 0;
108 VASliceDataBufferType,
111 &slice_data_buf_id) != VA_STATUS_SUCCESS)
127 type, size, 1,
NULL, buf_id) == VA_STATUS_SUCCESS)
128 vaMapBuffer(vactx->
display, *buf_id, &data);
151 VASliceParameterBufferBase *slice_param;
170 slice_param->slice_data_size =
size;
172 slice_param->slice_data_flag = VA_SLICE_DATA_FLAG_ALL;
183 av_dlog(avctx,
"ff_vaapi_common_end_frame()\n");
const uint8_t * slice_data
Pointer to slice data buffer base.
uint32_t iq_matrix_buf_id
VAIQMatrixBuffer ID.
uint32_t bitplane_buf_id
VABitPlaneBuffer ID (for VC-1 decoding)
uint32_t context_id
Context ID (video decode pipeline)
int ff_vaapi_render_picture(struct vaapi_context *vactx, VASurfaceID surface)
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 ff_mpeg_draw_horiz_band(MpegEncContext *s, int y, int h)
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.
H.264 / AVC / MPEG4 part10 codec.
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_common_end_frame(AVCodecContext *avctx)
Common AVHWAccel.end_frame() implementation.
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)
Picture * current_picture_ptr
pointer to the current picture
static VASurfaceID ff_vaapi_get_surface_id(AVFrame *pic)
Extract VASurfaceID from an AVFrame.
unsigned int slice_param_size
Size of a VASliceParameterBuffer element.
void * display
Window system dependent data.
main external API structure.
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.
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
int ff_vaapi_commit_slices(struct vaapi_context *vactx)
void * ff_vaapi_alloc_iq_matrix(struct vaapi_context *vactx, unsigned int size)
Allocate a new IQ matrix buffer.
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.
int ff_vaapi_mpeg_end_frame(AVCodecContext *avctx)
uint32_t pic_param_buf_id
VAPictureParameterBuffer ID.