2 * Copyright (c) 2015 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.
11 #ifndef VP9_VP9_DX_IFACE_H_
12 #define VP9_VP9_DX_IFACE_H_
14 #include "vp9/decoder/vp9_decoder.h"
16 typedef vpx_codec_stream_info_t vp9_stream_info_t;
18 // This limit is due to framebuffer numbers.
19 // TODO(hkuang): Remove this limit after implementing ondemand framebuffers.
20 #define FRAME_CACHE_SIZE 6 // Cache maximum 6 decoded frames.
22 typedef struct cache_frame {
27 struct vpx_codec_alg_priv {
28 vpx_codec_priv_t base;
29 vpx_codec_dec_cfg_t cfg;
32 vp8_postproc_cfg_t postproc_cfg;
33 vpx_decrypt_cb decrypt_cb;
38 int invert_tile_order;
39 int last_show_frame; // Index of last output frame.
43 // Frame parallel related.
44 int frame_parallel_decode; // frame-based threading.
45 VPxWorker *frame_workers;
46 int num_frame_workers;
47 int next_submit_worker_id;
48 int last_submit_worker_id;
49 int next_output_worker_id;
50 int available_threads;
51 cache_frame frame_cache[FRAME_CACHE_SIZE];
52 int frame_cache_write;
55 int need_resync; // wait for key/intra-only frame
56 // BufferPool that holds all reference frames. Shared by all the FrameWorkers.
57 BufferPool *buffer_pool;
59 // External frame buffer info to save for VP9 common.
60 void *ext_priv; // Private data associated with the external frame buffers.
61 vpx_get_frame_buffer_cb_fn_t get_ext_fb_cb;
62 vpx_release_frame_buffer_cb_fn_t release_ext_fb_cb;
65 #endif // VP9_VP9_DX_IFACE_H_