History

vaapi: streamline public context structure.

Move libavcodec managed objects from the public struct vaapi_context to a new privately owned FFVAContext. This is done so that to clean up and streamline the public structure, but also to prepare for new codec support, thus requiring new internal data to be added in there. The AVCodecContext.hwaccel_context, that holds the public vaapi_context, shall no longer be accessed from within vaapi_*.c codec support files.

Gwenole Beauchesne committed 11 years ago

Commit babd3401 parent 9f8e57e9 files · +123 −26Browse files

Unified · Split

9 files
  1. doc/APIchanges +4 −0
  2. libavcodec/vaapi.c +31 −9
  3. libavcodec/vaapi.h +16 −0
  4. libavcodec/vaapi_h264.c +7 −3
  5. libavcodec/vaapi_internal.h +36 −6
  6. libavcodec/vaapi_mpeg2.c +6 −2
  7. libavcodec/vaapi_mpeg4.c +9 −2
  8. libavcodec/vaapi_vc1.c +9 −2
  9. libavcodec/version.h +5 −2
doc/APIchanges+4−0
@@ -15,6 +15,10 @@ libavutil: 2014-08-09 · 14 unmodified lines
1515
1616 API changes, most recent first:
1717
18+2015-xx-xx - lavc 56.58.100 - vaapi.h
19+ Deprecate old VA-API context (vaapi_context) fields that were only
20+ set and used by libavcodec. They are all managed internally now.
21+
1822 2015-xx-xx - lavu 54.31.100 - pixfmt.h
1923 Add a unique pixel format for VA-API (AV_PIX_FMT_VAAPI) that
2024 indicates the nature of the underlying storage: a VA surface. This
libavcodec/vaapi.c+31−9
@@ -21,6 +21,7 @@ · 20 unmodified lines
2121 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
2222 */
2323
24+#include "libavutil/log.h"
2425 #include "h264.h"
2526 #include "vaapi_internal.h"
2627
@@ -41,7 +42,28 @@ static void destroy_buffers(VADisplay display, VABufferID *buffers, unsigned int · 14 unmodified lines
4142 }
4243 }
4344
44−int ff_vaapi_render_picture(struct vaapi_context *vactx, VASurfaceID surface)
45+int ff_vaapi_context_init(AVCodecContext *avctx)
46+{
47+ FFVAContext * const vactx = ff_vaapi_get_context(avctx);
48+ const struct vaapi_context * const user_vactx = avctx->hwaccel_context;
49+
50+ if (!user_vactx) {
51+ av_log(avctx, AV_LOG_ERROR, "Hardware acceleration context (hwaccel_context) does not exist.\n");
52+ return AVERROR(ENOSYS);
53+ }
54+
55+ vactx->display = user_vactx->display;
56+ vactx->config_id = user_vactx->config_id;
57+ vactx->context_id = user_vactx->context_id;
58+ return 0;
59+}
60+
61+int ff_vaapi_context_fini(AVCodecContext *avctx)
62+{
63+ return 0;
64+}
65+
66+int ff_vaapi_render_picture(FFVAContext *vactx, VASurfaceID surface)
4567 {
4668 VABufferID va_buffers[3];
4769 unsigned int n_va_buffers = 0;
@@ -81,7 +103,7 @@ int ff_vaapi_render_picture(struct vaapi_context *vactx, VASurfaceID surface) · 33 unmodified lines
81103 return 0;
82104 }
83105
84−int ff_vaapi_commit_slices(struct vaapi_context *vactx)
106+int ff_vaapi_commit_slices(FFVAContext *vactx)
85107 {
86108 VABufferID *slice_buf_ids;
87109 VABufferID slice_param_buf_id, slice_data_buf_id;
@@ -121,7 +143,7 @@ int ff_vaapi_commit_slices(struct vaapi_context *vactx) · 33 unmodified lines
121143 return 0;
122144 }
123145
124−static void *alloc_buffer(struct vaapi_context *vactx, int type, unsigned int size, uint32_t *buf_id)
146+static void *alloc_buffer(FFVAContext *vactx, int type, unsigned int size, uint32_t *buf_id)
125147 {
126148 void *data = NULL;
127149
@@ -133,22 +155,22 @@ static void *alloc_buffer(struct vaapi_context *vactx, int type, unsigned int si · 5 unmodified lines
133155 return data;
134156 }
135157
136−void *ff_vaapi_alloc_pic_param(struct vaapi_context *vactx, unsigned int size)
158+void *ff_vaapi_alloc_pic_param(FFVAContext *vactx, unsigned int size)
137159 {
138160 return alloc_buffer(vactx, VAPictureParameterBufferType, size, &vactx->pic_param_buf_id);
139161 }
140162
141−void *ff_vaapi_alloc_iq_matrix(struct vaapi_context *vactx, unsigned int size)
163+void *ff_vaapi_alloc_iq_matrix(FFVAContext *vactx, unsigned int size)
142164 {
143165 return alloc_buffer(vactx, VAIQMatrixBufferType, size, &vactx->iq_matrix_buf_id);
144166 }
145167
146−uint8_t *ff_vaapi_alloc_bitplane(struct vaapi_context *vactx, uint32_t size)
168+uint8_t *ff_vaapi_alloc_bitplane(FFVAContext *vactx, uint32_t size)
147169 {
148170 return alloc_buffer(vactx, VABitPlaneBufferType, size, &vactx->bitplane_buf_id);
149171 }
150172
151−VASliceParameterBufferBase *ff_vaapi_alloc_slice(struct vaapi_context *vactx, const uint8_t *buffer, uint32_t size)
173+VASliceParameterBufferBase *ff_vaapi_alloc_slice(FFVAContext *vactx, const uint8_t *buffer, uint32_t size)
152174 {
153175 uint8_t *slice_params;
154176 VASliceParameterBufferBase *slice_param;
@@ -181,7 +203,7 @@ VASliceParameterBufferBase *ff_vaapi_alloc_slice(struct vaapi_context *vactx, co · 26 unmodified lines
181203
182204 void ff_vaapi_common_end_frame(AVCodecContext *avctx)
183205 {
184− struct vaapi_context * const vactx = avctx->hwaccel_context;
206+ FFVAContext * const vactx = ff_vaapi_get_context(avctx);
185207
186208 ff_dlog(avctx, "ff_vaapi_common_end_frame()\n");
187209
@@ -202,7 +224,7 @@ void ff_vaapi_common_end_frame(AVCodecContext *avctx) · 14 unmodified lines
202224 CONFIG_VC1_VAAPI_HWACCEL || CONFIG_WMV3_VAAPI_HWACCEL
203225 int ff_vaapi_mpeg_end_frame(AVCodecContext *avctx)
204226 {
205− struct vaapi_context * const vactx = avctx->hwaccel_context;
227+ FFVAContext * const vactx = ff_vaapi_get_context(avctx);
206228 MpegEncContext *s = avctx->priv_data;
207229 int ret;
208230
libavcodec/vaapi.h+16−0
@@ -31,6 +31,8 @@ · 30 unmodified lines
3131 */
3232
3333 #include <stdint.h>
34+#include <libavutil/attributes.h>
35+#include "version.h"
3436
3537 /**
3638 * @defgroup lavc_codec_hwaccel_vaapi VA API Decoding
@@ -72,12 +74,14 @@ struct vaapi_context { · 35 unmodified lines
7274 */
7375 uint32_t context_id;
7476
77+#if FF_API_VAAPI_CONTEXT
7578 /**
7679 * VAPictureParameterBuffer ID
7780 *
7881 * - encoding: unused
7982 * - decoding: Set by libavcodec
8083 */
84+ attribute_deprecated
8185 uint32_t pic_param_buf_id;
8286
8387 /**
@@ -86,6 +90,7 @@ struct vaapi_context { · 2 unmodified lines
8690 * - encoding: unused
8791 * - decoding: Set by libavcodec
8892 */
93+ attribute_deprecated
8994 uint32_t iq_matrix_buf_id;
9095
9196 /**
@@ -94,6 +99,7 @@ struct vaapi_context { · 2 unmodified lines
9499 * - encoding: unused
95100 * - decoding: Set by libavcodec
96101 */
102+ attribute_deprecated
97103 uint32_t bitplane_buf_id;
98104
99105 /**
@@ -102,6 +108,7 @@ struct vaapi_context { · 2 unmodified lines
102108 * - encoding: unused
103109 * - decoding: Set by libavcodec
104110 */
111+ attribute_deprecated
105112 uint32_t *slice_buf_ids;
106113
107114 /**
@@ -110,6 +117,7 @@ struct vaapi_context { · 2 unmodified lines
110117 * - encoding: unused
111118 * - decoding: Set by libavcodec
112119 */
120+ attribute_deprecated
113121 unsigned int n_slice_buf_ids;
114122
115123 /**
@@ -118,6 +126,7 @@ struct vaapi_context { · 2 unmodified lines
118126 * - encoding: unused
119127 * - decoding: Set by libavcodec
120128 */
129+ attribute_deprecated
121130 unsigned int slice_buf_ids_alloc;
122131
123132 /**
@@ -126,6 +135,7 @@ struct vaapi_context { · 2 unmodified lines
126135 * - encoding: unused
127136 * - decoding: Set by libavcodec
128137 */
138+ attribute_deprecated
129139 void *slice_params;
130140
131141 /**
@@ -134,6 +144,7 @@ struct vaapi_context { · 2 unmodified lines
134144 * - encoding: unused
135145 * - decoding: Set by libavcodec
136146 */
147+ attribute_deprecated
137148 unsigned int slice_param_size;
138149
139150 /**
@@ -142,6 +153,7 @@ struct vaapi_context { · 2 unmodified lines
142153 * - encoding: unused
143154 * - decoding: Set by libavcodec
144155 */
156+ attribute_deprecated
145157 unsigned int slice_params_alloc;
146158
147159 /**
@@ -150,6 +162,7 @@ struct vaapi_context { · 2 unmodified lines
150162 * - encoding: unused
151163 * - decoding: Set by libavcodec
152164 */
165+ attribute_deprecated
153166 unsigned int slice_count;
154167
155168 /**
@@ -157,6 +170,7 @@ struct vaapi_context { · 1 unmodified line
157170 * - encoding: unused
158171 * - decoding: Set by libavcodec
159172 */
173+ attribute_deprecated
160174 const uint8_t *slice_data;
161175
162176 /**
@@ -165,7 +179,9 @@ struct vaapi_context { · 2 unmodified lines
165179 * - encoding: unused
166180 * - decoding: Set by libavcodec
167181 */
182+ attribute_deprecated
168183 uint32_t slice_data_size;
184+#endif
169185 };
170186
171187 /* @} */
libavcodec/vaapi_h264.c+7−3
@@ -227,7 +227,7 @@ static int vaapi_h264_start_frame(AVCodecContext *avctx, · 226 unmodified lines
227227 av_unused uint32_t size)
228228 {
229229 H264Context * const h = avctx->priv_data;
230− struct vaapi_context * const vactx = avctx->hwaccel_context;
230+ FFVAContext * const vactx = ff_vaapi_get_context(avctx);
231231 VAPictureParameterBufferH264 *pic_param;
232232 VAIQMatrixBufferH264 *iq_matrix;
233233
@@ -292,7 +292,7 @@ static int vaapi_h264_start_frame(AVCodecContext *avctx, · 58 unmodified lines
292292 /** End a hardware decoding based frame. */
293293 static int vaapi_h264_end_frame(AVCodecContext *avctx)
294294 {
295− struct vaapi_context * const vactx = avctx->hwaccel_context;
295+ FFVAContext * const vactx = ff_vaapi_get_context(avctx);
296296 H264Context * const h = avctx->priv_data;
297297 H264SliceContext *sl = &h->slice_ctx[0];
298298 int ret;
@@ -318,6 +318,7 @@ static int vaapi_h264_decode_slice(AVCodecContext *avctx, · 19 unmodified lines
318318 const uint8_t *buffer,
319319 uint32_t size)
320320 {
321+ FFVAContext * const vactx = ff_vaapi_get_context(avctx);
321322 H264Context * const h = avctx->priv_data;
322323 H264SliceContext *sl = &h->slice_ctx[0];
323324 VASliceParameterBufferH264 *slice_param;
@@ -326,7 +327,7 @@ static int vaapi_h264_decode_slice(AVCodecContext *avctx, · 2 unmodified lines
326327 buffer, size);
327328
328329 /* Fill in VASliceParameterBufferH264. */
329− slice_param = (VASliceParameterBufferH264 *)ff_vaapi_alloc_slice(avctx->hwaccel_context, buffer, size);
330+ slice_param = (VASliceParameterBufferH264 *)ff_vaapi_alloc_slice(vactx, buffer, size);
330331 if (!slice_param)
331332 return -1;
332333 slice_param->slice_data_bit_offset = get_bits_count(&sl->gb) + 8; /* bit buffer started beyond nal_unit_type */
@@ -363,4 +364,7 @@ AVHWAccel ff_h264_vaapi_hwaccel = { · 30 unmodified lines
363364 .start_frame = vaapi_h264_start_frame,
364365 .end_frame = vaapi_h264_end_frame,
365366 .decode_slice = vaapi_h264_decode_slice,
367+ .init = ff_vaapi_context_init,
368+ .uninit = ff_vaapi_context_fini,
369+ .priv_data_size = sizeof(FFVAContext),
366370 };
libavcodec/vaapi_internal.h+36−6
@@ -35,23 +35,53 @@ · 34 unmodified lines
3535 * @{
3636 */
3737
38+typedef struct {
39+ VADisplay display; ///< Windowing system dependent handle
40+ VAConfigID config_id; ///< Configuration ID
41+ VAContextID context_id; ///< Context ID (video decode pipeline)
42+ VABufferID pic_param_buf_id; ///< Picture parameter buffer
43+ VABufferID iq_matrix_buf_id; ///< Inverse quantiser matrix buffer
44+ VABufferID bitplane_buf_id; ///< Bitplane buffer (for VC-1 decoding)
45+ VABufferID *slice_buf_ids; ///< Slice parameter/data buffers
46+ unsigned int n_slice_buf_ids; ///< Number of effective slice buffers
47+ unsigned int slice_buf_ids_alloc; ///< Number of allocated slice buffers
48+ void *slice_params; ///< Pointer to slice parameter buffers
49+ unsigned int slice_param_size; ///< Size of a slice parameter element
50+ unsigned int slice_params_alloc; ///< Number of allocated slice parameters
51+ unsigned int slice_count; ///< Number of slices currently filled in
52+ const uint8_t *slice_data; ///< Pointer to slice data buffer base
53+ unsigned int slice_data_size; ///< Current size of slice data
54+} FFVAContext;
55+
56+/** Extract vaapi_context from an AVCodecContext */
57+static inline FFVAContext *ff_vaapi_get_context(AVCodecContext *avctx)
58+{
59+ return avctx->internal->hwaccel_priv_data;
60+}
61+
3862 /** Extract VASurfaceID from an AVFrame */
3963 static inline VASurfaceID ff_vaapi_get_surface_id(AVFrame *pic)
4064 {
4165 return (uintptr_t)pic->data[3];
4266 }
4367
68+/** Common AVHWAccel.init() implementation */
69+int ff_vaapi_context_init(AVCodecContext *avctx);
70+
71+/** Common AVHWAccel.uninit() implementation */
72+int ff_vaapi_context_fini(AVCodecContext *avctx);
73+
4474 /** Common AVHWAccel.end_frame() implementation */
4575 void ff_vaapi_common_end_frame(AVCodecContext *avctx);
4676
4777 /** Allocate a new picture parameter buffer */
48−void *ff_vaapi_alloc_pic_param(struct vaapi_context *vactx, unsigned int size);
78+void *ff_vaapi_alloc_pic_param(FFVAContext *vactx, unsigned int size);
4979
5080 /** Allocate a new IQ matrix buffer */
51−void *ff_vaapi_alloc_iq_matrix(struct vaapi_context *vactx, unsigned int size);
81+void *ff_vaapi_alloc_iq_matrix(FFVAContext *vactx, unsigned int size);
5282
5383 /** Allocate a new bit-plane buffer */
54−uint8_t *ff_vaapi_alloc_bitplane(struct vaapi_context *vactx, uint32_t size);
84+uint8_t *ff_vaapi_alloc_bitplane(FFVAContext *vactx, uint32_t size);
5585
5686 /**
5787 * Allocate a new slice descriptor for the input slice.
@@ -61,11 +91,11 @@ uint8_t *ff_vaapi_alloc_bitplane(struct vaapi_context *vactx, uint32_t size); · 3 unmodified lines
6191 * @param size the size of the slice in bytes
6292 * @return the newly allocated slice parameter
6393 */
64−VASliceParameterBufferBase *ff_vaapi_alloc_slice(struct vaapi_context *vactx, const uint8_t *buffer, uint32_t size);
94+VASliceParameterBufferBase *ff_vaapi_alloc_slice(FFVAContext *vactx, const uint8_t *buffer, uint32_t size);
6595
6696 int ff_vaapi_mpeg_end_frame(AVCodecContext *avctx);
67−int ff_vaapi_commit_slices(struct vaapi_context *vactx);
68−int ff_vaapi_render_picture(struct vaapi_context *vactx, VASurfaceID surface);
97+int ff_vaapi_commit_slices(FFVAContext *vactx);
98+int ff_vaapi_render_picture(FFVAContext *vactx, VASurfaceID surface);
6999
70100 /* @} */
71101
libavcodec/vaapi_mpeg2.c+6−2
@@ -40,7 +40,7 @@ static inline int mpeg2_get_is_frame_start(MpegEncContext *s) · 39 unmodified lines
4040 static int vaapi_mpeg2_start_frame(AVCodecContext *avctx, av_unused const uint8_t *buffer, av_unused uint32_t size)
4141 {
4242 struct MpegEncContext * const s = avctx->priv_data;
43− struct vaapi_context * const vactx = avctx->hwaccel_context;
43+ FFVAContext * const vactx = ff_vaapi_get_context(avctx);
4444 VAPictureParameterBufferMPEG2 *pic_param;
4545 VAIQMatrixBufferMPEG2 *iq_matrix;
4646 int i;
@@ -103,6 +103,7 @@ static int vaapi_mpeg2_start_frame(AVCodecContext *avctx, av_unused const uint8_ · 56 unmodified lines
103103 static int vaapi_mpeg2_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
104104 {
105105 MpegEncContext * const s = avctx->priv_data;
106+ FFVAContext * const vactx = ff_vaapi_get_context(avctx);
106107 VASliceParameterBufferMPEG2 *slice_param;
107108 GetBitContext gb;
108109 uint32_t quantiser_scale_code, intra_slice_flag, macroblock_offset;
@@ -123,7 +124,7 @@ static int vaapi_mpeg2_decode_slice(AVCodecContext *avctx, const uint8_t *buffer · 14 unmodified lines
123124 macroblock_offset = get_bits_count(&gb);
124125
125126 /* Fill in VASliceParameterBufferMPEG2 */
126− slice_param = (VASliceParameterBufferMPEG2 *)ff_vaapi_alloc_slice(avctx->hwaccel_context, buffer, size);
127+ slice_param = (VASliceParameterBufferMPEG2 *)ff_vaapi_alloc_slice(vactx, buffer, size);
127128 if (!slice_param)
128129 return -1;
129130 slice_param->macroblock_offset = macroblock_offset;
@@ -142,4 +143,7 @@ AVHWAccel ff_mpeg2_vaapi_hwaccel = { · 12 unmodified lines
142143 .start_frame = vaapi_mpeg2_start_frame,
143144 .end_frame = ff_vaapi_mpeg_end_frame,
144145 .decode_slice = vaapi_mpeg2_decode_slice,
146+ .init = ff_vaapi_context_init,
147+ .uninit = ff_vaapi_context_fini,
148+ .priv_data_size = sizeof(FFVAContext),
145149 };
libavcodec/vaapi_mpeg4.c+9−2
@@ -45,7 +45,7 @@ static int vaapi_mpeg4_start_frame(AVCodecContext *avctx, av_unused const uint8_ · 44 unmodified lines
4545 {
4646 Mpeg4DecContext *ctx = avctx->priv_data;
4747 MpegEncContext * const s = &ctx->m;
48− struct vaapi_context * const vactx = avctx->hwaccel_context;
48+ FFVAContext * const vactx = ff_vaapi_get_context(avctx);
4949 VAPictureParameterBufferMPEG4 *pic_param;
5050 VAIQMatrixBufferMPEG4 *iq_matrix;
5151 int i;
@@ -121,12 +121,13 @@ static int vaapi_mpeg4_start_frame(AVCodecContext *avctx, av_unused const uint8_ · 69 unmodified lines
121121 static int vaapi_mpeg4_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
122122 {
123123 MpegEncContext * const s = avctx->priv_data;
124+ FFVAContext * const vactx = ff_vaapi_get_context(avctx);
124125 VASliceParameterBufferMPEG4 *slice_param;
125126
126127 ff_dlog(avctx, "vaapi_mpeg4_decode_slice(): buffer %p, size %d\n", buffer, size);
127128
128129 /* Fill in VASliceParameterBufferMPEG4 */
129− slice_param = (VASliceParameterBufferMPEG4 *)ff_vaapi_alloc_slice(avctx->hwaccel_context, buffer, size);
130+ slice_param = (VASliceParameterBufferMPEG4 *)ff_vaapi_alloc_slice(vactx, buffer, size);
130131 if (!slice_param)
131132 return -1;
132133 slice_param->macroblock_offset = get_bits_count(&s->gb) % 8;
@@ -145,6 +146,9 @@ AVHWAccel ff_mpeg4_vaapi_hwaccel = { · 12 unmodified lines
145146 .start_frame = vaapi_mpeg4_start_frame,
146147 .end_frame = ff_vaapi_mpeg_end_frame,
147148 .decode_slice = vaapi_mpeg4_decode_slice,
149+ .init = ff_vaapi_context_init,
150+ .uninit = ff_vaapi_context_fini,
151+ .priv_data_size = sizeof(FFVAContext),
148152 };
149153 #endif
150154
@@ -157,5 +161,8 @@ AVHWAccel ff_h263_vaapi_hwaccel = { · 6 unmodified lines
157161 .start_frame = vaapi_mpeg4_start_frame,
158162 .end_frame = ff_vaapi_mpeg_end_frame,
159163 .decode_slice = vaapi_mpeg4_decode_slice,
164+ .init = ff_vaapi_context_init,
165+ .uninit = ff_vaapi_context_fini,
166+ .priv_data_size = sizeof(FFVAContext),
160167 };
161168 #endif
libavcodec/vaapi_vc1.c+9−2
@@ -148,7 +148,7 @@ static int vaapi_vc1_start_frame(AVCodecContext *avctx, av_unused const uint8_t · 147 unmodified lines
148148 {
149149 VC1Context * const v = avctx->priv_data;
150150 MpegEncContext * const s = &v->s;
151− struct vaapi_context * const vactx = avctx->hwaccel_context;
151+ FFVAContext * const vactx = ff_vaapi_get_context(avctx);
152152 VAPictureParameterBufferVC1 *pic_param;
153153
154154 ff_dlog(avctx, "vaapi_vc1_start_frame()\n");
@@ -315,6 +315,7 @@ static int vaapi_vc1_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, · 160 unmodified lines
315315 {
316316 VC1Context * const v = avctx->priv_data;
317317 MpegEncContext * const s = &v->s;
318+ FFVAContext * const vactx = ff_vaapi_get_context(avctx);
318319 VASliceParameterBufferVC1 *slice_param;
319320
320321 ff_dlog(avctx, "vaapi_vc1_decode_slice(): buffer %p, size %d\n", buffer, size);
@@ -326,7 +327,7 @@ static int vaapi_vc1_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, · 5 unmodified lines
326327 }
327328
328329 /* Fill in VASliceParameterBufferVC1 */
329− slice_param = (VASliceParameterBufferVC1 *)ff_vaapi_alloc_slice(avctx->hwaccel_context, buffer, size);
330+ slice_param = (VASliceParameterBufferVC1 *)ff_vaapi_alloc_slice(vactx, buffer, size);
330331 if (!slice_param)
331332 return -1;
332333 slice_param->macroblock_offset = get_bits_count(&s->gb);
@@ -343,6 +344,9 @@ AVHWAccel ff_wmv3_vaapi_hwaccel = { · 10 unmodified lines
343344 .start_frame = vaapi_vc1_start_frame,
344345 .end_frame = ff_vaapi_mpeg_end_frame,
345346 .decode_slice = vaapi_vc1_decode_slice,
347+ .init = ff_vaapi_context_init,
348+ .uninit = ff_vaapi_context_fini,
349+ .priv_data_size = sizeof(FFVAContext),
346350 };
347351 #endif
348352
@@ -354,4 +358,7 @@ AVHWAccel ff_vc1_vaapi_hwaccel = { · 5 unmodified lines
354358 .start_frame = vaapi_vc1_start_frame,
355359 .end_frame = ff_vaapi_mpeg_end_frame,
356360 .decode_slice = vaapi_vc1_decode_slice,
361+ .init = ff_vaapi_context_init,
362+ .uninit = ff_vaapi_context_fini,
363+ .priv_data_size = sizeof(FFVAContext),
357364 };
libavcodec/version.h+5−2
@@ -29,8 +29,8 @@ · 28 unmodified lines
2929 #include "libavutil/version.h"
3030
3131 #define LIBAVCODEC_VERSION_MAJOR 56
32−#define LIBAVCODEC_VERSION_MINOR 57
33−#define LIBAVCODEC_VERSION_MICRO 101
32+#define LIBAVCODEC_VERSION_MINOR 58
33+#define LIBAVCODEC_VERSION_MICRO 100
3434
3535 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
3636 LIBAVCODEC_VERSION_MINOR, \
@@ -181,6 +181,9 @@ · 144 unmodified lines
181181 #ifndef FF_API_AUDIOENC_DELAY
182182 #define FF_API_AUDIOENC_DELAY (LIBAVCODEC_VERSION_MAJOR < 58)
183183 #endif
184+#ifndef FF_API_VAAPI_CONTEXT
185+#define FF_API_VAAPI_CONTEXT (LIBAVCODEC_VERSION_MAJOR < 58)
186+#endif
184187 #ifndef FF_API_AVCTX_TIMEBASE
185188 #define FF_API_AVCTX_TIMEBASE (LIBAVCODEC_VERSION_MAJOR < 59)
186189 #endif

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t