Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (c) 2016 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 | /* The purpose of this header is to provide compile time pluggable bit reader |
| 12 | * implementations with a common interface. */ |
| 13 | |
| 14 | #ifndef VPX10_DECODER_BITREADER_H_ |
| 15 | #define VPX10_DECODER_BITREADER_H_ |
| 16 | |
| 17 | #include "./vpx_config.h" |
| 18 | |
| 19 | #if CONFIG_ANS |
| 20 | #include "av1/common/ans.h" |
| 21 | #include "aom/vp8dx.h" // for vp10_decrypt_cb |
| 22 | #define vp10_reader struct AnsDecoder |
| 23 | #define vp10_reader_has_error ans_reader_has_error |
| 24 | #define vp10_read uabs_read |
| 25 | #define vp10_read_bit uabs_read_bit |
| 26 | #define vp10_read_literal uabs_read_literal |
| 27 | #define vp10_read_tree uabs_read_tree |
| 28 | #else |
| 29 | #include "aom_dsp/bitreader.h" |
| 30 | #define vp10_reader vpx_reader |
| 31 | #define vp10_reader_has_error vpx_reader_has_error |
| 32 | #define vp10_read vpx_read |
| 33 | #define vp10_read_bit vpx_read_bit |
| 34 | #define vp10_read_literal vpx_read_literal |
| 35 | #define vp10_read_tree vpx_read_tree |
| 36 | #endif |
| 37 | |
| 38 | #endif // VPX10_DECODER_BITREADER_H_ |