blob: f53a13201de00d2055721dbdfaff4876da30da2f [file] [log] [blame]
Alex Converse65bea982016-03-21 14:23:55 -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 writer
12 * implementations with a common interface. */
13
14#ifndef VPX10_ENCODER_BITWRITER_H_
15#define VPX10_ENCODER_BITWRITER_H_
16
17#include "./vpx_config.h"
18#include "vpx_dsp/prob.h"
19
20#if CONFIG_ANS
21typedef struct BufAnsCoder BufAnsCoder;
22#include "vp10/encoder/buf_ans.h"
23#define vp10_writer BufAnsCoder
24#define vp10_write buf_uabs_write
25#define vp10_write_bit buf_uabs_write_bit
26#define vp10_write_literal buf_uabs_write_literal
27#else
28#include "vpx_dsp/bitwriter.h"
29#define vp10_writer vpx_writer
30#define vp10_write vpx_write
31#define vp10_write_bit vpx_write_bit
32#define vp10_write_literal vpx_write_literal
33#endif
34
35#endif // VPX10_ENCODER_BITWRITER_H_