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 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 14 | #ifndef AOM10_DECODER_BITREADER_H_ |
| 15 | #define AOM10_DECODER_BITREADER_H_ |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 16 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 17 | #include "./aom_config.h" |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 18 | |
| 19 | #if CONFIG_ANS |
Alex Converse | 1ac1ae7 | 2016-09-17 15:11:16 -0700 | [diff] [blame] | 20 | #include "aom_dsp/ans.h" |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 21 | #include "aom/aomdx.h" // for av1_decrypt_cb |
| 22 | #define aom_reader struct AnsDecoder |
| 23 | #define aom_reader_has_error ans_reader_has_error |
| 24 | #define aom_read uabs_read |
| 25 | #define aom_read_bit uabs_read_bit |
| 26 | #define aom_read_literal uabs_read_literal |
| 27 | #define aom_read_tree uabs_read_tree |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 28 | #else |
| 29 | #include "aom_dsp/bitreader.h" |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 30 | #define aom_reader aom_reader |
| 31 | #define aom_reader_has_error aom_reader_has_error |
| 32 | #define aom_read aom_read |
| 33 | #define aom_read_bit aom_read_bit |
| 34 | #define aom_read_literal aom_read_literal |
| 35 | #define aom_read_tree aom_read_tree |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 36 | #endif |
| 37 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 38 | #endif // AOM10_DECODER_BITREADER_H_ |