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.
11 #ifndef VP9_DECODER_VP9_DECODER_H_
12 #define VP9_DECODER_VP9_DECODER_H_
14 #include "./vpx_config.h"
16 #include "vpx/vpx_codec.h"
17 #include "vpx_scale/yv12config.h"
19 #include "vp9/common/vp9_onyxc_int.h"
20 #include "vp9/common/vp9_ppflags.h"
22 #include "vp9/decoder/vp9_decoder.h"
23 #include "vp9/decoder/vp9_dthread.h"
24 #include "vp9/decoder/vp9_thread.h"
30 typedef struct VP9DecoderConfig {
38 typedef struct VP9Decoder {
39 DECLARE_ALIGNED(16, MACROBLOCKD, mb);
41 DECLARE_ALIGNED(16, VP9_COMMON, common);
43 VP9DecoderConfig oxcf;
45 int64_t last_time_stamp;
46 int ready_for_new_data;
48 int refresh_frame_flags;
50 int decoded_key_frame;
52 int do_loopfilter_inline; // apply loopfilter to available rows immediately
55 VP9Worker *tile_workers;
58 VP9LfSync lf_row_sync;
61 void vp9_initialize_dec();
63 int vp9_receive_compressed_data(struct VP9Decoder *pbi,
64 size_t size, const uint8_t **dest,
67 int vp9_get_raw_frame(struct VP9Decoder *pbi,
68 YV12_BUFFER_CONFIG *sd,
69 int64_t *time_stamp, int64_t *time_end_stamp,
70 vp9_ppflags_t *flags);
72 vpx_codec_err_t vp9_copy_reference_dec(struct VP9Decoder *pbi,
73 VP9_REFFRAME ref_frame_flag,
74 YV12_BUFFER_CONFIG *sd);
76 vpx_codec_err_t vp9_set_reference_dec(VP9_COMMON *cm,
77 VP9_REFFRAME ref_frame_flag,
78 YV12_BUFFER_CONFIG *sd);
80 int vp9_get_reference_dec(struct VP9Decoder *pbi,
81 int index, YV12_BUFFER_CONFIG **fb);
84 struct VP9Decoder *vp9_decoder_create(const VP9DecoderConfig *oxcf);
86 void vp9_decoder_remove(struct VP9Decoder *pbi);
92 #endif // VP9_DECODER_VP9_DECODER_H_