Upstream version 7.35.144.0
[platform/framework/web/crosswalk.git] / src / third_party / libvpx / source / libvpx / vp9 / decoder / vp9_onyxd.h
1 /*
2  *  Copyright (c) 2010 The WebM project authors. All Rights Reserved.
3  *
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.
9  */
10
11 #ifndef VP9_DECODER_VP9_ONYXD_H_
12 #define VP9_DECODER_VP9_ONYXD_H_
13
14 #include "vpx_scale/yv12config.h"
15 #include "vp9/common/vp9_ppflags.h"
16 #include "vpx/vpx_codec.h"
17
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21
22 struct VP9Decompressor;
23
24 typedef struct {
25   int width;
26   int height;
27   int version;
28   int postprocess;
29   int max_threads;
30   int inv_tile_order;
31   int input_partition;
32 } VP9D_CONFIG;
33
34 typedef enum {
35   VP9_LAST_FLAG = 1,
36   VP9_GOLD_FLAG = 2,
37   VP9_ALT_FLAG = 4
38 } VP9_REFFRAME;
39
40 void vp9_initialize_dec();
41
42 int vp9_receive_compressed_data(struct VP9Decompressor *pbi,
43                                 size_t size, const uint8_t **dest,
44                                 int64_t time_stamp);
45
46 int vp9_get_raw_frame(struct VP9Decompressor *pbi,
47                       YV12_BUFFER_CONFIG *sd,
48                       int64_t *time_stamp, int64_t *time_end_stamp,
49                       vp9_ppflags_t *flags);
50
51 vpx_codec_err_t vp9_copy_reference_dec(struct VP9Decompressor *pbi,
52                                        VP9_REFFRAME ref_frame_flag,
53                                        YV12_BUFFER_CONFIG *sd);
54
55 vpx_codec_err_t vp9_set_reference_dec(struct VP9Decompressor *pbi,
56                                       VP9_REFFRAME ref_frame_flag,
57                                       YV12_BUFFER_CONFIG *sd);
58
59 int vp9_get_reference_dec(struct VP9Decompressor *pbi,
60                           int index, YV12_BUFFER_CONFIG **fb);
61
62
63 struct VP9Decompressor *vp9_create_decompressor(VP9D_CONFIG *oxcf);
64
65 void vp9_remove_decompressor(struct VP9Decompressor *pbi);
66
67 #ifdef __cplusplus
68 }  // extern "C"
69 #endif
70
71 #endif  // VP9_DECODER_VP9_ONYXD_H_