2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
14 #include "./vpx_config.h"
15 #include "./vpx_version.h"
17 #include "vpx/internal/vpx_codec_internal.h"
18 #include "vpx/vp8dx.h"
19 #include "vpx/vpx_decoder.h"
20 #include "vpx_dsp/bitreader_buffer.h"
21 #include "vpx_dsp/vpx_dsp_common.h"
22 #include "vpx_util/vpx_thread.h"
24 #include "vp9/common/vp9_alloccommon.h"
25 #include "vp9/common/vp9_frame_buffers.h"
27 #include "vp9/decoder/vp9_decodeframe.h"
29 #include "vp9/vp9_dx_iface.h"
30 #include "vp9/vp9_iface_common.h"
32 #define VP9_CAP_POSTPROC (CONFIG_VP9_POSTPROC ? VPX_CODEC_CAP_POSTPROC : 0)
34 static vpx_codec_err_t decoder_init(vpx_codec_ctx_t *ctx,
35 vpx_codec_priv_enc_mr_cfg_t *data) {
36 // This function only allocates space for the vpx_codec_alg_priv_t
37 // structure. More memory may be required at the time the stream
38 // information becomes known.
42 vpx_codec_alg_priv_t *const priv =
43 (vpx_codec_alg_priv_t *)vpx_calloc(1, sizeof(*priv));
44 if (priv == NULL) return VPX_CODEC_MEM_ERROR;
46 ctx->priv = (vpx_codec_priv_t *)priv;
47 ctx->priv->init_flags = ctx->init_flags;
48 priv->si.sz = sizeof(priv->si);
50 if (ctx->config.dec) {
51 priv->cfg = *ctx->config.dec;
52 ctx->config.dec = &priv->cfg;
59 static vpx_codec_err_t decoder_destroy(vpx_codec_alg_priv_t *ctx) {
60 if (ctx->pbi != NULL) {
61 vp9_decoder_remove(ctx->pbi);
64 if (ctx->buffer_pool) {
65 vp9_free_ref_frame_buffers(ctx->buffer_pool);
66 vp9_free_internal_frame_buffers(&ctx->buffer_pool->int_frame_buffers);
69 vpx_free(ctx->buffer_pool);
74 static int parse_bitdepth_colorspace_sampling(BITSTREAM_PROFILE profile,
75 struct vpx_read_bit_buffer *rb) {
76 vpx_color_space_t color_space;
77 if (profile >= PROFILE_2) rb->bit_offset += 1; // Bit-depth 10 or 12.
78 color_space = (vpx_color_space_t)vpx_rb_read_literal(rb, 3);
79 if (color_space != VPX_CS_SRGB) {
80 rb->bit_offset += 1; // [16,235] (including xvycc) vs [0,255] range.
81 if (profile == PROFILE_1 || profile == PROFILE_3) {
82 rb->bit_offset += 2; // subsampling x/y.
83 rb->bit_offset += 1; // unused.
86 if (profile == PROFILE_1 || profile == PROFILE_3) {
87 rb->bit_offset += 1; // unused
89 // RGB is only available in version 1.
96 static vpx_codec_err_t decoder_peek_si_internal(
97 const uint8_t *data, unsigned int data_sz, vpx_codec_stream_info_t *si,
98 int *is_intra_only, vpx_decrypt_cb decrypt_cb, void *decrypt_state) {
99 int intra_only_flag = 0;
100 uint8_t clear_buffer[10];
102 if (data + data_sz <= data) return VPX_CODEC_INVALID_PARAM;
108 data_sz = VPXMIN(sizeof(clear_buffer), data_sz);
109 decrypt_cb(decrypt_state, data, clear_buffer, data_sz);
113 // A maximum of 6 bits are needed to read the frame marker, profile and
114 // show_existing_frame.
115 if (data_sz < 1) return VPX_CODEC_UNSUP_BITSTREAM;
120 struct vpx_read_bit_buffer rb = { data, data + data_sz, 0, NULL, NULL };
121 const int frame_marker = vpx_rb_read_literal(&rb, 2);
122 const BITSTREAM_PROFILE profile = vp9_read_profile(&rb);
124 if (frame_marker != VP9_FRAME_MARKER) return VPX_CODEC_UNSUP_BITSTREAM;
126 if (profile >= MAX_PROFILES) return VPX_CODEC_UNSUP_BITSTREAM;
128 if (vpx_rb_read_bit(&rb)) { // show an existing frame
129 // If profile is > 2 and show_existing_frame is true, then at least 1 more
130 // byte (6+3=9 bits) is needed.
131 if (profile > 2 && data_sz < 2) return VPX_CODEC_UNSUP_BITSTREAM;
132 vpx_rb_read_literal(&rb, 3); // Frame buffer to show.
136 // For the rest of the function, a maximum of 9 more bytes are needed
137 // (computed by taking the maximum possible bits needed in each case). Note
138 // that this has to be updated if we read any more bits in this function.
139 if (data_sz < 10) return VPX_CODEC_UNSUP_BITSTREAM;
141 si->is_kf = !vpx_rb_read_bit(&rb);
142 show_frame = vpx_rb_read_bit(&rb);
143 error_resilient = vpx_rb_read_bit(&rb);
146 if (!vp9_read_sync_code(&rb)) return VPX_CODEC_UNSUP_BITSTREAM;
148 if (!parse_bitdepth_colorspace_sampling(profile, &rb))
149 return VPX_CODEC_UNSUP_BITSTREAM;
150 vp9_read_frame_size(&rb, (int *)&si->w, (int *)&si->h);
152 intra_only_flag = show_frame ? 0 : vpx_rb_read_bit(&rb);
154 rb.bit_offset += error_resilient ? 0 : 2; // reset_frame_context
156 if (intra_only_flag) {
157 if (!vp9_read_sync_code(&rb)) return VPX_CODEC_UNSUP_BITSTREAM;
158 if (profile > PROFILE_0) {
159 if (!parse_bitdepth_colorspace_sampling(profile, &rb))
160 return VPX_CODEC_UNSUP_BITSTREAM;
162 rb.bit_offset += REF_FRAMES; // refresh_frame_flags
163 vp9_read_frame_size(&rb, (int *)&si->w, (int *)&si->h);
167 if (is_intra_only != NULL) *is_intra_only = intra_only_flag;
171 static vpx_codec_err_t decoder_peek_si(const uint8_t *data,
172 unsigned int data_sz,
173 vpx_codec_stream_info_t *si) {
174 return decoder_peek_si_internal(data, data_sz, si, NULL, NULL, NULL);
177 static vpx_codec_err_t decoder_get_si(vpx_codec_alg_priv_t *ctx,
178 vpx_codec_stream_info_t *si) {
179 const size_t sz = (si->sz >= sizeof(vp9_stream_info_t))
180 ? sizeof(vp9_stream_info_t)
181 : sizeof(vpx_codec_stream_info_t);
182 memcpy(si, &ctx->si, sz);
183 si->sz = (unsigned int)sz;
188 static void set_error_detail(vpx_codec_alg_priv_t *ctx,
189 const char *const error) {
190 ctx->base.err_detail = error;
193 static vpx_codec_err_t update_error_state(
194 vpx_codec_alg_priv_t *ctx, const struct vpx_internal_error_info *error) {
195 if (error->error_code)
196 set_error_detail(ctx, error->has_detail ? error->detail : NULL);
198 return error->error_code;
201 static void init_buffer_callbacks(vpx_codec_alg_priv_t *ctx) {
202 VP9_COMMON *const cm = &ctx->pbi->common;
203 BufferPool *const pool = cm->buffer_pool;
205 cm->new_fb_idx = INVALID_IDX;
206 cm->byte_alignment = ctx->byte_alignment;
207 cm->skip_loop_filter = ctx->skip_loop_filter;
209 if (ctx->get_ext_fb_cb != NULL && ctx->release_ext_fb_cb != NULL) {
210 pool->get_fb_cb = ctx->get_ext_fb_cb;
211 pool->release_fb_cb = ctx->release_ext_fb_cb;
212 pool->cb_priv = ctx->ext_priv;
214 pool->get_fb_cb = vp9_get_frame_buffer;
215 pool->release_fb_cb = vp9_release_frame_buffer;
217 if (vp9_alloc_internal_frame_buffers(&pool->int_frame_buffers))
218 vpx_internal_error(&cm->error, VPX_CODEC_MEM_ERROR,
219 "Failed to initialize internal frame buffers");
221 pool->cb_priv = &pool->int_frame_buffers;
225 static void set_default_ppflags(vp8_postproc_cfg_t *cfg) {
226 cfg->post_proc_flag = VP8_DEBLOCK | VP8_DEMACROBLOCK;
227 cfg->deblocking_level = 4;
228 cfg->noise_level = 0;
231 static void set_ppflags(const vpx_codec_alg_priv_t *ctx, vp9_ppflags_t *flags) {
232 flags->post_proc_flag = ctx->postproc_cfg.post_proc_flag;
234 flags->deblocking_level = ctx->postproc_cfg.deblocking_level;
235 flags->noise_level = ctx->postproc_cfg.noise_level;
238 static vpx_codec_err_t init_decoder(vpx_codec_alg_priv_t *ctx) {
239 ctx->last_show_frame = -1;
240 ctx->need_resync = 1;
243 ctx->buffer_pool = (BufferPool *)vpx_calloc(1, sizeof(BufferPool));
244 if (ctx->buffer_pool == NULL) return VPX_CODEC_MEM_ERROR;
246 ctx->pbi = vp9_decoder_create(ctx->buffer_pool);
247 if (ctx->pbi == NULL) {
248 set_error_detail(ctx, "Failed to allocate decoder");
249 return VPX_CODEC_MEM_ERROR;
251 ctx->pbi->max_threads = ctx->cfg.threads;
252 ctx->pbi->inv_tile_order = ctx->invert_tile_order;
254 // If postprocessing was enabled by the application and a
255 // configuration has not been provided, default it.
256 if (!ctx->postproc_cfg_set && (ctx->base.init_flags & VPX_CODEC_USE_POSTPROC))
257 set_default_ppflags(&ctx->postproc_cfg);
259 init_buffer_callbacks(ctx);
264 static INLINE void check_resync(vpx_codec_alg_priv_t *const ctx,
265 const VP9Decoder *const pbi) {
266 // Clear resync flag if the decoder got a key frame or intra only frame.
267 if (ctx->need_resync == 1 && pbi->need_resync == 0 &&
268 (pbi->common.intra_only || pbi->common.frame_type == KEY_FRAME))
269 ctx->need_resync = 0;
272 static vpx_codec_err_t decode_one(vpx_codec_alg_priv_t *ctx,
273 const uint8_t **data, unsigned int data_sz,
274 void *user_priv, int64_t deadline) {
277 // Determine the stream parameters. Note that we rely on peek_si to
278 // validate that we have a buffer that does not wrap around the top
281 int is_intra_only = 0;
282 const vpx_codec_err_t res =
283 decoder_peek_si_internal(*data, data_sz, &ctx->si, &is_intra_only,
284 ctx->decrypt_cb, ctx->decrypt_state);
285 if (res != VPX_CODEC_OK) return res;
287 if (!ctx->si.is_kf && !is_intra_only) return VPX_CODEC_ERROR;
290 ctx->user_priv = user_priv;
292 // Set these even if already initialized. The caller may have changed the
293 // decrypt config between frames.
294 ctx->pbi->decrypt_cb = ctx->decrypt_cb;
295 ctx->pbi->decrypt_state = ctx->decrypt_state;
297 if (vp9_receive_compressed_data(ctx->pbi, data_sz, data)) {
298 ctx->pbi->cur_buf->buf.corrupted = 1;
299 ctx->pbi->need_resync = 1;
300 ctx->need_resync = 1;
301 return update_error_state(ctx, &ctx->pbi->common.error);
304 check_resync(ctx, ctx->pbi);
309 static vpx_codec_err_t decoder_decode(vpx_codec_alg_priv_t *ctx,
310 const uint8_t *data, unsigned int data_sz,
311 void *user_priv, long deadline) {
312 const uint8_t *data_start = data;
313 const uint8_t *const data_end = data + data_sz;
315 uint32_t frame_sizes[8];
318 if (data == NULL && data_sz == 0) {
323 // Reset flushed when receiving a valid frame.
326 // Initialize the decoder on the first frame.
327 if (ctx->pbi == NULL) {
328 const vpx_codec_err_t res = init_decoder(ctx);
329 if (res != VPX_CODEC_OK) return res;
332 res = vp9_parse_superframe_index(data, data_sz, frame_sizes, &frame_count,
333 ctx->decrypt_cb, ctx->decrypt_state);
334 if (res != VPX_CODEC_OK) return res;
336 if (ctx->svc_decoding && ctx->svc_spatial_layer < frame_count - 1)
337 frame_count = ctx->svc_spatial_layer + 1;
339 // Decode in serial mode.
340 if (frame_count > 0) {
343 for (i = 0; i < frame_count; ++i) {
344 const uint8_t *data_start_copy = data_start;
345 const uint32_t frame_size = frame_sizes[i];
347 if (data_start < data || frame_size > (uint32_t)(data_end - data_start)) {
348 set_error_detail(ctx, "Invalid frame size in index");
349 return VPX_CODEC_CORRUPT_FRAME;
352 res = decode_one(ctx, &data_start_copy, frame_size, user_priv, deadline);
353 if (res != VPX_CODEC_OK) return res;
355 data_start += frame_size;
358 while (data_start < data_end) {
359 const uint32_t frame_size = (uint32_t)(data_end - data_start);
360 const vpx_codec_err_t res =
361 decode_one(ctx, &data_start, frame_size, user_priv, deadline);
362 if (res != VPX_CODEC_OK) return res;
364 // Account for suboptimal termination by the encoder.
365 while (data_start < data_end) {
366 const uint8_t marker =
367 read_marker(ctx->decrypt_cb, ctx->decrypt_state, data_start);
377 static vpx_image_t *decoder_get_frame(vpx_codec_alg_priv_t *ctx,
378 vpx_codec_iter_t *iter) {
379 vpx_image_t *img = NULL;
381 // iter acts as a flip flop, so an image is only returned on the first
382 // call to get_frame.
383 if (*iter == NULL && ctx->pbi != NULL) {
384 YV12_BUFFER_CONFIG sd;
385 vp9_ppflags_t flags = { 0, 0, 0 };
386 if (ctx->base.init_flags & VPX_CODEC_USE_POSTPROC) set_ppflags(ctx, &flags);
387 if (vp9_get_raw_frame(ctx->pbi, &sd, &flags) == 0) {
388 VP9_COMMON *const cm = &ctx->pbi->common;
389 RefCntBuffer *const frame_bufs = cm->buffer_pool->frame_bufs;
390 ctx->last_show_frame = ctx->pbi->common.new_fb_idx;
391 if (ctx->need_resync) return NULL;
392 yuvconfig2image(&ctx->img, &sd, ctx->user_priv);
393 ctx->img.fb_priv = frame_bufs[cm->new_fb_idx].raw_frame_buffer.priv;
401 static vpx_codec_err_t decoder_set_fb_fn(
402 vpx_codec_alg_priv_t *ctx, vpx_get_frame_buffer_cb_fn_t cb_get,
403 vpx_release_frame_buffer_cb_fn_t cb_release, void *cb_priv) {
404 if (cb_get == NULL || cb_release == NULL) {
405 return VPX_CODEC_INVALID_PARAM;
406 } else if (ctx->pbi == NULL) {
407 // If the decoder has already been initialized, do not accept changes to
408 // the frame buffer functions.
409 ctx->get_ext_fb_cb = cb_get;
410 ctx->release_ext_fb_cb = cb_release;
411 ctx->ext_priv = cb_priv;
415 return VPX_CODEC_ERROR;
418 static vpx_codec_err_t ctrl_set_reference(vpx_codec_alg_priv_t *ctx,
420 vpx_ref_frame_t *const data = va_arg(args, vpx_ref_frame_t *);
423 vpx_ref_frame_t *const frame = (vpx_ref_frame_t *)data;
424 YV12_BUFFER_CONFIG sd;
425 image2yuvconfig(&frame->img, &sd);
426 return vp9_set_reference_dec(
427 &ctx->pbi->common, ref_frame_to_vp9_reframe(frame->frame_type), &sd);
429 return VPX_CODEC_INVALID_PARAM;
433 static vpx_codec_err_t ctrl_copy_reference(vpx_codec_alg_priv_t *ctx,
435 vpx_ref_frame_t *data = va_arg(args, vpx_ref_frame_t *);
438 vpx_ref_frame_t *frame = (vpx_ref_frame_t *)data;
439 YV12_BUFFER_CONFIG sd;
440 image2yuvconfig(&frame->img, &sd);
441 return vp9_copy_reference_dec(ctx->pbi, (VP9_REFFRAME)frame->frame_type,
444 return VPX_CODEC_INVALID_PARAM;
448 static vpx_codec_err_t ctrl_get_reference(vpx_codec_alg_priv_t *ctx,
450 vp9_ref_frame_t *data = va_arg(args, vp9_ref_frame_t *);
453 YV12_BUFFER_CONFIG *fb;
454 fb = get_ref_frame(&ctx->pbi->common, data->idx);
455 if (fb == NULL) return VPX_CODEC_ERROR;
456 yuvconfig2image(&data->img, fb, NULL);
459 return VPX_CODEC_INVALID_PARAM;
463 static vpx_codec_err_t ctrl_set_postproc(vpx_codec_alg_priv_t *ctx,
465 #if CONFIG_VP9_POSTPROC
466 vp8_postproc_cfg_t *data = va_arg(args, vp8_postproc_cfg_t *);
469 ctx->postproc_cfg_set = 1;
470 ctx->postproc_cfg = *((vp8_postproc_cfg_t *)data);
473 return VPX_CODEC_INVALID_PARAM;
478 return VPX_CODEC_INCAPABLE;
482 static vpx_codec_err_t ctrl_get_quantizer(vpx_codec_alg_priv_t *ctx,
484 int *const arg = va_arg(args, int *);
485 if (arg == NULL || ctx->pbi == NULL) return VPX_CODEC_INVALID_PARAM;
486 *arg = ctx->pbi->common.base_qindex;
490 static vpx_codec_err_t ctrl_get_last_ref_updates(vpx_codec_alg_priv_t *ctx,
492 int *const update_info = va_arg(args, int *);
495 if (ctx->pbi != NULL) {
496 *update_info = ctx->pbi->refresh_frame_flags;
499 return VPX_CODEC_ERROR;
503 return VPX_CODEC_INVALID_PARAM;
506 static vpx_codec_err_t ctrl_get_frame_corrupted(vpx_codec_alg_priv_t *ctx,
508 int *corrupted = va_arg(args, int *);
511 if (ctx->pbi != NULL) {
512 RefCntBuffer *const frame_bufs = ctx->pbi->common.buffer_pool->frame_bufs;
513 if (ctx->pbi->common.frame_to_show == NULL) return VPX_CODEC_ERROR;
514 if (ctx->last_show_frame >= 0)
515 *corrupted = frame_bufs[ctx->last_show_frame].buf.corrupted;
518 return VPX_CODEC_ERROR;
522 return VPX_CODEC_INVALID_PARAM;
525 static vpx_codec_err_t ctrl_get_frame_size(vpx_codec_alg_priv_t *ctx,
527 int *const frame_size = va_arg(args, int *);
530 if (ctx->pbi != NULL) {
531 const VP9_COMMON *const cm = &ctx->pbi->common;
532 frame_size[0] = cm->width;
533 frame_size[1] = cm->height;
536 return VPX_CODEC_ERROR;
540 return VPX_CODEC_INVALID_PARAM;
543 static vpx_codec_err_t ctrl_get_render_size(vpx_codec_alg_priv_t *ctx,
545 int *const render_size = va_arg(args, int *);
548 if (ctx->pbi != NULL) {
549 const VP9_COMMON *const cm = &ctx->pbi->common;
550 render_size[0] = cm->render_width;
551 render_size[1] = cm->render_height;
554 return VPX_CODEC_ERROR;
558 return VPX_CODEC_INVALID_PARAM;
561 static vpx_codec_err_t ctrl_get_bit_depth(vpx_codec_alg_priv_t *ctx,
563 unsigned int *const bit_depth = va_arg(args, unsigned int *);
566 if (ctx->pbi != NULL) {
567 const VP9_COMMON *const cm = &ctx->pbi->common;
568 *bit_depth = cm->bit_depth;
571 return VPX_CODEC_ERROR;
575 return VPX_CODEC_INVALID_PARAM;
578 static vpx_codec_err_t ctrl_set_invert_tile_order(vpx_codec_alg_priv_t *ctx,
580 ctx->invert_tile_order = va_arg(args, int);
584 static vpx_codec_err_t ctrl_set_decryptor(vpx_codec_alg_priv_t *ctx,
586 vpx_decrypt_init *init = va_arg(args, vpx_decrypt_init *);
587 ctx->decrypt_cb = init ? init->decrypt_cb : NULL;
588 ctx->decrypt_state = init ? init->decrypt_state : NULL;
592 static vpx_codec_err_t ctrl_set_byte_alignment(vpx_codec_alg_priv_t *ctx,
594 const int legacy_byte_alignment = 0;
595 const int min_byte_alignment = 32;
596 const int max_byte_alignment = 1024;
597 const int byte_alignment = va_arg(args, int);
599 if (byte_alignment != legacy_byte_alignment &&
600 (byte_alignment < min_byte_alignment ||
601 byte_alignment > max_byte_alignment ||
602 (byte_alignment & (byte_alignment - 1)) != 0))
603 return VPX_CODEC_INVALID_PARAM;
605 ctx->byte_alignment = byte_alignment;
606 if (ctx->pbi != NULL) {
607 ctx->pbi->common.byte_alignment = byte_alignment;
612 static vpx_codec_err_t ctrl_set_skip_loop_filter(vpx_codec_alg_priv_t *ctx,
614 ctx->skip_loop_filter = va_arg(args, int);
616 if (ctx->pbi != NULL) {
617 ctx->pbi->common.skip_loop_filter = ctx->skip_loop_filter;
623 static vpx_codec_err_t ctrl_set_spatial_layer_svc(vpx_codec_alg_priv_t *ctx,
625 ctx->svc_decoding = 1;
626 ctx->svc_spatial_layer = va_arg(args, int);
627 if (ctx->svc_spatial_layer < 0)
628 return VPX_CODEC_INVALID_PARAM;
633 static vpx_codec_ctrl_fn_map_t decoder_ctrl_maps[] = {
634 { VP8_COPY_REFERENCE, ctrl_copy_reference },
637 { VP8_SET_REFERENCE, ctrl_set_reference },
638 { VP8_SET_POSTPROC, ctrl_set_postproc },
639 { VP9_INVERT_TILE_DECODE_ORDER, ctrl_set_invert_tile_order },
640 { VPXD_SET_DECRYPTOR, ctrl_set_decryptor },
641 { VP9_SET_BYTE_ALIGNMENT, ctrl_set_byte_alignment },
642 { VP9_SET_SKIP_LOOP_FILTER, ctrl_set_skip_loop_filter },
643 { VP9_DECODE_SVC_SPATIAL_LAYER, ctrl_set_spatial_layer_svc },
646 { VPXD_GET_LAST_QUANTIZER, ctrl_get_quantizer },
647 { VP8D_GET_LAST_REF_UPDATES, ctrl_get_last_ref_updates },
648 { VP8D_GET_FRAME_CORRUPTED, ctrl_get_frame_corrupted },
649 { VP9_GET_REFERENCE, ctrl_get_reference },
650 { VP9D_GET_DISPLAY_SIZE, ctrl_get_render_size },
651 { VP9D_GET_BIT_DEPTH, ctrl_get_bit_depth },
652 { VP9D_GET_FRAME_SIZE, ctrl_get_frame_size },
657 #ifndef VERSION_STRING
658 #define VERSION_STRING
660 CODEC_INTERFACE(vpx_codec_vp9_dx) = {
661 "WebM Project VP9 Decoder" VERSION_STRING,
662 VPX_CODEC_INTERNAL_ABI_VERSION,
663 #if CONFIG_VP9_HIGHBITDEPTH
664 VPX_CODEC_CAP_HIGHBITDEPTH |
666 VPX_CODEC_CAP_DECODER | VP9_CAP_POSTPROC |
667 VPX_CODEC_CAP_EXTERNAL_FRAME_BUFFER, // vpx_codec_caps_t
668 decoder_init, // vpx_codec_init_fn_t
669 decoder_destroy, // vpx_codec_destroy_fn_t
670 decoder_ctrl_maps, // vpx_codec_ctrl_fn_map_t
673 decoder_peek_si, // vpx_codec_peek_si_fn_t
674 decoder_get_si, // vpx_codec_get_si_fn_t
675 decoder_decode, // vpx_codec_decode_fn_t
676 decoder_get_frame, // vpx_codec_frame_get_fn_t
677 decoder_set_fb_fn, // vpx_codec_set_fb_fn_t
682 NULL, // vpx_codec_enc_cfg_map_t
683 NULL, // vpx_codec_encode_fn_t
684 NULL, // vpx_codec_get_cx_data_fn_t
685 NULL, // vpx_codec_enc_config_set_fn_t
686 NULL, // vpx_codec_get_global_headers_fn_t
687 NULL, // vpx_codec_get_preview_frame_fn_t
688 NULL // vpx_codec_enc_mr_get_mem_loc_fn_t