vaapi_internal.h
Go to the documentation of this file.
1 /*
2  * Video Acceleration API (video decoding)
3  * HW decode acceleration for MPEG-2, MPEG-4, H.264 and VC-1
4  *
5  * Copyright (C) 2008-2009 Splitted-Desktop Systems
6  *
7  * This file is part of Libav.
8  *
9  * Libav is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License as published by the Free Software Foundation; either
12  * version 2.1 of the License, or (at your option) any later version.
13  *
14  * Libav is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with Libav; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22  */
23 
24 #ifndef AVCODEC_VAAPI_INTERNAL_H
25 #define AVCODEC_VAAPI_INTERNAL_H
26 
27 #include <va/va.h>
28 #include "vaapi.h"
29 #include "avcodec.h"
30 #include "mpegvideo.h"
31 
39 static inline VASurfaceID ff_vaapi_get_surface_id(Picture *pic)
40 {
41  return (uintptr_t)pic->f.data[3];
42 }
43 
46 
48 void *ff_vaapi_alloc_pic_param(struct vaapi_context *vactx, unsigned int size);
49 
51 void *ff_vaapi_alloc_iq_matrix(struct vaapi_context *vactx, unsigned int size);
52 
54 uint8_t *ff_vaapi_alloc_bitplane(struct vaapi_context *vactx, uint32_t size);
55 
64 VASliceParameterBufferBase *ff_vaapi_alloc_slice(struct vaapi_context *vactx, const uint8_t *buffer, uint32_t size);
65 
67 int ff_vaapi_commit_slices(struct vaapi_context *vactx);
68 int ff_vaapi_render_picture(struct vaapi_context *vactx, VASurfaceID surface);
69 
70 /* @} */
71 
72 #endif /* AVCODEC_VAAPI_INTERNAL_H */
int size
int ff_vaapi_render_picture(struct vaapi_context *vactx, VASurfaceID surface)
Definition: vaapi.c:44
mpegvideo header.
This structure is used to share data between the Libav library and the client video application...
Definition: vaapi.h:50
uint8_t
void ff_vaapi_common_end_frame(AVCodecContext *avctx)
Common AVHWAccel.end_frame() implementation.
Definition: vaapi.c:179
void * ff_vaapi_alloc_pic_param(struct vaapi_context *vactx, unsigned int size)
Allocate a new picture parameter buffer.
Definition: vaapi.c:133
Picture.
Definition: mpegvideo.h:95
static char buffer[20]
Definition: seek-test.c:31
external API header
main external API structure.
Definition: avcodec.h:1339
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.
Definition: vaapi.c:148
Public libavcodec VA API header.
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
Definition: avcodec.h:997
int ff_vaapi_commit_slices(struct vaapi_context *vactx)
Definition: vaapi.c:81
void * ff_vaapi_alloc_iq_matrix(struct vaapi_context *vactx, unsigned int size)
Allocate a new IQ matrix buffer.
Definition: vaapi.c:138
static VASurfaceID ff_vaapi_get_surface_id(Picture *pic)
Extract VASurfaceID from a Picture.
uint8_t * ff_vaapi_alloc_bitplane(struct vaapi_context *vactx, uint32_t size)
Allocate a new bit-plane buffer.
Definition: vaapi.c:143
struct AVFrame f
Definition: mpegvideo.h:96
int ff_vaapi_mpeg_end_frame(AVCodecContext *avctx)
Definition: vaapi.c:197