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;
66 surface) != VA_STATUS_SUCCESS)
70 va_buffers, n_va_buffers) != VA_STATUS_SUCCESS)
86 VABufferID *slice_buf_ids;
87 VABufferID slice_param_buf_id, slice_data_buf_id;
100 slice_param_buf_id = 0;
102 VASliceParameterBufferType,
105 &slice_param_buf_id) != VA_STATUS_SUCCESS)
109 slice_data_buf_id = 0;
111 VASliceDataBufferType,
114 &slice_data_buf_id) != VA_STATUS_SUCCESS)
130 type, size, 1,
NULL, buf_id) == VA_STATUS_SUCCESS)
131 vaMapBuffer(vactx->
display, *buf_id, &data);
154 VASliceParameterBufferBase *slice_param;
173 slice_param->slice_data_size =
size;
175 slice_param->slice_data_flag = VA_SLICE_DATA_FLAG_ALL;
186 ff_dlog(avctx,
"ff_vaapi_common_end_frame()\n");
200 #if CONFIG_H263_VAAPI_HWACCEL || CONFIG_MPEG1_VAAPI_HWACCEL || \
201 CONFIG_MPEG2_VAAPI_HWACCEL || CONFIG_MPEG4_VAAPI_HWACCEL || \
202 CONFIG_VC1_VAAPI_HWACCEL || CONFIG_WMV3_VAAPI_HWACCEL
const uint8_t * slice_data
Pointer to slice data buffer base.
uint32_t iq_matrix_buf_id
VAIQMatrixBuffer ID.
ptrdiff_t const GLvoid * data
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)
This structure is used to share data between the FFmpeg library and the client video application...
unsigned int slice_params_alloc
Size of pre-allocated slice_params.
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.