| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 #ifndef VP9_DECODER_VP9_DECODER_H_ | 11 #ifndef VP9_DECODER_VP9_DECODER_H_ |
| 12 #define VP9_DECODER_VP9_DECODER_H_ | 12 #define VP9_DECODER_VP9_DECODER_H_ |
| 13 | 13 |
| 14 #include "./vpx_config.h" | 14 #include "./vpx_config.h" |
| 15 | 15 |
| 16 #include "vpx/vpx_codec.h" | 16 #include "vpx/vpx_codec.h" |
| 17 #include "vpx_scale/yv12config.h" | 17 #include "vpx_scale/yv12config.h" |
| 18 | 18 |
| 19 #include "vp9/common/vp9_onyxc_int.h" | 19 #include "vp9/common/vp9_onyxc_int.h" |
| 20 #include "vp9/common/vp9_ppflags.h" | 20 #include "vp9/common/vp9_ppflags.h" |
| 21 | 21 |
| 22 #include "vp9/decoder/vp9_decoder.h" | 22 #include "vp9/decoder/vp9_decoder.h" |
| 23 #include "vp9/decoder/vp9_dthread.h" | 23 #include "vp9/decoder/vp9_dthread.h" |
| 24 #include "vp9/decoder/vp9_thread.h" | 24 #include "vp9/decoder/vp9_thread.h" |
| 25 | 25 |
| 26 #ifdef __cplusplus | 26 #ifdef __cplusplus |
| 27 extern "C" { | 27 extern "C" { |
| 28 #endif | 28 #endif |
| 29 | 29 |
| 30 typedef struct VP9DecoderConfig { | |
| 31 int width; | |
| 32 int height; | |
| 33 int version; | |
| 34 int max_threads; | |
| 35 int inv_tile_order; | |
| 36 } VP9DecoderConfig; | |
| 37 | |
| 38 typedef struct VP9Decoder { | 30 typedef struct VP9Decoder { |
| 39 DECLARE_ALIGNED(16, MACROBLOCKD, mb); | 31 DECLARE_ALIGNED(16, MACROBLOCKD, mb); |
| 40 | 32 |
| 41 DECLARE_ALIGNED(16, VP9_COMMON, common); | 33 DECLARE_ALIGNED(16, VP9_COMMON, common); |
| 42 | 34 |
| 43 VP9DecoderConfig oxcf; | |
| 44 | |
| 45 int64_t last_time_stamp; | 35 int64_t last_time_stamp; |
| 46 int ready_for_new_data; | 36 int ready_for_new_data; |
| 47 | 37 |
| 48 int refresh_frame_flags; | 38 int refresh_frame_flags; |
| 49 | 39 |
| 50 int decoded_key_frame; | 40 int decoded_key_frame; |
| 51 | 41 |
| 52 int do_loopfilter_inline; // apply loopfilter to available rows immediately | |
| 53 VP9Worker lf_worker; | 42 VP9Worker lf_worker; |
| 54 | 43 |
| 55 VP9Worker *tile_workers; | 44 VP9Worker *tile_workers; |
| 56 int num_tile_workers; | 45 int num_tile_workers; |
| 57 | 46 |
| 58 VP9LfSync lf_row_sync; | 47 VP9LfSync lf_row_sync; |
| 59 | 48 |
| 60 vpx_decrypt_cb decrypt_cb; | 49 vpx_decrypt_cb decrypt_cb; |
| 61 void *decrypt_state; | 50 void *decrypt_state; |
| 51 |
| 52 int max_threads; |
| 53 int inv_tile_order; |
| 62 } VP9Decoder; | 54 } VP9Decoder; |
| 63 | 55 |
| 64 void vp9_initialize_dec(); | 56 void vp9_initialize_dec(); |
| 65 | 57 |
| 66 int vp9_receive_compressed_data(struct VP9Decoder *pbi, | 58 int vp9_receive_compressed_data(struct VP9Decoder *pbi, |
| 67 size_t size, const uint8_t **dest, | 59 size_t size, const uint8_t **dest, |
| 68 int64_t time_stamp); | 60 int64_t time_stamp); |
| 69 | 61 |
| 70 int vp9_get_raw_frame(struct VP9Decoder *pbi, | 62 int vp9_get_raw_frame(struct VP9Decoder *pbi, |
| 71 YV12_BUFFER_CONFIG *sd, | 63 YV12_BUFFER_CONFIG *sd, |
| 72 int64_t *time_stamp, int64_t *time_end_stamp, | 64 int64_t *time_stamp, int64_t *time_end_stamp, |
| 73 vp9_ppflags_t *flags); | 65 vp9_ppflags_t *flags); |
| 74 | 66 |
| 75 vpx_codec_err_t vp9_copy_reference_dec(struct VP9Decoder *pbi, | 67 vpx_codec_err_t vp9_copy_reference_dec(struct VP9Decoder *pbi, |
| 76 VP9_REFFRAME ref_frame_flag, | 68 VP9_REFFRAME ref_frame_flag, |
| 77 YV12_BUFFER_CONFIG *sd); | 69 YV12_BUFFER_CONFIG *sd); |
| 78 | 70 |
| 79 vpx_codec_err_t vp9_set_reference_dec(VP9_COMMON *cm, | 71 vpx_codec_err_t vp9_set_reference_dec(VP9_COMMON *cm, |
| 80 VP9_REFFRAME ref_frame_flag, | 72 VP9_REFFRAME ref_frame_flag, |
| 81 YV12_BUFFER_CONFIG *sd); | 73 YV12_BUFFER_CONFIG *sd); |
| 82 | 74 |
| 83 int vp9_get_reference_dec(struct VP9Decoder *pbi, | 75 int vp9_get_reference_dec(struct VP9Decoder *pbi, |
| 84 int index, YV12_BUFFER_CONFIG **fb); | 76 int index, YV12_BUFFER_CONFIG **fb); |
| 85 | 77 |
| 86 | 78 struct VP9Decoder *vp9_decoder_create(); |
| 87 struct VP9Decoder *vp9_decoder_create(const VP9DecoderConfig *oxcf); | |
| 88 | 79 |
| 89 void vp9_decoder_remove(struct VP9Decoder *pbi); | 80 void vp9_decoder_remove(struct VP9Decoder *pbi); |
| 90 | 81 |
| 91 #ifdef __cplusplus | 82 #ifdef __cplusplus |
| 92 } // extern "C" | 83 } // extern "C" |
| 93 #endif | 84 #endif |
| 94 | 85 |
| 95 #endif // VP9_DECODER_VP9_DECODER_H_ | 86 #endif // VP9_DECODER_VP9_DECODER_H_ |
| OLD | NEW |