4 * copyright (c) 2011 Sebastien Zwickert
6 * This file is part of Libav.
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.
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.
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
28 * @ingroup lavc_codec_hwaccel_vda
29 * Public libavcodec VDA header.
32 #include "libavcodec/version.h"
36 // emmintrin.h is unable to compile with -std=c99 -Werror=missing-prototypes
37 // http://openradar.appspot.com/8026390
38 #undef __GNUC_STDC_INLINE__
40 #define Picture QuickdrawPicture
41 #include <VideoDecodeAcceleration/VDADecoder.h>
45 * @defgroup lavc_codec_hwaccel_vda VDA
46 * @ingroup lavc_codec_hwaccel
52 * This structure is used to provide the necessary configurations and data
53 * to the VDA Libav HWAccel implementation.
55 * The application must make it available as AVCodecContext.hwaccel_context.
62 * - decoding: Set/Unset by libavcodec.
67 * The Core Video pixel buffer that contains the current image data.
70 * decoding: Set by libavcodec. Unset by user.
72 CVPixelBufferRef cv_buffer;
75 * Use the hardware decoder in synchronous mode.
78 * decoding: Set by user.
80 int use_sync_decoding;
86 * - decoding: Set/Unset by user.
94 * - decoding: Set/Unset by user.
102 * - decoding: Set/Unset by user.
107 * The pixel format for output image buffers.
110 * - decoding: Set/Unset by user.
112 OSType cv_pix_fmt_type;
115 * The current bitstream buffer.
117 uint8_t *priv_bitstream;
120 * The current size of the bitstream.
122 int priv_bitstream_size;
125 * The reference size used for fast reallocation.
127 int priv_allocated_size;
130 /** Create the video decoder. */
131 int ff_vda_create_decoder(struct vda_context *vda_ctx,
135 /** Destroy the video decoder. */
136 int ff_vda_destroy_decoder(struct vda_context *vda_ctx);
142 #endif /* AVCODEC_VDA_H */