blob: 4d77664cc77b59b654982a634f3a65a65ab1ff6b [file] [log] [blame]
Yaowu Xuc27fc142016-08-22 16:08:15 -07001/*
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 Xuf883b422016-08-30 14:01:10 -070014#ifndef AOM10_DECODER_BITREADER_H_
15#define AOM10_DECODER_BITREADER_H_
Yaowu Xuc27fc142016-08-22 16:08:15 -070016
Yaowu Xuf883b422016-08-30 14:01:10 -070017#include "./aom_config.h"
Yaowu Xuc27fc142016-08-22 16:08:15 -070018
19#if CONFIG_ANS
Alex Converse1ac1ae72016-09-17 15:11:16 -070020#include "aom_dsp/ans.h"
Yaowu Xuf883b422016-08-30 14:01:10 -070021#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 Xuc27fc142016-08-22 16:08:15 -070028#else
29#include "aom_dsp/bitreader.h"
Yaowu Xuf883b422016-08-30 14:01:10 -070030#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 Xuc27fc142016-08-22 16:08:15 -070036#endif
37
Yaowu Xuf883b422016-08-30 14:01:10 -070038#endif // AOM10_DECODER_BITREADER_H_