Libav
vda.h
Go to the documentation of this file.
1 /*
2  * VDA HW acceleration
3  *
4  * copyright (c) 2011 Sebastien Zwickert
5  *
6  * This file is part of Libav.
7  *
8  * Libav is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * Libav is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with Libav; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21  */
22 
23 #ifndef AVCODEC_VDA_H
24 #define AVCODEC_VDA_H
25 
32 #include "libavcodec/version.h"
33 
34 #include <stdint.h>
35 
36 // emmintrin.h is unable to compile with -std=c99 -Werror=missing-prototypes
37 // http://openradar.appspot.com/8026390
38 #undef __GNUC_STDC_INLINE__
39 
40 #define Picture QuickdrawPicture
41 #include <VideoDecodeAcceleration/VDADecoder.h>
42 #undef Picture
43 
57 struct vda_context {
64  VDADecoder decoder;
65 
72  CVPixelBufferRef cv_buffer;
73 
81 
88  int width;
89 
96  int height;
97 
104  int format;
105 
113 
118 
123 
128 };
129 
131 int ff_vda_create_decoder(struct vda_context *vda_ctx,
132  uint8_t *extradata,
133  int extradata_size);
134 
136 int ff_vda_destroy_decoder(struct vda_context *vda_ctx);
137 
142 #endif /* AVCODEC_VDA_H */
int format
The frame format.
Definition: vda.h:104
OSType cv_pix_fmt_type
The pixel format for output image buffers.
Definition: vda.h:112
uint8_t
int width
The frame width.
Definition: vda.h:88
CVPixelBufferRef cv_buffer
The Core Video pixel buffer that contains the current image data.
Definition: vda.h:72
Libavcodec version macros.
VDADecoder decoder
VDA decoder object.
Definition: vda.h:64
This structure is used to provide the necessary configurations and data to the VDA Libav HWAccel impl...
Definition: vda.h:57
int ff_vda_destroy_decoder(struct vda_context *vda_ctx)
Destroy the video decoder.
Definition: vda_h264.c:213
int use_sync_decoding
Use the hardware decoder in synchronous mode.
Definition: vda.h:80
uint8_t * priv_bitstream
The current bitstream buffer.
Definition: vda.h:117
int ff_vda_create_decoder(struct vda_context *vda_ctx, uint8_t *extradata, int extradata_size)
Create the video decoder.
Definition: vda_h264.c:129
int priv_allocated_size
The reference size used for fast reallocation.
Definition: vda.h:127
int height
The frame height.
Definition: vda.h:96
int priv_bitstream_size
The current size of the bitstream.
Definition: vda.h:122